Go to the documentation of this file.
38 #ifndef RAGTIME_SPREADSHEET
39 # define RAGTIME_SPREADSHEET
142 bool readFormulaV2(
MWAWVec2i const &cellPos, std::vector<MWAWCellContent::FormulaInstruction> &formula,
long endPos, std::string &extra);
144 bool readFormula(
MWAWVec2i const &cellPos, std::vector<MWAWCellContent::FormulaInstruction> &formula,
long endPos, std::string &extra);
164 std::shared_ptr<RagTimeSpreadsheetInternal::State>
m_state;
Definition: MWAWCell.hxx:383
bool readCellInFormula(MWAWVec2i const &pos, bool canBeList, MWAWCellContent::FormulaInstruction &instr, long endPos, std::string &extra)
try to read a cell in a formula
Definition: RagTimeSpreadsheet.cxx:2618
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
Type
the different resource type which can be stored as list
Definition: RagTimeStruct.hxx:59
std::map< int, std::shared_ptr< Spreadsheet > > m_idSpreadsheetMap
map id -> spreadsheet
Definition: RagTimeSpreadsheet.cxx:423
bool readSpreadsheetCellV2(RagTimeSpreadsheetInternal::Cell &cell, long endPos)
try to read a cell :v2
Definition: RagTimeSpreadsheet.cxx:2046
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
MWAWParserStatePtr m_parserState
the parser state
Definition: RagTimeSpreadsheet.hxx:161
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
Cell & operator=(Cell const &)=default
std::map< MWAWVec2i, Cell, MWAWVec2i::PosSizeLtY > Map
a map a cell sorted by row
Definition: RagTimeSpreadsheet.cxx:299
bool hasBorders() const
returns true if the cell has some border
Definition: RagTimeSpreadsheet.cxx:135
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:474
bool read(MWAWInputStreamPtr input, MWAWEntry &entry)
try to read the header block
Definition: RagTimeStruct.cxx:42
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:840
std::vector< int > m_intList
a list of unknown counter
Definition: RagTimeSpreadsheet.cxx:219
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:443
Definition: MWAWCell.hxx:56
bool isEmpty() const
returns true if the border is empty
Definition: libmwaw_internal.hxx:356
MWAWEntry m_textEntry
the text entry if the cell is a zone of text zone
Definition: RagTimeSpreadsheet.cxx:260
bool readSpreadsheetZone9(MWAWEntry const &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read a the last spreadsheet zone
Definition: RagTimeSpreadsheet.cxx:1641
int m_rotation
the content's rotation angle
Definition: RagTimeSpreadsheet.cxx:262
bool readBlockHeader(MWAWEntry const &entry, RagTimeSpreadsheetInternal::ComplexBlock &block)
try to read a complex bock header
Definition: RagTimeSpreadsheet.cxx:1093
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:186
Definition: MWAWCell.hxx:58
bool readNumericFormat(MWAWEntry &entry)
try to read the numeric/date format table zone: FoTa
Definition: RagTimeSpreadsheet.cxx:461
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:278
~Cell() final
destructor
Definition: RagTimeSpreadsheet.cxx:265
Internal: the state of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:391
static std::string getName(Type type)
returns a string corresponding to a type
Definition: RagTimeStruct.hxx:75
Definition: MWAWCell.hxx:383
MWAWVec2i getRightBottomPosition() const
returns the spreadsheet dimension
Definition: RagTimeSpreadsheet.cxx:353
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
int getNewZoneId()
returns a new unique zone id
Definition: RagTimeParser.cxx:451
Definition: MWAWFont.hxx:190
Definition: MWAWCell.hxx:58
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:449
std::string m_extra
extra data
Definition: RagTimeSpreadsheet.cxx:154
bool getCharStyle(int charId, MWAWFont &font) const
returns font style corresponding to a char style id
Definition: RagTimeParser.cxx:421
int m_columns
the number of col
Definition: RagTimeSpreadsheet.cxx:368
float getRowHeight(int row) const
returns the row size in point
Definition: RagTimeSpreadsheet.cxx:316
Definition: libmwaw_internal.hxx:178
Definition: MWAWCell.hxx:56
float m_heightDefault
the default row height
Definition: RagTimeSpreadsheet.cxx:374
static bool date2Double(int Y, int M, int D, double &val)
conversion beetween date and double days since 1900 date
Definition: MWAWCell.cxx:555
small class use to define a formula instruction
Definition: MWAWCell.hxx:382
int id() const
returns the id
Definition: MWAWEntry.hxx:163
Definition: RagTimeStruct.hxx:59
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
Internal: date/time format of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:63
Definition: RagTimeStruct.hxx:59
MWAWCellContent m_content
the cell content
Definition: RagTimeSpreadsheet.cxx:258
int m_version
the file version
Definition: RagTimeSpreadsheet.cxx:407
Definition: MWAWCell.hxx:58
bool readRsrcSpDI(MWAWEntry &entry)
try to read the SpDI zone (a spreadsheet zone zone with id=0)
Definition: RagTimeSpreadsheet.cxx:976
bool send(int zId, MWAWPosition const &pos)
send a spreadsheet corresponding to zId
Definition: RagTimeSpreadsheet.cxx:2567
Definition: MWAWCell.hxx:383
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:239
Definition: MWAWFont.hxx:49
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
Spreadsheet()
constructor
Definition: RagTimeSpreadsheet.cxx:301
Definition: MWAWCell.hxx:58
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:319
Definition: RagTimeStruct.hxx:59
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:125
Internal: a spreadsheet's zone of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:297
float m_widthDefault
the default column width
Definition: RagTimeSpreadsheet.cxx:370
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
std::vector< CellFormat > m_cellFormatList
a list SpVaId -> cellFormat
Definition: RagTimeSpreadsheet.cxx:415
int getZoneDataFieldSize(int zId) const
returns the size of a zone data field
Definition: RagTimeParser.cxx:442
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:255
const MWAWVec2f & size() const
returns the frame size
Definition: MWAWPosition.hxx:134
const std::string & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:136
bool m_isSent
true if the sheet is sent to the listener
Definition: RagTimeSpreadsheet.cxx:386
a structure used to store list in a resource fork
Definition: RagTimeStruct.hxx:57
std::vector< DateTime > m_dateTimeList
a list dateTimeFormatId -> dateTimeFormat;
Definition: RagTimeSpreadsheet.cxx:411
bool m_isDate
true if this is a date field
Definition: RagTimeSpreadsheet.cxx:79
Definition: RagTimeStruct.hxx:59
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
Definition: MWAWFont.hxx:190
bool readFormula(MWAWVec2i const &cellPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, long endPos, std::string &extra)
try to read a formula: v3...
Definition: RagTimeSpreadsheet.cxx:2949
bool readSpreadsheetCellDimension(MWAWVec2i const &cellPos, long endPos, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read a spreadsheet cells dimension
Definition: RagTimeSpreadsheet.cxx:1355
the main class to read a RagTime v2-3 file
Definition: RagTimeParser.hxx:60
bool readPositionsList(MWAWEntry const &entry, std::vector< long > &posList, long &lastDataPos)
try to read a list of position
Definition: RagTimeSpreadsheet.cxx:1174
Definition: RagTimeStruct.hxx:59
std::vector< Zone > m_zones
the list of zone
Definition: RagTimeSpreadsheet.cxx:217
const Format & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:234
int m_rows
the number of row
Definition: RagTimeSpreadsheet.cxx:366
DateTime()
constructor
Definition: RagTimeSpreadsheet.cxx:65
long m_cellsBegin
the positions of the cells in the file
Definition: RagTimeSpreadsheet.cxx:378
Definition: MWAWCell.hxx:383
int version() const
returns the file version
Definition: RagTimeSpreadsheet.cxx:441
Definition: RagTimeStruct.hxx:59
const MWAWVec2i & position() const
position accessor
Definition: MWAWCell.hxx:181
Zone()
constructor
Definition: RagTimeSpreadsheet.cxx:195
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
Internal: a cell of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:223
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:267
int getFontId(int localId) const
returns a mac font id corresponding to a local id
Definition: RagTimeParser.cxx:416
RagTimeSpreadsheet(RagTimeParser &parser)
constructor
Definition: RagTimeSpreadsheet.cxx:431
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:476
float getRowHeight(int row, int &numRepeated) const
returns the height of a row in point and updated repeated row
Definition: RagTimeSpreadsheet.cxx:323
std::shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:561
Definition: MWAWFont.hxx:191
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:131
bool readSpreadsheetComplexStructure(MWAWEntry const &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read a complex structured spreadsheet zone
Definition: RagTimeSpreadsheet.cxx:1768
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: MWAWSpreadsheetListener.hxx:65
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:76
Type m_type
the type
Definition: MWAWCell.hxx:401
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:47
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:66
RagTimeSpreadsheet & operator=(RagTimeSpreadsheet const &orig)=delete
the main class to read the spreadsheet part of ragTime file
Definition: RagTimeSpreadsheet.hxx:71
std::vector< std::string > m_cellDEList
a list SpDEId -> unknown data
Definition: RagTimeSpreadsheet.cxx:421
Internal: the structures of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:59
double m_value
the cell value
Definition: MWAWCell.hxx:470
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:92
MWAWBorder m_borders[2]
the top and left border
Definition: RagTimeSpreadsheet.cxx:152
RagTimeParser * m_mainParser
the main parser;
Definition: RagTimeSpreadsheet.hxx:167
Definition: libmwaw_internal.hxx:178
small class use to define a sheet cell content
Definition: MWAWCell.hxx:378
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:82
std::vector< long > m_rowPositionsList
the positions of row in the file
Definition: RagTimeSpreadsheet.cxx:382
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:71
bool getDateTimeFormat(int dtId, std::string &dtFormat) const
returns the ith date format or ""
Definition: RagTimeSpreadsheet.cxx:451
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1191
friend std::ostream & operator<<(std::ostream &o, CellBorder const &border)
operator<<
Definition: RagTimeSpreadsheet.cxx:142
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool readSpreadsheet(MWAWEntry &entry)
try to read a spreadsheet zone: v3-...
Definition: RagTimeSpreadsheet.cxx:1232
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:168
Definition: MWAWPosition.hxx:51
Definition: RagTimeStruct.hxx:59
State()
constructor
Definition: RagTimeSpreadsheet.cxx:393
CellBorder()
constructor
Definition: RagTimeSpreadsheet.cxx:130
Definition: MWAWCell.hxx:419
a small zone of a ComplexBlock
Definition: RagTimeSpreadsheet.cxx:193
bool validateFormula()
test if we can use or not the formula
Definition: RagTimeSpreadsheet.cxx:238
Definition: MWAWCell.hxx:383
bool readFormulaV2(MWAWVec2i const &cellPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, long endPos, std::string &extra)
try to read a formula
Definition: RagTimeSpreadsheet.cxx:3138
Definition: RagTimeStruct.hxx:59
bool sendText(int zId, MWAWListenerPtr listener)
try to send the text zone (interface of RagTimeText)
Definition: RagTimeParser.cxx:466
Definition: MWAWCell.hxx:383
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
Definition: MWAWCell.hxx:56
std::vector< MWAWFont > m_cellFontList
a list SpTe -> font
Definition: RagTimeSpreadsheet.cxx:413
bool readSpreadsheetCellsV2(MWAWEntry &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read spreadsheet cells :v2
Definition: RagTimeSpreadsheet.cxx:1982
friend std::ostream & operator<<(std::ostream &o, DateTime const &dt)
operator<<
Definition: RagTimeSpreadsheet.cxx:71
Definition: MWAWCell.hxx:56
ComplexBlock()
constructor
Definition: RagTimeSpreadsheet.cxx:187
Definition: libmwaw_internal.hxx:178
std::vector< MWAWCell::Format > m_numericFormatList
a list of numeric format
Definition: RagTimeSpreadsheet.cxx:409
bool getColor(int colId, MWAWColor &color, int listId=-1) const
returns the ith color ( if possible)
Definition: RagTimeParser.cxx:426
std::vector< float > m_widthCols
the column size in points
Definition: RagTimeSpreadsheet.cxx:372
Definition: MWAWFont.hxx:190
Definition: MWAWCell.hxx:58
Cell(MWAWVec2i pos=MWAWVec2i(0, 0))
constructor
Definition: RagTimeSpreadsheet.cxx:225
void update(Cell &cell) const
update the cell border if need
Definition: RagTimeSpreadsheet.cxx:285
std::vector< float > getColumnsWidth() const
returns the columns dimension in point
Definition: RagTimeSpreadsheet.cxx:340
Definition: MWAWCell.hxx:419
Definition: RagTimeStruct.hxx:59
int m_data[3]
three unknown int
Definition: RagTimeSpreadsheet.cxx:214
std::string m_sheet
the sheet name (if not empty)
Definition: MWAWCell.hxx:413
bool readRsrcSpDo(MWAWEntry &entry)
try to read the SpDo zone (a spreadsheet zone with id=0)
Definition: RagTimeSpreadsheet.cxx:1033
Definition: MWAWCell.hxx:383
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:555
HorizontalAlignment
the default horizontal alignment.
Definition: MWAWCell.hxx:127
Definition: libmwaw_internal.hxx:178
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:409
main class used to define store librevenge::RVNGSpreadsheetInterface lists of command in a librevenge...
Definition: MWAWSpreadsheetEncoder.hxx:55
bool readSpreadsheetCellFormat(MWAWVec2i const &cellPos, long endPos, RagTimeSpreadsheetInternal::Cell &cell)
try to read a spreadsheet cell's format
Definition: RagTimeSpreadsheet.cxx:1551
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:379
bool readResource(MWAWEntry &entry)
try to read a SpXX resource
Definition: RagTimeSpreadsheet.cxx:705
virtual ~RagTimeSpreadsheet()
destructor
Definition: RagTimeSpreadsheet.cxx:438
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:98
std::string m_extra
extra data ( if needed)
Definition: libmwaw_internal.hxx:395
std::string m_DTFormat
the date time format
Definition: RagTimeSpreadsheet.cxx:81
std::vector< CellBorder > m_cellBorderList
a list SpBoId -> cellBorder
Definition: RagTimeSpreadsheet.cxx:417
bool readCellInFormulaV2(MWAWVec2i const &pos, bool canBeList, MWAWCellContent::FormulaInstruction &instr, long endPos, std::string &extra)
try to read a cell in a formula
Definition: RagTimeSpreadsheet.cxx:2827
Map m_cellsMap
the map cell position to not empty cells
Definition: RagTimeSpreadsheet.cxx:380
bool readSpreadsheetSimpleStructure(MWAWEntry const &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read a simple structured spreadsheet zone
Definition: RagTimeSpreadsheet.cxx:1688
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
std::shared_ptr< RagTimeSpreadsheetInternal::State > m_state
the state
Definition: RagTimeSpreadsheet.hxx:164
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
std::string m_name
the sheet name
Definition: RagTimeSpreadsheet.cxx:384
MWAWVec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:411
long m_pos
the zone position
Definition: RagTimeSpreadsheet.cxx:212
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:551
Internal: header of a complex block of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:185
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:269
Definition: RagTimeStruct.hxx:59
bool readSpreadsheetExtraV2(MWAWEntry &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read spreadsheet end zone (positions, ...) :v2
Definition: RagTimeSpreadsheet.cxx:2399
Definition: MWAWCell.hxx:127
Definition: RagTimeStruct.hxx:59
std::vector< float > m_heightRows
the row height in points
Definition: RagTimeSpreadsheet.cxx:376
bool readTextZone(MWAWEntry &entry, int width, MWAWColor const &fontColor=MWAWColor::black())
try to read a text zone (knowing the zone width in point and the font color)
Definition: RagTimeParser.cxx:456
Class to store font.
Definition: MWAWFont.hxx:43
bool readSpreadsheetV2(MWAWEntry &entry)
try to read spreadsheet zone ( a big zone):v2
Definition: RagTimeSpreadsheet.cxx:1919
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:468
bool readSpreadsheetCellContent(RagTimeSpreadsheetInternal::Cell &cell, long endPos)
try to read a spreadsheet cells content
Definition: RagTimeSpreadsheet.cxx:1421
Definition: MWAWCell.hxx:419
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:393
Definition: MWAWCell.hxx:127
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:836
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
Internal: cell border of a RagTimeSpreadsheet (SpVa block)
Definition: RagTimeSpreadsheet.cxx:128
Definition: MWAWCell.hxx:127
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
std::vector< CellExtra > m_cellExtraList
a list SpCeId -> cellExtra
Definition: RagTimeSpreadsheet.cxx:419
Definition: MWAWCell.hxx:56
friend std::ostream & operator<<(std::ostream &o, Zone const &z)
operator<<
Definition: RagTimeSpreadsheet.cxx:201
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:250
void flushExtra()
flush extra data
Definition: RagTimeSpreadsheet.cxx:2592
Generated on Wed Jul 24 2024 03:55:51 for libmwaw by
doxygen 1.8.16