[Libreoffice-commits] core.git: include/xmloff reportdesign/source sc/source xmloff/source
David Tardon
dtardon at redhat.com
Thu Jan 8 07:09:10 PST 2015
include/xmloff/shapeexport.hxx | 4 +---
reportdesign/source/filter/xml/xmlExport.cxx | 4 ++--
sc/source/filter/xml/xmlexprt.cxx | 8 ++++----
xmloff/source/chart/SchXMLExport.cxx | 4 ++--
xmloff/source/draw/shapeexport.cxx | 27 +++++++++------------------
xmloff/source/text/txtparae.cxx | 2 +-
6 files changed, 19 insertions(+), 30 deletions(-)
New commits:
commit 5672dab6b59268cd8ce08752178d3f7564d5e8d7
Author: David Tardon <dtardon at redhat.com>
Date: Thu Jan 8 10:35:27 2015 +0100
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
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index 6cc70a4..64538e2 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 d90b0e2..bf7594e9 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 436b7d8..fa6c944 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 5ab0b16..ca25f2b 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 8919030..3f0858a 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 542591f..ddd8a71 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;
}
More information about the Libreoffice-commits
mailing list