RagTime5StyleManager.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 RAG_TIME_5_STYLE_MANAGER
35 # define RAG_TIME_5_STYLE_MANAGER
36 
37 #include <map>
38 #include <ostream>
39 #include <sstream>
40 #include <set>
41 #include <string>
42 #include <vector>
43 
44 #include "libmwaw_internal.hxx"
45 #include "MWAWDebug.hxx"
46 #include "MWAWEntry.hxx"
47 #include "MWAWGraphicStyle.hxx"
48 
51 
53 {
54 struct State;
55 }
56 
57 class RagTime5Parser;
58 
61 {
62  friend class RagTime5Parser;
63 public:
65  explicit RagTime5StyleManager(RagTime5Parser &parser);
68 
69  struct GraphicStyle;
70  struct TextStyle;
71 
80 
82  bool updateSurfaceStyle(int graphicId, MWAWGraphicStyle &surfaceStyle) const;
84  bool updateBorderStyle(int graphicId, MWAWGraphicStyle &borderStyle, bool isLine) const;
86  bool getLineColor(int graphicId, MWAWColor &color) const;
88  bool updateTextStyles(int textId, MWAWFont &font, MWAWParagraph &para) const;
90  bool getCellBorder(int graphicId, MWAWBorder &border) const;
92  bool getCellBackgroundColor(int graphicId, MWAWColor &color) const;
94  bool updateCellFormat(int formatId, MWAWCell &cell) const;
95 
96 protected:
98  void updateTextStyles(size_t id, RagTime5StyleManager::TextStyle const &style,
99  std::vector<RagTime5StyleManager::TextStyle> const &listReadStyles,
100  std::multimap<size_t, size_t> const &idToChildIpMap,
101  std::set<size_t> &seens);
103  void updateGraphicStyles(size_t id, RagTime5StyleManager::GraphicStyle const &style,
104  std::vector<RagTime5StyleManager::GraphicStyle> const &listReadStyles,
105  std::multimap<size_t, size_t> const &idToChildIpMap,
106  std::set<size_t> &seens);
107 
108 public:
110  struct GraphicStyle {
113  m_position(-1), m_cap(1), m_mitter(-1), m_limitPercent(-1), m_hidden(false), m_extra("")
114  {
117  m_colorsAlpha[0]=m_colorsAlpha[1]=-1;
118  }
120  virtual ~GraphicStyle();
122  bool isDefault() const
123  {
124  return m_parentId<=-1000 && m_width<0 && !m_dash.isSet() && !m_pattern &&
125  m_gradient<0 && m_gradientRotation<=-1000 && !m_gradientCenter.isSet() &&
126  m_position<0 && m_cap<0 && m_mitter<0 &&
127  !m_colors[0].isSet() && !m_colors[1].isSet() && m_colorsAlpha[0]<0 && m_colorsAlpha[1]<0 &&
128  m_limitPercent<0 && !m_hidden.isSet() && m_extra.empty();
129  }
131  friend std::ostream &operator<<(std::ostream &o, GraphicStyle const &style);
133  void insert(GraphicStyle const &childStyle);
135  bool read(MWAWInputStreamPtr &input, RagTime5StructManager::Field const &field, std::vector<MWAWColor> const &colorList);
139  float m_width;
143  float m_colorsAlpha[2];
147  shared_ptr<MWAWGraphicStyle::Pattern> m_pattern;
157  int m_cap;
159  int m_mitter;
165  std::string m_extra;
166  };
168  struct TextStyle {
173  m_numColumns(-1), m_columnGap(-1), m_extra("")
174  {
175  m_parentId[0]=m_parentId[1]=-1;
176  m_fontFlags[0]=m_fontFlags[1]=0;
177  for (int i=0; i<3; ++i) {
178  m_margins[i]=-1;
179  m_spacings[i]=-1;
180  m_spacingUnits[i]=-1;
181  }
182  for (int i=0; i<4; ++i) m_letterSpacings[i]=0;
183  }
185  virtual ~TextStyle();
187  bool isDefault() const
188  {
189  if (m_parentId[0]>=0 || m_parentId[1]>=0 || !m_linkIdList.empty() ||
191  m_keepWithNext.isSet() || m_justify>=0 || m_breakMethod>=0 || !m_tabList.empty() ||
192  !m_fontName.empty() || m_fontId>=0 || m_fontSize>=0 || m_fontFlags[0] || m_fontFlags[1] || m_scriptPosition.isSet() ||
193  m_fontScaling>=0 || m_underline>=0 || m_caps>=0 || m_language>=0 || m_widthStreching>=0 ||
194  m_numColumns>=0 || m_columnGap>=0 || !m_extra.empty())
195  return false;
196  for (int i=0; i<3; ++i) {
197  if (m_margins[i]>=0 || m_spacings[i]>=0 || m_spacingUnits[i]>=0)
198  return false;
199  }
200  for (int i=0; i<4; ++i) {
201  if (m_letterSpacings[i]>0 || m_letterSpacings[i]<0)
202  return false;
203  }
204  return true;
205  }
207  static std::string getLanguageLocale(int id);
208 
210  friend std::ostream &operator<<(std::ostream &o, TextStyle const &style);
212  void insert(TextStyle const &childStyle);
214  bool read(RagTime5StructManager::Field const &field);
216  int m_parentId[2];
218  std::vector<int> m_linkIdList;
225 
226  // paragraph
227 
233  double m_spacings[3];
239  double m_margins[3];
241  std::vector<RagTime5StructManager::TabStop> m_tabList;
242 
243  // character
244 
246  librevenge::RVNGString m_fontName;
248  int m_fontId;
250  float m_fontSize;
252  uint32_t m_fontFlags[2];
260  int m_caps;
264  double m_letterSpacings[4];
267 
268  // column
269 
273  double m_columnGap;
274 
276  std::string m_extra;
277  };
278 
279 protected:
280  //
281  // data
282  //
283 
288 
290  shared_ptr<RagTime5StyleManagerInternal::State> m_state;
291 
292 private:
295 };
296 
297 #endif
298 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
RagTime5StyleManager::TextStyle::m_margins
double m_margins[3]
the spacings in point ( left, right, first)
Definition: RagTime5StyleManager.hxx:239
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
RagTime5StyleManager::GraphicStyle::m_limitPercent
float m_limitPercent
the line limit
Definition: RagTime5StyleManager.hxx:161
RagTime5StyleManagerInternal::GraphicFieldParser::parseHeaderField
virtual bool parseHeaderField(RagTime5StructManager::Field &field, RagTime5Zone &zone, int n, libmwaw::DebugStream &f)
parse a header field
Definition: RagTime5StyleManager.cxx:162
MWAWCell::getFormat
Format const & getFormat() const
returns the cell format
Definition: MWAWCell.hxx:211
RagTime5StyleManagerInternal::TextFieldParser::parseField
virtual bool parseField(RagTime5StructManager::Field &field, RagTime5Zone &, int n, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StyleManager.cxx:234
RagTime5StructManager::Field::T_Unicode
@ T_Unicode
Definition: RagTime5StructManager.hxx:221
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
RagTime5StyleManager::readGraphicStyles
bool readGraphicStyles(RagTime5ClusterManager::Cluster &cluster)
try to read a main graphic styles
Definition: RagTime5StyleManager.cxx:311
RagTime5StyleManagerInternal::State::m_colorsList
std::vector< MWAWColor > m_colorsList
the list of color
Definition: RagTime5StyleManager.cxx:264
RagTime5StyleManager::updateCellFormat
bool updateCellFormat(int formatId, MWAWCell &cell) const
updates the cell format
Definition: RagTime5StyleManager.cxx:1204
MWAWFont::smallCapsBit
@ smallCapsBit
Definition: MWAWFont.hxx:184
MWAWTabStop::m_leaderCharacter
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:75
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
RagTime5StructManager::TabStop
a tabulation in RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:178
MWAWVariable< MWAWColor >
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
RagTime5StyleManager::TextStyle::m_parentId
int m_parentId[2]
the parent id ( main and style ?)
Definition: RagTime5StyleManager.hxx:216
RagTime5StyleManagerInternal::State
Internal: the state of a RagTime5Style.
Definition: RagTime5StyleManager.cxx:258
MWAWBorder::Dash
@ Dash
Definition: libmwaw_internal.hxx:316
RagTime5StyleManager::TextStyle::m_linkIdList
std::vector< int > m_linkIdList
the link id list
Definition: RagTime5StyleManager.hxx:218
RagTime5StyleManager::GraphicStyle::read
bool read(MWAWInputStreamPtr &input, RagTime5StructManager::Field const &field, std::vector< MWAWColor > const &colorList)
try to read a graphic style
Definition: RagTime5StyleManager.cxx:1232
MWAWFont::Line
a small struct to define a line in MWAWFont
Definition: MWAWFont.hxx:47
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:282
RagTime5StyleManagerInternal::TextFieldParser::TextFieldParser
TextFieldParser()
constructor
Definition: RagTime5StyleManager.cxx:209
RagTime5Parser::readUnicodeStringList
bool readUnicodeStringList(RagTime5ClusterManager::Link const &link, std::map< int, librevenge::RVNGString > &idToStringMap)
try to read a list of unicode string zone
Definition: RagTime5Parser.cxx:896
MWAWCell::F_DATE
@ F_DATE
Definition: MWAWCell.hxx:56
RagTime5StyleManagerInternal::ColorFieldParser::ColorFieldParser
ColorFieldParser()
constructor
Definition: RagTime5StyleManager.cxx:57
RagTime5StructManager::Field::T_Color
@ T_Color
Definition: RagTime5StructManager.hxx:221
RagTime5StyleManager::GraphicStyle::m_mitter
int m_mitter
the line mitter ( triangle=1, round, out)
Definition: RagTime5StyleManager.hxx:159
MWAWParagraph::m_tabs
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
MWAWCell::F_NUMBER_DECIMAL
@ F_NUMBER_DECIMAL
Definition: MWAWCell.hxx:58
RagTime5StyleManager::GraphicStyle::m_hidden
MWAWVariable< bool > m_hidden
flag to know if we need to print the shape
Definition: RagTime5StyleManager.hxx:163
MWAWGraphicStyle::m_gradientType
GradientType m_gradientType
the gradient type
Definition: MWAWGraphicStyle.hxx:396
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:182
MWAWCell::F_NUMBER_PERCENT
@ F_NUMBER_PERCENT
Definition: MWAWCell.hxx:58
RagTime5StructManager.hxx
RagTime5StructManager::Field::T_Unstructured
@ T_Unstructured
Definition: RagTime5StructManager.hxx:221
RagTime5StyleManagerInternal::ColorFieldParser::m_colorsList
std::vector< MWAWColor > m_colorsList
a map id to color
Definition: RagTime5StyleManager.cxx:134
RagTime5Parser
the main class to read a RagTime v5 file
Definition: RagTime5Parser.hxx:74
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
MWAWFont::setColor
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
MWAWFont::setWidthStreching
void setWidthStreching(float scale=1.0)
sets the text width streching
Definition: MWAWFont.hxx:282
RagTime5StyleManagerInternal::GraphicFieldParser::GraphicFieldParser
GraphicFieldParser(std::vector< MWAWColor > const &colorList)
constructor
Definition: RagTime5StyleManager.cxx:145
MWAWEntry.hxx
MWAWCell::FormatType
FormatType
the different format of a cell's content
Definition: MWAWCell.hxx:56
RagTime5StructManager::FieldParser::m_regroupFields
bool m_regroupFields
a flag use to decide if we output one debug message by field or not
Definition: RagTime5StructManager.hxx:338
RagTime5StyleManagerInternal::GraphicFieldParser::parseField
virtual bool parseField(RagTime5StructManager::Field &field, RagTime5Zone &zone, int n, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StyleManager.cxx:175
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:182
RagTime5StructManager::Field
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:218
RagTime5StyleManagerInternal::TextFieldParser::m_styleList
std::vector< RagTime5StyleManager::TextStyle > m_styleList
the list of read style
Definition: RagTime5StyleManager.cxx:254
MWAWParagraph::m_spacings
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:150
RagTime5StyleManagerInternal::State::initColorsList
void initColorsList()
init the color list (if empty)
Definition: RagTime5StyleManager.cxx:277
MWAWParagraph::JustificationFullAllLines
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:88
RagTime5StyleManagerInternal::ColorFieldParser::parseField
virtual bool parseField(RagTime5StructManager::Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StyleManager.cxx:71
MWAWCell::F_NUMBER_SCIENTIFIC
@ F_NUMBER_SCIENTIFIC
Definition: MWAWCell.hxx:58
RagTime5StyleManager::GraphicStyle::m_gradientCenter
MWAWVariable< MWAWVec2f > m_gradientCenter
the rotation center(checkme)
Definition: RagTime5StyleManager.hxx:153
RagTime5StyleManagerInternal::State::m_textStyleList
std::vector< RagTime5StyleManager::TextStyle > m_textStyleList
the list of text styles
Definition: RagTime5StyleManager.cxx:270
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
MWAWCell::setFormat
void setFormat(Format const &format)
set the cell format
Definition: MWAWCell.hxx:216
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
RagTime5StyleManagerInternal::TextFieldParser::getZoneName
std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StyleManager.cxx:215
MWAWFont::setUnderline
void setUnderline(Line const &line)
sets the underline
Definition: MWAWFont.hxx:440
MWAWBorder::m_width
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:357
RagTime5StyleManager::TextStyle::getLanguageLocale
static std::string getLanguageLocale(int id)
returns the language locale name corresponding to an id ( if known)
Definition: RagTime5StyleManager.cxx:1661
MWAWCell::F_NUMBER_GENERIC
@ F_NUMBER_GENERIC
Definition: MWAWCell.hxx:58
MWAWParserStatePtr
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
RagTime5StyleManager::TextStyle::m_graphStyleId
int m_graphStyleId
the graphic style id
Definition: RagTime5StyleManager.hxx:222
RagTime5Parser::readFixedSizeZone
bool readFixedSizeZone(RagTime5ClusterManager::Link const &link, std::string const &name)
try to read a fixed size zone
Definition: RagTime5Parser.cxx:1726
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWFont::setDeltaLetterSpacing
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:271
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
RagTime5StyleManager::TextStyle::isDefault
bool isDefault() const
returns true if the line style is default
Definition: RagTime5StyleManager.hxx:187
MWAWCell::Format::m_DTFormat
std::string m_DTFormat
a date/time format ( using a subset of strftime format )
Definition: MWAWCell.hxx:101
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
RagTime5StructManager::Field::m_tabList
std::vector< TabStop > m_tabList
the list of tabStop
Definition: RagTime5StructManager.hxx:257
RagTime5StructManager::Field::T_FieldList
@ T_FieldList
Definition: RagTime5StructManager.hxx:220
MWAWBorder::Dot
@ Dot
Definition: libmwaw_internal.hxx:316
RagTime5StyleManager::m_state
shared_ptr< RagTime5StyleManagerInternal::State > m_state
the state
Definition: RagTime5StyleManager.hxx:290
RagTime5StyleManagerInternal::GraphicFieldParser::m_colorsList
std::vector< MWAWColor > const & m_colorsList
Definition: RagTime5StyleManager.cxx:196
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
RagTime5StyleManager::readGraphicColors
bool readGraphicColors(RagTime5ClusterManager::Cluster &cluster)
try to read a graphic color zone
Definition: RagTime5StyleManager.cxx:302
RagTime5StyleManagerInternal::GraphicFieldParser
Internal: the helper to read field graphic field for a RagTime5StyleManager.
Definition: RagTime5StyleManager.cxx:143
RagTime5StyleManager::TextStyle::TextStyle
TextStyle()
constructor
Definition: RagTime5StyleManager.hxx:170
MWAWGraphicStyle::m_gradientStopList
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:402
RagTime5StyleManager::GraphicStyle::m_parentId
int m_parentId
the parent id
Definition: RagTime5StyleManager.hxx:137
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:182
RagTime5StyleManager::TextStyle::m_dateStyleId
int m_dateStyleId
the date style id
Definition: RagTime5StyleManager.hxx:220
MWAWGraphicStyle::m_lineOpacity
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:381
MWAWFont::uppercaseBit
@ uppercaseBit
Definition: MWAWFont.hxx:184
MWAWCell.hxx
RagTime5StyleManager
basic class used to read/store RagTime 5/6 styles
Definition: RagTime5StyleManager.hxx:61
RagTime5StyleManager::RagTime5StyleManager
RagTime5StyleManager(RagTime5Parser &parser)
constructor
Definition: RagTime5StyleManager.cxx:290
MWAWCell::Format::m_digits
int m_digits
the number of digits
Definition: MWAWCell.hxx:87
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MWAWFont::setStrikeOutStyle
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
MWAWVariable::isSet
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
RagTime5StyleManager::TextStyle::m_language
int m_language
the language
Definition: RagTime5StyleManager.hxx:262
MWAWGraphicStyle::Pattern
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
RagTime5StyleManager::TextStyle::m_fontId
int m_fontId
the font id
Definition: RagTime5StyleManager.hxx:248
RagTime5ClusterManager.hxx
RagTime5StyleManager::TextStyle::m_tabList
std::vector< RagTime5StructManager::TabStop > m_tabList
the tabulations
Definition: RagTime5StyleManager.hxx:241
RagTime5StyleManagerInternal::GraphicFieldParser::m_styleList
std::vector< RagTime5StyleManager::GraphicStyle > m_styleList
the list of graphic style
Definition: RagTime5StyleManager.cxx:198
RagTime5StructManager::Field::m_doubleList
std::vector< double > m_doubleList
the list of double value
Definition: RagTime5StructManager.hxx:253
RagTime5StructManager::FieldParser
virtual class use to parse the field data
Definition: RagTime5StructManager.hxx:308
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:205
MWAWCell::Format::m_numberFormat
NumberType m_numberFormat
the numeric format
Definition: MWAWCell.hxx:85
RagTime5StyleManager::updateBorderStyle
bool updateBorderStyle(int graphicId, MWAWGraphicStyle &borderStyle, bool isLine) const
updates a graphic style(border)
Definition: RagTime5StyleManager.cxx:526
RagTime5StyleManagerInternal::GraphicFieldParser::~GraphicFieldParser
virtual ~GraphicFieldParser()
destructor
Definition: RagTime5StyleManager.cxx:201
RagTime5StyleManagerInternal
Internal: the structures of a RagTime5Style.
Definition: RagTime5StyleManager.cxx:52
RagTime5StyleManager::TextStyle::m_caps
int m_caps
caps : none, all caps, lower caps, inital caps + other lowers
Definition: RagTime5StyleManager.hxx:260
RagTime5StyleManager::GraphicStyle::m_width
float m_width
the line width (in point)
Definition: RagTime5StyleManager.hxx:139
RagTime5StyleManager::TextStyle::read
bool read(RagTime5StructManager::Field const &field)
try to read a text style
Definition: RagTime5StyleManager.cxx:1714
MWAWFont::initialcaseBit
@ initialcaseBit
Definition: MWAWFont.hxx:186
RagTime5StyleManager::TextStyle::m_letterSpacings
double m_letterSpacings[4]
the spacings in percent ( normal, minimum, maximum)
Definition: RagTime5StyleManager.hxx:264
RagTime5StructManager::Field::T_Code
@ T_Code
Definition: RagTime5StructManager.hxx:221
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
MWAWParagraph::m_breakStatus
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:163
MWAWFont::Line::None
@ None
Definition: MWAWFont.hxx:49
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:183
MWAWFont::Line::m_type
Type m_type
the type
Definition: MWAWFont.hxx:91
RagTime5StructManager::Field::m_fileType
long m_fileType
the file type
Definition: RagTime5StructManager.hxx:239
RagTime5Parser::readLongList
bool readLongList(RagTime5ClusterManager::Link const &link, std::vector< long > &list)
try to read/get the list of long of a L_LongList
Definition: RagTime5Parser.cxx:945
MWAWParagraph.hxx
RagTime5StructManager::Field::m_longValue
long m_longValue[2]
the long value
Definition: RagTime5StructManager.hxx:243
RagTime5StructManager::Field::m_color
MWAWColor m_color
the color
Definition: RagTime5StructManager.hxx:247
libmwaw_internal.hxx
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
RagTime5StyleManagerInternal::TextFieldParser::parseHeaderField
virtual bool parseHeaderField(RagTime5StructManager::Field &field, RagTime5Zone &, int n, libmwaw::DebugStream &f)
parse a header field
Definition: RagTime5StyleManager.cxx:222
RagTime5StyleManager::TextStyle::m_keepWithNext
MWAWVariable< bool > m_keepWithNext
the keep with next flag
Definition: RagTime5StyleManager.hxx:229
MWAWColor::getBlue
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:250
MWAWGraphicStyle::G_Radial
@ G_Radial
Definition: MWAWGraphicStyle.hxx:55
MWAWCell::Format
a structure uses to define the format of a cell content
Definition: MWAWCell.hxx:60
RagTime5StructManager::Field::T_Long
@ T_Long
Definition: RagTime5StructManager.hxx:220
MWAWBorder
a border
Definition: libmwaw_internal.hxx:314
RagTime5StructManager::Field::m_string
librevenge::RVNGString m_string
small string use to store a string or a 4 char code
Definition: RagTime5StructManager.hxx:249
RagTime5Zone
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:49
RagTime5StyleManager::GraphicStyle::m_gradient
int m_gradient
the gradient 0: none, normal, radial
Definition: RagTime5StyleManager.hxx:149
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
RagTime5StyleManager::TextStyle::m_spacings
double m_spacings[3]
the interline/before/after value
Definition: RagTime5StyleManager.hxx:233
RagTime5StyleManagerInternal::ColorFieldParser
Internal: the helper to read field color field for a RagTime5StyleManager.
Definition: RagTime5StyleManager.cxx:55
RagTime5StyleManager::TextStyle::m_numColumns
int m_numColumns
the number of columns
Definition: RagTime5StyleManager.hxx:271
RagTime5Parser::readPositions
bool readPositions(int posId, std::vector< long > &listPosition)
try to read a positions zone in data
Definition: RagTime5Parser.cxx:954
RagTime5StructManager::Field::T_DoubleList
@ T_DoubleList
Definition: RagTime5StructManager.hxx:220
RagTime5StyleManager::TextStyle::m_fontName
librevenge::RVNGString m_fontName
the font name
Definition: RagTime5StyleManager.hxx:246
RagTime5StructManager::Field::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:263
MWAWVec2< float >
RagTime5Zone::getInput
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:77
MWAWCell::F_NUMBER_FRACTION
@ F_NUMBER_FRACTION
Definition: MWAWCell.hxx:58
RagTime5StructManager::FieldParser::FieldParser
FieldParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:310
RagTime5StyleManager::TextStyle::m_extra
std::string m_extra
extra data
Definition: RagTime5StyleManager.hxx:276
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:73
RagTime5StyleManager::RagTime5StyleManager
RagTime5StyleManager(RagTime5StyleManager const &orig)
MWAWDebug.hxx
RagTime5StyleManager::TextStyle::m_scriptPosition
MWAWVariable< float > m_scriptPosition
the font script position ( in percent)
Definition: RagTime5StyleManager.hxx:254
RagTime5StyleManagerInternal::TextFieldParser::~TextFieldParser
virtual ~TextFieldParser()
destructor
Definition: RagTime5StyleManager.cxx:273
RagTime5StyleManager::GraphicStyle::insert
void insert(GraphicStyle const &childStyle)
update the current style
Definition: RagTime5StyleManager.cxx:1528
RagTime5StyleManager::TextStyle::m_widthStreching
double m_widthStreching
the width streching
Definition: RagTime5StyleManager.hxx:266
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
RagTime5StyleManager::GraphicStyle::GraphicStyle
GraphicStyle()
constructor
Definition: RagTime5StyleManager.hxx:112
RagTime5StyleManager::getLineColor
bool getLineColor(int graphicId, MWAWColor &color) const
returns the line color corresponding to a graphic style
Definition: RagTime5StyleManager.cxx:440
MWAWGraphicStyle::setPattern
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:293
RagTime5StyleManager::TextStyle::m_graphLineStyleId
int m_graphLineStyleId
the graphic line style id
Definition: RagTime5StyleManager.hxx:224
RagTime5StyleManager::GraphicStyle
the graphic style of a RagTime v5-v6 document
Definition: RagTime5StyleManager.hxx:110
RagTime5StructManager::Field::T_Double
@ T_Double
Definition: RagTime5StructManager.hxx:220
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
RagTime5StyleManagerInternal::ColorFieldParser::~ColorFieldParser
virtual ~ColorFieldParser()
destructor
Definition: RagTime5StyleManager.cxx:137
RagTime5StyleManagerInternal::TextFieldParser
Internal: the helper to read style for a RagTime5StyleManager.
Definition: RagTime5StyleManager.cxx:207
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
MWAWFont::Line::m_style
Style m_style
the style
Definition: MWAWFont.hxx:89
RagTime5StyleManager::GraphicStyle::m_extra
std::string m_extra
extra data
Definition: RagTime5StyleManager.hxx:165
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
RagTime5StyleManager.hxx
RagTime5StyleManager::TextStyle::m_justify
int m_justify
justify 0: left, 1:center, 2:right, 3:full, 4:full all
Definition: RagTime5StyleManager.hxx:231
RagTime5StructManager::Field::m_doubleValue
double m_doubleValue
the double value
Definition: RagTime5StructManager.hxx:245
RagTime5Parser::getDataZone
shared_ptr< RagTime5Zone > getDataZone(int dataId) const
returns the zone corresponding to a data id (or 0)
Definition: RagTime5Parser.cxx:400
MWAWGraphicStyle::G_Linear
@ G_Linear
Definition: MWAWGraphicStyle.hxx:55
RagTime5StyleManager::readFormats
bool readFormats(RagTime5ClusterManager::Cluster &cluster)
try to read the list of format
Definition: RagTime5StyleManager.cxx:880
MWAWGraphicStyle::GradientStop
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:134
MWAWFont::Line::m_word
bool m_word
word or not word line
Definition: MWAWFont.hxx:97
RagTime5StyleManager::getCellBorder
bool getCellBorder(int graphicId, MWAWBorder &border) const
returns a cell border
Definition: RagTime5StyleManager.cxx:454
RagTime5StructManager::Field::T_2Long
@ T_2Long
Definition: RagTime5StructManager.hxx:220
RagTime5ClusterManager::Cluster::m_linksList
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:258
MWAWGraphicStyle::Pattern::m_colors
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
RagTime5StructManager::Field::m_longList
std::vector< long > m_longList
the list of long value
Definition: RagTime5StructManager.hxx:251
RagTime5StyleManager::m_mainParser
RagTime5Parser & m_mainParser
the parser
Definition: RagTime5StyleManager.hxx:285
RagTime5StyleManager::GraphicStyle::m_pattern
shared_ptr< MWAWGraphicStyle::Pattern > m_pattern
the line pattern
Definition: RagTime5StyleManager.hxx:147
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
MWAWBorder::m_style
Style m_style
the border style
Definition: libmwaw_internal.hxx:350
RagTime5StyleManager::TextStyle::m_columnGap
double m_columnGap
the gap between columns
Definition: RagTime5StyleManager.hxx:273
RagTime5ClusterManager::Cluster::m_dataLink
Link m_dataLink
the main data link
Definition: RagTime5ClusterManager.hxx:248
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
RagTime5StyleManager::TextStyle::m_breakMethod
int m_breakMethod
the break method 0: asIs, next container, next page, next even page, next odd page
Definition: RagTime5StyleManager.hxx:237
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:383
MWAWCell::F_NUMBER
@ F_NUMBER
Definition: MWAWCell.hxx:56
MWAWCell::F_TIME
@ F_TIME
Definition: MWAWCell.hxx:56
operator<<
std::ostream & operator<<(std::ostream &o, RagTime5StyleManager::GraphicStyle const &style)
Definition: RagTime5StyleManager.cxx:1554
RagTime5StyleManager::updateSurfaceStyle
bool updateSurfaceStyle(int graphicId, MWAWGraphicStyle &surfaceStyle) const
updates a graphic style
Definition: RagTime5StyleManager.cxx:562
MWAWGraphicStyle.hxx
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:182
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:144
MWAWCell::F_NUMBER_CURRENCY
@ F_NUMBER_CURRENCY
Definition: MWAWCell.hxx:58
RagTime5StyleManager::TextStyle::m_fontSize
float m_fontSize
the font size
Definition: RagTime5StyleManager.hxx:250
RagTime5StyleManager::TextStyle::operator<<
friend std::ostream & operator<<(std::ostream &o, TextStyle const &style)
operator<<
Definition: RagTime5StyleManager.cxx:2309
MWAWParagraph::NoBreakWithNextBit
@ NoBreakWithNextBit
Definition: MWAWParagraph.hxx:85
MWAWCell::Format::m_format
FormatType m_format
the cell format : by default unknown
Definition: MWAWCell.hxx:83
RagTime5StyleManager::GraphicStyle::m_colors
MWAWVariable< MWAWColor > m_colors[2]
the first and second color
Definition: RagTime5StyleManager.hxx:141
MWAWColor::getRed
unsigned char getRed() const
returns the red value
Definition: libmwaw_internal.hxx:255
RagTime5StyleManager::GraphicStyle::m_cap
int m_cap
the line caps ( normal=1, round, square)
Definition: RagTime5StyleManager.hxx:157
RagTime5StyleManager::updateTextStyles
bool updateTextStyles(int textId, MWAWFont &font, MWAWParagraph &para) const
update the font and the paragraph properties using a text style
Definition: RagTime5StyleManager.cxx:738
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:87
RagTime5StructManager::Field::T_LongList
@ T_LongList
Definition: RagTime5StructManager.hxx:220
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:88
RagTime5StyleManager::TextStyle::m_fontFlags
uint32_t m_fontFlags[2]
the font flags (add and remove )
Definition: RagTime5StyleManager.hxx:252
MWAWCell::Format::m_parenthesesForNegative
bool m_parenthesesForNegative
true if we use parenthese to print negative number
Definition: MWAWCell.hxx:97
RagTime5StructManager::Field::T_LongDouble
@ T_LongDouble
Definition: RagTime5StructManager.hxx:221
RagTime5StyleManager::GraphicStyle::isDefault
bool isDefault() const
returns true if the line style is default
Definition: RagTime5StyleManager.hxx:122
RagTime5StructManager::Field::T_TabList
@ T_TabList
Definition: RagTime5StructManager.hxx:220
RagTime5StyleManagerInternal::State::m_formatList
std::vector< MWAWCell::Format > m_formatList
the list of format
Definition: RagTime5StyleManager.cxx:266
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWGraphicStyle::m_lineDashWidth
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:373
RagTime5StyleManagerInternal::State::m_graphicStyleList
std::vector< RagTime5StyleManager::GraphicStyle > m_graphicStyleList
the list of graphic styles
Definition: RagTime5StyleManager.cxx:268
RagTime5StyleManager::updateGraphicStyles
void updateGraphicStyles(size_t id, RagTime5StyleManager::GraphicStyle const &style, std::vector< RagTime5StyleManager::GraphicStyle > const &listReadStyles, std::multimap< size_t, size_t > const &idToChildIpMap, std::set< size_t > &seens)
recursive function use to update the style list
Definition: RagTime5StyleManager.cxx:417
MWAWGraphicStyle::m_gradientPercentCenter
MWAWVec2f m_gradientPercentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:408
RagTime5StructManager::Field::T_Bool
@ T_Bool
Definition: RagTime5StructManager.hxx:220
RagTime5StructManager
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:157
MWAWVariable::get
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
RagTime5StyleManager::operator=
RagTime5StyleManager operator=(RagTime5StyleManager const &orig)
RagTime5StructManager::TabStop::m_leaderChar
uint16_t m_leaderChar
the unicode leader char
Definition: RagTime5StructManager.hxx:215
MWAWBorder::LargeDot
@ LargeDot
Definition: libmwaw_internal.hxx:316
RagTime5ClusterManager::Cluster::m_nameLink
Link m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:250
RagTime5StyleManagerInternal::ColorFieldParser::getZoneName
std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StyleManager.cxx:64
RagTime5StructManager::TabStop::m_position
float m_position
the position
Definition: RagTime5StructManager.hxx:211
RagTime5StyleManager::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: RagTime5StyleManager.hxx:287
RagTime5StyleManager::GraphicStyle::operator<<
friend std::ostream & operator<<(std::ostream &o, GraphicStyle const &style)
operator<<
Definition: RagTime5StyleManager.cxx:1554
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
RagTime5ClusterManager::Cluster
the cluster data
Definition: RagTime5ClusterManager.hxx:216
RagTime5StyleManager::TextStyle::~TextStyle
virtual ~TextStyle()
destructor
Definition: RagTime5StyleManager.cxx:1657
RagTime5StyleManager::~RagTime5StyleManager
~RagTime5StyleManager()
destructor
Definition: RagTime5StyleManager.cxx:295
MWAWFont::Script
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
MWAWFont::Line::Double
@ Double
Definition: MWAWFont.hxx:51
RagTime5StyleManager::TextStyle
the text style of a RagTime v5-v6 document
Definition: RagTime5StyleManager.hxx:168
RagTime5StyleManager::TextStyle::m_underline
int m_underline
underline : none, single, double
Definition: RagTime5StyleManager.hxx:258
MWAWGraphicStyle::m_gradientAngle
float m_gradientAngle
the gradient angle
Definition: MWAWGraphicStyle.hxx:404
RagTime5StyleManager::GraphicStyle::~GraphicStyle
virtual ~GraphicStyle()
destructor
Definition: RagTime5StyleManager.cxx:1228
RagTime5StyleManagerInternal::State::State
State()
constructor
Definition: RagTime5StyleManager.cxx:260
RagTime5StyleManager::TextStyle::m_fontScaling
float m_fontScaling
the font script position ( in percent)
Definition: RagTime5StyleManager.hxx:256
MWAWFont.hxx
RagTime5StyleManager::GraphicStyle::m_colorsAlpha
float m_colorsAlpha[2]
alpha of the first and second color
Definition: RagTime5StyleManager.hxx:143
RagTime5StructManager::TabStop::m_type
int m_type
the type
Definition: RagTime5StructManager.hxx:213
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
MWAWFont::setLanguage
void setLanguage(std::string const &lang)
set the language ( in the for en_US, en_GB, en, ...)
Definition: MWAWFont.hxx:479
MWAWColor::getGreen
unsigned char getGreen() const
returns the green value
Definition: libmwaw_internal.hxx:260
RagTime5StyleManager::GraphicStyle::m_dash
MWAWVariable< std::vector< long > > m_dash
the line dash/...
Definition: RagTime5StyleManager.hxx:145
RagTime5StyleManagerInternal::GraphicFieldParser::getZoneName
std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StyleManager.cxx:152
RagTime5StructManager::Field::m_entry
MWAWEntry m_entry
entry to defined the position of a String or Unstructured data
Definition: RagTime5StructManager.hxx:261
RagTime5StyleManager::readTextStyles
bool readTextStyles(RagTime5ClusterManager::Cluster &cluster)
try to read a main text styles
Definition: RagTime5StyleManager.cxx:598
RagTime5Parser::readStructZone
bool readStructZone(RagTime5ClusterManager::Cluster &cluster, RagTime5StructManager::FieldParser &parser, int headerSz)
try to read a structured zone
Definition: RagTime5Parser.cxx:1790
MWAWBorder::m_color
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:363
RagTime5StyleManager::TextStyle::insert
void insert(TextStyle const &childStyle)
update the current style
Definition: RagTime5StyleManager.cxx:2265
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
RagTime5StyleManager::GraphicStyle::m_gradientRotation
float m_gradientRotation
the gradient rotation(checkme)
Definition: RagTime5StyleManager.hxx:151
RagTime5StructManager::Field::m_type
Type m_type
the field type
Definition: RagTime5StructManager.hxx:237
RagTime5StyleManager::GraphicStyle::m_position
int m_position
the line position inside=1/normal/outside/round
Definition: RagTime5StyleManager.hxx:155
RagTime5StructManager::Field::m_fieldList
std::vector< Field > m_fieldList
the list of field
Definition: RagTime5StructManager.hxx:259
MWAWFont::setUnderlineStyle
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
RagTime5Parser.hxx
MWAWCell::Format::m_thousandHasSeparator
bool m_thousandHasSeparator
true if we must separate the thousand
Definition: MWAWCell.hxx:95
RagTime5StyleManager::TextStyle::m_spacingUnits
int m_spacingUnits[3]
the interline/before/after unit 0: line, 1:point
Definition: RagTime5StyleManager.hxx:235
RagTime5StyleManager::getCellBackgroundColor
bool getCellBackgroundColor(int graphicId, MWAWColor &color) const
returns the cell background
Definition: RagTime5StyleManager.cxx:500
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
MWAWFont::lowercaseBit
@ lowercaseBit
Definition: MWAWFont.hxx:185

Generated on Wed Jun 17 2020 06:30:13 for libmwaw by doxygen 1.8.18