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 #include <librevenge/librevenge.h>
35
36 #include "StarState.hxx"
37
38 #include "STOFFList.hxx"
39
40 #include "StarItemPool.hxx"
41 #include "StarObjectModel.hxx"
42 #include "StarObjectNumericRuler.hxx"
43
44 #include "SWFieldManager.hxx"
45
~GlobalState()46 StarState::GlobalState::~GlobalState()
47 {
48 }
49
StarState(StarItemPool const * pool,StarObject & object)50 StarState::StarState(StarItemPool const *pool, StarObject &object)
51 : m_global(new StarState::GlobalState(pool, object, pool ? pool->getRelativeUnit() : 0.05))
52 , m_styleName("")
53 , m_break(0)
54 , m_cell()
55 , m_frame()
56 , m_graphic()
57 , m_paragraph()
58 , m_font()
59 , m_content(false)
60 , m_flyCnt(false)
61 , m_footnote(false)
62 , m_headerFooter(false)
63 , m_link("")
64 , m_refMark("")
65 , m_field()
66 {
67 }
68
StarState(StarState::GlobalState const & global)69 StarState::StarState(StarState::GlobalState const &global)
70 : m_global(new StarState::GlobalState(global.m_pool, global.m_object, global.m_relativeUnit))
71 , m_styleName("")
72 , m_break(0)
73 , m_cell()
74 , m_frame()
75 , m_graphic()
76 , m_paragraph()
77 , m_font()
78 , m_content(false)
79 , m_flyCnt(false)
80 , m_footnote(false)
81 , m_headerFooter(false)
82 , m_link("")
83 , m_refMark("")
84 , m_field()
85 {
86 m_global->m_objectModel=global.m_objectModel;
87 }
~StarState()88 StarState::~StarState()
89 {
90 }
91
reinitializeLineData()92 void StarState::reinitializeLineData()
93 {
94 m_font=STOFFFont();
95 m_content=m_flyCnt=m_footnote=false;
96 m_link=m_refMark="";
97 m_field.reset();
98 }
99
100 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
101