diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-28 17:50:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-06 10:59:42 +0200 |
commit | 64cccf36f26f6398906a0cc6fc48e76defbe057d (patch) | |
tree | 9359c64efccfc85a298a54859c7279a3a2a1467e | |
parent | 8447eeb192acf7e3255f7fdf92977470b28a18f9 (diff) |
fdo#84938: convert SEF_EXPORT_ #defines to 'enum class'
Change-Id: I7165d0f1b6b4af4de5e5b39a21f36d726a1b0e30
-rw-r--r-- | include/xmloff/shapeexport.hxx | 85 | ||||
-rw-r--r-- | include/xmloff/txtparae.hxx | 3 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 124 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 12 |
6 files changed, 118 insertions, 114 deletions
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx index 71e1683c5493..6cc70a4c2830 100644 --- a/include/xmloff/shapeexport.hxx +++ b/include/xmloff/shapeexport.hxx @@ -38,31 +38,34 @@ #include <xmloff/xmlexppr.hxx> #include <xmloff/animexp.hxx> #include <xmloff/families.hxx> +#include <o3tl/typed_flags_set.hxx> #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 - +enum class XMLShapeExportFlags { + NONE = 0, + X = 0x0001, + Y = 0x0002, + POSITION = 0x0003, + WIDTH = 0x0004, + HEIGHT = 0x0008, + 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 - + 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 - + NO_WS = 0x0020, // When setting the flag below a callout shape is exported as office:annotation -#define SEF_EXPORT_ANNOTATION 0x0040 + ANNOTATION = 0x0040, +}; +namespace o3tl +{ + template<> struct typed_flags<XMLShapeExportFlags> : is_typed_flags<XMLShapeExportFlags, 0x7f> {}; +} -#define SEF_DEFAULT SEF_EXPORT_POSITION|SEF_EXPORT_SIZE +#define SEF_DEFAULT XMLShapeExportFlags::POSITION|XMLShapeExportFlags::SIZE enum XmlShapeType { @@ -208,10 +211,10 @@ private: 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(const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, XMLShapeExportFlags 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 void ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const XMLShapeExportFlags nFeatures); SAL_DLLPRIVATE 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 ); @@ -219,28 +222,28 @@ private: 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 ); + SAL_DLLPRIVATE void ImpExportGroupShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags 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, XMLShapeExportFlags nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL ); public: XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=0 ); virtual ~XMLShapeExport(); @@ -254,7 +257,7 @@ public: void exportShape( const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape, sal_Int32 nShapeId = -1, - sal_Int32 nFeatures = SEF_DEFAULT, + XMLShapeExportFlags nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL ); @@ -266,7 +269,7 @@ public: // 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, + XMLShapeExportFlags nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL ); diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index a7369eafae24..f6a8c8574c88 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -44,6 +44,7 @@ class XMLIndexMarkExport; class XMLRedlineExport; struct XMLPropertyState; class MultiPropertySetHelper; +enum class XMLShapeExportFlags; namespace com { namespace sun { namespace star { @@ -260,7 +261,7 @@ public: protected: - sal_Int32 addTextFrameAttributes( + XMLShapeExportFlags addTextFrameAttributes( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& rPropSet, bool bShape, diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 9aecd97d60db..d90b0e2b6ec0 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1501,7 +1501,7 @@ void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool _bAddPa } AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_TYPE, XML_PARAGRAPH ); - xShapeExport->exportShape(xShape.get(), i, SEF_DEFAULT|SEF_EXPORT_NO_WS,&aRefPoint); + xShapeExport->exportShape(xShape.get(), i, SEF_DEFAULT|XMLShapeExportFlags::NO_WS,&aRefPoint); } } } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 84f4de11da42..436b7d8154c6 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3470,7 +3470,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, pAttrList->AddAttribute( GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken( XML_NOTIFY_ON_UPDATE_OF_RANGES ) ), sRanges ); } - GetShapeExport()->exportShape( xShape, -1, SEF_EXPORT_NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList ); + GetShapeExport()->exportShape( xShape, -1, XMLShapeExportFlags::NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList ); } } } @@ -3504,7 +3504,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, pAttrList->AddAttribute( GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken(XML_NOTIFY_ON_UPDATE_OF_RANGES) ), sRanges ); } - GetShapeExport()->exportShape(xShape, -1, SEF_EXPORT_NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList); + GetShapeExport()->exportShape(xShape, -1, XMLShapeExportFlags::NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList); } } } @@ -3716,7 +3716,7 @@ void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell) SdrCaptionObj* pNoteCaption = pNote->GetOrCreateCaption(rMyCell.maCellAddress); Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY ); - GetShapeExport()->exportShape(xShape, -1, SEF_DEFAULT|SEF_EXPORT_ANNOTATION, NULL); + GetShapeExport()->exportShape(xShape, -1, SEF_DEFAULT|XMLShapeExportFlags::ANNOTATION, NULL); pCurrentCell = NULL; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index f812badef54b..8919030022b1 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -568,7 +568,7 @@ namespace // This method exports the given XShape void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape, sal_Int32 nZIndex, - sal_Int32 nFeatures /* = SEF_DEFAULT */, + XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, com::sun::star::awt::Point* pRefPoint /* = NULL */, SvXMLAttributeList* pAttrList /* = NULL */ ) { @@ -969,7 +969,7 @@ void XMLShapeExport::collectShapesAutoStyles( const uno::Reference < drawing::XS } // This method exports all XShape inside the given XShapes collection -void XMLShapeExport::exportShapes( const uno::Reference < drawing::XShapes >& xShapes, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */ ) +void XMLShapeExport::exportShapes( const uno::Reference < drawing::XShapes >& xShapes, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */ ) { ShapesInfos::iterator aOldCurrentShapesIter = maCurrentShapesIter; seekShapes( xShapes ); @@ -1298,7 +1298,7 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport() } void XMLShapeExport::ImpExportNewTrans(const uno::Reference< beans::XPropertySet >& xPropSet, - sal_Int32 nFeatures, awt::Point* pRefPoint) + XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { // get matrix ::basegfx::B2DHomMatrix aMatrix; @@ -1367,7 +1367,7 @@ void XMLShapeExport::ImpExportNewTrans_DecomposeAndRefPoint(const ::basegfx::B2D } void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, - double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32 nFeatures) + double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const XMLShapeExportFlags nFeatures) { // always write Size (rTRScale) since this statement carries the union // of the object @@ -1376,7 +1376,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTR ::basegfx::B2DTuple aTRScale(rTRScale); // svg: width - if(!(nFeatures & SEF_EXPORT_WIDTH)) + if(!(nFeatures & XMLShapeExportFlags::WIDTH)) { aTRScale.setX(1.0); } @@ -1394,7 +1394,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTR mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_WIDTH, aStr); // svg: height - if(!(nFeatures & SEF_EXPORT_HEIGHT)) + if(!(nFeatures & XMLShapeExportFlags::HEIGHT)) { aTRScale.setY(1.0); } @@ -1438,7 +1438,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTR else { // no shear, no rotate; just add object position to export and we are done - if(nFeatures & SEF_EXPORT_X) + if(nFeatures & XMLShapeExportFlags::X) { // svg: x mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -1447,7 +1447,7 @@ void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTR mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X, aStr); } - if(nFeatures & SEF_EXPORT_Y) + if(nFeatures & XMLShapeExportFlags::Y) { // svg: y mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -1800,13 +1800,13 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape } } -void XMLShapeExport::ImpExportGroupShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) +void XMLShapeExport::ImpExportGroupShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { uno::Reference< drawing::XShapes > xShapes(xShape, uno::UNO_QUERY); if(xShapes.is() && xShapes->getCount()) { // write group shape - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aPGR(mrExport, XML_NAMESPACE_DRAW, XML_G, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -1818,9 +1818,9 @@ void XMLShapeExport::ImpExportGroupShape( const uno::Reference< drawing::XShape // the upper left edge of the group. awt::Point aUpperLeft; - if(!(nFeatures & SEF_EXPORT_POSITION)) + if(!(nFeatures & XMLShapeExportFlags::POSITION)) { - nFeatures |= SEF_EXPORT_POSITION; + nFeatures |= XMLShapeExportFlags::POSITION; aUpperLeft = xShape->getPosition(); pRefPoint = &aUpperLeft; } @@ -1832,7 +1832,7 @@ void XMLShapeExport::ImpExportGroupShape( const uno::Reference< drawing::XShape void XMLShapeExport::ImpExportTextBoxShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -1904,7 +1904,7 @@ void XMLShapeExport::ImpExportTextBoxShape( if(bIsPresShape) bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, aStr ); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -1934,7 +1934,7 @@ void XMLShapeExport::ImpExportTextBoxShape( void XMLShapeExport::ImpExportRectangleShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -1954,7 +1954,7 @@ void XMLShapeExport::ImpExportRectangleShape( } // write rectangle - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_RECT, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -1966,7 +1966,7 @@ void XMLShapeExport::ImpExportRectangleShape( void XMLShapeExport::ImpExportLineShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2027,7 +2027,7 @@ void XMLShapeExport::ImpExportLineShape( } } - if( nFeatures & SEF_EXPORT_X ) + if( nFeatures & XMLShapeExportFlags::X ) { // svg: x1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2040,7 +2040,7 @@ void XMLShapeExport::ImpExportLineShape( aEnd.X -= aStart.X; } - if( nFeatures & SEF_EXPORT_Y ) + if( nFeatures & XMLShapeExportFlags::Y ) { // svg: y1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2066,7 +2066,7 @@ void XMLShapeExport::ImpExportLineShape( mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr); // write line - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_LINE, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -2078,7 +2078,7 @@ void XMLShapeExport::ImpExportLineShape( void XMLShapeExport::ImpExportEllipseShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2118,7 +2118,7 @@ void XMLShapeExport::ImpExportEllipseShape( mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_ANGLE, sStringBuffer.makeStringAndClear() ); } - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# // write ellipse or circle SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, @@ -2135,7 +2135,7 @@ void XMLShapeExport::ImpExportEllipseShape( void XMLShapeExport::ImpExportPolygonShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2163,7 +2163,7 @@ void XMLShapeExport::ImpExportPolygonShape( SdXMLImExViewBox aViewBox(0, 0, aSize.Width, aSize.Height); mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX, aViewBox.GetExportString()); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# // prepare name (with most used) enum ::xmloff::token::XMLTokenEnum eName(XML_PATH); @@ -2242,7 +2242,7 @@ void XMLShapeExport::ImpExportPolygonShape( void XMLShapeExport::ImpExportGraphicObjectShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2258,7 +2258,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( if(eShapeType == XmlShapeTypePresGraphicObjectShape) bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_GRAPHIC) ); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -2385,7 +2385,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( void XMLShapeExport::ImpExportChartShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint, + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint, SvXMLAttributeList* pAttrList ) { ImpExportOLE2Shape( xShape, eShapeType, nFeatures, pRefPoint, pAttrList ); @@ -2393,7 +2393,7 @@ void XMLShapeExport::ImpExportChartShape( void XMLShapeExport::ImpExportControlShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2414,7 +2414,7 @@ void XMLShapeExport::ImpExportControlShape( } } - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_CONTROL, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -2422,7 +2422,7 @@ void XMLShapeExport::ImpExportControlShape( void XMLShapeExport::ImpExportConnectorShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) + XmlShapeType, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); @@ -2509,7 +2509,7 @@ void XMLShapeExport::ImpExportConnectorShape( aEnd.Y -= pRefPoint->Y; } - if( nFeatures & SEF_EXPORT_X ) + if( nFeatures & XMLShapeExportFlags::X ) { // svg: x1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2522,7 +2522,7 @@ void XMLShapeExport::ImpExportConnectorShape( aEnd.X -= aStart.X; } - if( nFeatures & SEF_EXPORT_Y ) + if( nFeatures & XMLShapeExportFlags::Y ) { // svg: y1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2626,7 +2626,7 @@ void XMLShapeExport::ImpExportConnectorShape( mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_VIEWBOX, aViewBox.GetExportString()); // write connector shape. Add Export later. - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_CONNECTOR, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -2637,7 +2637,7 @@ void XMLShapeExport::ImpExportConnectorShape( void XMLShapeExport::ImpExportMeasureShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) + XmlShapeType, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); @@ -2681,7 +2681,7 @@ void XMLShapeExport::ImpExportMeasureShape( aEnd.Y -= pRefPoint->Y; } - if( nFeatures & SEF_EXPORT_X ) + if( nFeatures & XMLShapeExportFlags::X ) { // svg: x1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2694,7 +2694,7 @@ void XMLShapeExport::ImpExportMeasureShape( aEnd.X -= aStart.X; } - if( nFeatures & SEF_EXPORT_Y ) + if( nFeatures & XMLShapeExportFlags::Y ) { // svg: y1 mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -2718,7 +2718,7 @@ void XMLShapeExport::ImpExportMeasureShape( mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr); // write measure shape - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_MEASURE, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -2732,7 +2732,7 @@ void XMLShapeExport::ImpExportMeasureShape( void XMLShapeExport::ImpExportOLE2Shape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */, + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */, SvXMLAttributeList* pAttrList /* = NULL */ ) { uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); @@ -2754,7 +2754,7 @@ void XMLShapeExport::ImpExportOLE2Shape( else if(eShapeType == XmlShapeTypePresSheetShape) bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# bool bExportEmbedded(mrExport.getExportFlags() & SvXMLExportFlags::EMBEDDED); OUString sPersistName; SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, @@ -2889,7 +2889,7 @@ void XMLShapeExport::ImpExportOLE2Shape( void XMLShapeExport::ImpExportPageShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2918,14 +2918,14 @@ void XMLShapeExport::ImpExportPageShape( } // write Page shape - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_PAGE_THUMBNAIL, bCreateNewline, true); } } void XMLShapeExport::ImpExportCaptionShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) + XmlShapeType, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, awt::Point* pRefPoint /* = NULL */) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2955,8 +2955,8 @@ void XMLShapeExport::ImpExportCaptionShape( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CAPTION_POINT_Y, msBuffer.makeStringAndClear() ); // write Caption shape. Add export later. - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# - bool bAnnotation( (nFeatures & SEF_EXPORT_ANNOTATION) == SEF_EXPORT_ANNOTATION ); + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# + bool bAnnotation( (nFeatures & XMLShapeExportFlags::ANNOTATION) == XMLShapeExportFlags::ANNOTATION ); SvXMLElementExport aObj( mrExport, (bAnnotation ? XML_NAMESPACE_OFFICE @@ -2975,7 +2975,7 @@ void XMLShapeExport::ImpExportCaptionShape( void XMLShapeExport::ImpExportFrameShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2983,7 +2983,7 @@ void XMLShapeExport::ImpExportFrameShape( // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -3009,7 +3009,7 @@ void XMLShapeExport::ImpExportFrameShape( void XMLShapeExport::ImpExportAppletShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -3017,7 +3017,7 @@ void XMLShapeExport::ImpExportAppletShape( // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -3064,7 +3064,7 @@ void XMLShapeExport::ImpExportAppletShape( void XMLShapeExport::ImpExportPluginShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -3072,7 +3072,7 @@ void XMLShapeExport::ImpExportPluginShape( // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -3311,7 +3311,7 @@ static void lcl_StoreGltfFallback( void XMLShapeExport::ImpExportMediaShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -3323,7 +3323,7 @@ void XMLShapeExport::ImpExportMediaShape( { (void)ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_OBJECT) ); } - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); @@ -3349,7 +3349,7 @@ void XMLShapeExport::ImpExportMediaShape( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType ); // write plugin - SvXMLElementExport* pPluginOBJ = new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & SEF_EXPORT_NO_WS ), true); + SvXMLElementExport* pPluginOBJ = new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); // export parameters const OUString aFalseStr( "false" ), aTrueStr( "true" ); @@ -3409,7 +3409,7 @@ void XMLShapeExport::ImpExportMediaShape( } } -void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint) +void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType, XMLShapeExportFlags nFeatures, awt::Point* pRefPoint) { uno::Reference< drawing::XShapes > xShapes(xShape, uno::UNO_QUERY); if(xShapes.is() && xShapes->getCount()) @@ -3425,7 +3425,7 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap export3DSceneAttributes( xPropSet ); // write 3DScene shape - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ( mrExport, XML_NAMESPACE_DR3D, XML_SCENE, bCreateNewline, true); ImpExportDescription( xShape ); // #i68101# @@ -3439,9 +3439,9 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap // the upper left edge of the group. awt::Point aUpperLeft; - if(!(nFeatures & SEF_EXPORT_POSITION)) + if(!(nFeatures & XMLShapeExportFlags::POSITION)) { - nFeatures |= SEF_EXPORT_POSITION; + nFeatures |= XMLShapeExportFlags::POSITION; aUpperLeft = xShape->getPosition(); pRefPoint = &aUpperLeft; } @@ -3454,7 +3454,7 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap void XMLShapeExport::ImpExport3DShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, sal_Int32 /* nFeatures = SEF_DEFAULT */, awt::Point* /*pRefPoint = NULL */) + XmlShapeType eShapeType, XMLShapeExportFlags /* nFeatures = SEF_DEFAULT */, awt::Point* /*pRefPoint = NULL */) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -4842,7 +4842,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean void XMLShapeExport::ImpExportCustomShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) + XmlShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint ) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if ( xPropSet.is() ) @@ -4868,7 +4868,7 @@ void XMLShapeExport::ImpExportCustomShape( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DATA, aStr ); } } - bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# + bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); // #86116#/#92210# SvXMLElementExport aOBJ( mrExport, XML_NAMESPACE_DRAW, XML_CUSTOM_SHAPE, bCreateNewline, true ); ImpExportDescription( xShape ); // #i68101# ImpExportEvents( xShape ); @@ -4878,7 +4878,7 @@ void XMLShapeExport::ImpExportCustomShape( } } -void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) +void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures, com::sun::star::awt::Point* pRefPoint ) { uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); uno::Reference< container::XNamed > xNamed(xShape, uno::UNO_QUERY); @@ -4895,7 +4895,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape if(eShapeType == XmlShapeTypePresTableShape) bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); - const bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); + const bool bCreateNewline( (nFeatures & XMLShapeExportFlags::NO_WS) == XMLShapeExportFlags::NONE ); const bool bExportEmbedded(mrExport.getExportFlags() & SvXMLExportFlags::EMBEDDED); SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true ); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index f23a34051430..542591f6f6b2 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2561,13 +2561,13 @@ static bool lcl_txtpara_isBoundAsChar( return bIsBoundAsChar; } -sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( +XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes( const Reference < XPropertySet >& rPropSet, bool bShape, OUString *pMinHeightValue, OUString *pMinWidthValue) { - sal_Int32 nShapeFeatures = SEF_DEFAULT; + XMLShapeExportFlags nShapeFeatures = SEF_DEFAULT; // draw:name (#97662#: not for shapes, since those names will be // treated in the shape export) @@ -2610,7 +2610,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( else { // #92210# - nShapeFeatures |= SEF_EXPORT_NO_WS; + nShapeFeatures |= XMLShapeExportFlags::NO_WS; } // OD 2004-06-01 #i27691# - correction: no export of svg:x, if object @@ -2632,7 +2632,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( } } else if( TextContentAnchorType_AS_CHARACTER == eAnchor ) - nShapeFeatures = (nShapeFeatures & ~SEF_EXPORT_X); + nShapeFeatures = (nShapeFeatures & ~XMLShapeExportFlags::X); if( !bShape || TextContentAnchorType_AS_CHARACTER == eAnchor ) { @@ -2649,7 +2649,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( sValue.makeStringAndClear() ); } if( bShape ) - nShapeFeatures = (nShapeFeatures & ~SEF_EXPORT_Y); + nShapeFeatures = (nShapeFeatures & ~XMLShapeExportFlags::Y); } Reference< XPropertySetInfo > xPropSetInfo(rPropSet->getPropertySetInfo()); @@ -2871,7 +2871,7 @@ void XMLTextParagraphExport::exportAnyTextFrame( case FT_SHAPE: { Reference < XShape > xShape( rTxtCntnt, UNO_QUERY ); - sal_Int32 nFeatures = + XMLShapeExportFlags nFeatures = addTextFrameAttributes( xPropSet, true ); GetExport().GetShapeExport() ->exportShape( xShape, -1, nFeatures ); |