LCOV - code coverage report
Current view: top level - xmloff/inc/xmloff - shapeexport.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 11 11 100.0 %
Date: 2012-08-25 Functions: 12 13 92.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _XMLOFF_SHAPEEXPORT_HXX_
      29                 :            : #define _XMLOFF_SHAPEEXPORT_HXX_
      30                 :            : 
      31                 :            : #include "sal/config.h"
      32                 :            : #include "xmloff/dllapi.h"
      33                 :            : #include "sal/types.h"
      34                 :            : 
      35                 :            : #include <rtl/ref.hxx>
      36                 :            : #include <rtl/ustring.hxx>
      37                 :            : #include <rtl/ustrbuf.hxx>
      38                 :            : #include <xmloff/uniref.hxx>
      39                 :            : 
      40                 :            : #include <com/sun/star/drawing/XShape.hpp>
      41                 :            : #include <com/sun/star/drawing/XShapes.hpp>
      42                 :            : #include <com/sun/star/awt/Point.hpp>
      43                 :            : #include <com/sun/star/beans/PropertyValue.hpp>
      44                 :            : 
      45                 :            : #include <map>
      46                 :            : #include <xmloff/xmlprmap.hxx>
      47                 :            : #include <xmloff/xmlexppr.hxx>
      48                 :            : #include <xmloff/animexp.hxx>
      49                 :            : #include <xmloff/families.hxx>
      50                 :            : 
      51                 :            : #include "xmloff/table/XMLTableExport.hxx"
      52                 :            : 
      53                 :            : // shape export features are bits used for the nFeature
      54                 :            : // parameter of XMLShapeExport::exportShape
      55                 :            : 
      56                 :            : #define SEF_EXPORT_X        0x0001
      57                 :            : #define SEF_EXPORT_Y        0x0002
      58                 :            : #define SEF_EXPORT_POSITION 0x0003
      59                 :            : 
      60                 :            : #define SEF_EXPORT_WIDTH    0x0004
      61                 :            : #define SEF_EXPORT_HEIGHT   0x0008
      62                 :            : #define SEF_EXPORT_SIZE     0x000c
      63                 :            : 
      64                 :            : // when you set this flag a chart does NOT export its own data as table element
      65                 :            : #define SEF_EXPORT_NO_CHART_DATA    0x0010
      66                 :            : 
      67                 :            : // When setting the flag below no ignorableWhiteSpace will be called around
      68                 :            : // the drawing object elements
      69                 :            : #define SEF_EXPORT_NO_WS    0x0020
      70                 :            : 
      71                 :            : // When setting the flag below a callout shape is exported as office:annotation
      72                 :            : #define SEF_EXPORT_ANNOTATION 0x0040
      73                 :            : 
      74                 :            : #define SEF_DEFAULT         SEF_EXPORT_POSITION|SEF_EXPORT_SIZE
      75                 :            : 
      76                 :            : enum XmlShapeType
      77                 :            : {
      78                 :            :     XmlShapeTypeUnknown,                            // not known
      79                 :            : 
      80                 :            :     XmlShapeTypeDrawRectangleShape,                 // "com.sun.star.drawing.RectangleShape"
      81                 :            :     XmlShapeTypeDrawEllipseShape,                   // "com.sun.star.drawing.EllipseShape"
      82                 :            :     XmlShapeTypeDrawControlShape,                   // "com.sun.star.drawing.ControlShape"
      83                 :            :     XmlShapeTypeDrawConnectorShape,                 // "com.sun.star.drawing.ConnectorShape"
      84                 :            :     XmlShapeTypeDrawMeasureShape,                   // "com.sun.star.drawing.MeasureShape"
      85                 :            :     XmlShapeTypeDrawLineShape,                      // "com.sun.star.drawing.LineShape"
      86                 :            :     XmlShapeTypeDrawPolyPolygonShape,               // "com.sun.star.drawing.PolyPolygonShape"
      87                 :            :     XmlShapeTypeDrawPolyLineShape,                  // "com.sun.star.drawing.PolyLineShape"
      88                 :            :     XmlShapeTypeDrawOpenBezierShape,                // "com.sun.star.drawing.OpenBezierShape"
      89                 :            :     XmlShapeTypeDrawClosedBezierShape,              // "com.sun.star.drawing.ClosedBezierShape"
      90                 :            :     XmlShapeTypeDrawGraphicObjectShape,             // "com.sun.star.drawing.GraphicObjectShape"
      91                 :            :     XmlShapeTypeDrawGroupShape,                     // "com.sun.star.drawing.GroupShape"
      92                 :            :     XmlShapeTypeDrawTextShape,                      // "com.sun.star.drawing.TextShape"
      93                 :            :     XmlShapeTypeDrawOLE2Shape,                      // "com.sun.star.drawing.OLE2Shape"
      94                 :            :     XmlShapeTypeDrawChartShape,                     // embedded com.sun.star.chart
      95                 :            :     XmlShapeTypeDrawSheetShape,                     // embedded com.sun.star.sheet
      96                 :            :     XmlShapeTypeDrawPageShape,                      // "com.sun.star.drawing.PageShape"
      97                 :            :     XmlShapeTypeDrawFrameShape,                     // "com.sun.star.drawing.FrameShape"
      98                 :            :     XmlShapeTypeDrawCaptionShape,                   // "com.sun.star.drawing.CaptionShape"
      99                 :            :     XmlShapeTypeDrawAppletShape,                    // "com.sun.star.drawing.AppletShape"
     100                 :            :     XmlShapeTypeDrawPluginShape,                    // "com.sun.star.drawing.PlugginShape"
     101                 :            : 
     102                 :            :     XmlShapeTypeDraw3DSceneObject,                  // "com.sun.star.drawing.Shape3DSceneObject"
     103                 :            :     XmlShapeTypeDraw3DCubeObject,                   // "com.sun.star.drawing.Shape3DCubeObject"
     104                 :            :     XmlShapeTypeDraw3DSphereObject,                 // "com.sun.star.drawing.Shape3DSphereObject"
     105                 :            :     XmlShapeTypeDraw3DLatheObject,                  // "com.sun.star.drawing.Shape3DLatheObject"
     106                 :            :     XmlShapeTypeDraw3DExtrudeObject,                // "com.sun.star.drawing.Shape3DExtrudeObject"
     107                 :            : 
     108                 :            :     XmlShapeTypePresTitleTextShape,                 // "com.sun.star.presentation.TitleTextShape"
     109                 :            :     XmlShapeTypePresOutlinerShape,                  // "com.sun.star.presentation.OutlinerShape"
     110                 :            :     XmlShapeTypePresSubtitleShape,                  // "com.sun.star.presentation.SubtitleShape"
     111                 :            :     XmlShapeTypePresGraphicObjectShape,             // "com.sun.star.presentation.GraphicObjectShape"
     112                 :            :     XmlShapeTypePresPageShape,                      // "com.sun.star.presentation.PageShape"
     113                 :            :     XmlShapeTypePresOLE2Shape,                      // "com.sun.star.presentation.OLE2Shape"
     114                 :            :     XmlShapeTypePresChartShape,                     // "com.sun.star.presentation.ChartShape"
     115                 :            :     XmlShapeTypePresSheetShape,                     // "com.sun.star.presentation.CalcShape"
     116                 :            :     XmlShapeTypePresTableShape,                     // "com.sun.star.presentation.TableShape"
     117                 :            :     XmlShapeTypePresOrgChartShape,                  // "com.sun.star.presentation.OrgChartShape"
     118                 :            :     XmlShapeTypePresNotesShape,                     // "com.sun.star.presentation.NotesShape"
     119                 :            :     XmlShapeTypeHandoutShape,                       // "com.sun.star.presentation.HandoutShape"
     120                 :            : 
     121                 :            :     XmlShapeTypePresHeaderShape,                    // "com.sun.star.presentation.HeaderShape"
     122                 :            :     XmlShapeTypePresFooterShape,                    // "com.sun.star.presentation.FooterShape"
     123                 :            :     XmlShapeTypePresSlideNumberShape,               // "com.sun.star.presentation.SlideNumberShape"
     124                 :            :     XmlShapeTypePresDateTimeShape,                  // "com.sun.star.presentation.DateTimeShape"
     125                 :            : 
     126                 :            :     XmlShapeTypeDrawCustomShape,                    // "com.sun.star.drawing.CustomShape"
     127                 :            :     XmlShapeTypeDrawMediaShape,                     // "com.sun.star.drawing.MediaShape"
     128                 :            :     XmlShapeTypePresMediaShape,                     // "com.sun.star.presentation.MediaShape"
     129                 :            : 
     130                 :            :     XmlShapeTypeDrawTableShape,                     // "com.sun.star.drawing.TableShape"
     131                 :            : 
     132                 :            :     XmlShapeTypeNotYetSet
     133                 :            : };
     134                 :            : 
     135                 :            : /** caches style and type info after a collectShapeAutostyle for later use in exportShape */
     136                 :        772 : struct ImplXMLShapeExportInfo
     137                 :            : {
     138                 :            :     rtl::OUString   msStyleName;
     139                 :            :     rtl::OUString   msTextStyleName;
     140                 :            :     sal_Int32       mnFamily;
     141                 :            :     XmlShapeType    meShapeType;
     142                 :            : 
     143                 :            :     com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xCustomShapeReplacement;
     144                 :            : 
     145                 :        100 :     ImplXMLShapeExportInfo() : mnFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID ), meShapeType( XmlShapeTypeNotYetSet ) {}
     146                 :            : };
     147                 :            : 
     148                 :            : /** a vector for shape style and type cache information */
     149                 :            : typedef std::vector< ImplXMLShapeExportInfo > ImplXMLShapeExportInfoVector;
     150                 :            : 
     151                 :            : /** a map to store all cache data for already collected XShapes */
     152                 :            : typedef std::map< com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >, ImplXMLShapeExportInfoVector > ShapesInfos;
     153                 :            : 
     154                 :            : //////////////////////////////////////////////////////////////////////////////
     155                 :            : // predeclarations
     156                 :            : 
     157                 :            : class SvXMLExport;
     158                 :            : class SvXMLExportPropertyMapper;
     159                 :            : 
     160                 :            : namespace basegfx
     161                 :            : {
     162                 :            :     class B2DTuple;
     163                 :            :     class B2DHomMatrix;
     164                 :            : } // end of namespace basegfx
     165                 :            : 
     166                 :            : class XMLOFF_DLLPUBLIC XMLShapeExport : public UniRefBase
     167                 :            : {
     168                 :            : private:
     169                 :            : 
     170                 :            :     SvXMLExport&                                mrExport;
     171                 :            :     UniReference< XMLPropertyHandlerFactory >   mxSdPropHdlFactory;
     172                 :            :     UniReference< SvXMLExportPropertyMapper >   mxPropertySetMapper;
     173                 :            :     UniReference< XMLAnimationsExporter >       mxAnimationsExporter;
     174                 :            :     sal_Int32                                   mnNextUniqueShapeId;
     175                 :            :     ShapesInfos                                 maShapesInfos;
     176                 :            :     ShapesInfos::iterator                       maCurrentShapesIter;
     177                 :            :     sal_Bool                                    mbExportLayer;
     178                 :            :     ImplXMLShapeExportInfoVector                maShapeInfos;
     179                 :            :     ImplXMLShapeExportInfoVector::iterator      maCurrentInfo;
     180                 :            :     rtl::OUString                               msPresentationStylePrefix;
     181                 :            : 
     182                 :            :     // #88546# possibility to swich progress bar handling on/off
     183                 :            :     sal_Bool                                    mbHandleProgressBar;
     184                 :            : 
     185                 :            :     rtl::Reference< XMLTableExport >            mxShapeTableExport;
     186                 :            : 
     187                 :            : protected:
     188                 :       1336 :     SvXMLExport& GetExport() { return mrExport; }
     189                 :            :     const SvXMLExport& GetExport() const  { return mrExport; }
     190                 :            : private:
     191                 :            : 
     192                 :        314 :     SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
     193                 :            : 
     194                 :            :     const rtl::OUString                         msZIndex;
     195                 :            :     const rtl::OUString                         msPrintable;
     196                 :            :     const rtl::OUString                         msVisible;
     197                 :            : 
     198                 :            :     const rtl::OUString                         msEmptyPres;
     199                 :            :     const rtl::OUString                         msModel;
     200                 :            :     const rtl::OUString                         msStartShape;
     201                 :            :     const rtl::OUString                         msEndShape;
     202                 :            :     const rtl::OUString                         msOnClick;
     203                 :            :     const rtl::OUString                         msEventType;
     204                 :            :     const rtl::OUString                         msPresentation;
     205                 :            :     const rtl::OUString                         msMacroName;
     206                 :            :     const rtl::OUString                         msScript;
     207                 :            :     const rtl::OUString                         msLibrary;
     208                 :            :     const rtl::OUString                         msClickAction;
     209                 :            :     const rtl::OUString                         msBookmark;
     210                 :            :     const rtl::OUString                         msEffect;
     211                 :            :     const rtl::OUString                         msPlayFull;
     212                 :            :     const rtl::OUString                         msVerb;
     213                 :            :     const rtl::OUString                         msSoundURL;
     214                 :            :     const rtl::OUString                         msSpeed;
     215                 :            :     const rtl::OUString                         msStarBasic;
     216                 :            : 
     217                 :            :     rtl::OUStringBuffer msBuffer;
     218                 :            : 
     219                 :            :     SAL_DLLPRIVATE void ImpCalcShapeType(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType& eShapeType);
     220                 :            : 
     221                 :            :     SAL_DLLPRIVATE void ImpExportNewTrans(const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint);
     222                 :            :     SAL_DLLPRIVATE void ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet);
     223                 :            :     SAL_DLLPRIVATE void ImpExportNewTrans_DecomposeAndRefPoint(const ::basegfx::B2DHomMatrix& rMat, ::basegfx::B2DTuple& rTRScale, double& fTRShear, double& fTRRotate, ::basegfx::B2DTuple& rTRTranslate, com::sun::star::awt::Point* pRefPoint);
     224                 :            :     SAL_DLLPRIVATE void ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32 nFeatures);
     225                 :            :     SAL_DLLPRIVATE sal_Bool ImpExportPresentationAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, const rtl::OUString& rClass );
     226                 :            :     SAL_DLLPRIVATE void ImpExportText( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
     227                 :            :     SAL_DLLPRIVATE void ImpExportEvents( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
     228                 :            :     SAL_DLLPRIVATE void ImpExportDescription( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape ); // #i68101#
     229                 :            :     SAL_DLLPRIVATE void ImpExportGluePoints( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
     230                 :            : 
     231                 :            :     // single shape exporters
     232                 :            :     SAL_DLLPRIVATE void ImpExportGroupShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     233                 :            :     SAL_DLLPRIVATE void ImpExport3DSceneShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     234                 :            :     SAL_DLLPRIVATE void ImpExportRectangleShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     235                 :            :     SAL_DLLPRIVATE void ImpExportLineShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     236                 :            :     SAL_DLLPRIVATE void ImpExportEllipseShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     237                 :            :     SAL_DLLPRIVATE void ImpExportPolygonShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     238                 :            :     SAL_DLLPRIVATE void ImpExportTextBoxShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     239                 :            :     SAL_DLLPRIVATE void ImpExportGraphicObjectShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     240                 :            :     SAL_DLLPRIVATE void ImpExportChartShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL );
     241                 :            :     SAL_DLLPRIVATE void ImpExportControlShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT,  com::sun::star::awt::Point* pRefPoint = NULL );
     242                 :            :     SAL_DLLPRIVATE void ImpExportConnectorShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     243                 :            :     SAL_DLLPRIVATE void ImpExportMeasureShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT,  com::sun::star::awt::Point* pRefPoint = NULL );
     244                 :            :     SAL_DLLPRIVATE void ImpExportOLE2Shape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL );
     245                 :            :     SAL_DLLPRIVATE void ImpExportPageShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     246                 :            :     SAL_DLLPRIVATE void ImpExportCaptionShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     247                 :            :     SAL_DLLPRIVATE void ImpExport3DShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     248                 :            :     SAL_DLLPRIVATE void ImpExportFrameShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     249                 :            :     SAL_DLLPRIVATE void ImpExportPluginShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     250                 :            :     SAL_DLLPRIVATE void ImpExportAppletShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     251                 :            :     SAL_DLLPRIVATE void ImpExportCustomShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     252                 :            :     SAL_DLLPRIVATE void ImpExportMediaShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
     253                 :            :     SAL_DLLPRIVATE void ImpExportTableShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT,    com::sun::star::awt::Point* pRefPoint = NULL );
     254                 :            : public:
     255                 :            :     XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=0 );
     256                 :            :     virtual ~XMLShapeExport();
     257                 :            : 
     258                 :            :     // This method collects all automatic styles for the given XShape
     259                 :            :     void collectShapeAutoStyles(
     260                 :            :         const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape);
     261                 :            : 
     262                 :            :     // This method exports the given XShape
     263                 :            :     void exportShape(
     264                 :            :         const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape,
     265                 :            :         sal_Int32 nFeatures = SEF_DEFAULT,
     266                 :            :         com::sun::star::awt::Point* pRefPoint = NULL,
     267                 :            :         SvXMLAttributeList* pAttrList = NULL
     268                 :            :         );
     269                 :            : 
     270                 :            :     // This method collects all automatic styles for the shapes inside the given XShapes collection
     271                 :            :     void collectShapesAutoStyles(
     272                 :            :         const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes);
     273                 :            : 
     274                 :            :     // This method exports all XShape inside the given XShapes collection
     275                 :            :     void exportShapes(
     276                 :            :         const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes,
     277                 :            :         sal_Int32 nFeatures = SEF_DEFAULT,
     278                 :            :         com::sun::star::awt::Point* pRefPoint = NULL
     279                 :            :         );
     280                 :            : 
     281                 :            :     /** initializes some internal structures for fast access to the given XShapes collection
     282                 :            : 
     283                 :            :         <p>This method has to be called before you use exportShape or collectShapeAutoStyles.
     284                 :            :         It is automaticly called if you use collectShapesAutoStyles and exportShapes.
     285                 :            : 
     286                 :            :         @see collectShapeAutoStyles
     287                 :            :         @see exportShape
     288                 :            :         @see collectShapesAutoStyles
     289                 :            :         @see exportShapes
     290                 :            :     */
     291                 :            :     void seekShapes(
     292                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xShapes ) throw();
     293                 :            : 
     294                 :            :     void exportAutoStyles();
     295                 :            : 
     296                 :            :     /** sets a new reference to an XMLAnimationExporter.
     297                 :            :         If this is a non NULL reference, the animation information from all shapes given to exportShape()
     298                 :            :         from now on are collected.
     299                 :            :     */
     300                 :         10 :     void setAnimationsExporter( UniReference< XMLAnimationsExporter > xAnimExport ) { mxAnimationsExporter = xAnimExport; }
     301                 :            : 
     302                 :            :     /** returns the last set XMLAnimationExport */
     303                 :          2 :     UniReference< XMLAnimationsExporter > getAnimationsExporter() const { return mxAnimationsExporter; }
     304                 :            : 
     305                 :            :     /// returns the export property mapper for external chaining
     306                 :            :     static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport );
     307                 :            : 
     308                 :         58 :     void enableLayerExport( sal_Bool bEnable = sal_True ) { mbExportLayer = bEnable; }
     309                 :        100 :     sal_Bool IsLayerExportEnabled() const { return mbExportLayer; }
     310                 :            : 
     311                 :            :     // #88546#
     312                 :            :     /** defines if the export should increment the progress bar or not */
     313                 :         58 :     void enableHandleProgressBar( sal_Bool bEnable = sal_True ) { mbHandleProgressBar = bEnable; }
     314                 :        100 :     sal_Bool IsHandleProgressBarEnabled() const { return mbHandleProgressBar; }
     315                 :            : 
     316                 :         28 :     void setPresentationStylePrefix( const rtl::OUString& rPrefix ) { msPresentationStylePrefix = rPrefix; }
     317                 :            : 
     318                 :            :     /** helper for chart that adds all attributes of a 3d scene element to the export */
     319                 :            :     void export3DSceneAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
     320                 :            : 
     321                 :            :     /** helper for chart that exports all lamps from the propertyset */
     322                 :            :     void export3DLamps( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
     323                 :            : 
     324                 :            :     /** sj: replacing CustomShapes with standard objects that are also supported in OpenOffice.org format */
     325                 :            :     com::sun::star::uno::Reference < com::sun::star::drawing::XShape > checkForCustomShapeReplacement(
     326                 :            :         const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& );
     327                 :            : 
     328                 :            :     /** helper to export the style for graphic defaults */
     329                 :            :     void ExportGraphicDefaults();
     330                 :            : 
     331                 :            :     /** is called before a shape element for the given XShape is exported */
     332                 :            :     virtual void onExport( const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape );
     333                 :            : 
     334                 :            :     const rtl::Reference< XMLTableExport >&     GetShapeTableExport();
     335                 :            : };
     336                 :            : 
     337                 :            : 
     338                 :            : #endif
     339                 :            : 
     340                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10