StarObjectSmallGraphic.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libstaroffice
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
/*
* Parser to convert a small graphic zone/OLE in a StarOffice document
*
*/
#ifndef STAR_OBJECT_SMALL_GRAPHIC
# define STAR_OBJECT_SMALL_GRAPHIC
#include <vector>
#include "libstaroffice_internal.hxx"
#include "StarObject.hxx"
namespace StarObjectSmallGraphicInternal
{
class GluePoint;
class OutlinerParaObject;
class Graphic;
// SDR graphic
class SdrGraphic;
class SdrGraphicAttribute;
class SdrGraphicCaption;
class SdrGraphicCircle;
class SdrGraphicEdge;
class SdrGraphicGraph;
class SdrGraphicGroup;
class SdrGraphicMeasure;
class SdrGraphicOLE;
class SdrGraphicPath;
class SdrGraphicRect;
class SdrGraphicText;
// SDR User data
class SDRUserData;
struct State;
}
class STOFFFrameStyle;
class StarZone;
class StarObjectSmallGraphic : public StarObject
{
public:
StarObjectSmallGraphic(StarObject const &orig, bool duplicateState);
~StarObjectSmallGraphic() override;
bool readSdrObject(StarZone &zone);
bool send(STOFFListenerPtr &listener, STOFFFrameStyle const &pos, StarObject &object, bool inPageMaster=false);
friend std::ostream &operator<<(std::ostream &o, StarObjectSmallGraphic const &graphic);
protected:
//
// low level
//
std::shared_ptr<StarObjectSmallGraphicInternal::SdrGraphic> readSVDRObject(StarZone &zone, int identifier);
bool readSVDRObjectHeader(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphic &graphic);
bool readSVDRObjectAttrib(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicAttribute &graphic);
bool readSVDRObjectText(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicText &graphic);
bool readSVDRObjectRect(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicRect &graphic);
bool readSVDRObjectCaption(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCaption &graphic);
bool readSVDRObjectCircle(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCircle &graphic);
bool readSVDRObjectEdge(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicEdge &graphic);
bool readSVDRObjectGraph(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGraph &graphic);
bool readSVDRObjectGroup(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGroup &graphic);
bool readSVDRObjectMeasure(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicMeasure &graphic);
bool readSVDRObjectOLE(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicOLE &graphic);
bool readSVDRObjectPath(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicPath &graphic);
bool readSDRGluePoint(StarZone &zone, StarObjectSmallGraphicInternal::GluePoint &point);
bool readSDRGluePointList(StarZone &zone, std::vector<StarObjectSmallGraphicInternal::GluePoint> &listPoints);
bool readSDRObjectConnection(StarZone &zone);
bool readSDRObjectSurrogate(StarZone &zone);
bool readSDROutlinerParaObject(StarZone &zone, StarObjectSmallGraphicInternal::OutlinerParaObject &object);
std::shared_ptr<StarObjectSmallGraphicInternal::SDRUserData> readSDRUserData(StarZone &zone, bool inRecord);
bool readSDRUserDataList(StarZone &zone, bool inRecord,
std::vector<std::shared_ptr<StarObjectSmallGraphicInternal::SDRUserData> > &data);
std::shared_ptr<StarObjectSmallGraphicInternal::Graphic> readFmFormObject(StarZone &zone, int identifier);
std::shared_ptr<StarObjectSmallGraphicInternal::SDRUserData> readSCHUObject(StarZone &zone, int identifier);
std::shared_ptr<StarObjectSmallGraphicInternal::SDRUserData> readSDUDObject(StarZone &zone, int identifier);
protected:
//
// data
//
std::shared_ptr<StarObjectSmallGraphicInternal::State> m_graphicState;
private:
StarObjectSmallGraphic &operator=(StarObjectSmallGraphic const &orig) = delete;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StarObject.hxx
STOFFFrameStyle
Class to store a frame style.
Definition STOFFFrameStyle.hxx:46
StarObjectSmallGraphicInternal::GluePoint
Internal: virtual class to store a glue point.
Definition StarObjectSmallGraphic.cxx:70
StarObjectSmallGraphicInternal::Graphic
Internal: virtual class to store a graphic.
Definition StarObjectSmallGraphic.cxx:249
StarObjectSmallGraphicInternal::OutlinerParaObject
Internal: virtual class to store a outliner paragraph object.
Definition StarObjectSmallGraphic.cxx:105
StarObjectSmallGraphicInternal::SDRUserData
Internal: virtual class to store a user data.
Definition StarObjectSmallGraphic.cxx:1441
StarObjectSmallGraphicInternal::SdrGraphicAttribute
Internal: virtual class to store a Sdr graphic attribute.
Definition StarObjectSmallGraphic.cxx:389
StarObjectSmallGraphicInternal::SdrGraphicCaption
Internal: virtual class to store a Sdr graphic caption.
Definition StarObjectSmallGraphic.cxx:691
StarObjectSmallGraphicInternal::SdrGraphicCircle
Internal: virtual class to store a Sdr graphic circle.
Definition StarObjectSmallGraphic.cxx:757
StarObjectSmallGraphicInternal::SdrGraphicEdge
Internal: virtual class to store a Sdr graphic edge.
Definition StarObjectSmallGraphic.cxx:837
StarObjectSmallGraphicInternal::SdrGraphicGraph
Internal: virtual class to store a Sdr graphic graph.
Definition StarObjectSmallGraphic.cxx:945
StarObjectSmallGraphicInternal::SdrGraphicGroup
Internal: virtual class to store a Sdr graphic group.
Definition StarObjectSmallGraphic.cxx:455
StarObjectSmallGraphicInternal::SdrGraphicMeasure
Internal: virtual class to store a Sdr graphic edge.
Definition StarObjectSmallGraphic.cxx:1050
StarObjectSmallGraphicInternal::SdrGraphicOLE
Internal: virtual class to store a Sdr graphic OLE.
Definition StarObjectSmallGraphic.cxx:1125
StarObjectSmallGraphicInternal::SdrGraphicPath
Internal: virtual class to store a Sdr graphic path.
Definition StarObjectSmallGraphic.cxx:1276
StarObjectSmallGraphicInternal::SdrGraphicRect
Internal: virtual class to store a Sdr graphic rectangle.
Definition StarObjectSmallGraphic.cxx:632
StarObjectSmallGraphicInternal::SdrGraphicText
Internal: virtual class to store a Sdr graphic text.
Definition StarObjectSmallGraphic.cxx:528
StarObjectSmallGraphicInternal::SdrGraphic
Internal: virtual class to store a Sdr graphic.
Definition StarObjectSmallGraphic.cxx:287
StarObjectSmallGraphic::readSVDRObjectOLE
bool readSVDRObjectOLE(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicOLE &graphic)
try to read the object OLE zone
Definition StarObjectSmallGraphic.cxx:2672
StarObjectSmallGraphic::readSVDRObjectAttrib
bool readSVDRObjectAttrib(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicAttribute &graphic)
try to read the object attrib zone
Definition StarObjectSmallGraphic.cxx:2000
StarObjectSmallGraphic::readSDRUserDataList
bool readSDRUserDataList(StarZone &zone, bool inRecord, std::vector< std::shared_ptr< StarObjectSmallGraphicInternal::SDRUserData > > &data)
try to read a SDR userData list
Definition StarObjectSmallGraphic.cxx:3312
StarObjectSmallGraphic::readSVDRObjectCircle
bool readSVDRObjectCircle(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCircle &graphic)
try to read the object circle zone
Definition StarObjectSmallGraphic.cxx:2128
StarObjectSmallGraphic::readSVDRObjectMeasure
bool readSVDRObjectMeasure(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicMeasure &graphic)
try to read the object measure zone
Definition StarObjectSmallGraphic.cxx:2630
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:1717
StarObjectSmallGraphic::readSDUDObject
std::shared_ptr< StarObjectSmallGraphicInternal::SDRUserData > readSDUDObject(StarZone &zone, int identifier)
try to read a SDDU object
Definition StarObjectSmallGraphic.cxx:3468
StarObjectSmallGraphic::readSDROutlinerParaObject
bool readSDROutlinerParaObject(StarZone &zone, StarObjectSmallGraphicInternal::OutlinerParaObject &object)
try to read a outliner para object
Definition StarObjectSmallGraphic.cxx:3045
StarObjectSmallGraphic::m_graphicState
std::shared_ptr< StarObjectSmallGraphicInternal::State > m_graphicState
the state
Definition StarObjectSmallGraphic.hxx:157
StarObjectSmallGraphic::operator=
StarObjectSmallGraphic & operator=(StarObjectSmallGraphic const &orig)=delete
StarObjectSmallGraphic::readSVDRObjectRect
bool readSVDRObjectRect(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicRect &graphic)
try to read the object rect zone
Definition StarObjectSmallGraphic.cxx:2839
StarObjectSmallGraphic::readSDRObjectSurrogate
bool readSDRObjectSurrogate(StarZone &zone)
try to read a SDR object surrogate
Definition StarObjectSmallGraphic.cxx:2999
StarObjectSmallGraphic::readSDRGluePointList
bool readSDRGluePointList(StarZone &zone, std::vector< StarObjectSmallGraphicInternal::GluePoint > &listPoints)
try to read a SDR gluepoint list
Definition StarObjectSmallGraphic.cxx:3211
StarObjectSmallGraphic::readSVDRObjectEdge
bool readSVDRObjectEdge(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicEdge &graphic)
try to read the object edge zone
Definition StarObjectSmallGraphic.cxx:2171
StarObjectSmallGraphic::readSDRUserData
std::shared_ptr< StarObjectSmallGraphicInternal::SDRUserData > readSDRUserData(StarZone &zone, bool inRecord)
try to read a SDR userData
Definition StarObjectSmallGraphic.cxx:3243
StarObjectSmallGraphic::readSVDRObjectGraph
bool readSVDRObjectGraph(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGraph &graphic)
try to read the object graph zone
Definition StarObjectSmallGraphic.cxx:2396
StarObjectSmallGraphic::readSDRObjectConnection
bool readSDRObjectConnection(StarZone &zone)
try to read a SDR object connection
Definition StarObjectSmallGraphic.cxx:2949
StarObjectSmallGraphic::send
bool send(STOFFListenerPtr &listener, STOFFFrameStyle const &pos, StarObject &object, bool inPageMaster=false)
try to send a object to the listener
Definition StarObjectSmallGraphic.cxx:1724
StarObjectSmallGraphic::readSVDRObject
std::shared_ptr< StarObjectSmallGraphicInternal::SdrGraphic > readSVDRObject(StarZone &zone, int identifier)
try to read a SVDr object
Definition StarObjectSmallGraphic.cxx:1824
StarObjectSmallGraphic::StarObjectSmallGraphic
StarObjectSmallGraphic(StarObject const &orig, bool duplicateState)
constructor
Definition StarObjectSmallGraphic.cxx:1707
StarObjectSmallGraphic::~StarObjectSmallGraphic
~StarObjectSmallGraphic() override
destructor
Definition StarObjectSmallGraphic.cxx:1713
StarObjectSmallGraphic::readSVDRObjectPath
bool readSVDRObjectPath(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicPath &graphic)
try to read the object path zone
Definition StarObjectSmallGraphic.cxx:2744
StarObjectSmallGraphic::readSVDRObjectText
bool readSVDRObjectText(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicText &graphic)
try to read the object text zone
Definition StarObjectSmallGraphic.cxx:2867
StarObjectSmallGraphic::readSdrObject
bool readSdrObject(StarZone &zone)
try to read a object zone: "DrOb'
Definition StarObjectSmallGraphic.cxx:1745
StarObjectSmallGraphic::readSVDRObjectGroup
bool readSVDRObjectGroup(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicGroup &graphic)
try to read the object group zone
Definition StarObjectSmallGraphic.cxx:2539
StarObjectSmallGraphic::readSDRGluePoint
bool readSDRGluePoint(StarZone &zone, StarObjectSmallGraphicInternal::GluePoint &point)
try to read a SDR gluepoint
Definition StarObjectSmallGraphic.cxx:3180
StarObjectSmallGraphic::readFmFormObject
std::shared_ptr< StarObjectSmallGraphicInternal::Graphic > readFmFormObject(StarZone &zone, int identifier)
try to read a FM01 object
Definition StarObjectSmallGraphic.cxx:3347
StarObjectSmallGraphic::readSVDRObjectCaption
bool readSVDRObjectCaption(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphicCaption &graphic)
try to read the object caption zone
Definition StarObjectSmallGraphic.cxx:2075
StarObjectSmallGraphic::readSCHUObject
std::shared_ptr< StarObjectSmallGraphicInternal::SDRUserData > readSCHUObject(StarZone &zone, int identifier)
try to read a SCHU object
Definition StarObjectSmallGraphic.cxx:3407
StarObjectSmallGraphic::readSVDRObjectHeader
bool readSVDRObjectHeader(StarZone &zone, StarObjectSmallGraphicInternal::SdrGraphic &graphic)
try to read the first zone of SVDr object
Definition StarObjectSmallGraphic.cxx:2293
StarObject::StarObject
StarObject(char const *passwd, std::shared_ptr< STOFFOLEParser > &oleParser, std::shared_ptr< STOFFOLEParser::OleDirectory > &directory)
constructor
Definition StarObject.cxx:80
StarZone
a zone in a StarOffice file
Definition StarZone.hxx:57
libstaroffice_internal.hxx
STOFFListenerPtr
std::shared_ptr< STOFFListener > STOFFListenerPtr
a smart pointer of STOFFListener
Definition libstaroffice_internal.hxx:491
StarObjectSmallGraphicInternal
Internal: the structures of a StarObjectSmallGraphic.
Definition StarObjectSmallGraphic.cxx:66
StarObjectSmallGraphicInternal::State
Internal: the state of a StarObjectSmallGraphic.
Definition StarObjectSmallGraphic.cxx:1692