MWAWFont.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
34#ifndef MWAW_FONT
35# define MWAW_FONT
36
37#include <string>
38#include <vector>
39
40#include "libmwaw_internal.hxx"
41
44{
45public:
47 struct Line {
53 Line(Style style=None, Type type=Single, bool wordFlag=false, float w=1.0) :
54 m_style(style), m_type(type), m_width(w), m_color(MWAWColor::black()), m_word(wordFlag) { }
56 bool isSet() const
57 {
58 return m_style != None && m_width>0;
59 }
61 void addTo(librevenge::RVNGPropertyList &propList, std::string const &type) const;
63 friend std::ostream &operator<<(std::ostream &o, Line const &line);
65 bool operator==(Line const &oth) const
66 {
67 return cmp(oth)==0;
68 }
70 bool operator!=(Line const &oth) const
71 {
72 return cmp(oth)!=0;
73 }
75 int cmp(Line const &oth) const
76 {
77 if (m_style != oth.m_style) return int(m_style)-int(oth.m_style);
78 if (m_type != oth.m_type) return int(m_type)-int(oth.m_type);
79 if (m_word != oth.m_word) return m_word ? -1 : 1;
80 if (m_width < oth.m_width) return -1;
81 if (m_width > oth.m_width) return 1;
82 if (m_color.isSet() != oth.m_color.isSet())
83 return m_color.isSet();
84 if (m_color.get() < oth.m_color.get()) return -1;
85 if (m_color.get() > oth.m_color.get()) return 1;
86 return 0;
87 }
93 float m_width;
97 bool m_word;
98 };
100 struct Script {
102 Script(float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT, int scale=100) :
103 m_delta(delta), m_deltaUnit(deltaUnit), m_scale(scale)
104 {
105 }
107 bool isSet() const
108 {
109 return *this != Script();
110 }
112 static Script sub()
113 {
114 return Script(-33,librevenge::RVNG_PERCENT,58);
115 }
117 static Script sub100()
118 {
119 return Script(-20);
120 }
122 static Script super()
123 {
124 return Script(33,librevenge::RVNG_PERCENT,58);
125 }
128 {
129 return Script(20);
130 }
132 std::string str(float fSize) const;
133
135 bool operator==(Script const &oth) const
136 {
137 return cmp(oth)==0;
138 }
140 bool operator!=(Script const &oth) const
141 {
142 return cmp(oth)!=0;
143 }
145 bool operator<(Script const &oth) const
146 {
147 return cmp(oth)<0;
148 }
150 bool operator<=(Script const &oth) const
151 {
152 return cmp(oth)<=0;
153 }
155 bool operator>(Script const &oth) const
156 {
157 return cmp(oth)>0;
158 }
160 bool operator>=(Script const &oth) const
161 {
162 return cmp(oth)>=0;
163 }
165 int cmp(Script const &oth) const
166 {
167 if (m_delta > oth.m_delta) return -1;
168 if (m_delta < oth.m_delta) return 1;
169 if (m_deltaUnit != oth.m_deltaUnit) return int(m_deltaUnit)-int(oth.m_deltaUnit);
170 if (m_scale != oth.m_scale) return m_scale-oth.m_scale;
171 return 0;
172 }
174 float m_delta;
176 librevenge::RVNGUnit m_deltaUnit;
179 };
180
190 };
196 MWAWFont(int newId=-1, float sz=12, uint32_t f = 0) : m_id(newId), m_size(sz), m_sizeIsRelative(false), m_deltaSpacing(0), m_deltaSpacingUnit(librevenge::RVNG_POINT), m_widthStreching(1), m_scriptPosition(),
197 m_flags(f), m_overline(Line::None), m_strikeoutline(Line::None), m_underline(Line::None),
198 m_color(MWAWColor::black()), m_backgroundColor(MWAWColor::white()), m_language(""), m_extra("")
199 {
200 resetColor();
201 }
203 bool isSet() const
204 {
205 return m_id.isSet();
206 }
208 void insert(MWAWFont const &ft)
209 {
210 m_id.insert(ft.m_id);
211 m_size.insert(ft.m_size);
217 if (ft.m_flags.isSet()) {
218 if (m_flags.isSet())
219 setFlags(flags()| ft.flags());
220 else
221 m_flags = ft.m_flags;
222 }
223 m_overline.insert(ft.m_overline);
225 m_underline.insert(ft.m_underline);
228 m_extra += ft.m_extra;
229 }
231 void setFont(int newId)
232 {
233 resetColor();
234 m_id=newId;
235 }
236
238 int id() const
239 {
240 return m_id.get();
241 }
243 void setId(int newId)
244 {
245 m_id = newId;
246 }
247
249 float size() const
250 {
251 return m_size.get();
252 }
254 void setSize(float sz, bool isRelative=false)
255 {
256 m_size = sz;
257 m_sizeIsRelative = isRelative;
258 }
259
261 float deltaLetterSpacing() const
262 {
263 return m_deltaSpacing.get();
264 }
266 librevenge::RVNGUnit deltaLetterSpacingUnit() const
267 {
268 return m_deltaSpacingUnit.get();
269 }
271 void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
272 {
275 }
277 float widthStreching() const
278 {
279 return m_widthStreching.get();
280 }
282 void setWidthStreching(float scale=1.0)
283 {
284 m_widthStreching = scale;
285 }
287 Script const &script() const
288 {
289 return m_scriptPosition.get();
290 }
291
293 void set(Script const &newscript)
294 {
295 m_scriptPosition = newscript;
296 }
297
299 uint32_t flags() const
300 {
301 return m_flags.get();
302 }
304 void setFlags(uint32_t fl)
305 {
306 m_flags = fl;
307 }
308
310 bool hasColor() const
311 {
312 return m_color.isSet() && !m_color.get().isBlack();
313 }
315 void getColor(MWAWColor &c) const
316 {
317 c = m_color.get();
318 }
320 void setColor(MWAWColor color)
321 {
322 m_color = color;
323 }
324
327 {
329 }
332 {
333 m_backgroundColor = color;
334 }
337 {
340 }
341
344 {
345 return (m_overline.isSet() && m_overline->isSet()) ||
346 (m_strikeoutline.isSet() && m_strikeoutline->isSet()) ||
347 (m_underline.isSet() && m_underline->isSet());
348 }
351 {
352 if (m_overline.isSet()) m_overline=Line(Line::None);
355 }
357 Line const &getOverline() const
358 {
359 return m_overline.get();
360 }
362 void setOverline(Line const &line)
363 {
364 m_overline = line;
365 }
367 void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
368 {
369 if (doReset)
370 m_overline = Line(style);
371 else
372 m_overline->m_style = style;
373 }
376 {
377 m_overline->m_type = type;
378 }
380 void setOverlineWordFlag(bool wordFlag=false)
381 {
382 m_overline->m_word = wordFlag;
383 }
385 void setOverlineWidth(float w)
386 {
387 m_overline->m_width = w;
388 }
390 void setOverlineColor(MWAWColor const &color)
391 {
392 m_overline->m_color = color;
393 }
394
396 Line const &getStrikeOut() const
397 {
398 return m_strikeoutline.get();
399 }
401 void setStrikeOut(Line const &line)
402 {
403 m_strikeoutline = line;
404 }
406 void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
407 {
408 if (doReset)
409 m_strikeoutline = Line(style);
410 else
411 m_strikeoutline->m_style = style;
412 }
415 {
416 m_strikeoutline->m_type = type;
417 }
419 void setStrikeOutWordFlag(bool wordFlag=false)
420 {
421 m_strikeoutline->m_word = wordFlag;
422 }
424 void setStrikeOutWidth(float w)
425 {
426 m_strikeoutline->m_width = w;
427 }
429 void setStrikeOutColor(MWAWColor const &color)
430 {
431 m_strikeoutline->m_color = color;
432 }
433
435 Line const &getUnderline() const
436 {
437 return m_underline.get();
438 }
440 void setUnderline(Line const &line)
441 {
442 m_underline = line;
443 }
445 void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
446 {
447 if (doReset)
448 m_underline = Line(style);
449 else
450 m_underline->m_style = style;
451 }
454 {
455 m_underline->m_type = type;
456 }
458 void setUnderlineWordFlag(bool wordFlag=false)
459 {
460 m_underline->m_word = wordFlag;
461 }
463 void setUnderlineWidth(float w)
464 {
465 m_underline->m_width = w;
466 }
468 void setUnderlineColor(MWAWColor const &color)
469 {
470 m_underline->m_color = color;
471 }
472
474 std::string const &language() const
475 {
476 return m_language.get();
477 }
479 void setLanguage(std::string const &lang)
480 {
481 m_language=lang;
482 }
484 void addTo(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter) const;
486 void addToListLevel(librevenge::RVNGPropertyList &propList, shared_ptr<MWAWFontConverter> fontConverter) const;
487
489 std::string getDebugString(shared_ptr<MWAWFontConverter> &converter) const;
490
492 bool operator==(MWAWFont const &f) const
493 {
494 return cmp(f) == 0;
495 }
497 bool operator!=(MWAWFont const &f) const
498 {
499 return cmp(f) != 0;
500 }
501
503 int cmp(MWAWFont const &oth) const
504 {
505 int diff = id() - oth.id();
506 if (diff != 0) return diff;
507 if (size() < oth.size()) return -1;
508 if (size() > oth.size()) return -1;
509 if (m_sizeIsRelative.get() != oth.m_sizeIsRelative.get()) return m_sizeIsRelative.get() ? 1 : -1;
510 if (flags() < oth.flags()) return -1;
511 if (flags() > oth.flags()) return 1;
512 if (m_deltaSpacing.get() < oth.m_deltaSpacing.get()) return -1;
513 if (m_deltaSpacing.get() > oth.m_deltaSpacing.get()) return 1;
514 if (m_deltaSpacingUnit.get() < oth.m_deltaSpacingUnit.get()) return -1;
515 if (m_deltaSpacingUnit.get() > oth.m_deltaSpacingUnit.get()) return 1;
516 if (m_widthStreching.get() < oth.m_widthStreching.get()) return -1;
517 if (m_widthStreching.get() > oth.m_widthStreching.get()) return 1;
518 diff = script().cmp(oth.script());
519 if (diff != 0) return diff;
520 diff = m_overline.get().cmp(oth.m_overline.get());
521 if (diff != 0) return diff;
522 diff = m_strikeoutline.get().cmp(oth.m_strikeoutline.get());
523 if (diff != 0) return diff;
524 diff = m_underline.get().cmp(oth.m_underline.get());
525 if (diff != 0) return diff;
526 if (m_color.get() < oth.m_color.get()) return -1;
527 if (m_color.get() > oth.m_color.get()) return 1;
528 if (m_backgroundColor.get() < oth.m_backgroundColor.get()) return -1;
529 if (m_backgroundColor.get() > oth.m_backgroundColor.get()) return 1;
530 if (m_language.get() < oth.m_language.get()) return -1;
531 if (m_language.get() > oth.m_language.get()) return 1;
532 return diff;
533 }
534
535protected:
550public:
552 std::string m_extra;
553};
554
556{
557struct State;
558}
559
562{
563public:
565 explicit MWAWFontManager(shared_ptr<MWAWFontConverter> fontConverter);
569 int getId(MWAWFont const &font);
571 bool getFont(int id, MWAWFont &font) const;
573 shared_ptr<MWAWFontConverter> getFontConverter();
574protected:
576 shared_ptr<MWAWFontManagerInternal::State> m_state;
577private:
580};
581#endif
582// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
a font manager which can be used to store fonts, ...
Definition: MWAWFont.hxx:562
shared_ptr< MWAWFontConverter > getFontConverter()
returns the font converter
Definition: MWAWFont.cxx:424
shared_ptr< MWAWFontManagerInternal::State > m_state
the state
Definition: MWAWFont.hxx:576
int getId(MWAWFont const &font)
returns a span id which can be used to call the list
Definition: MWAWFont.cxx:429
MWAWFontManager & operator=(MWAWFontManager const &)
~MWAWFontManager()
destructor
Definition: MWAWFont.cxx:420
MWAWFontManager(shared_ptr< MWAWFontConverter > fontConverter)
constructor
Definition: MWAWFont.cxx:416
bool getFont(int id, MWAWFont &font) const
returns the font corresponding to an id
Definition: MWAWFont.cxx:439
MWAWFontManager(MWAWFontManager const &)
Class to store font.
Definition: MWAWFont.hxx:44
MWAWVariable< Script > m_scriptPosition
the sub/super script definition
Definition: MWAWFont.hxx:542
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:282
void setUnderlineColor(MWAWColor const &color)
sets the underline color
Definition: MWAWFont.hxx:468
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:231
void addTo(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList
Definition: MWAWFont.cxx:245
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:299
Line const & getStrikeOut() const
returns the strikeoutline
Definition: MWAWFont.hxx:396
void getBackgroundColor(MWAWColor &c) const
returns the font background color
Definition: MWAWFont.hxx:326
void insert(MWAWFont const &ft)
inserts the set value in the current font
Definition: MWAWFont.hxx:208
void setOverlineWordFlag(bool wordFlag=false)
sets the overline word flag
Definition: MWAWFont.hxx:380
FontBits
the different font bit
Definition: MWAWFont.hxx:182
@ shadowBit
Definition: MWAWFont.hxx:183
@ outlineBit
Definition: MWAWFont.hxx:183
@ boxedBit
Definition: MWAWFont.hxx:187
@ uppercaseBit
Definition: MWAWFont.hxx:184
@ smallCapsBit
Definition: MWAWFont.hxx:184
@ reverseVideoBit
Definition: MWAWFont.hxx:184
@ embossBit
Definition: MWAWFont.hxx:182
@ hiddenBit
Definition: MWAWFont.hxx:183
@ boldBit
Definition: MWAWFont.hxx:182
@ lowercaseBit
Definition: MWAWFont.hxx:185
@ reverseWritingBit
Definition: MWAWFont.hxx:189
@ initialcaseBit
Definition: MWAWFont.hxx:186
@ italicBit
Definition: MWAWFont.hxx:182
@ boxedRoundedBit
Definition: MWAWFont.hxx:188
@ blinkBit
Definition: MWAWFont.hxx:182
@ engraveBit
Definition: MWAWFont.hxx:182
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:406
float size() const
returns the font size
Definition: MWAWFont.hxx:249
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:440
MWAWVariable< MWAWColor > m_backgroundColor
font background color
Definition: MWAWFont.hxx:548
MWAWVariable< MWAWColor > m_color
font color
Definition: MWAWFont.hxx:547
Script const & script() const
returns the script position
Definition: MWAWFont.hxx:287
int id() const
returns the font id
Definition: MWAWFont.hxx:238
void setUnderlineWordFlag(bool wordFlag=false)
sets the underline word flag
Definition: MWAWFont.hxx:458
librevenge::RVNGUnit deltaLetterSpacingUnit() const
returns the condensed(negative)/extended(positive) unit
Definition: MWAWFont.hxx:266
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
void setBackgroundColor(MWAWColor color)
sets the font background color
Definition: MWAWFont.hxx:331
int cmp(MWAWFont const &oth) const
a comparison function
Definition: MWAWFont.hxx:503
bool operator==(MWAWFont const &f) const
operator==
Definition: MWAWFont.hxx:492
MWAWVariable< float > m_size
font size
Definition: MWAWFont.hxx:537
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
void setUnderlineType(Line::Type type=Line::Single)
sets the underline type
Definition: MWAWFont.hxx:453
MWAWFont(int newId=-1, float sz=12, uint32_t f=0)
constructor
Definition: MWAWFont.hxx:196
Line const & getUnderline() const
returns the underline
Definition: MWAWFont.hxx:435
void setStrikeOutWidth(float w)
sets the strikeoutline width
Definition: MWAWFont.hxx:424
MWAWVariable< bool > m_sizeIsRelative
true if the size is percent
Definition: MWAWFont.hxx:538
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
MWAWVariable< librevenge::RVNGUnit > m_deltaSpacingUnit
the delta spacing unit
Definition: MWAWFont.hxx:540
void setStrikeOutColor(MWAWColor const &color)
sets the strikeoutline color
Definition: MWAWFont.hxx:429
MWAWVariable< int > m_id
font identificator
Definition: MWAWFont.hxx:536
MWAWVariable< float > m_widthStreching
the width streching in percent
Definition: MWAWFont.hxx:541
bool operator!=(MWAWFont const &f) const
operator!=
Definition: MWAWFont.hxx:497
void setStrikeOut(Line const &line)
sets the strikeoutline
Definition: MWAWFont.hxx:401
void setStrikeOutType(Line::Type type=Line::Single)
sets the strikeoutline type
Definition: MWAWFont.hxx:414
MWAWVariable< Line > m_overline
overline attributes
Definition: MWAWFont.hxx:544
MWAWVariable< Line > m_strikeoutline
overline attributes
Definition: MWAWFont.hxx:545
MWAWVariable< float > m_deltaSpacing
expand(> 0), condensed(< 0) depl
Definition: MWAWFont.hxx:539
void resetColor()
resets the font color to black and the background color to white
Definition: MWAWFont.hxx:336
void setLanguage(std::string const &lang)
set the language ( in the for en_US, en_GB, en, ...)
Definition: MWAWFont.hxx:479
void setOverlineType(Line::Type type=Line::Single)
sets the overline type
Definition: MWAWFont.hxx:375
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:271
bool hasColor() const
returns true if the font color is not black
Definition: MWAWFont.hxx:310
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
float deltaLetterSpacing() const
returns the condensed(negative)/extended(positive) width
Definition: MWAWFont.hxx:261
void setOverlineColor(MWAWColor const &color)
sets the overline color
Definition: MWAWFont.hxx:390
MWAWVariable< std::string > m_language
the language if set
Definition: MWAWFont.hxx:549
void resetDecorationLines()
reset the decoration
Definition: MWAWFont.hxx:350
MWAWVariable< Line > m_underline
underline attributes
Definition: MWAWFont.hxx:546
bool isSet() const
returns true if the font id is initialized
Definition: MWAWFont.hxx:203
bool hasDecorationLines() const
return true if the font has decorations line (overline, strikeout, underline)
Definition: MWAWFont.hxx:343
float widthStreching() const
returns the text width streching
Definition: MWAWFont.hxx:277
void addToListLevel(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
add to the propList to a list level
Definition: MWAWFont.cxx:355
void setOverlineWidth(float w)
sets the overline width
Definition: MWAWFont.hxx:385
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
std::string const & language() const
returns the language
Definition: MWAWFont.hxx:474
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
Line const & getOverline() const
returns the overline
Definition: MWAWFont.hxx:357
void getColor(MWAWColor &c) const
returns the font color
Definition: MWAWFont.hxx:315
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
void setUnderlineWidth(float w)
sets the underline width
Definition: MWAWFont.hxx:463
void setOverline(Line const &line)
sets the overline
Definition: MWAWFont.hxx:362
void setOverlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the overline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:367
void setStrikeOutWordFlag(bool wordFlag=false)
sets the strikeoutline word flag
Definition: MWAWFont.hxx:419
MWAWVariable< uint32_t > m_flags
font attributes
Definition: MWAWFont.hxx:543
namespace used to define structure for the font manager
Definition: MWAWFont.cxx:388
Definition: MWAWDocument.hxx:57
the class to store a color
Definition: libmwaw_internal.hxx:182
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
Style
the line style
Definition: MWAWFont.hxx:49
@ None
Definition: MWAWFont.hxx:49
@ Dot
Definition: MWAWFont.hxx:49
@ Dash
Definition: MWAWFont.hxx:49
@ LargeDot
Definition: MWAWFont.hxx:49
@ Simple
Definition: MWAWFont.hxx:49
@ Wave
Definition: MWAWFont.hxx:49
bool isSet() const
return true if the line is not empty
Definition: MWAWFont.hxx:56
Type m_type
the type
Definition: MWAWFont.hxx:91
friend std::ostream & operator<<(std::ostream &o, Line const &line)
operator<<
Definition: MWAWFont.cxx:49
Line(Style style=None, Type type=Single, bool wordFlag=false, float w=1.0)
constructor
Definition: MWAWFont.hxx:53
float m_width
the width in point
Definition: MWAWFont.hxx:93
bool operator!=(Line const &oth) const
operator!=
Definition: MWAWFont.hxx:70
Type
the line style
Definition: MWAWFont.hxx:51
@ Single
Definition: MWAWFont.hxx:51
@ Double
Definition: MWAWFont.hxx:51
@ Triple
Definition: MWAWFont.hxx:51
MWAWVariable< MWAWColor > m_color
the color ( if not set, we use the font color )
Definition: MWAWFont.hxx:95
Style m_style
the style
Definition: MWAWFont.hxx:89
bool operator==(Line const &oth) const
operator==
Definition: MWAWFont.hxx:65
int cmp(Line const &oth) const
small comparison function
Definition: MWAWFont.hxx:75
bool m_word
word or not word line
Definition: MWAWFont.hxx:97
void addTo(librevenge::RVNGPropertyList &propList, std::string const &type) const
add a line to the propList knowing the type (line-through, underline, overline )
Definition: MWAWFont.cxx:96
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
bool operator==(Script const &oth) const
operator==
Definition: MWAWFont.hxx:135
Script(float delta=0, librevenge::RVNGUnit deltaUnit=librevenge::RVNG_PERCENT, int scale=100)
constructor
Definition: MWAWFont.hxx:102
librevenge::RVNGUnit m_deltaUnit
the ydelta unit ( point or percent )
Definition: MWAWFont.hxx:176
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
bool isSet() const
return true if the position is not default
Definition: MWAWFont.hxx:107
bool operator<=(Script const &oth) const
operator<=
Definition: MWAWFont.hxx:150
int cmp(Script const &oth) const
small comparison function
Definition: MWAWFont.hxx:165
std::string str(float fSize) const
return a string which correspond to style:text-position
Definition: MWAWFont.cxx:148
bool operator>=(Script const &oth) const
operator>=
Definition: MWAWFont.hxx:160
int m_scale
the font scaling ( in percent )
Definition: MWAWFont.hxx:178
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
bool operator<(Script const &oth) const
operator<
Definition: MWAWFont.hxx:145
static Script sub()
return a yposition which correspond to a basic subscript
Definition: MWAWFont.hxx:112
float m_delta
the ydelta
Definition: MWAWFont.hxx:174
bool operator>(Script const &oth) const
operator>
Definition: MWAWFont.hxx:155
static Script super()
return a yposition which correspond to a basic superscript
Definition: MWAWFont.hxx:122
bool operator!=(Script const &oth) const
operator!=
Definition: MWAWFont.hxx:140
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition: libmwaw_internal.hxx:551
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581

Generated on Wed Jan 19 2022 22:23:15 for libmwaw by doxygen 1.9.3