summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-01-28 10:27:06 +0100
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-01-28 10:36:11 +0100
commit0583c889c3af30e7f569127827cdb77b6c4770bd (patch)
treecdf25bd803003774ce2c7359c94a3cdbb4c780f0 /drawinglayer
parentd71d16958fad1975c17245f064d7dc32c581e220 (diff)
sd/qa: Remove InteropGrabBag property from XML dumps
The InteropGrabBag property adds a lot of noise to this tests and it doesn't actually have any purpose, because we are building their own tests for InteropGrabBag-supported document attributes. We have removed this property by default but we left a flag to enable it when it's convenient for debugging. Change-Id: I97cc7ba171783222a57ab5a96e5755070b949505
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index accb18a84e74..43b335d47ef9 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -148,14 +148,14 @@ void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPt
// the rest
void dumpShapeDescriptorAsAttribute( com::sun::star::uno::Reference< com::sun::star::drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter );
-void dumpXShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, xmlTextWriterPtr xmlWriter);
-void dumpXShapes( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter );
+void dumpXShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties);
+void dumpXShapes( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties );
void dumpTextPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpFillPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpLinePropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpShadowPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpPolyPolygonDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
-void dumpShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
+void dumpShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties);
void dumpPolyPolygonBezierDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpCustomShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
@@ -1674,7 +1674,7 @@ void dumpPolyPolygonDescriptorService(uno::Reference< beans::XPropertySet > xPro
}
}
-void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
+void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties)
{
uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
{
@@ -1744,7 +1744,7 @@ void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWri
if(anotherAny >>= sHyperlink)
dumpHyperlinkAsAttribute(sHyperlink, xmlWriter);
}
- if(xInfo->hasPropertyByName("InteropGrabBag"))
+ if(xInfo->hasPropertyByName("InteropGrabBag") && bDumpInteropProperties)
{
uno::Any anotherAny = xPropSet->getPropertyValue("InteropGrabBag");
uno::Sequence< beans::PropertyValue> aInteropGrabBag;
@@ -1805,7 +1805,7 @@ void dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlT
}
}
-void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)
+void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties)
{
xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );
uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY_THROW);
@@ -1851,7 +1851,7 @@ void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWr
if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
{
uno::Reference< drawing::XShapes > xShapes(xShape, uno::UNO_QUERY_THROW);
- dumpXShapes(xShapes, xmlWriter);
+ dumpXShapes(xShapes, xmlWriter, bDumpInteropProperties);
}
if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties"))
dumpFillPropertiesService(xPropSet, xmlWriter);
@@ -1866,7 +1866,7 @@ void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWr
dumpShadowPropertiesService(xPropSet, xmlWriter);
if(xServiceInfo->supportsService("com.sun.star.drawing.Shape"))
- dumpShapeService(xPropSet, xmlWriter);
+ dumpShapeService(xPropSet, xmlWriter, bDumpInteropProperties);
if(xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonBezierDescriptor"))
dumpPolyPolygonBezierDescriptorService(xPropSet, xmlWriter);
@@ -1921,7 +1921,7 @@ void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWr
xmlTextWriterEndElement( xmlWriter );
}
-void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter )
+void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties )
{
xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShapes" ) );
uno::Reference< container::XIndexAccess > xIA( xShapes, uno::UNO_QUERY_THROW);
@@ -1929,14 +1929,14 @@ void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr x
for (sal_Int32 i = 0; i < nLength; ++i)
{
uno::Reference< drawing::XShape > xShape( xIA->getByIndex( i ), uno::UNO_QUERY_THROW );
- dumpXShape( xShape, xmlWriter );
+ dumpXShape( xShape, xmlWriter, bDumpInteropProperties );
}
xmlTextWriterEndElement( xmlWriter );
}
} //end of namespace
-OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes)
+OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool bDumpInteropProperties)
{
OStringBuffer aString;
@@ -1948,7 +1948,7 @@ OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes)
try
{
- dumpXShapes( xPageShapes, xmlWriter );
+ dumpXShapes( xPageShapes, xmlWriter, bDumpInteropProperties );
}
catch (const beans::UnknownPropertyException& e)
{