diff options
author | David Tardon <dtardon@redhat.com> | 2015-01-08 10:35:27 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-01-08 16:08:11 +0100 |
commit | 5672dab6b59268cd8ce08752178d3f7564d5e8d7 (patch) | |
tree | 2251b84efccad1cfbdd5ea083a7d95a4cac804d3 /xmloff | |
parent | 4852e6d27be16866bfd55309271558ce41edb232 (diff) |
Revert "Don't assume that the ZOrder property of shapes is an enumeration"
This reverts commit 66c7dbbf7dfba8cfab63f8d1df72ace87e5bf7ca.
See https://gerrit.libreoffice.org/#/c/13554/ .
Conflicts:
include/xmloff/shapeexport.hxx
reportdesign/source/filter/xml/xmlExport.cxx
sc/source/filter/xml/xmlexprt.cxx
xmloff/source/draw/shapeexport.cxx
Change-Id: I14fed9ad043a756a9e2d390c76fa907c349c3a2e
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 27 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 2 |
3 files changed, 12 insertions, 21 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 5ab0b165f873..ca25f2b98ab0 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1487,7 +1487,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& if( ! xShape.is()) continue; - rShapeExport->exportShape( xShape, nShapeId ); + rShapeExport->exportShape( xShape ); } // this would be the easier way if it worked: //mrExport.GetShapeExport()->exportShapes( mxAdditionalShapes ); @@ -1536,7 +1536,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& if( ! xShape.is()) continue; - rShapeExport->collectShapeAutoStyles( xShape, nShapeId ); + rShapeExport->collectShapeAutoStyles( xShape ); } } } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 8919030022b1..3f0858a88a66 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -235,21 +235,17 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement } // This method collects all automatic styles for the given XShape -void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShape >& xShape, sal_Int32 nZIndex) +void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShape >& xShape ) { if( maCurrentShapesIter == maShapesInfos.end() ) { OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): no call to seekShapes()!" ); return; } + sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); - if( nZIndex == -1 ) - { - if( xPropSet.is() ) - xPropSet->getPropertyValue(msZIndex) >>= nZIndex; - else - nZIndex = 0; - } + if( xPropSet.is() ) + xPropSet->getPropertyValue(msZIndex) >>= nZIndex; ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second; @@ -567,7 +563,6 @@ namespace } // This method exports the given XShape void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape, - sal_Int32 nZIndex, XMLShapeExportFlags nFeatures /* = SEF_DEFAULT */, com::sun::star::awt::Point* pRefPoint /* = NULL */, SvXMLAttributeList* pAttrList /* = NULL */ ) @@ -578,6 +573,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape SAL_WARN( "xmloff", "XMLShapeExport::exportShape(): no auto styles where collected before export" ); return; } + sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY ); boost::scoped_ptr< SvXMLElementExport > mpHyperlinkElement; @@ -609,13 +605,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape SAL_WARN("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export"); } - if( nZIndex == -1 ) - { - if( xSet.is() ) - xSet->getPropertyValue(msZIndex) >>= nZIndex; - else - nZIndex = 0; - } + if( xSet.is() ) + xSet->getPropertyValue(msZIndex) >>= nZIndex; ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second; @@ -962,7 +953,7 @@ void XMLShapeExport::collectShapesAutoStyles( const uno::Reference < drawing::XS if(!xShape.is()) continue; - collectShapeAutoStyles( xShape, nShapeId ); + collectShapeAutoStyles( xShape ); } maCurrentShapesIter = aOldCurrentShapesIter; @@ -983,7 +974,7 @@ void XMLShapeExport::exportShapes( const uno::Reference < drawing::XShapes >& xS if(!xShape.is()) continue; - exportShape( xShape, nShapeId, nFeatures, pRefPoint ); + exportShape( xShape, nFeatures, pRefPoint ); } maCurrentShapesIter = aOldCurrentShapesIter; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 542591f6f6b2..ddd8a7184801 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2874,7 +2874,7 @@ void XMLTextParagraphExport::exportAnyTextFrame( XMLShapeExportFlags nFeatures = addTextFrameAttributes( xPropSet, true ); GetExport().GetShapeExport() - ->exportShape( xShape, -1, nFeatures ); + ->exportShape( xShape, nFeatures ); } break; } |