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 "STOFFGraphicStyle.hxx"
48 #include "STOFFParagraph.hxx"
49 #include "STOFFPageSpan.hxx"
50 #include "STOFFSection.hxx"
51 
52 class StarItemPool;
53 class StarObject;
54 class StarZone;
56 class STOFFList;
57 
59 {
60 struct Field;
61 }
62 
65 class StarState
66 {
67 public:
69  struct GlobalState {
71  GlobalState(StarItemPool const *pool, StarObject &object, double relUnit=0.05) :
72  m_pool(pool), m_object(object), m_numericRuler(),
73  m_page(), m_pageName(""), m_pageNameList(), m_pageZone(STOFFPageSpan::Page), m_pageOccurence("all"),
74  m_list(), m_listLevel(-1),
75  m_relativeUnit(relUnit)
76  {
77  }
79  ~GlobalState();
85  shared_ptr<StarObjectNumericRuler> m_numericRuler;
89  librevenge::RVNGString m_pageName;
91  std::vector<librevenge::RVNGString> m_pageNameList;
95  std::string m_pageOccurence;
97  shared_ptr<STOFFList> m_list;
102  private:
103  GlobalState(GlobalState const &);
104  GlobalState &operator=(GlobalState const &);
105  };
107  StarState(StarItemPool const *pool, StarObject &object, double relUnit=0.05) :
108  m_global(new GlobalState(pool, object, relUnit)),
109  m_styleName(""),
110  m_break(0),
111  m_cell(),
112  m_graphic(),
113  m_paragraph(),
114  m_font(), m_content(false), m_footnote(false), m_link(""), m_refMark(""), m_field()
115  {
116  }
118  explicit StarState(shared_ptr<GlobalState> global) :
119  m_global(global),
120  m_styleName(""),
121  m_break(0),
122  m_cell(),
123  m_graphic(),
124  m_paragraph(),
125  m_font(), m_content(false), m_footnote(false), m_link(""), m_refMark(""), m_field()
126  {
127  }
129  explicit StarState(StarState const &orig);
131  ~StarState();
133  void reinitializeLineData();
135  shared_ptr<GlobalState> m_global;
137  librevenge::RVNGString m_styleName;
138 
140  int m_break;
141 
146 
152  bool m_content;
156  librevenge::RVNGString m_link;
158  librevenge::RVNGString m_refMark;
160  shared_ptr<SWFieldManagerInternal::Field> m_field;
161 
162 private:
163  StarState &operator=(StarState const &);
164 };
165 #endif
166 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StarItemPool const * m_pool
the pool
Definition: StarState.hxx:81
int m_listLevel
the current list level
Definition: StarState.hxx:99
StarState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition: StarState.hxx:107
GlobalState(StarItemPool const *pool, StarObject &object, double relUnit=0.05)
constructor
Definition: StarState.hxx:71
class to store an state: ie.
Definition: StarState.hxx:65
shared_ptr< StarObjectNumericRuler > m_numericRuler
the numeric ruler manager
Definition: StarState.hxx:85
librevenge::RVNGString m_link
the link url
Definition: StarState.hxx:156
Internal: a field.
Definition: SWFieldManager.hxx:53
shared_ptr< GlobalState > m_global
global state
Definition: StarState.hxx:135
STOFFGraphicStyle m_graphic
the graphic style
Definition: StarState.hxx:145
bool m_content
flag to know if this is a content zone
Definition: StarState.hxx:152
STOFFPageSpan::ZoneType m_pageZone
the actual page zone: document, header, footer
Definition: StarState.hxx:93
STOFFPageSpan m_page
the page
Definition: StarState.hxx:87
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
std::string m_pageOccurence
the page occurence: all, first, left, right
Definition: StarState.hxx:95
ZoneType
the zone type
Definition: STOFFPageSpan.hxx:79
bool m_footnote
flag to know if this is a footnote
Definition: StarState.hxx:154
StarState(shared_ptr< GlobalState > global)
constructor
Definition: StarState.hxx:118
librevenge::RVNGString m_refMark
the ref mark
Definition: StarState.hxx:158
shared_ptr< SWFieldManagerInternal::Field > m_field
the field
Definition: StarState.hxx:160
the main class to read a SwNumRules zone
Definition: StarObjectNumericRuler.hxx:63
Internal: the structures of a SWFieldManager.
Definition: StarState.hxx:58
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:91
STOFFCellStyle m_cell
the cell style
Definition: StarState.hxx:143
Class to store font.
Definition: STOFFFont.hxx:43
StarObject & m_object
the object
Definition: StarState.hxx:83
the main class to read/.
Definition: StarItemPool.hxx:70
librevenge::RVNGString m_pageName
the page name
Definition: StarState.hxx:89
STOFFFont m_font
the font
Definition: StarState.hxx:150
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:101
librevenge::RVNGString m_styleName
the style name
Definition: StarState.hxx:137
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:148
small struct use to store global data
Definition: StarState.hxx:69
int m_break
a page/column break: 1=columnBefore, 2=columnAfter, 3=columnBoth, 4=pageBefore, 5=pageAfter,n 6=pageBoth
Definition: StarState.hxx:140
shared_ptr< STOFFList > m_list
the current list
Definition: StarState.hxx:97

Generated on Fri Apr 21 2017 23:22:20 for libstaroffice by doxygen 1.8.13