summaryrefslogtreecommitdiffstats
path: root/drawinglayer/source/tools/primitive2dxmldump.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/tools/primitive2dxmldump.cxx')
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx29
1 files changed, 10 insertions, 19 deletions
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index f3b9ef1bc919..1a8aa542df7b 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -663,6 +663,11 @@ xmlDocUniquePtr Primitive2dXmlDump::dumpAndParse(
return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<xmlChar*>(pBuffer.get())));
}
+OUString Primitive2dXmlDump::idToString(sal_uInt32 nId)
+{
+ return drawinglayer::primitive2d::idToString(nId);
+}
+
void Primitive2dXmlDump::decomposeAndWrite(
const drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence,
::tools::XmlWriter& rWriter)
@@ -674,6 +679,10 @@ void Primitive2dXmlDump::decomposeAndWrite(
if (nId < maFilter.size() && maFilter[nId])
continue;
+ // handled by subclass
+ if (decomposeAndWrite(*pBasePrimitive, rWriter))
+ continue;
+
OUString sCurrentElementTag = drawinglayer::primitive2d::idToString(nId);
switch (nId)
@@ -1207,28 +1216,10 @@ void Primitive2dXmlDump::decomposeAndWrite(
default:
{
- const char* aName = "unhandled";
- switch (nId)
- {
- case PRIMITIVE2D_ID_RANGE_SVX | 14: // PRIMITIVE2D_ID_SDRCELLPRIMITIVE2D
- {
- aName = "sdrCell";
- break;
- }
- }
- rWriter.startElement(aName);
+ rWriter.startElement("unhandled");
rWriter.attribute("id", sCurrentElementTag);
rWriter.attribute("idNumber", nId);
- auto pBufferedDecomposition
- = dynamic_cast<const BufferedDecompositionPrimitive2D*>(pBasePrimitive);
- if (pBufferedDecomposition)
- {
- rWriter.attribute(
- "transparenceForShadow",
- OString::number(pBufferedDecomposition->getTransparenceForShadow()));
- }
-
drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
drawinglayer::geometry::ViewInformation2D());