-
-#include "xmloff/table/XMLTableExport.hxx"
-
-// shape export features are bits used for the nFeature
-// parameter of XMLShapeExport::exportShape
-
-#define SEF_EXPORT_X 0x0001
-#define SEF_EXPORT_Y 0x0002
-#define SEF_EXPORT_POSITION 0x0003
-
-#define SEF_EXPORT_WIDTH 0x0004
-#define SEF_EXPORT_HEIGHT 0x0008
-#define SEF_EXPORT_SIZE 0x000c
-
-// when you set this flag a chart does NOT export its own data as table element
-#define SEF_EXPORT_NO_CHART_DATA 0x0010
-
-// When setting the flag below no ignorableWhiteSpace will be called around
-// the drawing object elements
-#define SEF_EXPORT_NO_WS 0x0020
-
-// When setting the flag below a callout shape is exported as office:annotation
-#define SEF_EXPORT_ANNOTATION 0x0040
-
-#define SEF_DEFAULT SEF_EXPORT_POSITION|SEF_EXPORT_SIZE
-
-enum XmlShapeType
-{
- XmlShapeTypeUnknown, // not known
-
- XmlShapeTypeDrawRectangleShape, // "com.sun.star.drawing.RectangleShape"
- XmlShapeTypeDrawEllipseShape, // "com.sun.star.drawing.EllipseShape"
- XmlShapeTypeDrawControlShape, // "com.sun.star.drawing.ControlShape"
- XmlShapeTypeDrawConnectorShape, // "com.sun.star.drawing.ConnectorShape"
- XmlShapeTypeDrawMeasureShape, // "com.sun.star.drawing.MeasureShape"
- XmlShapeTypeDrawLineShape, // "com.sun.star.drawing.LineShape"
- XmlShapeTypeDrawPolyPolygonShape, // "com.sun.star.drawing.PolyPolygonShape"
- XmlShapeTypeDrawPolyLineShape, // "com.sun.star.drawing.PolyLineShape"
- XmlShapeTypeDrawOpenBezierShape, // "com.sun.star.drawing.OpenBezierShape"
- XmlShapeTypeDrawClosedBezierShape, // "com.sun.star.drawing.ClosedBezierShape"
- XmlShapeTypeDrawGraphicObjectShape, // "com.sun.star.drawing.GraphicObjectShape"
- XmlShapeTypeDrawGroupShape, // "com.sun.star.drawing.GroupShape"
- XmlShapeTypeDrawTextShape, // "com.sun.star.drawing.TextShape"
- XmlShapeTypeDrawOLE2Shape, // "com.sun.star.drawing.OLE2Shape"
- XmlShapeTypeDrawChartShape, // embedded com.sun.star.chart
- XmlShapeTypeDrawSheetShape, // embedded com.sun.star.sheet
- XmlShapeTypeDrawPageShape, // "com.sun.star.drawing.PageShape"
- XmlShapeTypeDrawFrameShape, // "com.sun.star.drawing.FrameShape"
- XmlShapeTypeDrawCaptionShape, // "com.sun.star.drawing.CaptionShape"
- XmlShapeTypeDrawAppletShape, // "com.sun.star.drawing.AppletShape"
- XmlShapeTypeDrawPluginShape, // "com.sun.star.drawing.PlugginShape"
-
- XmlShapeTypeDraw3DSceneObject, // "com.sun.star.drawing.Shape3DSceneObject"
- XmlShapeTypeDraw3DCubeObject, // "com.sun.star.drawing.Shape3DCubeObject"
- XmlShapeTypeDraw3DSphereObject, // "com.sun.star.drawing.Shape3DSphereObject"
- XmlShapeTypeDraw3DLatheObject, // "com.sun.star.drawing.Shape3DLatheObject"
- XmlShapeTypeDraw3DExtrudeObject, // "com.sun.star.drawing.Shape3DExtrudeObject"
-
- XmlShapeTypePresTitleTextShape, // "com.sun.star.presentation.TitleTextShape"
- XmlShapeTypePresOutlinerShape, // "com.sun.star.presentation.OutlinerShape"
- XmlShapeTypePresSubtitleShape, // "com.sun.star.presentation.SubtitleShape"
- XmlShapeTypePresGraphicObjectShape, // "com.sun.star.presentation.GraphicObjectShape"
- XmlShapeTypePresPageShape, // "com.sun.star.presentation.PageShape"
- XmlShapeTypePresOLE2Shape, // "com.sun.star.presentation.OLE2Shape"
- XmlShapeTypePresChartShape, // "com.sun.star.presentation.ChartShape"
- XmlShapeTypePresSheetShape, // "com.sun.star.presentation.CalcShape"
- XmlShapeTypePresTableShape, // "com.sun.star.presentation.TableShape"
- XmlShapeTypePresOrgChartShape, // "com.sun.star.presentation.OrgChartShape"
- XmlShapeTypePresNotesShape, // "com.sun.star.presentation.NotesShape"
- XmlShapeTypeHandoutShape, // "com.sun.star.presentation.HandoutShape"
-
- XmlShapeTypePresHeaderShape, // "com.sun.star.presentation.HeaderShape"
- XmlShapeTypePresFooterShape, // "com.sun.star.presentation.FooterShape"
- XmlShapeTypePresSlideNumberShape, // "com.sun.star.presentation.SlideNumberShape"
- XmlShapeTypePresDateTimeShape, // "com.sun.star.presentation.DateTimeShape"
-
- XmlShapeTypeDrawCustomShape, // "com.sun.star.drawing.CustomShape"
- XmlShapeTypeDrawMediaShape, // "com.sun.star.drawing.MediaShape"
- XmlShapeTypePresMediaShape, // "com.sun.star.presentation.MediaShape"
-
- XmlShapeTypeDrawTableShape, // "com.sun.star.drawing.TableShape"
-
- XmlShapeTypeNotYetSet
-};
-
-/** caches style and type info after a collectShapeAutostyle for later use in exportShape */
-struct ImplXMLShapeExportInfo
-{
- OUString msStyleName;
- OUString msTextStyleName;
- sal_Int32 mnFamily;
- XmlShapeType meShapeType;
-
- com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xCustomShapeReplacement;
-
- ImplXMLShapeExportInfo() : mnFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID ), meShapeType( XmlShapeTypeNotYetSet ) {}
-};
-
-/** a vector for shape style and type cache information */
-typedef std::vector< ImplXMLShapeExportInfo > ImplXMLShapeExportInfoVector;
-
-/** a map to store all cache data for already collected XShapes */
-typedef std::map< com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >, ImplXMLShapeExportInfoVector > ShapesInfos;
-
-//////////////////////////////////////////////////////////////////////////////
-// predeclarations
-
-class SvXMLExport;
-class SvXMLExportPropertyMapper;
-
-namespace basegfx
-{
- class B2DTuple;
- class B2DHomMatrix;
-} // end of namespace basegfx
-
-class XMLOFF_DLLPUBLIC XMLShapeExport : public UniRefBase
-{
-private:
-
- SvXMLExport& mrExport;
- UniReference< XMLPropertyHandlerFactory > mxSdPropHdlFactory;
- UniReference< SvXMLExportPropertyMapper > mxPropertySetMapper;
- UniReference< XMLAnimationsExporter > mxAnimationsExporter;
- sal_Int32 mnNextUniqueShapeId;
- ShapesInfos maShapesInfos;
- ShapesInfos::iterator maCurrentShapesIter;
- sal_Bool mbExportLayer;
- ImplXMLShapeExportInfoVector maShapeInfos;
- ImplXMLShapeExportInfoVector::iterator maCurrentInfo;
- OUString msPresentationStylePrefix;
-
- // #88546# possibility to swich progress bar handling on/off
- sal_Bool mbHandleProgressBar;
-
- rtl::Reference< XMLTableExport > mxShapeTableExport;
-
-protected:
- SvXMLExport& GetExport() { return mrExport; }
- const SvXMLExport& GetExport() const { return mrExport; }
-private:
-
- SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
-
- const OUString msZIndex;
- const OUString msPrintable;
- const OUString msVisible;
-
- const OUString msEmptyPres;
- const OUString msModel;
- const OUString msStartShape;
- const OUString msEndShape;
- const OUString msOnClick;
- const OUString msEventType;
- const OUString msPresentation;
- const OUString msMacroName;
- const OUString msScript;
- const OUString msLibrary;
- const OUString msClickAction;
- const OUString msBookmark;
- const OUString msEffect;
- const OUString msPlayFull;
- const OUString msVerb;
- const OUString msSoundURL;
- const OUString msSpeed;
- const OUString msStarBasic;
-
- OUStringBuffer msBuffer;
-
- SAL_DLLPRIVATE void ImpCalcShapeType(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType& eShapeType);
-
- 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);
- SAL_DLLPRIVATE void ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet);
- 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);
- SAL_DLLPRIVATE void ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32 nFeatures);
- SAL_DLLPRIVATE sal_Bool ImpExportPresentationAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, const OUString& rClass );
- SAL_DLLPRIVATE void ImpExportText( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
- SAL_DLLPRIVATE void ImpExportEvents( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
- SAL_DLLPRIVATE void ImpExportDescription( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape ); // #i68101#
- SAL_DLLPRIVATE void ImpExportGluePoints( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
-
- // single shape exporters
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
- 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 );
-public:
- XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=0 );
- virtual ~XMLShapeExport();
-
- // This method collects all automatic styles for the given XShape
- void collectShapeAutoStyles(
- const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape);
-
- // This method exports the given XShape
- void exportShape(
- const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape,
- sal_Int32 nFeatures = SEF_DEFAULT,
- com::sun::star::awt::Point* pRefPoint = NULL,
- SvXMLAttributeList* pAttrList = NULL
- );
-
- // This method collects all automatic styles for the shapes inside the given XShapes collection
- void collectShapesAutoStyles(
- const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes);
-
- // This method exports all XShape inside the given XShapes collection
- void exportShapes(
- const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes,
- sal_Int32 nFeatures = SEF_DEFAULT,
- com::sun::star::awt::Point* pRefPoint = NULL
- );
-
- /** initializes some internal structures for fast access to the given XShapes collection
-
- This method has to be called before you use exportShape or collectShapeAutoStyles.
- It is automaticly called if you use collectShapesAutoStyles and exportShapes.
-
- @see collectShapeAutoStyles
- @see exportShape
- @see collectShapesAutoStyles
- @see exportShapes
- */
- void seekShapes(
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xShapes ) throw();
-
- void exportAutoStyles();
-
- /** sets a new reference to an XMLAnimationExporter.
- If this is a non NULL reference, the animation information from all shapes given to exportShape()
- from now on are collected.
- */
- void setAnimationsExporter( UniReference< XMLAnimationsExporter > xAnimExport ) { mxAnimationsExporter = xAnimExport; }
-
- /** returns the last set XMLAnimationExport */
- UniReference< XMLAnimationsExporter > getAnimationsExporter() const { return mxAnimationsExporter; }
-
- /// returns the export property mapper for external chaining
- static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport );
-
- void enableLayerExport( sal_Bool bEnable = sal_True ) { mbExportLayer = bEnable; }
- sal_Bool IsLayerExportEnabled() const { return mbExportLayer; }
-
- // #88546#
- /** defines if the export should increment the progress bar or not */
- void enableHandleProgressBar( sal_Bool bEnable = sal_True ) { mbHandleProgressBar = bEnable; }
- sal_Bool IsHandleProgressBarEnabled() const { return mbHandleProgressBar; }
-
- void setPresentationStylePrefix( const OUString& rPrefix ) { msPresentationStylePrefix = rPrefix; }
-
- /** helper for chart that adds all attributes of a 3d scene element to the export */
- void export3DSceneAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
-
- /** helper for chart that exports all lamps from the propertyset */
- void export3DLamps( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
-
- /** sj: replacing CustomShapes with standard objects that are also supported in OpenOffice.org format */
- com::sun::star::uno::Reference < com::sun::star::drawing::XShape > checkForCustomShapeReplacement(
- const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& );
-
- /** helper to export the style for graphic defaults */
- void ExportGraphicDefaults();
-
- /** is called before a shape element for the given XShape is exported */
- virtual void onExport( const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape );
-
- const rtl::Reference< XMLTableExport >& GetShapeTableExport();
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/shapeimport.hxx b/xmloff/inc/xmloff/shapeimport.hxx
deleted file mode 100644
index 6de02130f243..000000000000
--- a/xmloff/inc/xmloff/shapeimport.hxx
+++ /dev/null
@@ -1,426 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _XMLOFF_SHAPEIMPORT_HXX_
-#define _XMLOFF_SHAPEIMPORT_HXX_
-
-#include "sal/config.h"
-#include "xmloff/dllapi.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "xmloff/table/XMLTableImport.hxx"
-#include
-#include
-
-class SvXMLImport;
-class SvXMLImportContext;
-class SvXMLTokenMap;
-class SvXMLStylesContext;
-class XMLSdPropHdlFactory;
-class XMLPropertySetMapper;
-class SvXMLImportPropertyMapper;
-
-//////////////////////////////////////////////////////////////////////////////
-
-enum SdXMLGroupShapeElemTokenMap
-{
- XML_TOK_GROUP_GROUP,
- XML_TOK_GROUP_RECT,
- XML_TOK_GROUP_LINE,
- XML_TOK_GROUP_CIRCLE,
- XML_TOK_GROUP_ELLIPSE,
- XML_TOK_GROUP_POLYGON,
- XML_TOK_GROUP_POLYLINE,
- XML_TOK_GROUP_PATH,
-
- XML_TOK_GROUP_CONTROL,
- XML_TOK_GROUP_CONNECTOR,
- XML_TOK_GROUP_MEASURE,
- XML_TOK_GROUP_PAGE,
- XML_TOK_GROUP_CAPTION,
-
- XML_TOK_GROUP_CHART,
- XML_TOK_GROUP_3DSCENE,
-
- XML_TOK_GROUP_FRAME,
-
- XML_TOK_GROUP_CUSTOM_SHAPE,
-
- XML_TOK_GROUP_ANNOTATION,
-
- XML_TOK_GROUP_A,
-
- XML_TOK_GROUP_LAST
-};
-
-enum SdXMLFrameShapeElemTokenMap
-{
- XML_TOK_FRAME_TEXT_BOX,
- XML_TOK_FRAME_IMAGE,
- XML_TOK_FRAME_OBJECT,
- XML_TOK_FRAME_OBJECT_OLE,
- XML_TOK_FRAME_PLUGIN,
- XML_TOK_FRAME_FRAME,
- XML_TOK_FRAME_FLOATING_FRAME,
- XML_TOK_FRAME_APPLET,
- XML_TOK_FRAME_TABLE,
-
- XML_TOK_FRAME_LAST
-};
-
-enum SdXML3DSceneShapeElemTokenMap
-{
- XML_TOK_3DSCENE_3DSCENE,
- XML_TOK_3DSCENE_3DCUBE,
- XML_TOK_3DSCENE_3DSPHERE,
- XML_TOK_3DSCENE_3DLATHE,
- XML_TOK_3DSCENE_3DEXTRUDE,
-
- XML_TOK_3DSCENE_LAST
-};
-
-enum SdXMLShapeAttrTokenMap
-{
- XML_TOK_SHAPE_NAME,
- XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS,
- XML_TOK_SHAPE_PRESENTATION_CLASS,
- XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION,
- XML_TOK_SHAPE_TRANSFORM,
- XML_TOK_SHAPE_IS_PLACEHOLDER,
- XML_TOK_SHAPE_IS_USER_TRANSFORMED
-};
-
-enum SdXML3DObjectAttrTokenMap
-{
- XML_TOK_3DOBJECT_DRAWSTYLE_NAME,
- XML_TOK_3DOBJECT_TRANSFORM
-};
-
-enum SdXML3DPolygonBasedAttrTokenMap
-{
- XML_TOK_3DPOLYGONBASED_VIEWBOX,
- XML_TOK_3DPOLYGONBASED_D
-};
-
-enum SdXML3DCubeObjectAttrTokenMap
-{
- XML_TOK_3DCUBEOBJ_MINEDGE,
- XML_TOK_3DCUBEOBJ_MAXEDGE
-};
-
-enum SdXML3DSphereObjectAttrTokenMap
-{
- XML_TOK_3DSPHEREOBJ_CENTER,
- XML_TOK_3DSPHEREOBJ_SIZE
-};
-
-enum SdXMLPolygonShapeAttrTokenMap
-{
- XML_TOK_POLYGONSHAPE_VIEWBOX,
- XML_TOK_POLYGONSHAPE_POINTS
-};
-
-enum SdXMLPathShapeAttrTokenMap
-{
- XML_TOK_PATHSHAPE_VIEWBOX,
- XML_TOK_PATHSHAPE_D
-};
-
-enum SdXML3DSceneShapeAttrTokenMap
-{
- XML_TOK_3DSCENESHAPE_TRANSFORM,
- XML_TOK_3DSCENESHAPE_VRP,
- XML_TOK_3DSCENESHAPE_VPN,
- XML_TOK_3DSCENESHAPE_VUP,
- XML_TOK_3DSCENESHAPE_PROJECTION,
- XML_TOK_3DSCENESHAPE_DISTANCE,
- XML_TOK_3DSCENESHAPE_FOCAL_LENGTH,
- XML_TOK_3DSCENESHAPE_SHADOW_SLANT,
- XML_TOK_3DSCENESHAPE_SHADE_MODE,
- XML_TOK_3DSCENESHAPE_AMBIENT_COLOR,
- XML_TOK_3DSCENESHAPE_LIGHTING_MODE
-};
-
-enum SdXML3DLightAttrTokenMap
-{
- XML_TOK_3DLIGHT_DIFFUSE_COLOR,
- XML_TOK_3DLIGHT_DIRECTION,
- XML_TOK_3DLIGHT_ENABLED,
- XML_TOK_3DLIGHT_SPECULAR
-};
-
-//////////////////////////////////////////////////////////////////////////////
-// dr3d:3dlight context
-
-class SdXML3DLightContext: public SvXMLImportContext
-{
- // local parameters which need to be read
- sal_Int32 maDiffuseColor;
- ::basegfx::B3DVector maDirection;
- bool mbEnabled;
- bool mbSpecular;
-
-public:
- SdXML3DLightContext(
- SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
- virtual ~SdXML3DLightContext();
-
- sal_Int32 GetDiffuseColor() { return maDiffuseColor; }
- const ::basegfx::B3DVector& GetDirection() { return maDirection; }
- sal_Bool GetEnabled() { return mbEnabled; }
- sal_Bool GetSpecular() { return mbSpecular; }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-typedef ::std::vector< SdXML3DLightContext* > Imp3DLightList;
-
-class SdXML3DSceneAttributesHelper
-{
-protected:
- SvXMLImport& mrImport;
-
- // list for local light contexts
- Imp3DLightList maList;
-
- // local parameters which need to be read
- com::sun::star::drawing::HomogenMatrix mxHomMat;
- sal_Bool mbSetTransform;
-
- com::sun::star::drawing::ProjectionMode mxPrjMode;
- sal_Int32 mnDistance;
- sal_Int32 mnFocalLength;
- sal_Int32 mnShadowSlant;
- com::sun::star::drawing::ShadeMode mxShadeMode;
- sal_Int32 maAmbientColor;
- bool mbLightingMode;
-
- ::basegfx::B3DVector maVRP;
- ::basegfx::B3DVector maVPN;
- ::basegfx::B3DVector maVUP;
- sal_Bool mbVRPUsed;
- sal_Bool mbVPNUsed;
- sal_Bool mbVUPUsed;
-
-public:
- SdXML3DSceneAttributesHelper( SvXMLImport& rImporter );
- ~SdXML3DSceneAttributesHelper();
-
- /** creates a 3d ligth context and adds it to the internal list for later processing */
- SvXMLImportContext * create3DLightContext( sal_uInt16 nPrfx, const OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
-
- /** this should be called for each scene attribute */
- void processSceneAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue );
-
- /** this sets the scene attributes at this propertyset */
- void setSceneAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-class SvXMLShapeContext : public SvXMLImportContext
-{
-protected:
- com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxShape;
- sal_Bool mbTemporaryShape;
- OUString msHyperlink;
-
-public:
- SvXMLShapeContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
- const OUString& rLName, sal_Bool bTemporaryShape ) : SvXMLImportContext( rImp, nPrfx, rLName ), mbTemporaryShape(bTemporaryShape) {}
-
- TYPEINFO();
-
- const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& getShape() const { return mxShape; }
-
- void setHyperlink( const OUString& rHyperlink );
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-class ShapeSortContext;
-struct XMLShapeImportHelperImpl;
-struct XMLShapeImportPageContextImpl;
-
-class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public UniRefBase
-{
- XMLShapeImportHelperImpl* mpImpl;
-
- XMLShapeImportPageContextImpl* mpPageContext;
-
- com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
-
- // PropertySetMappers and factory
- XMLSdPropHdlFactory* mpSdPropHdlFactory;
- SvXMLImportPropertyMapper* mpPropertySetMapper;
- SvXMLImportPropertyMapper* mpPresPagePropsMapper;
-
- // contexts for Style and AutoStyle import
- SvXMLStylesContext* mpStylesContext;
- SvXMLStylesContext* mpAutoStylesContext;
-
- // contexts for xShape contents TokenMaps
- SvXMLTokenMap* mpGroupShapeElemTokenMap;
- SvXMLTokenMap* mpFrameShapeElemTokenMap;
- SvXMLTokenMap* mp3DSceneShapeElemTokenMap;
- SvXMLTokenMap* mp3DObjectAttrTokenMap;
- SvXMLTokenMap* mp3DPolygonBasedAttrTokenMap;
- SvXMLTokenMap* mp3DCubeObjectAttrTokenMap;
- SvXMLTokenMap* mp3DSphereObjectAttrTokenMap;
- SvXMLTokenMap* mp3DSceneShapeAttrTokenMap;
- SvXMLTokenMap* mp3DLightAttrTokenMap;
- SvXMLTokenMap* mpPathShapeAttrTokenMap;
- SvXMLTokenMap* mpPolygonShapeAttrTokenMap;
-
- const OUString msStartShape;
- const OUString msEndShape;
- const OUString msStartGluePointIndex;
- const OUString msEndGluePointIndex;
-
- rtl::Reference< XMLTableImport > mxShapeTableImport;
-
-protected:
- SvXMLImport& mrImporter;
-
-public:
- XMLShapeImportHelper( SvXMLImport& rImporter,
- const com::sun::star::uno::Reference< com::sun::star::frame::XModel>& rModel,
- SvXMLImportPropertyMapper *pExtMapper=0 );
-
- ~XMLShapeImportHelper();
-
- SvXMLShapeContext* CreateGroupChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
- com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
- sal_Bool bTemporaryShape = sal_False);
-
- SvXMLShapeContext* CreateFrameChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
- com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xFrameAttrList);
- SvXMLImportContext* CreateFrameChildContext(
- SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString& rLocalName,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
-
- SvXMLShapeContext* Create3DSceneChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
- com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
-
- const SvXMLTokenMap& GetGroupShapeElemTokenMap();
- const SvXMLTokenMap& GetFrameShapeElemTokenMap();
- const SvXMLTokenMap& Get3DSceneShapeElemTokenMap();
- const SvXMLTokenMap& Get3DObjectAttrTokenMap();
- const SvXMLTokenMap& Get3DPolygonBasedAttrTokenMap();
- const SvXMLTokenMap& Get3DCubeObjectAttrTokenMap();
- const SvXMLTokenMap& Get3DSphereObjectAttrTokenMap();
- const SvXMLTokenMap& Get3DLightAttrTokenMap();
-
- // Styles and AutoStyles contexts
- SvXMLStylesContext* GetStylesContext() const { return mpStylesContext; }
- void SetStylesContext(SvXMLStylesContext* pNew);
- SvXMLStylesContext* GetAutoStylesContext() const { return mpAutoStylesContext; }
- void SetAutoStylesContext(SvXMLStylesContext* pNew);
-
- // get factories and mappers
- SvXMLImportPropertyMapper* GetPropertySetMapper() const { return mpPropertySetMapper; }
- SvXMLImportPropertyMapper* GetPresPagePropsMapper() const { return mpPresPagePropsMapper; }
-
- // this function is called whenever the implementation classes like to add this new
- // shape to the given XShapes.
- virtual void addShape(
- com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
- com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
-
- // this function is called whenever the implementation classes have finished importing
- // a shape to the given XShapes. The shape is already inserted into its XShapes and
- // all properties and styles are set.
- virtual void finishShape(
- com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
- const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
- com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
-
- // helper functions for z-order sorting
- void pushGroupForSorting( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
- void popGroupAndSort();
-
- void shapeWithZIndexAdded( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
- sal_Int32 nZIndex );
-
- void addShapeConnection( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rConnectorShape,
- sal_Bool bStart,
- const OUString& rDestShapeId,
- sal_Int32 nDestGlueId );
-
- /** adds a mapping for a glue point identifier from an xml file to the identifier created after inserting
- the new glue point into the core. The saved mappings can be retrieved by getGluePointId() */
- void addGluePointMapping( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape,
- sal_Int32 nSourceId, sal_Int32 nDestinnationId );
-
- /** moves all current DestinationId's for rXShape by n */
- void moveGluePointMapping( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, const sal_Int32 n );
-
- /** retrieves a mapping for a glue point identifier from the current xml file to the identifier created after
- inserting the new glue point into the core. The mapping must be initialized first with addGluePointMapping() */
- sal_Int32 getGluePointId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId );
-
- /** this method must be calling before the first shape is imported for the given page.
- Calls to this method can be nested */
- void startPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
-
- /** this method must be calling after the last shape is imported for the given page
- Calls to this method can be nested */
- void endPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
-
- void restoreConnections();
-
- /** creates a property mapper for external chaining */
- static SvXMLImportPropertyMapper* CreateShapePropMapper(
- const com::sun::star::uno::Reference< com::sun::star::frame::XModel>& rModel, SvXMLImport& rImport );
-
- // #88546#
- /** defines if the import should increment the progress bar or not */
- void enableHandleProgressBar( sal_Bool bEnable = sal_True );
- sal_Bool IsHandleProgressBarEnabled() const;
-
- /** queries the capability of the current model to create presentation shapes */
- sal_Bool IsPresentationShapesSupported();
-
- XMLSdPropHdlFactory* GetSdPropHdlFactory() const { return mpSdPropHdlFactory; }
-
- const rtl::Reference< XMLTableImport >& GetShapeTableImport();
-};
-
-#endif // _XMLOFF_SHAPEIMPORT_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/styleexp.hxx b/xmloff/inc/xmloff/styleexp.hxx
deleted file mode 100644
index 367c6d44b402..000000000000
--- a/xmloff/inc/xmloff/styleexp.hxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _XMLOFF_STYLEEXP_HXX_
-#define _XMLOFF_STYLEEXP_HXX_
-
-#include "sal/config.h"
-#include "xmloff/dllapi.h"
-#include
-#include
-
-#include
-
-namespace com { namespace sun { namespace star
-{
- namespace style
- {
- class XStyle;
- }
- namespace beans
- {
- class XPropertySet;
- }
- namespace container
- {
- class XNameAccess;
- }
-
-} } }
-
-class XMLPropertySetMapper;
-class SvXMLExportPropertyMapper;
-class SvXMLAutoStylePoolP;
-class SvXMLExport;
-
-class XMLOFF_DLLPUBLIC XMLStyleExport : public UniRefBase
-{
- SvXMLExport& rExport;
-protected:
- const OUString sIsPhysical;
- const OUString sIsAutoUpdate;
- const OUString sFollowStyle;
- const OUString sNumberingStyleName;
- const OUString sOutlineLevel;
-
- SvXMLExport& GetExport() { return rExport; }
- const SvXMLExport& GetExport() const { return rExport; }
-
-private:
-
- const OUString sPoolStyleName;
-
- SvXMLAutoStylePoolP *pAutoStylePool;
-
-protected:
-
- virtual sal_Bool exportStyle(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::style::XStyle > & rStyle,
- const OUString& rXMLFamily,
- const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles,
- const OUString* pPrefix = 0L );
-
- virtual void exportStyleAttributes(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::style::XStyle > & rStyle );
-
- virtual void exportStyleContent(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::style::XStyle > & rStyle );
-public:
- XMLStyleExport(
- SvXMLExport& rExp,
- const OUString& rPoolStyleName,
- SvXMLAutoStylePoolP *pAutoStyleP=0 );
- virtual ~XMLStyleExport();
-
-// void exportStyleFamily(
-// const OUString& rFamily, const OUString& rXMLFamily,
-// const UniReference < XMLPropertySetMapper >& rPropMapper,
-// sal_Bool bUsed, sal_uInt16 nFamily = 0,
-// const OUString* pPrefix = 0L);
-
-// void exportStyleFamily(
-// const sal_Char *pFamily, const OUString& rXMLFamily,
-// const UniReference < XMLPropertySetMapper >& rPropMapper,
-// sal_Bool bUsed, sal_uInt16 nFamily = 0,
-// const OUString* pPrefix = 0L);
-
- virtual sal_Bool exportDefaultStyle(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & xPropSet,
- const OUString& rXMLFamily,
- const UniReference < SvXMLExportPropertyMapper >& rPropMapper );
-
- void exportStyleFamily(
- const OUString& rFamily, const OUString& rXMLFamily,
- const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
- sal_Bool bUsed, sal_uInt16 nFamily = 0,
- const OUString* pPrefix = 0L);
-
- void exportStyleFamily(
- const sal_Char *pFamily, const OUString& rXMLFamily,
- const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
- sal_Bool bUsed, sal_uInt16 nFamily = 0,
- const OUString* pPrefix = 0L);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/table/XMLTableExport.hxx b/xmloff/inc/xmloff/table/XMLTableExport.hxx
deleted file mode 100644
index e93c0a244a51..000000000000
--- a/xmloff/inc/xmloff/table/XMLTableExport.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _XMLOFF_XMLTABLEEXPORT_HXX
-#define _XMLOFF_XMLTABLEEXPORT_HXX
-
-#include "sal/config.h"
-
-#include
-#include
-#include
-
-#include
-#include