diff options
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 27 |
1 files changed, 9 insertions, 18 deletions
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; |