diff options
-rw-r--r-- | include/xmloff/shapeexport.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 8 | ||||
-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 |
6 files changed, 19 insertions, 30 deletions
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx index 6cc70a4c2830..64538e2a6fba 100644 --- a/include/xmloff/shapeexport.hxx +++ b/include/xmloff/shapeexport.hxx @@ -250,13 +250,11 @@ public: // This method collects all automatic styles for the given XShape void collectShapeAutoStyles( - const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape, - sal_Int32 nShapeId = -1); + 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 nShapeId = -1, XMLShapeExportFlags nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index d90b0e2b6ec0..bf7594e9ae53 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -674,7 +674,7 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport(); xShapeExport->seekShapes(_xProp.get()); SolarMutexGuard aGuard; - xShapeExport->collectShapeAutoStyles(xShape.get(), i); + xShapeExport->collectShapeAutoStyles(xShape.get()); } else { @@ -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|XMLShapeExportFlags::NO_WS,&aRefPoint); + xShapeExport->exportShape(xShape.get(), SEF_DEFAULT|XMLShapeExportFlags::NO_WS,&aRefPoint); } } } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 436b7d8154c6..fa6c9443ac83 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, XMLShapeExportFlags::NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList ); + GetShapeExport()->exportShape( xShape, 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, XMLShapeExportFlags::NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList); + GetShapeExport()->exportShape(xShape, XMLShapeExportFlags::NO_CHART_DATA | SEF_DEFAULT, pPoint, pAttrList); } } } @@ -3546,7 +3546,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, // re-add pre-loaded attributes AddAttributeList( xSaveAttribs ); } - GetShapeExport()->exportShape(xShape, -1, SEF_DEFAULT, pPoint); + GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint); } IncrementProgressBar(false); } @@ -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|XMLShapeExportFlags::ANNOTATION, NULL); + GetShapeExport()->exportShape(xShape, SEF_DEFAULT|XMLShapeExportFlags::ANNOTATION, NULL); pCurrentCell = NULL; 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; } |