157 void addTo(librevenge::RVNGPropertyList &propList, std::shared_ptr<MWAWFontConverter> fontConverter)
const;
297 std::vector<MWAWBorder>
const &
borders()
const 380 enum Type { F_Operator, F_Function, F_Cell, F_CellList, F_Long, F_Double, F_Text };
390 for (
auto &rel : m_positionRelative) rel=
MWAWVec2b(
false,
false);
393 librevenge::RVNGPropertyList getPropertyList(
MWAWFontConverter &fontConverter,
int fontId)
const;
413 enum Type { C_NONE, C_TEXT, C_NUMBER, C_FORMULA, C_UNKNOWN };
416 : m_contentType(C_UNKNOWN)
429 if (m_contentType == C_NUMBER)
return false;
430 if (m_contentType == C_TEXT && m_textEntry.valid())
return false;
431 if (m_contentType == C_FORMULA && (m_formula.size() || isValueSet()))
return false;
448 return m_textEntry.valid();
452 static bool double2Date(
double val,
int &Y,
int &M,
int &D);
454 static bool double2Time(
double val,
int &H,
int &M,
int &S);
456 static bool double2String(
double val,
MWAWCell::Format const &format, std::string &str);
458 static bool date2Double(
int Y,
int M,
int D,
double &val);
small class use to define a formula instruction
Definition: MWAWCell.hxx:379
static std::string getBasicCellName(MWAWVec2i const &pos)
return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2...
Definition: MWAWCell.cxx:342
double m_doubleValue
value ( if type==F_Double )
Definition: MWAWCell.hxx:403
Type
the different types of cell's field
Definition: MWAWCell.hxx:413
MWAWVec2i m_position
the cell row and column : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:343
MWAWFont m_font
the cell font
Definition: MWAWCell.hxx:354
MWAWBorder m_extraLineType
extra line type
Definition: MWAWCell.hxx:371
MWAWBorder const & extraLineType() const
returns the extra line border
Definition: MWAWCell.hxx:331
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:236
HorizontalAlignment hAlignment() const
returns the horizontal alignment
Definition: MWAWCell.hxx:270
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:252
virtual bool sendContent(MWAWListenerPtr listener, MWAWTable &table)
function called when the content of a cell must be send to the listener, ie.
Definition: MWAWCell.cxx:496
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:231
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:316
Definition: MWAWCell.hxx:56
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:427
MWAWCell()
constructor
Definition: MWAWCell.hxx:137
bool isEmpty() const
returns true if the border is empty
Definition: libmwaw_internal.hxx:356
Definition: MWAWCell.hxx:58
Definition: MWAWCell.hxx:56
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:549
MWAWCellContent()
constructor
Definition: MWAWCell.hxx:415
Definition: MWAWCell.hxx:58
Definition: MWAWCell.hxx:56
Definition: MWAWCell.hxx:58
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:264
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:292
Definition: MWAWCell.hxx:131
std::vector< MWAWBorder > m_bordersList
the cell border MWAWBorder::Pos
Definition: MWAWCell.hxx:367
virtual bool send(MWAWListenerPtr listener, MWAWTable &table)
function called when a cell is send by MWAWTable to send a cell to a listener.
Definition: MWAWCell.cxx:487
VerticalAlignment m_vAlign
the vertical cell alignment : by default nothing
Definition: MWAWCell.hxx:360
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:466
Type m_type
the type
Definition: MWAWCell.hxx:397
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:435
std::string m_sheet
the sheet name (if not empty)
Definition: MWAWCell.hxx:409
Definition: MWAWCell.hxx:58
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:51
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:834
VerticalAlignment vAlignment() const
returns the vertical alignment
Definition: MWAWCell.hxx:281
bool m_protected
cell protected
Definition: MWAWCell.hxx:364
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:275
static std::string getColumnName(int col)
return the column name
Definition: MWAWCell.cxx:332
Definition: MWAWCell.hxx:58
bool isProtected() const
returns true if the cell is protected
Definition: MWAWCell.hxx:259
HorizontalAlignment
the default horizontal alignment.
Definition: MWAWCell.hxx:125
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWVec2i const & position() const
position accessor
Definition: MWAWCell.hxx:178
MWAWVec2f const & bdSize() const
bdbox size accessor
Definition: MWAWCell.hxx:211
Format m_format
the cell format
Definition: MWAWCell.hxx:352
MWAWBox2f const & bdBox() const
bdbox accessor
Definition: MWAWCell.hxx:200
double m_value
the cell value
Definition: MWAWCell.hxx:462
Definition: MWAWCell.hxx:134
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:468
small class use to define a sheet cell content
Definition: MWAWCell.hxx:375
FormatType
the different format of a cell's content
Definition: MWAWCell.hxx:56
MWAWVec2f m_bdSize
the cell bounding size : unit point
Definition: MWAWCell.hxx:349
MWAWBox2f m_bdBox
the cell bounding box (unit in point)
Definition: MWAWCell.hxx:347
virtual ~MWAWCell()
destructor
Definition: MWAWCell.hxx:154
Class to store font.
Definition: MWAWFont.hxx:43
a border
Definition: libmwaw_internal.hxx:333
~MWAWCellContent()
destructor
Definition: MWAWCell.hxx:422
Definition: MWAWCell.hxx:58
bool hasText() const
returns true if the text is set
Definition: MWAWCell.hxx:446
void setBdSize(MWAWVec2f sz)
set the bdbox size(unit point)
Definition: MWAWCell.hxx:216
void setVAlignment(VerticalAlignment align)
sets the vertical alignment
Definition: MWAWCell.hxx:286
HorizontalAlignment m_hAlign
the cell alignment : by default nothing
Definition: MWAWCell.hxx:358
ExtraLine
an enum to defined potential internal line: E_Line1=TL to RB, E_Line2=BL to RT
Definition: MWAWCell.hxx:134
Definition: MWAWCell.hxx:131
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:832
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:441
Definition: MWAWCell.hxx:126
Definition: MWAWCell.hxx:56
MWAWVec2i m_numberCellSpanned
the cell spanned : by default (1,1)
Definition: MWAWCell.hxx:345
bool hasExtraLine() const
returns true if we have some extra lines
Definition: MWAWCell.hxx:321
void setExtraLine(ExtraLine extrLine, MWAWBorder const &type=MWAWBorder())
sets the extraline
Definition: MWAWCell.hxx:336
ExtraLine m_extraLine
extra line
Definition: MWAWCell.hxx:369
void resetBorders()
reset the border
Definition: MWAWCell.hxx:303
Type
Definition: MWAWCell.hxx:380
Definition: MWAWCell.hxx:134
MWAWColor backgroundColor() const
returns the background color
Definition: MWAWCell.hxx:311
ExtraLine extraLine() const
returns the extra lines
Definition: MWAWCell.hxx:326
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:183
a namespace used to convert Mac font characters in unicode
Definition: MWAWFontConverter.hxx:62
std::vector< MWAWBorder > const & borders() const
return the cell border: libmwaw::Left | ...
Definition: MWAWCell.hxx:297
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:460
Definition: MWAWCell.hxx:56
Definition: MWAWCell.hxx:131
void setNumSpannedCells(MWAWVec2i numSpanned)
sets the number of spanned cells : MWAWVec2i(1,1) means 1 cellule
Definition: MWAWCell.hxx:194
Definition: MWAWCell.hxx:126
Definition: MWAWCell.hxx:58
MWAWColor m_backgroundColor
the backgroung color
Definition: MWAWCell.hxx:362
bool m_fontSet
a flag to know if the font has been set
Definition: MWAWCell.hxx:356
static std::string getCellName(MWAWVec2i const &pos, MWAWVec2b const &absolute)
return the name of a cell (given row and column) : 0,0 -> [.A1], 0,1 -> [.A2]
Definition: MWAWCell.cxx:359
double m_longValue
value ( if type==F_Long )
Definition: MWAWCell.hxx:401
Definition: MWAWCell.hxx:134
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:247
MWAWVec2i const & numSpannedCells() const
returns the number of spanned cells
Definition: MWAWCell.hxx:189
bool m_valueSet
true if the value has been set
Definition: MWAWCell.hxx:464
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
VerticalAlignment
the default vertical alignment.
Definition: MWAWCell.hxx:131
FormulaInstruction()
constructor
Definition: MWAWCell.hxx:382
NumberType
the different number format of a cell's content
Definition: MWAWCell.hxx:58
Definition: MWAWCell.hxx:125
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:399
Definition: MWAWCell.hxx:131
void setBdBox(MWAWBox2f box)
set the bdbox (unit point)
Definition: MWAWCell.hxx:205
Definition: MWAWCell.hxx:134
Definition: MWAWCell.hxx:125
Definition: MWAWCell.hxx:125
void addTo(librevenge::RVNGPropertyList &propList, std::shared_ptr< MWAWFontConverter > fontConverter) const
adds to the propList
Definition: MWAWCell.cxx:255
Definition: MWAWCell.hxx:56
bool isFontSet() const
returns true if the font has been set
Definition: MWAWCell.hxx:242
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:379