StarObjectSmallGraphic.hxx Source File documentation

StarObjectSmallGraphic.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 graphic zone/OLE in a StarOffice document
36 *
37 */
38 #ifndef STAR_OBJECT_SMALL_GRAPHIC
39 # define STAR_OBJECT_SMALL_GRAPHIC
40
41 #include <vector>
42
43 #include "libstaroffice_internal.hxx"
44 #include "StarObject.hxx"
45
46 namespace StarObjectSmallGraphicInternal
47 {
48 class GluePoint;
49 class OutlinerParaObject;
50
51 class Graphic;
52 // SDR graphic
53 class SdrGraphic;
54 class SdrGraphicAttribute;
55 class SdrGraphicCaption;
56 class SdrGraphicCircle;
57 class SdrGraphicEdge;
58 class SdrGraphicGraph;
59 class SdrGraphicGroup;
60 class SdrGraphicMeasure;
61 class SdrGraphicOLE;
62 class SdrGraphicPath;
63 class SdrGraphicRect;
64 class SdrGraphicText;
65
66 struct State;
67 }
68
69 class StarZone;
70
76 class StarObjectSmallGraphic : public StarObject
77 {
78 public:
80 StarObjectSmallGraphic(StarObject const &orig, bool duplicateState);
82 ~StarObjectSmallGraphic() override;
84 bool readSdrObject(StarZone &zone);
86 bool send(STOFFListenerPtr listener, STOFFPosition const &pos, StarObject &object, bool inPageMaster=false);
88 friend std::ostream &operator<<(std::ostream &o, StarObjectSmallGraphic const &graphic);
89
90 protected:
91 //
92 // low level
93 //
95 std::shared_ptr<StarObjectSmallGraphicInternal::SdrGraphic> readSVDRObject(StarZone &zone, int identifier);
97 bool readSVDRObjectHeader(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphic &graphic);
99 bool readSVDRObjectAttrib(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicAttribute &graphic);
101 bool readSVDRObjectText(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicText &graphic);
103 bool readSVDRObjectRect(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicRect &graphic);
105 bool readSVDRObjectCaption(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCaption &graphic);
107 bool readSVDRObjectCircle(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCircle &graphic);
109 bool readSVDRObjectEdge(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicEdge &graphic);
111 bool readSVDRObjectGraph(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGraph &graphic);
113 bool readSVDRObjectGroup(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGroup &graphic);
115 bool readSVDRObjectMeasure(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicMeasure &graphic);
117 bool readSVDRObjectOLE(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicOLE &graphic);
119 bool readSVDRObjectPath(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicPath &graphic);
120
122 bool readSDRGluePoint(StarZone &zone, StarObjectSmallGraphicInternal::GluePoint &point);
124 bool readSDRGluePointList(StarZone &zone, std::vector<StarObjectSmallGraphicInternal::GluePoint> &listPoints);
126 bool readSDRObjectConnection(StarZone &zone);
128 bool readSDRObjectSurrogate(StarZone &zone);
130 bool readSDROutlinerParaObject(StarZone &zone, StarObjectSmallGraphicInternal::OutlinerParaObject &object);
132 bool readSDRUserData(StarZone &zone, bool inRecord);
134 bool readSDRUserDataList(StarZone &zone, bool inRecord);
135
137 std::shared_ptr<StarObjectSmallGraphicInternal::Graphic> readFmFormObject(StarZone &zone, int identifier);
138
140 std::shared_ptr<StarObjectSmallGraphicInternal::Graphic> readSCHUObject(StarZone &zone, int identifier);
141
143 std::shared_ptr<StarObjectSmallGraphicInternal::Graphic> readSDUDObject(StarZone &zone, int identifier);
144
145 protected:
146 //
147 // data
148 //
149
151 std::shared_ptr<StarObjectSmallGraphicInternal::State> m_graphicState;
152 private:
153 StarObjectSmallGraphic &operator=(StarObjectSmallGraphic const &orig) = delete;
154 };
155 #endif
156 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StarObjectSmallGraphicInternal::SdrGraphicEdge
Internal: virtual class to store a Sdr graphic edge.
Definition: StarObjectSmallGraphic.cxx:946
StarObjectSmallGraphic::operator=
StarObjectSmallGraphic & operator=(StarObjectSmallGraphic const &orig)=delete
StarObjectSmallGraphic::readSVDRObjectCircle
bool readSVDRObjectCircle(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCircle &graphic)
try to read the object circle zone
Definition: StarObjectSmallGraphic.cxx:2051
StarObjectSmallGraphicInternal::SdrGraphicGroup
Internal: virtual class to store a Sdr graphic group.
Definition: StarObjectSmallGraphic.cxx:568
StarObjectSmallGraphic::readSVDRObjectGroup
bool readSVDRObjectGroup(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGroup &graphic)
try to read the object group zone
Definition: StarObjectSmallGraphic.cxx:2456
StarObjectSmallGraphicInternal::SdrGraphicMeasure
Internal: virtual class to store a Sdr graphic edge.
Definition: StarObjectSmallGraphic.cxx:1161
StarObjectSmallGraphic::readSDRGluePointList
bool readSDRGluePointList(StarZone &zone, std::vector< StarObjectSmallGraphicInternal::GluePoint > &listPoints)
try to read a SDR gluepoint list
Definition: StarObjectSmallGraphic.cxx:3127
StarObjectSmallGraphicInternal::SdrGraphicGraph
Internal: virtual class to store a Sdr graphic graph.
Definition: StarObjectSmallGraphic.cxx:1055
StarObjectSmallGraphicInternal::SdrGraphicText
Internal: virtual class to store a Sdr graphic text.
Definition: StarObjectSmallGraphic.cxx:637
StarObjectSmallGraphic::readSVDRObjectGraph
bool readSVDRObjectGraph(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGraph &graphic)
try to read the object graph zone
Definition: StarObjectSmallGraphic.cxx:2313
StarObject.hxx
StarObjectSmallGraphic::readSdrObject
bool readSdrObject(StarZone &zone)
try to read a object zone: "DrOb&#39;
Definition: StarObjectSmallGraphic.cxx:1668
StarObjectSmallGraphic::operator<<
friend std::ostream & operator<<(std::ostream &o, StarObjectSmallGraphic const &graphic)
small operator<< to print the content of the small graphic object
Definition: StarObjectSmallGraphic.cxx:1640
StarObjectSmallGraphicInternal::SdrGraphicOLE
Internal: virtual class to store a Sdr graphic OLE.
Definition: StarObjectSmallGraphic.cxx:1236
StarObjectSmallGraphic::readSVDRObjectRect
bool readSVDRObjectRect(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicRect &graphic)
try to read the object rect zone
Definition: StarObjectSmallGraphic.cxx:2755
StarObjectSmallGraphic::readSVDRObject
std::shared_ptr< StarObjectSmallGraphicInternal::SdrGraphic > readSVDRObject(StarZone &zone, int identifier)
try to read a SVDr object
Definition: StarObjectSmallGraphic.cxx:1747
StarObjectSmallGraphic::readSVDRObjectCaption
bool readSVDRObjectCaption(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCaption &graphic)
try to read the object caption zone
Definition: StarObjectSmallGraphic.cxx:1998
StarObjectSmallGraphic::readSDRObjectSurrogate
bool readSDRObjectSurrogate(StarZone &zone)
try to read a SDR object surrogate
Definition: StarObjectSmallGraphic.cxx:2915
StarObjectSmallGraphicInternal::SdrGraphicRect
Internal: virtual class to store a Sdr graphic rectangle.
Definition: StarObjectSmallGraphic.cxx:739
StarObjectSmallGraphic::readFmFormObject
std::shared_ptr< StarObjectSmallGraphicInternal::Graphic > readFmFormObject(StarZone &zone, int identifier)
try to read a FM01 object
Definition: StarObjectSmallGraphic.cxx:3254
StarObjectSmallGraphicInternal::SdrGraphicCircle
Internal: virtual class to store a Sdr graphic circle.
Definition: StarObjectSmallGraphic.cxx:866
StarObjectSmallGraphic::readSDRObjectConnection
bool readSDRObjectConnection(StarZone &zone)
try to read a SDR object connection
Definition: StarObjectSmallGraphic.cxx:2865
StarObjectSmallGraphic::readSVDRObjectMeasure
bool readSVDRObjectMeasure(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicMeasure &graphic)
try to read the object measure zone
Definition: StarObjectSmallGraphic.cxx:2547
StarObjectSmallGraphic::readSDROutlinerParaObject
bool readSDROutlinerParaObject(StarZone &zone, StarObjectSmallGraphicInternal::OutlinerParaObject &object)
try to read a outliner para object
Definition: StarObjectSmallGraphic.cxx:2961
StarObjectSmallGraphic::readSVDRObjectPath
bool readSVDRObjectPath(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicPath &graphic)
try to read the object path zone
Definition: StarObjectSmallGraphic.cxx:2661
StarObjectSmallGraphicInternal::SdrGraphicAttribute
Internal: virtual class to store a Sdr graphic attribute.
Definition: StarObjectSmallGraphic.cxx:502
StarObjectSmallGraphic::~StarObjectSmallGraphic
~StarObjectSmallGraphic() override
destructor
Definition: StarObjectSmallGraphic.cxx:1636
StarObjectSmallGraphic
the main class to read a small StarOffice graphic zone
Definition: StarObjectSmallGraphic.hxx:76
StarObjectSmallGraphicInternal::GluePoint
Internal: virtual class to store a glue point.
Definition: StarObjectSmallGraphic.cxx:64
StarObjectSmallGraphic::readSDRGluePoint
bool readSDRGluePoint(StarZone &zone, StarObjectSmallGraphicInternal::GluePoint &point)
try to read a SDR gluepoint
Definition: StarObjectSmallGraphic.cxx:3096
StarObjectSmallGraphic::readSVDRObjectOLE
bool readSVDRObjectOLE(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicOLE &graphic)
try to read the object OLE zone
Definition: StarObjectSmallGraphic.cxx:2589
StarObjectSmallGraphic::readSVDRObjectText
bool readSVDRObjectText(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicText &graphic)
try to read the object text zone
Definition: StarObjectSmallGraphic.cxx:2783
libstaroffice_internal.hxx
StarObjectSmallGraphic::readSDRUserData
bool readSDRUserData(StarZone &zone, bool inRecord)
try to read a SDR userData
Definition: StarObjectSmallGraphic.cxx:3159
StarObjectSmallGraphic::readSVDRObjectEdge
bool readSVDRObjectEdge(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicEdge &graphic)
try to read the object edge zone
Definition: StarObjectSmallGraphic.cxx:2094
StarObjectSmallGraphic::send
bool send(STOFFListenerPtr listener, STOFFPosition const &pos, StarObject &object, bool inPageMaster=false)
try to send a object to the listener
Definition: StarObjectSmallGraphic.cxx:1647
StarObjectSmallGraphic::readSDUDObject
std::shared_ptr< StarObjectSmallGraphicInternal::Graphic > readSDUDObject(StarZone &zone, int identifier)
try to read a SDDU object
Definition: StarObjectSmallGraphic.cxx:3371
StarObjectSmallGraphic::readSCHUObject
std::shared_ptr< StarObjectSmallGraphicInternal::Graphic > readSCHUObject(StarZone &zone, int identifier)
try to read a SCHU object
Definition: StarObjectSmallGraphic.cxx:3314
StarObjectSmallGraphicInternal::OutlinerParaObject
Internal: virtual class to store a outliner paragraph object.
Definition: StarObjectSmallGraphic.cxx:99
StarObjectSmallGraphic::StarObjectSmallGraphic
StarObjectSmallGraphic(StarObject const &orig, bool duplicateState)
constructor
Definition: StarObjectSmallGraphic.cxx:1630
StarObjectSmallGraphic::readSDRUserDataList
bool readSDRUserDataList(StarZone &zone, bool inRecord)
try to read a SDR userData list
Definition: StarObjectSmallGraphic.cxx:3222
StarObjectSmallGraphic::readSVDRObjectHeader
bool readSVDRObjectHeader(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphic &graphic)
try to read the first zone of SVDr object
Definition: StarObjectSmallGraphic.cxx:2216
STOFFListenerPtr
std::shared_ptr< STOFFListener > STOFFListenerPtr
a smart pointer of STOFFListener
Definition: libstaroffice_internal.hxx:486
StarObjectSmallGraphic::m_graphicState
std::shared_ptr< StarObjectSmallGraphicInternal::State > m_graphicState
the state
Definition: StarObjectSmallGraphic.hxx:151
StarObjectSmallGraphicInternal::SdrGraphic
Internal: virtual class to store a Sdr graphic.
Definition: StarObjectSmallGraphic.cxx:406
StarObject
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
StarZone
a zone in a StarOffice file
Definition: StarZone.hxx:56
StarObjectSmallGraphicInternal::SdrGraphicPath
Internal: virtual class to store a Sdr graphic path.
Definition: StarObjectSmallGraphic.cxx:1363
StarObjectSmallGraphicInternal::SdrGraphicCaption
Internal: virtual class to store a Sdr graphic caption.
Definition: StarObjectSmallGraphic.cxx:799
STOFFPosition
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: STOFFPosition.hxx:47
StarObjectSmallGraphicInternal
Internal: the structures of a StarObjectSmallGraphic.
Definition: StarObjectSmallGraphic.cxx:60
StarObjectSmallGraphic::readSVDRObjectAttrib
bool readSVDRObjectAttrib(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicAttribute &graphic)
try to read the object attrib zone
Definition: StarObjectSmallGraphic.cxx:1923