- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MWAWCell.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
38 #ifndef MWAW_CELL_H
39 # define MWAW_CELL_H
40
41 #include <string>
42 #include <vector>
43
44 #include "libmwaw_internal.hxx"
45
46 #include "MWAWEntry.hxx"
47 #include "MWAWFont.hxx"
48
49 class MWAWTable;
50
52 class MWAWCell
53 {
54 public:
56 enum FormatType { F_TEXT, F_BOOLEAN, F_NUMBER, F_DATE, F_TIME, F_UNKNOWN };
58 enum NumberType { F_NUMBER_CURRENCY, F_NUMBER_DECIMAL, F_NUMBER_FRACTION, F_NUMBER_GENERIC, F_NUMBER_SCIENTIFIC, F_NUMBER_PERCENT, F_NUMBER_UNKNOWN };
60 struct Format {
62 Format() : m_format(F_UNKNOWN), m_numberFormat(F_NUMBER_UNKNOWN), m_digits(-1), m_integerDigits(-1), m_numeratorDigits(-1), m_denominatorDigits(-1),
63 m_thousandHasSeparator(false), m_parenthesesForNegative(false), m_currencySymbol("$"), m_DTFormat("")
64 {
65 }
67 virtual ~Format() {}
69 bool hasBasicFormat() const
70 {
71 return m_format==F_TEXT || m_format==F_UNKNOWN;
72 }
74 std::string getValueType() const;
76 bool getNumberingProperties(librevenge::RVNGPropertyList &propList) const;
78 static bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVector &propListVector);
80 friend std::ostream &operator<<(std::ostream &o, Format const &format);
82 int compare(Format const &format) const;
83
85 FormatType m_format;
87 NumberType m_numberFormat;
89 int m_digits;
91 int m_integerDigits;
93 int m_numeratorDigits;
95 int m_denominatorDigits;
97 bool m_thousandHasSeparator;
99 bool m_parenthesesForNegative;
101 std::string m_currencySymbol;
103 std::string m_DTFormat;
104 };
106 struct CompareFormat {
108 CompareFormat() {}
110 bool operator()(Format const &c1, Format const &c2) const
111 {
112 return c1.compare(c2) < 0;
113 }
114 };
118 enum HorizontalAlignment { HALIGN_LEFT, HALIGN_RIGHT, HALIGN_CENTER,
119 HALIGN_FULL, HALIGN_DEFAULT
120 };
121
124 enum VerticalAlignment { VALIGN_TOP, VALIGN_CENTER, VALIGN_BOTTOM, VALIGN_DEFAULT };
125
127 enum ExtraLine { E_None, E_Line1, E_Line2, E_Cross };
128
130 MWAWCell() : m_position(0,0), m_numberCellSpanned(1,1), m_bdBox(), m_bdSize(),
131 m_format(), m_font(3,12), m_fontSet(false), m_hAlign(HALIGN_DEFAULT), m_vAlign(VALIGN_DEFAULT),
132 m_backgroundColor(MWAWColor::white()), m_protected(false),
133 m_bordersList(), m_extraLine(E_None), m_extraLineType() { }
134
136 virtual ~MWAWCell() {}
137
139 void addTo(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter) const;
140
142 friend std::ostream &operator<<(std::ostream &o, MWAWCell const &cell);
143
144 // interface with MWAWTable:
145
150 virtual bool send(MWAWListenerPtr listener, MWAWTable &table);
155 virtual bool sendContent(MWAWListenerPtr listener, MWAWTable &table);
156
157 // position
158
160 Vec2i const &position() const
161 {
162 return m_position;
163 }
165 void setPosition(Vec2i posi)
166 {
167 m_position = posi;
168 }
169
171 Vec2i const &numSpannedCells() const
172 {
173 return m_numberCellSpanned;
174 }
176 void setNumSpannedCells(Vec2i numSpanned)
177 {
178 m_numberCellSpanned=numSpanned;
179 }
180
182 Box2f const &bdBox() const
183 {
184 return m_bdBox;
185 }
187 void setBdBox(Box2f box)
188 {
189 m_bdBox = box;
190 }
191
193 Vec2f const &bdSize() const
194 {
195 return m_bdSize;
196 }
198 void setBdSize(Vec2f sz)
199 {
200 m_bdSize = sz;
201 }
202
204 static std::string getCellName(Vec2i const &pos, Vec2b const &absolute);
205
207 static std::string getColumnName(int col);
208
209 // format
210
212 Format const &getFormat() const
213 {
214 return m_format;
215 }
217 void setFormat(Format const &format)
218 {
219 m_format=format;
220 }
221
223 bool isFontSet() const
224 {
225 return m_fontSet;
226 }
228 MWAWFont getFont() const
229 {
230 return m_font;
231 }
233 void setFont(MWAWFont const &font, bool isDefault=false)
234 {
235 m_font=font;
236 m_fontSet=!isDefault;
237 }
238
240 bool isProtected() const
241 {
242 return m_protected;
243 }
245 void setProtected(bool fl)
246 {
247 m_protected = fl;
248 }
249
251 HorizontalAlignment hAlignment() const
252 {
253 return m_hAlign;
254 }
256 void setHAlignment(HorizontalAlignment align)
257 {
258 m_hAlign = align;
259 }
260
262 VerticalAlignment vAlignment() const
263 {
264 return m_vAlign;
265 }
267 void setVAlignment(VerticalAlignment align)
268 {
269 m_vAlign = align;
270 }
271
273 bool hasBorders() const
274 {
275 return m_bordersList.size() != 0;
276 }
278 std::vector<MWAWBorder> const &borders() const
279 {
280 return m_bordersList;
281 }
282
284 void resetBorders()
285 {
286 m_bordersList.resize(0);
287 }
289 void setBorders(int wh, MWAWBorder const &border);
290
292 MWAWColor backgroundColor() const
293 {
294 return m_backgroundColor;
295 }
297 void setBackgroundColor(MWAWColor color)
298 {
299 m_backgroundColor = color;
300 }
302 bool hasExtraLine() const
303 {
304 return m_extraLine!=E_None && !m_extraLineType.isEmpty();
305 }
307 ExtraLine extraLine() const
308 {
309 return m_extraLine;
310 }
312 MWAWBorder const &extraLineType() const
313 {
314 return m_extraLineType;
315 }
317 void setExtraLine(ExtraLine extrLine, MWAWBorder const &type=MWAWBorder())
318 {
319 m_extraLine = extrLine;
320 m_extraLineType=type;
321 }
322 protected:
324 Vec2i m_position;
326 Vec2i m_numberCellSpanned;
328 Box2f m_bdBox;
330 Vec2f m_bdSize;
331
333 Format m_format;
335 MWAWFont m_font;
337 bool m_fontSet;
339 HorizontalAlignment m_hAlign;
341 VerticalAlignment m_vAlign;
343 MWAWColor m_backgroundColor;
345 bool m_protected;
346
348 std::vector<MWAWBorder> m_bordersList;
350 ExtraLine m_extraLine;
352 MWAWBorder m_extraLineType;
353 };
354
356 class MWAWCellContent
357 {
358 public:
360 struct FormulaInstruction {
361 enum Type { F_Operator, F_Function, F_Cell, F_CellList, F_Long, F_Double, F_Text };
363 FormulaInstruction() : m_type(F_Text), m_content(""), m_longValue(0), m_doubleValue(0), m_sheet("")
364 {
365 for (int i=0; i<2; ++i) {
366 m_position[i]=Vec2i(0,0);
367 m_positionRelative[i]=Vec2b(false,false);
368 }
369 }
371 librevenge::RVNGPropertyList getPropertyList(MWAWFontConverter &fontConverter, int fontId) const;
373 friend std::ostream &operator<<(std::ostream &o, FormulaInstruction const &inst);
375 Type m_type;
377 std::string m_content;
379 double m_longValue;
381 double m_doubleValue;
383 Vec2i m_position[2];
385 Vec2b m_positionRelative[2];
387 std::string m_sheet;
388 };
389
391 enum Type { C_NONE, C_TEXT, C_NUMBER, C_FORMULA, C_UNKNOWN };
393 MWAWCellContent() : m_contentType(C_UNKNOWN), m_value(0.0), m_valueSet(false), m_textEntry(), m_formula() { }
395 ~MWAWCellContent() {}
397 friend std::ostream &operator<<(std::ostream &o, MWAWCellContent const &cell);
398
400 bool empty() const
401 {
402 if (m_contentType == C_NUMBER) return false;
403 if (m_contentType == C_TEXT && m_textEntry.valid()) return false;
404 if (m_contentType == C_FORMULA && (m_formula.size() || isValueSet())) return false;
405 return true;
406 }
408 void setValue(double value)
409 {
410 m_value = value;
411 m_valueSet = true;
412 }
414 bool isValueSet() const
415 {
416 return m_valueSet;
417 }
419 bool hasText() const
420 {
421 return m_textEntry.valid();
422 }
425 static bool double2Date(double val, int &Y, int &M, int &D);
427 static bool double2Time(double val, int &H, int &M, int &S);
429 static bool double2String(double val, MWAWCell::Format const &format, std::string &str);
431 static bool date2Double(int Y, int M, int D, double &val);
433 Type m_contentType;
435 double m_value;
437 bool m_valueSet;
439 MWAWEntry m_textEntry;
441 std::vector<FormulaInstruction> m_formula;
442 };
443
444 #endif
445 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWListenerPtr
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:431
MWAWCellContent::FormulaInstruction
small class use to define a formula instruction
Definition: MWAWCell.hxx:360
MWAWCellContent::FormulaInstruction::m_doubleValue
double m_doubleValue
value ( if type==F_Double )
Definition: MWAWCell.hxx:381
MWAWCellContent::Type
Type
the different types of cell's field
Definition: MWAWCell.hxx:391
MWAWCellContent::FormulaInstruction::F_Operator
Definition: MWAWCell.hxx:361
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:87
MWAWCell::setPosition
void setPosition(Vec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:165
MWAWCell::m_font
MWAWFont m_font
the cell font
Definition: MWAWCell.hxx:335
MWAWCell::m_bdBox
Box2f m_bdBox
the cell bounding box (unit in point)
Definition: MWAWCell.hxx:328
MWAWCell::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWCell const &cell)
operator<<
Definition: MWAWCell.cxx:455
MWAWCell::getFont
MWAWFont getFont() const
returns the font
Definition: MWAWCell.hxx:228
MWAWCell::m_extraLineType
MWAWBorder m_extraLineType
extra line type
Definition: MWAWCell.hxx:352
MWAWCell::setFormat
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:217
MWAWCell::setBdBox
void setBdBox(Box2f box)
set the bdbox (unit point)
Definition: MWAWCell.hxx:187
MWAWCell::Format::Format
Format()
constructor
Definition: MWAWCell.hxx:62
MWAWCell::setFont
void setFont(MWAWFont const &font, bool isDefault=false)
sets the fonts
Definition: MWAWCell.hxx:233
MWAWCell::sendContent
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:543
MWAWCell::m_numberCellSpanned
Vec2i m_numberCellSpanned
the cell spanned : by default (1,1)
Definition: MWAWCell.hxx:326
MWAWCell::setBackgroundColor
void setBackgroundColor(MWAWColor color)
sets the background color
Definition: MWAWCell.hxx:297
MWAWCell::F_BOOLEAN
Definition: MWAWCell.hxx:56
MWAWCell::MWAWCell
MWAWCell()
constructor
Definition: MWAWCell.hxx:130
MWAWCell::CompareFormat
a comparaison structure used to store data
Definition: MWAWCell.hxx:106
MWAWCellContent::double2Time
static bool double2Time(double val, int &H, int &M, int &S)
conversion beetween double: second since 0:00 and time
Definition: MWAWCell.cxx:632
MWAWCellContent::C_NUMBER
Definition: MWAWCell.hxx:391
MWAWCell::Format::compare
int compare(Format const &format) const
a comparison function
Definition: MWAWCell.cxx:311
MWAWEntry.hxx
MWAWCell::F_NUMBER_UNKNOWN
Definition: MWAWCell.hxx:58
MWAWCell::F_UNKNOWN
Definition: MWAWCell.hxx:56
libmwaw_internal.hxx
MWAWCellContent::FormulaInstruction::getPropertyList
librevenge::RVNGPropertyList getPropertyList(MWAWFontConverter &fontConverter, int fontId) const
returns a proplist corresponding to a instruction using a font converter to send the text ...
Definition: MWAWCell.cxx:763
MWAWCellContent::MWAWCellContent
MWAWCellContent()
constructor
Definition: MWAWCell.hxx:393
MWAWCell::Format::getNumberingProperties
bool getNumberingProperties(librevenge::RVNGPropertyList &propList) const
get the numbering style
Definition: MWAWCell.cxx:76
MWAWCell::Format
a structure uses to define the format of a cell content
Definition: MWAWCell.hxx:60
MWAWCell::F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
Box2< float >
MWAWCell::F_DATE
Definition: MWAWCell.hxx:56
MWAWCell::hasBorders
bool hasBorders() const
return true if the cell has some border
Definition: MWAWCell.hxx:273
MWAWCell::F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
MWAWCell::setProtected
void setProtected(bool fl)
sets the cell's protected flag
Definition: MWAWCell.hxx:245
MWAWCell::bdSize
Vec2f const & bdSize() const
bdbox size accessor
Definition: MWAWCell.hxx:193
MWAWCellContent::C_FORMULA
Definition: MWAWCell.hxx:391
MWAWCell::VALIGN_TOP
Definition: MWAWCell.hxx:124
MWAWCell::isFontSet
bool isFontSet() const
returns true if the font has been set
Definition: MWAWCell.hxx:223
MWAWCell::m_bordersList
std::vector< MWAWBorder > m_bordersList
the cell border MWAWBorder::Pos
Definition: MWAWCell.hxx:348
MWAWCell::send
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:534
MWAWCell::m_vAlign
VerticalAlignment m_vAlign
the vertical cell alignment : by default nothing
Definition: MWAWCell.hxx:341
MWAWCellContent::m_textEntry
MWAWEntry m_textEntry
the cell string
Definition: MWAWCell.hxx:439
MWAWCell::Format::m_currencySymbol
std::string m_currencySymbol
the currency symbol ( default '$')
Definition: MWAWCell.hxx:101
MWAWCell::getCellName
static std::string getCellName(Vec2i const &pos, Vec2b const &absolute)
return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.cxx:419
MWAWCell::Format::convertDTFormat
static bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVector &propListVector)
convert a DTFormat in a propertyList
Definition: MWAWCell.cxx:157
MWAWCellContent::FormulaInstruction::m_type
Type m_type
the type
Definition: MWAWCell.hxx:375
MWAWCellContent::setValue
void setValue(double value)
sets the double value
Definition: MWAWCell.hxx:408
MWAWCellContent::FormulaInstruction::m_sheet
std::string m_sheet
the sheet name (if not empty)
Definition: MWAWCell.hxx:387
MWAWCell::F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
Vec2b
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libmwaw_internal.hxx:705
MWAWCell::bdBox
Box2f const & bdBox() const
bdbox accessor
Definition: MWAWCell.hxx:182
MWAWCell::hAlignment
HorizontalAlignment hAlignment() const
returns the horizontal alignment
Definition: MWAWCell.hxx:251
MWAWTable
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:51
MWAWCell::Format::~Format
virtual ~Format()
destructor
Definition: MWAWCell.hxx:67
MWAWCell::m_protected
bool m_protected
cell protected
Definition: MWAWCell.hxx:345
MWAWCell::Format::m_thousandHasSeparator
bool m_thousandHasSeparator
true if we must separate the thousand
Definition: MWAWCell.hxx:97
MWAWCell::setHAlignment
void setHAlignment(HorizontalAlignment align)
sets the horizontal alignment
Definition: MWAWCell.hxx:256
MWAWCell::getColumnName
static std::string getColumnName(int col)
return the column name
Definition: MWAWCell.cxx:409
MWAWCell::F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
MWAWCell::extraLine
ExtraLine extraLine() const
returns the extra lines
Definition: MWAWCell.hxx:307
MWAWCell::HorizontalAlignment
HorizontalAlignment
the default horizontal alignment.
Definition: MWAWCell.hxx:118
MWAWCell::Format::m_parenthesesForNegative
bool m_parenthesesForNegative
true if we use parenthese to print negative number
Definition: MWAWCell.hxx:99
MWAWCellContent::C_TEXT
Definition: MWAWCell.hxx:391
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:167
Vec2i
Vec2< int > Vec2i
Vec2 of int.
Definition: libmwaw_internal.hxx:707
MWAWCellContent::FormulaInstruction::F_Function
Definition: MWAWCell.hxx:361
MWAWCell::backgroundColor
MWAWColor backgroundColor() const
returns the background color
Definition: MWAWCell.hxx:292
MWAWCell::m_format
Format m_format
the cell format
Definition: MWAWCell.hxx:333
MWAWCellContent::m_value
double m_value
the cell value
Definition: MWAWCell.hxx:435
MWAWCell::E_None
Definition: MWAWCell.hxx:127
MWAWCellContent::m_formula
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:441
MWAWCellContent::C_UNKNOWN
Definition: MWAWCell.hxx:391
MWAWCellContent
small class use to define a sheet cell content
Definition: MWAWCell.hxx:356
MWAWCell::FormatType
FormatType
the different format of a cell's content
Definition: MWAWCell.hxx:56
MWAWCell::~MWAWCell
virtual ~MWAWCell()
destructor
Definition: MWAWCell.hxx:136
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MWAWBorder
a border
Definition: libmwaw_internal.hxx:299
MWAWCell::setBdSize
void setBdSize(Vec2f sz)
set the bdbox size(unit point)
Definition: MWAWCell.hxx:198
MWAWCellContent::hasText
bool hasText() const
returns true if the text is set
Definition: MWAWCell.hxx:419
MWAWCellContent::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWCellContent const &cell)
operator<<
Definition: MWAWCell.cxx:727
MWAWCell::setNumSpannedCells
void setNumSpannedCells(Vec2i numSpanned)
sets the number of spanned cells : Vec2i(1,1) means 1 cellule
Definition: MWAWCell.hxx:176
MWAWCellContent::FormulaInstruction::F_Text
Definition: MWAWCell.hxx:361
MWAWCellContent::~MWAWCellContent
~MWAWCellContent()
destructor
Definition: MWAWCell.hxx:395
MWAWCell::F_NUMBER_FRACTION
Definition: MWAWCell.hxx:58
MWAWFont.hxx
MWAWCell::setVAlignment
void setVAlignment(VerticalAlignment align)
sets the vertical alignment
Definition: MWAWCell.hxx:267
MWAWCell::m_hAlign
HorizontalAlignment m_hAlign
the cell alignment : by default nothing
Definition: MWAWCell.hxx:339
MWAWCell::ExtraLine
ExtraLine
an enum to defined potential internal line: E_Line1=TL to RB, E_Line2=BL to RT
Definition: MWAWCell.hxx:127
MWAWCell::Format::operator<<
friend std::ostream & operator<<(std::ostream &o, Format const &format)
operator<<
Definition: MWAWCell.cxx:252
MWAWCell::Format::hasBasicFormat
bool hasBasicFormat() const
returns true if this is a basic format style
Definition: MWAWCell.hxx:69
MWAWCell::VALIGN_BOTTOM
Definition: MWAWCell.hxx:124
MWAWCellContent::FormulaInstruction::operator<<
friend std::ostream & operator<<(std::ostream &o, FormulaInstruction const &inst)
operator<<
Definition: MWAWCell.cxx:831
MWAWCellContent::double2Date
static bool double2Date(double val, int &Y, int &M, int &D)
conversion beetween double days since 1900 and a date, ie val=0 corresponds to 1/1/1900, val=365 to 1/1/1901, ...
Definition: MWAWCell.cxx:552
MWAWCell::HALIGN_FULL
Definition: MWAWCell.hxx:119
MWAWCell::m_bdSize
Vec2f m_bdSize
the cell bounding size : unit point
Definition: MWAWCell.hxx:330
MWAWCell::Format::getValueType
std::string getValueType() const
returns a value type
Definition: MWAWCell.cxx:54
MWAWCell::getFormat
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:212
MWAWCell::F_NUMBER
Definition: MWAWCell.hxx:56
MWAWCell::Format::m_format
FormatType m_format
the cell format : by default unknown
Definition: MWAWCell.hxx:85
MWAWCell::setExtraLine
void setExtraLine(ExtraLine extrLine, MWAWBorder const &type=MWAWBorder())
sets the extraline
Definition: MWAWCell.hxx:317
MWAWCell::m_extraLine
ExtraLine m_extraLine
extra line
Definition: MWAWCell.hxx:350
MWAWCell::resetBorders
void resetBorders()
reset the border
Definition: MWAWCell.hxx:284
MWAWCellContent::FormulaInstruction::Type
Type
Definition: MWAWCell.hxx:361
MWAWCell::E_Cross
Definition: MWAWCell.hxx:127
MWAWCell::vAlignment
VerticalAlignment vAlignment() const
returns the vertical alignment
Definition: MWAWCell.hxx:262
MWAWCellContent::FormulaInstruction::F_Double
Definition: MWAWCell.hxx:361
MWAWCell::Format::m_numeratorDigits
int m_numeratorDigits
the number of numerator digits
Definition: MWAWCell.hxx:93
MWAWFontConverter
a namespace used to convert Mac font characters in unicode
Definition: MWAWFontConverter.hxx:63
MWAWCell::position
Vec2i const & position() const
position accessor
Definition: MWAWCell.hxx:160
MWAWCellContent::m_contentType
Type m_contentType
the content type ( by default unknown )
Definition: MWAWCell.hxx:433
MWAWCell::F_TIME
Definition: MWAWCell.hxx:56
MWAWCell::VALIGN_CENTER
Definition: MWAWCell.hxx:124
MWAWCell::HALIGN_DEFAULT
Definition: MWAWCell.hxx:119
MWAWCellContent::FormulaInstruction::F_Cell
Definition: MWAWCell.hxx:361
MWAWCell::Format::m_digits
int m_digits
the number of digits
Definition: MWAWCell.hxx:89
MWAWCell::F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
MWAWCellContent::FormulaInstruction::F_Long
Definition: MWAWCell.hxx:361
MWAWCell::m_backgroundColor
MWAWColor m_backgroundColor
the backgroung color
Definition: MWAWCell.hxx:343
MWAWCell::addTo
void addTo(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
adds to the propList
Definition: MWAWCell.cxx:336
MWAWCell::Format::m_numberFormat
NumberType m_numberFormat
the numeric format
Definition: MWAWCell.hxx:87
MWAWCell::m_fontSet
bool m_fontSet
a flag to know if the font has been set
Definition: MWAWCell.hxx:337
MWAWCell::hasExtraLine
bool hasExtraLine() const
returns true if we have some extra lines
Definition: MWAWCell.hxx:302
MWAWCellContent::C_NONE
Definition: MWAWCell.hxx:391
MWAWCellContent::double2String
static bool double2String(double val, MWAWCell::Format const &format, std::string &str)
conversion of the value in string knowing the cell format
Definition: MWAWCell.cxx:644
MWAWCellContent::FormulaInstruction::m_longValue
double m_longValue
value ( if type==F_Long )
Definition: MWAWCell.hxx:379
MWAWCell::E_Line1
Definition: MWAWCell.hxx:127
MWAWCell::CompareFormat::CompareFormat
CompareFormat()
constructor
Definition: MWAWCell.hxx:108
MWAWCell::borders
std::vector< MWAWBorder > const & borders() const
return the cell border: libmwaw::Left | ...
Definition: MWAWCell.hxx:278
MWAWCell::extraLineType
MWAWBorder const & extraLineType() const
returns the extra line border
Definition: MWAWCell.hxx:312
MWAWCellContent::m_valueSet
bool m_valueSet
true if the value has been set
Definition: MWAWCell.hxx:437
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
Vec2< int >
MWAWCellContent::empty
bool empty() const
returns true if the cell has no content
Definition: MWAWCell.hxx:400
MWAWCell::VerticalAlignment
VerticalAlignment
the default vertical alignment.
Definition: MWAWCell.hxx:124
MWAWCellContent::FormulaInstruction::FormulaInstruction
FormulaInstruction()
constructor
Definition: MWAWCell.hxx:363
MWAWCell::NumberType
NumberType
the different number format of a cell's content
Definition: MWAWCell.hxx:58
MWAWCell::numSpannedCells
Vec2i const & numSpannedCells() const
returns the number of spanned cells
Definition: MWAWCell.hxx:171
MWAWCell::HALIGN_RIGHT
Definition: MWAWCell.hxx:118
MWAWCellContent::FormulaInstruction::F_CellList
Definition: MWAWCell.hxx:361
MWAWCellContent::FormulaInstruction::m_position
Vec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:383
MWAWCellContent::FormulaInstruction::m_content
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:377
MWAWCell::Format::m_denominatorDigits
int m_denominatorDigits
the number of denominator digits
Definition: MWAWCell.hxx:95
MWAWCell::VALIGN_DEFAULT
Definition: MWAWCell.hxx:124
MWAWCell::Format::m_DTFormat
std::string m_DTFormat
a date/time format ( using a subset of strftime format )
Definition: MWAWCell.hxx:103
MWAWCellContent::FormulaInstruction::m_positionRelative
Vec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:385
MWAWCell::E_Line2
Definition: MWAWCell.hxx:127
MWAWCellContent::isValueSet
bool isValueSet() const
returns true if the value has been setted
Definition: MWAWCell.hxx:414
MWAWCell::HALIGN_LEFT
Definition: MWAWCell.hxx:118
MWAWCellContent::date2Double
static bool date2Double(int Y, int M, int D, double &val)
conversion beetween date and double days since 1900 date
Definition: MWAWCell.cxx:602
MWAWCell::CompareFormat::operator()
bool operator()(Format const &c1, Format const &c2) const
comparaison function
Definition: MWAWCell.hxx:110
MWAWCell::isProtected
bool isProtected() const
returns true if the cell is protected
Definition: MWAWCell.hxx:240
MWAWCell::Format::m_integerDigits
int m_integerDigits
the number of main digits
Definition: MWAWCell.hxx:91
MWAWCell::HALIGN_CENTER
Definition: MWAWCell.hxx:118
MWAWCell::m_position
Vec2i m_position
the cell row and column : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:324
MWAWCell::F_TEXT
Definition: MWAWCell.hxx:56
MWAWCell::setBorders
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWCell.cxx:432
MWAWBorder::isEmpty
bool isEmpty() const
returns true if the border is empty
Definition: libmwaw_internal.hxx:312