StarObjectMath.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  * Parser to convert a small StarMath zone in a StarOffice document .sdf
36  *
37  */
38 #ifndef STAR_OBJECT_MATH
39 # define STAR_OBJECT_MATH
40 
41 #include <vector>
42 
44 #include "StarObject.hxx"
45 
46 namespace StarObjectMathInternal
47 {
48 struct State;
49 }
50 
51 class StarZone;
52 
58 class StarObjectMath : public StarObject
59 {
60 public:
62  StarObjectMath(StarObject const &orig, bool duplicateState);
64  ~StarObjectMath() override;
66  bool parse();
68  bool send(STOFFListenerPtr listener, STOFFFrameStyle const &pos, STOFFGraphicStyle const &style=STOFFGraphicStyle());
69 
70 protected:
71  //
72  // low level
73  //
74 
76  bool readMathDocument(STOFFInputStreamPtr input, std::string const &fileName);
77 
78 protected:
79  //
80  // data
81  //
82 
84  std::shared_ptr<StarObjectMathInternal::State> m_mathState;
85 private:
86  StarObjectMath &operator=(StarObjectMath const &orig) = delete;
87 };
88 #endif
89 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
std::shared_ptr< StarObjectMathInternal::State > m_mathState
the state
Definition: StarObjectMath.hxx:84
bool send(STOFFListenerPtr listener, STOFFFrameStyle const &pos, STOFFGraphicStyle const &style=STOFFGraphicStyle())
try to send a object to the listener
Definition: StarObjectMath.cxx:86
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
StarObjectMath & operator=(StarObjectMath const &orig)=delete
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:485
bool readMathDocument(STOFFInputStreamPtr input, std::string const &fileName)
try to read a math zone: StarMathDocument .sdm
Definition: StarObjectMath.cxx:137
the main class to read a small StarOffice math zone .sdf
Definition: StarObjectMath.hxx:58
~StarObjectMath() override
destructor
Definition: StarObjectMath.cxx:82
StarObjectMath(StarObject const &orig, bool duplicateState)
constructor
Definition: StarObjectMath.cxx:76
std::shared_ptr< STOFFListener > STOFFListenerPtr
a smart pointer of STOFFListener
Definition: libstaroffice_internal.hxx:487
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
a zone in a StarOffice file
Definition: StarZone.hxx:56
Internal: the structures of a StarObjectMath.
Definition: StarObjectMath.cxx:56
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
bool parse()
try to parse the current object
Definition: StarObjectMath.cxx:99

Generated on Sun Mar 24 2019 23:33:11 for libstaroffice by doxygen 1.8.15