38 #ifndef CLARIS_WKS_STRUCT 39 # define CLARIS_WKS_STRUCT 93 P_Slide, P_SlideNote, P_SlideThumbnail, P_SlideMaster,
P_Unknown 96 enum ChildType { C_Zone, C_SubText, C_Graphic, C_Unknown };
104 , m_position(P_Unknown)
108 , m_pageDimension(0,0)
111 , m_beginSelection(0)
119 for (
auto &fl : m_flags) fl=0;
128 return m_position==P_Header||m_position==P_Footer;
134 return m_position==P_Slide || m_position==P_SlideNote || m_position==P_SlideThumbnail || m_position==P_SlideMaster;
139 MWAWVec2f minPt(m_box[0][0], m_box[0][1]);
140 MWAWVec2f maxPt(m_box[1][0], m_box[1][1]);
141 for (
int c=0; c<2; ++c) {
142 if (m_box.size()[c]>=0)
continue;
143 minPt[c]=m_box[1][c];
144 maxPt[c]=m_box[0][c];
156 for (
const auto &child : m_childs) {
157 if (child.m_page > nPages)
164 virtual void removeChild(
int cId,
bool normalChild);
166 virtual void removeChild(
int cId);
168 void updateChildPositions(
MWAWVec2f const &pageDim,
float formLength,
int numHorizontalPages=1);
170 void findForbiddenPagesBreaking(
float pageDim,
float formDim,
int dim,
MWAWVariable<int> &lastPage)
const;
175 friend std::ostream &
operator<<(std::ostream &o,
DSET const &doc);
238 MWAWVec2f minPt(m_box[0][0], m_box[0][1]);
239 MWAWVec2f maxPt(m_box[1][0], m_box[1][1]);
240 for (
int c=0; c<2; ++c) {
241 if (m_box.
size()[c]>=0)
continue;
242 minPt[c]=m_box[1][c];
243 maxPt[c]=m_box[0][c];
263 #if !defined(__clang__) 268 if (ch.
m_id != -1) o <<
"id=" << ch.
m_id <<
",";
272 o <<
"box=" << ch.
m_box <<
",";
int m_beginSelection
the begin of selection ( at least in text header)
Definition: ClarisWksStruct.hxx:204
int m_endSelection
the end of selection ( at least in text header)
Definition: ClarisWksStruct.hxx:206
long m_dataSize
the data size
Definition: ClarisWksStruct.hxx:73
T y() const
second element
Definition: libmwaw_internal.hxx:671
Child()
constructor
Definition: ClarisWksStruct.hxx:227
virtual ~DSET()
virtual destructor
Definition: ClarisWksStruct.hxx:123
ChildType m_type
the type
Definition: ClarisWksStruct.hxx:277
MWAWBox2f m_box
the bdbox
Definition: ClarisWksStruct.hxx:285
std::set< int > m_fathersList
the list of fathers
Definition: ClarisWksStruct.hxx:201
structure used to define the child of a DSET structure
Definition: ClarisWksStruct.hxx:225
friend std::ostream & operator<<(std::ostream &o, Child const &ch)
operator<<
Definition: ClarisWksStruct.hxx:249
friend std::ostream & operator<<(std::ostream &o, Struct const &z)
operator<<
Definition: ClarisWksStruct.cxx:54
a basic structure
Definition: ClarisWksStruct.hxx:53
long m_size
the size of the DSET header
Definition: ClarisWksStruct.hxx:178
int m_page
the page (if known)
Definition: ClarisWksStruct.hxx:192
bool isSlide() const
test if the zone is a slide
Definition: ClarisWksStruct.hxx:132
Definition: ClarisWksStruct.hxx:92
int m_internal
an internal variable used to do some computation
Definition: ClarisWksStruct.hxx:222
bool readHeader(MWAWInputStreamPtr input, bool strict=false)
try to read the header
Definition: ClarisWksStruct.cxx:72
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1065
Struct()
constructor
Definition: ClarisWksStruct.hxx:55
long m_numData
the number of header
Definition: ClarisWksStruct.hxx:180
int m_type
the type
Definition: ClarisWksStruct.hxx:77
Definition: NisusWrtText.cxx:318
int m_id
the zone identificator
Definition: ClarisWksStruct.hxx:199
MWAWBox2f m_box
the bounding box (if known)
Definition: ClarisWksStruct.hxx:194
int m_textType
the text type (header/footer,footnote, ...)
Definition: ClarisWksStruct.hxx:209
main structure which correspond to a document part
Definition: ClarisWksStruct.hxx:87
MWAWBox2f getBdBox() const
return the zone bdbox
Definition: ClarisWksStruct.hxx:236
T x() const
first element
Definition: libmwaw_internal.hxx:666
std::vector< int > m_otherChilds
the list of other child
Definition: ClarisWksStruct.hxx:217
MWAWBox2f getBdBox() const
return the zone bdbox
Definition: ClarisWksStruct.hxx:137
Definition: ClarisWksStruct.hxx:93
a class to define the parser state
Definition: MWAWParser.hxx:49
DSET()
constructor
Definition: ClarisWksStruct.hxx:99
long m_size
the size of the DSET header
Definition: ClarisWksStruct.hxx:69
bool m_parsed
a flag to know if the entry is sent or not to the listener
Definition: ClarisWksStruct.hxx:220
int m_page
the page if known
Definition: ClarisWksStruct.hxx:283
int m_fileType
the type ( 0: text, -1: graphic, ...)
Definition: ClarisWksStruct.hxx:189
int m_values[2]
an unknown value
Definition: ClarisWksStruct.hxx:79
Position
the zone position
Definition: ClarisWksStruct.hxx:91
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1191
Position m_position
the zone type
Definition: ClarisWksStruct.hxx:187
namespace to store the main structure which appears in a ClarisDraw/ClarisWorks file ...
Definition: ClarisWksStruct.cxx:49
long m_dataSz
the data size
Definition: ClarisWksStruct.hxx:182
int getMaximumPage() const
returns the maximum page
Definition: ClarisWksStruct.hxx:149
long m_numData
the number of header
Definition: ClarisWksStruct.hxx:71
long m_headerSize
the header size
Definition: ClarisWksStruct.hxx:75
std::vector< Child > m_childs
the list of child zone
Definition: ClarisWksStruct.hxx:215
ChildType
the different types of zone child
Definition: ClarisWksStruct.hxx:96
Definition: ClarisDrawText.cxx:60
bool isHeaderFooter() const
test if the zone is an header/footer
Definition: ClarisWksStruct.hxx:126
long m_posC
a position (used in text zone to store the character )
Definition: ClarisWksStruct.hxx:281
bool readIntZone(MWAWParserState &parserState, char const *zoneName, bool hasEntete, int intSz, std::vector< int > &res)
try to read a int structured zone where fSz to the int size: 1(int8), 2(int16), 4(int32) ...
Definition: ClarisWksStruct.cxx:99
int m_id
the identificator
Definition: ClarisWksStruct.hxx:279
Definition: ClarisWksStruct.hxx:91
MWAWVec2f m_pageDimension
the page dimension (if know)
Definition: ClarisWksStruct.hxx:196
long m_headerSz
the header size
Definition: ClarisWksStruct.hxx:184
bool readStructZone(MWAWParserState &parserState, char const *zoneName, bool hasEntete)
try to read a structured zone with unknown content
Definition: ClarisWksStruct.cxx:162