summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/shapeexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r--xmloff/source/draw/shapeexport.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index d13062996cad..5276afb81bd6 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -235,17 +235,21 @@ 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 )
+void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShape >& xShape, sal_Int32 nZIndex)
{
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( xPropSet.is() )
- xPropSet->getPropertyValue(msZIndex) >>= nZIndex;
+ if( nZIndex == -1 )
+ {
+ if( xPropSet.is() )
+ xPropSet->getPropertyValue(msZIndex) >>= nZIndex;
+ else
+ nZindex = 0;
+ }
ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second;
@@ -563,6 +567,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 */,
com::sun::star::awt::Point* pRefPoint /* = NULL */,
SvXMLAttributeList* pAttrList /* = NULL */ )
@@ -573,7 +578,6 @@ 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;
@@ -605,8 +609,13 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
SAL_WARN("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
}
- if( xSet.is() )
- xSet->getPropertyValue(msZIndex) >>= nZIndex;
+ if( nZIndex == -1 )
+ {
+ if( xSet.is() )
+ xSet->getPropertyValue(msZIndex) >>= nZIndex;
+ else
+ nZindex = 0;
+ }
ImplXMLShapeExportInfoVector& aShapeInfoVector = (*maCurrentShapesIter).second;
@@ -953,7 +962,7 @@ void XMLShapeExport::collectShapesAutoStyles( const uno::Reference < drawing::XS
if(!xShape.is())
continue;
- collectShapeAutoStyles( xShape );
+ collectShapeAutoStyles( xShape, nShapeId );
}
maCurrentShapesIter = aOldCurrentShapesIter;
@@ -974,7 +983,7 @@ void XMLShapeExport::exportShapes( const uno::Reference < drawing::XShapes >& xS
if(!xShape.is())
continue;
- exportShape( xShape, nFeatures, pRefPoint );
+ exportShape( xShape, nShapeId, nFeatures, pRefPoint );
}
maCurrentShapesIter = aOldCurrentShapesIter;