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

Generated on Mon Nov 27 2023 04:05:55 for libstaroffice by doxygen 1.9.8