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 
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 
53 class StarItemPool;
54 class StarObject;
55 class StarZone;
57 class STOFFList;
58 
60 {
61 struct Field;
62 }
63 
66 class StarState
67 {
68 public:
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  }
80  ~GlobalState();
86  shared_ptr<StarObjectNumericRuler> m_numericRuler;
90  librevenge::RVNGString m_pageName;
92  std::vector<librevenge::RVNGString> m_pageNameList;
96  std::string m_pageOccurence;
98  shared_ptr<STOFFList> m_list;
103 
104  private:
105  GlobalState(GlobalState const &);
106  GlobalState &operator=(GlobalState const &);
107  };
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  }
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  }
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 
152 
158  bool m_content;
162  librevenge::RVNGString m_link;
164  librevenge::RVNGString m_refMark;
166  shared_ptr<SWFieldManagerInternal::Field> m_field;
167 private:
168  StarState &operator=(StarState const &);
169 };
170 #endif
171 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StarItemPool const * m_pool
the pool
Definition: StarState.hxx:82
int m_listLevel
the current list level
Definition: StarState.hxx:100
StarState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition: StarState.hxx:109
GlobalState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition: StarState.hxx:72
class to store an state: ie.
Definition: StarState.hxx:66
shared_ptr< StarObjectNumericRuler > m_numericRuler
the numeric ruler manager
Definition: StarState.hxx:86
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:43
librevenge::RVNGString m_link
the link url
Definition: StarState.hxx:162
Internal: a field.
Definition: SWFieldManager.hxx:53
shared_ptr< GlobalState > m_global
global state
Definition: StarState.hxx:139
STOFFGraphicStyle m_graphic
the graphic style
Definition: StarState.hxx:151
bool m_content
flag to know if this is a content zone
Definition: StarState.hxx:158
STOFFPageSpan::ZoneType m_pageZone
the actual page zone: document, header, footer
Definition: StarState.hxx:94
STOFFPageSpan m_page
the page
Definition: StarState.hxx:88
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
std::string m_pageOccurence
the page occurence: all, first, left, right
Definition: StarState.hxx:96
ZoneType
the zone type
Definition: STOFFPageSpan.hxx:79
bool m_footnote
flag to know if this is a footnote
Definition: StarState.hxx:160
StarState(shared_ptr< GlobalState > global)
constructor
Definition: StarState.hxx:121
librevenge::RVNGString m_refMark
the ref mark
Definition: StarState.hxx:164
shared_ptr< SWFieldManagerInternal::Field > m_field
the field
Definition: StarState.hxx:166
the main class to read a SwNumRules zone
Definition: StarObjectNumericRuler.hxx:63
Internal: the structures of a SWFieldManager.
Definition: StarState.hxx:59
a small structure used to store the informations about a list
Definition: STOFFList.hxx:102
std::vector< librevenge::RVNGString > m_pageNameList
the list of page name
Definition: StarState.hxx:92
STOFFCellStyle m_cell
the cell style
Definition: StarState.hxx:147
Class to store font.
Definition: STOFFFont.hxx:43
StarObject & m_object
the object
Definition: StarState.hxx:84
STOFFFrameStyle m_frame
the frame style
Definition: StarState.hxx:149
the main class to read/.
Definition: StarItemPool.hxx:70
librevenge::RVNGString m_pageName
the page name
Definition: StarState.hxx:90
STOFFFont m_font
the font
Definition: StarState.hxx:156
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
double m_relativeUnit
the relative unit uses to transform rel font height in point, default 1/20
Definition: StarState.hxx:102
librevenge::RVNGString m_styleName
the style name
Definition: StarState.hxx:141
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
a zone in a StarOffice file
Definition: StarZone.hxx:56
Class to store a cell style.
Definition: STOFFCellStyle.hxx:43
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
STOFFParagraph m_paragraph
the paragraph style
Definition: StarState.hxx:154
small struct use to store global data
Definition: StarState.hxx:70
int m_break
a page/column break: 1=columnBefore, 2=columnAfter, 3=columnBoth, 4=pageBefore, 5=pageAfter,n 6=pageBoth
Definition: StarState.hxx:144
shared_ptr< STOFFList > m_list
the current list
Definition: StarState.hxx:98

Generated on Wed Feb 22 2017 09:37:08 for libstaroffice by doxygen 1.8.11