34 #ifndef RAG_TIME_5_STRUCT_MANAGER 35 # define RAG_TIME_5_STRUCT_MANAGER 60 for (
int i=0; i<2; ++i)
m_kinds[i]=
"";
76 std::string res(
m_kinds[main ? 0 : 1]);
77 std::string::size_type pos = res.find_last_of(
':');
78 if (pos == std::string::npos)
return res;
79 return res.substr(pos+1);
171 Field &field,
long fSz=0);
175 static bool readUnicodeString(
MWAWInputStreamPtr input,
long endPos, librevenge::RVNGString &
string);
177 static bool readDataIdList(
MWAWInputStreamPtr input,
int n, std::vector<int> &listIds);
182 TabStop() : m_position(0), m_type(1), m_leader(
"")
205 o <<
":#type=" << tab.
m_type;
209 o <<
":leader=" << tab.
m_leader.cstr();
222 enum Type { T_Unknown, T_Bool, T_Double, T_Long, T_2Long, T_FieldList, T_LongList, T_DoubleList, T_TabList,
223 T_Code, T_Color, T_CondColor, T_PrintInfo, T_String, T_Unicode,
T_ZoneId, T_LongDouble, T_Unstructured
228 m_longList(), m_doubleList(), m_numLongByData(1), m_tabList(), m_fieldList(),
m_entry(),
m_extra(
"")
230 for (
int i=0; i<2; ++i) m_longValue[i]=0;
333 GraphicStyle() : m_parentId(-1), m_width(-1), m_dash(), m_pattern(), m_gradient(0), m_gradientRotation(0), m_gradientCenter(0.5f,0.5f),
334 m_position(2), m_cap(1), m_mitter(1), m_limitPercent(1), m_hidden(false),
m_extra(
"")
338 m_colorsAlpha[0]=m_colorsAlpha[1]=1;
347 return m_parentId<0 && m_width<0 && m_dash.empty() && !m_pattern &&
348 m_gradient==0 && m_gradientRotation<=0 && m_gradientRotation>=0 && m_gradientCenter!=
MWAWVec2f(0.5f, 0.5f) &&
349 m_position==2 && m_cap==1 && m_mitter==1 &&
350 m_colors[0].isBlack() && m_colors[1].isWhite() && m_colorsAlpha[0]>=1 && m_colorsAlpha[1]>=1 &&
351 m_limitPercent>=1 && m_limitPercent<=1 && !m_hidden &&
m_extra.empty();
364 float m_colorsAlpha[2];
392 m_dateStyleId(-1), m_graphStyleId(-1), m_graphLineStyleId(-1), m_keepWithNext(false), m_justify(-1), m_breakMethod(-1), m_tabList(),
393 m_fontName(
""), m_fontId(-1), m_fontSize(-1), m_scriptPosition(0), m_fontScaling(-1), m_underline(-1), m_caps(-1), m_language(-1),
394 m_numColumns(-1), m_columnGap(-1),
m_extra(
"")
396 m_parentId[0]=m_parentId[1]=-1;
397 m_fontFlags[0]=m_fontFlags[1]=0;
398 for (
int i=0; i<3; ++i) {
401 m_spacingUnits[i]=-1;
402 m_letterSpacings[i]=-1;
412 if (m_parentId[0]>=0 || m_parentId[1]>=0 || !m_linkIdList.empty() ||
413 m_dateStyleId>=0 || m_graphStyleId>=0 || m_graphLineStyleId>=0 ||
414 m_keepWithNext.isSet() || m_justify>=0 || m_breakMethod>=0 || !m_tabList.empty() ||
415 !m_fontName.empty() || m_fontId>=0 || m_fontSize>=0 || m_fontFlags[0] || m_fontFlags[1] || m_scriptPosition.isSet() ||
416 m_fontScaling>=0 || m_underline>=0 || m_caps>=0 || m_language>=0 ||
417 m_numColumns>=0 || m_columnGap>=0 || !
m_extra.empty())
419 for (
int i=0; i<3; ++i) {
420 if (m_margins[i]>=0 || m_spacings[i]>=0 || m_spacingUnits[i]>=0 || m_letterSpacings[i]>=0)
447 double m_spacings[3];
449 int m_spacingUnits[3];
466 uint32_t m_fontFlags[2];
478 double m_letterSpacings[3];
int m_cap
the line caps ( normal=1, round, square)
Definition: RagTime5StructManager.hxx:378
a tabulation in RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:180
std::string m_asciiName
the ascii file name ( used if we need to create a ascii file)
Definition: RagTime5StructManager.hxx:147
bool isHeaderZone() const
returns true if the zone is a header zone(header, list zone, ...)
Definition: RagTime5StructManager.hxx:68
libmwaw::DebugFile & ascii()
returns the current ascii file
Definition: RagTime5StructManager.hxx:101
shared_ptr< MWAWGraphicStyle::Pattern > m_pattern
the line pattern
Definition: RagTime5StructManager.hxx:368
librevenge::RVNGString m_leader
the leader char
Definition: RagTime5StructManager.hxx:217
Definition: RagTime5StructManager.hxx:52
FileType m_fileType
the zone file type
Definition: RagTime5StructManager.hxx:116
FieldParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:270
long m_fileType
the file type
Definition: RagTime5StructManager.hxx:241
std::string m_name
the field name
Definition: RagTime5StructManager.hxx:325
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:274
int m_language
the language
Definition: RagTime5StructManager.hxx:476
virtual ~FieldParser()
destructor
Definition: RagTime5StructManager.hxx:272
std::string getKindLastPart(bool main=true) const
returns the main type
Definition: RagTime5StructManager.hxx:74
TabStop()
constructor
Definition: RagTime5StructManager.hxx:182
virtual std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StructManager.hxx:312
bool isMainInput() const
returns true if the input correspond to the basic file
Definition: RagTime5StructManager.hxx:96
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:226
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
float m_limitPercent
the line limit
Definition: RagTime5StructManager.hxx:382
int m_mitter
the line mitter ( triangle=1, round, out)
Definition: RagTime5StructManager.hxx:380
int m_graphLineStyleId
the graphic line style id
Definition: RagTime5StructManager.hxx:438
float m_width
the line width (in point)
Definition: RagTime5StructManager.hxx:360
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:386
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:221
int m_dateStyleId
the date style id
Definition: RagTime5StructManager.hxx:434
MWAWVariable< float > m_scriptPosition
the font script position ( in percent)
Definition: RagTime5StructManager.hxx:468
double m_columnGap
the gap between columns
Definition: RagTime5StructManager.hxx:485
virtual ~TextStyle()
destructor
Definition: RagTime5StructManager.hxx:406
int m_idsFlag[3]
the zone flag
Definition: RagTime5StructManager.hxx:132
int m_variableD[2]
the content of the zone D if it exists
Definition: RagTime5StructManager.hxx:138
double m_doubleValue
the double value
Definition: RagTime5StructManager.hxx:247
libmwaw::DebugFile * m_asciiFile
the ascii file corresponding to an input
Definition: RagTime5StructManager.hxx:149
~Field()
destructor
Definition: RagTime5StructManager.hxx:233
virtual class use to parse the field data
Definition: RagTime5StructManager.hxx:268
int m_numColumns
the number of columns
Definition: RagTime5StructManager.hxx:483
int m_subType
the zone sub type
Definition: RagTime5StructManager.hxx:118
shared_ptr< libmwaw::DebugFile > m_localAsciiFile
the local ascii file ( if we need to create a new input)
Definition: RagTime5StructManager.hxx:151
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:48
the class to store a color
Definition: libmwaw_internal.hxx:177
virtual ~RagTime5Zone()
destructor
Definition: RagTime5StructManager.hxx:64
int m_type
the type
Definition: RagTime5StructManager.hxx:215
librevenge::RVNGString m_fontName
the font name
Definition: RagTime5StructManager.hxx:460
float m_fontScaling
the font script position ( in percent)
Definition: RagTime5StructManager.hxx:470
TextStyle()
constructor
Definition: RagTime5StructManager.hxx:391
std::vector< double > m_doubleList
the list of double value
Definition: RagTime5StructManager.hxx:255
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:307
MWAWVec2f m_gradientCenter
the rotation center(checkme)
Definition: RagTime5StructManager.hxx:374
Definition: RagTime5StructManager.hxx:52
virtual class use to parse the unstructured data
Definition: RagTime5StructManager.hxx:301
float m_fontSize
the font size
Definition: RagTime5StructManager.hxx:464
Type m_type
the field type
Definition: RagTime5StructManager.hxx:239
GraphicStyle()
constructor
Definition: RagTime5StructManager.hxx:333
friend std::ostream & operator<<(std::ostream &o, RagTime5Zone const &z)
operator<<
Definition: RagTime5StructManager.cxx:2547
int m_breakMethod
the break method 0: asIs, next container, next page, next even page, next odd page ...
Definition: RagTime5StructManager.hxx:451
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:488
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:721
float m_gradientRotation
the gradient rotation(checkme)
Definition: RagTime5StructManager.hxx:372
bool m_isParsed
a flag to know if the zone is parsed
Definition: RagTime5StructManager.hxx:140
int m_underline
underline : none, single, double
Definition: RagTime5StructManager.hxx:472
long m_defPosition
the position of the definition in the main zones
Definition: RagTime5StructManager.hxx:120
Definition: RagTime5StructManager.hxx:52
void setAsciiFileName(std::string const &name)
defines the ascii name
Definition: RagTime5StructManager.hxx:108
Definition: RagTime5StructManager.hxx:223
std::string m_kinds[2]
the zone types: normal and packing
Definition: RagTime5StructManager.hxx:122
std::string m_name
the field type name
Definition: RagTime5StructManager.hxx:243
RagTime5Zone(MWAWInputStreamPtr input, libmwaw::DebugFile &asc)
constructor
Definition: RagTime5StructManager.hxx:54
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:220
virtual std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StructManager.hxx:279
std::vector< long > m_longList
the list of long value
Definition: RagTime5StructManager.hxx:253
bool m_regroupFields
a flag use to decide if we output one debug message by field or not
Definition: RagTime5StructManager.hxx:292
void createAsciiFile()
creates the ascii file
Definition: RagTime5StructManager.cxx:2472
std::string getZoneName() const
returns the zone name
Definition: RagTime5StructManager.cxx:2486
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:439
std::vector< MWAWEntry > m_entriesList
the list of original entries
Definition: RagTime5StructManager.hxx:134
Field()
constructor
Definition: RagTime5StructManager.hxx:227
MWAWEntry m_entry
the zone entry
Definition: RagTime5StructManager.hxx:124
bool m_hidden
flag to know if we need to print the shape
Definition: RagTime5StructManager.hxx:384
long m_fontId
the font id
Definition: RagTime5StructManager.hxx:462
int m_position
the line position inside=1/normal/outside/round
Definition: RagTime5StructManager.hxx:376
std::vector< TabStop > m_tabList
the tabulations
Definition: RagTime5StructManager.hxx:455
std::string m_name
the field name
Definition: RagTime5StructManager.hxx:295
std::vector< TabStop > m_tabList
the list of tabStop
Definition: RagTime5StructManager.hxx:259
std::string m_name
the zone name ( mainly used for debugging)
Definition: RagTime5StructManager.hxx:126
MWAWColor m_color
the color
Definition: RagTime5StructManager.hxx:249
int m_graphStyleId
the graphic style id
Definition: RagTime5StructManager.hxx:436
void setInput(MWAWInputStreamPtr input)
reset the current input
Definition: RagTime5StructManager.hxx:90
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:265
virtual ~GraphicStyle()
destructor
Definition: RagTime5StructManager.hxx:341
the graphic style of a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:331
the text style of a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:389
float m_position
the position
Definition: RagTime5StructManager.hxx:213
std::vector< int > m_linkIdList
the link id list
Definition: RagTime5StructManager.hxx:432
Definition: RagTime5StructManager.hxx:52
int m_numLongByData
the number of long by data (in m_longList)
Definition: RagTime5StructManager.hxx:257
bool isDefault() const
returns true if the line style is default
Definition: RagTime5StructManager.hxx:345
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Type
the different type
Definition: RagTime5StructManager.hxx:222
DataParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:303
FileType
the zone file type
Definition: RagTime5StructManager.hxx:52
virtual ~DataParser()
destructor
Definition: RagTime5StructManager.hxx:305
RagTime5Zone & operator=(RagTime5Zone const &orig)
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:158
std::vector< long > m_dash
the line dash/...
Definition: RagTime5StructManager.hxx:366
friend std::ostream & operator<<(std::ostream &o, TabStop const &tab)
operator<<
Definition: RagTime5StructManager.hxx:186
MWAWVariable< bool > m_keepWithNext
the keep with next flag
Definition: RagTime5StructManager.hxx:443
bool m_hiLoEndian
true if the endian is hilo
Definition: RagTime5StructManager.hxx:128
bool m_defaultInput
a flag used to know if the input is or not the default input
Definition: RagTime5StructManager.hxx:145
int m_ids[3]
the zone id
Definition: RagTime5StructManager.hxx:130
int m_gradient
the gradient 0: none, normal, radial
Definition: RagTime5StructManager.hxx:370
std::vector< Field > m_fieldList
the list of field
Definition: RagTime5StructManager.hxx:261
virtual bool parseField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StructManager.hxx:286
int m_parentId
the parent id
Definition: RagTime5StructManager.hxx:358
MWAWInputStreamPtr m_input
the main input
Definition: RagTime5StructManager.hxx:143
MWAWEntry m_entry
entry to defined the position of a String or Unstructured data
Definition: RagTime5StructManager.hxx:263
int m_justify
justify 0: left, 1:center, 2:right, 3:full, 4:full all
Definition: RagTime5StructManager.hxx:445
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:85
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:136
virtual bool parseData(MWAWInputStreamPtr &, long, RagTime5Zone &, int, libmwaw::DebugStream &)
parse a data
Definition: RagTime5StructManager.hxx:319
bool isDefault() const
returns true if the line style is default
Definition: RagTime5StructManager.hxx:410
int m_caps
caps : none, all caps, lower caps, inital caps + other lowers
Definition: RagTime5StructManager.hxx:474
librevenge::RVNGString m_string
small string use to store a string or a 4 char code
Definition: RagTime5StructManager.hxx:251