StarState.hxx Source File documentation

StarState.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/* libstaroffice
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/*
35 * StarPool to store the state
36 *
37 */
38#ifndef STAR_STATE_HXX
39# define STAR_STATE_HXX
40
41#include <vector>
42
43#include "libstaroffice_internal.hxx"
44
45#include "STOFFCellStyle.hxx"
46#include "STOFFFont.hxx"
47#include "STOFFFrameStyle.hxx"
48#include "STOFFGraphicStyle.hxx"
49#include "STOFFParagraph.hxx"
50#include "STOFFPageSpan.hxx"
51#include "STOFFSection.hxx"
52
53class StarItemPool;
54class StarObject;
55class StarZone;
56class StarObjectNumericRuler;
57class STOFFList;
58
59 namespace SWFieldManagerInternal
60{
61struct Field;
62}
63
66 class StarState
67{
68public:
70 struct GlobalState {
72 GlobalState(StarItemPool const *pool, StarObject &object, double relUnit=0.05) :
73 m_pool(pool), m_object(object), m_numericRuler(),
74 m_page(), m_pageName(""), m_pageNameList(), m_pageZone(STOFFPageSpan::Page), m_pageOccurence("all"),
75 m_list(), m_listLevel(-1),
76 m_relativeUnit(relUnit)
77 {
78 }
79
80 ~GlobalState();
82 StarItemPool const *m_pool;
84 StarObject &m_object;
86 shared_ptr<StarObjectNumericRuler> m_numericRuler;
88 STOFFPageSpan m_page;
90 librevenge::RVNGString m_pageName;
92 std::vector<librevenge::RVNGString> m_pageNameList;
94 STOFFPageSpan::ZoneType m_pageZone;
96 std::string m_pageOccurence;
98 shared_ptr<STOFFList> m_list;
100 int m_listLevel;
102 double m_relativeUnit;
103
104 private:
105 GlobalState(GlobalState const &);
106 GlobalState &operator=(GlobalState const &);
107 };
108
109 StarState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
110 : m_global(new GlobalState(pool, object, relUnit))
111 , m_styleName("")
112 , m_break(0)
113 , m_cell()
114 , m_frame()
115 , m_graphic()
116 , m_paragraph()
117 , m_font(), m_content(false), m_footnote(false), m_link(""), m_refMark(""), m_field()
118 {
119 }
120
121 explicit StarState(shared_ptr<GlobalState> global) :
122 m_global(global),
123 m_styleName(""),
124 m_break(0),
125 m_cell(),
126 m_frame(),
127 m_graphic(),
128 m_paragraph(),
129 m_font(), m_content(false), m_footnote(false), m_link(""), m_refMark(""), m_field()
130 {
131 }
132
133 explicit StarState(StarState const &orig);
135 ~StarState();
137 void reinitializeLineData();
139 shared_ptr<GlobalState> m_global;
141 librevenge::RVNGString m_styleName;
142
144 int m_break;
145
147 STOFFCellStyle m_cell;
149 STOFFFrameStyle m_frame;
151 STOFFGraphicStyle m_graphic;
152
154 STOFFParagraph m_paragraph;
156 STOFFFont m_font;
158 bool m_content;
160 bool m_footnote;
162 librevenge::RVNGString m_link;
164 librevenge::RVNGString m_refMark;
166 shared_ptr<SWFieldManagerInternal::Field> m_field;
167private:
168 StarState &operator=(StarState const &);
169};
170#endif
171// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
STOFFCellStyle.hxx
STOFFFont.hxx
STOFFFrameStyle.hxx
STOFFGraphicStyle.hxx
STOFFPageSpan.hxx
STOFFParagraph.hxx
STOFFSection.hxx
STOFFCellStyle
Class to store a cell style.
Definition STOFFCellStyle.hxx:44
STOFFFont
Class to store font.
Definition STOFFFont.hxx:44
STOFFFrameStyle
Class to store a frame style.
Definition STOFFFrameStyle.hxx:44
STOFFGraphicStyle
Class to store a graphic style.
Definition STOFFGraphicStyle.hxx:45
STOFFList
a small structure used to store the informations about a list
Definition STOFFList.hxx:103
STOFFPageSpan
A class which defines the page properties.
Definition STOFFPageSpan.hxx:76
STOFFPageSpan::ZoneType
ZoneType
the zone type
Definition STOFFPageSpan.hxx:79
STOFFParagraph
class to store the paragraph properties
Definition STOFFParagraph.hxx:48
StarItemPool
the main class to read/.
Definition StarItemPool.hxx:71
StarObjectNumericRuler
the main class to read a SwNumRules zone
Definition StarObjectNumericRuler.hxx:64
StarObject
an object corresponding to an OLE directory
Definition StarObject.hxx:65
StarState
class to store an state: ie.
Definition StarState.hxx:67
StarState::m_footnote
bool m_footnote
flag to know if this is a footnote
Definition StarState.hxx:160
StarState::m_break
int m_break
a page/column break: 1=columnBefore, 2=columnAfter, 3=columnBoth, 4=pageBefore, 5=pageAfter,...
Definition StarState.hxx:144
StarState::m_font
STOFFFont m_font
the font
Definition StarState.hxx:156
StarState::m_content
bool m_content
flag to know if this is a content zone
Definition StarState.hxx:158
StarState::StarState
StarState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition StarState.hxx:109
StarState::reinitializeLineData
void reinitializeLineData()
reinit the local data: break, font, content, footnote, ...
Definition StarState.cxx:64
StarState::m_global
shared_ptr< GlobalState > m_global
global state
Definition StarState.hxx:139
StarState::m_styleName
librevenge::RVNGString m_styleName
the style name
Definition StarState.hxx:141
StarState::StarState
StarState(shared_ptr< GlobalState > global)
constructor
Definition StarState.hxx:121
StarState::m_field
shared_ptr< SWFieldManagerInternal::Field > m_field
the field
Definition StarState.hxx:166
StarState::m_paragraph
STOFFParagraph m_paragraph
the paragraph style
Definition StarState.hxx:154
StarState::m_cell
STOFFCellStyle m_cell
the cell style
Definition StarState.hxx:147
StarState::m_graphic
STOFFGraphicStyle m_graphic
the graphic style
Definition StarState.hxx:151
StarState::m_frame
STOFFFrameStyle m_frame
the frame style
Definition StarState.hxx:149
StarState::~StarState
~StarState()
destructor
Definition StarState.cxx:60
StarState::m_link
librevenge::RVNGString m_link
the link url
Definition StarState.hxx:162
StarState::operator=
StarState & operator=(StarState const &)
StarState::m_refMark
librevenge::RVNGString m_refMark
the ref mark
Definition StarState.hxx:164
StarZone
a zone in a StarOffice file
Definition StarZone.hxx:57
libstaroffice_internal.hxx
SWFieldManagerInternal
Internal: the structures of a SWFieldManager.
Definition StarState.hxx:60
SWFieldManagerInternal::Field
Internal: a field.
Definition SWFieldManager.hxx:53
StarState::GlobalState
small struct use to store global data
Definition StarState.hxx:70
StarState::GlobalState::m_pageNameList
std::vector< librevenge::RVNGString > m_pageNameList
the list of page name
Definition StarState.hxx:92
StarState::GlobalState::m_pageName
librevenge::RVNGString m_pageName
the page name
Definition StarState.hxx:90
StarState::GlobalState::m_page
STOFFPageSpan m_page
the page
Definition StarState.hxx:88
StarState::GlobalState::GlobalState
GlobalState(GlobalState const &)
StarState::GlobalState::m_listLevel
int m_listLevel
the current list level
Definition StarState.hxx:100
StarState::GlobalState::m_pool
StarItemPool const * m_pool
the pool
Definition StarState.hxx:82
StarState::GlobalState::m_numericRuler
shared_ptr< StarObjectNumericRuler > m_numericRuler
the numeric ruler manager
Definition StarState.hxx:86
StarState::GlobalState::m_pageOccurence
std::string m_pageOccurence
the page occurence: all, first, left, right
Definition StarState.hxx:96
StarState::GlobalState::m_pageZone
STOFFPageSpan::ZoneType m_pageZone
the actual page zone: document, header, footer
Definition StarState.hxx:94
StarState::GlobalState::~GlobalState
~GlobalState()
destructor
Definition StarState.cxx:44
StarState::GlobalState::GlobalState
GlobalState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition StarState.hxx:72
StarState::GlobalState::m_relativeUnit
double m_relativeUnit
the relative unit uses to transform rel font height in point, default 1/20
Definition StarState.hxx:102
StarState::GlobalState::operator=
GlobalState & operator=(GlobalState const &)
StarState::GlobalState::m_list
shared_ptr< STOFFList > m_list
the current list
Definition StarState.hxx:98
StarState::GlobalState::m_object
StarObject & m_object
the object
Definition StarState.hxx:84