summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/source/mtfxmldump.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 5e329a3b85a2..500fa8663ef9 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -167,7 +167,7 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
if (rTempStreamName.isEmpty())
pStream = new SvMemoryStream();
else
- pStream = new SvFileStream(rTempStreamName, STREAM_STD_READWRITE);
+ pStream = new SvFileStream(rTempStreamName, STREAM_STD_READWRITE | STREAM_TRUNC);
xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO(lclWriteCallback, lclCloseCallback, pStream, NULL);
xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
@@ -336,6 +336,25 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
}
break;
+ case META_CLIPREGION_ACTION:
+ {
+ const MetaClipRegionAction* pA = static_cast< const MetaClipRegionAction* >(pAction);
+
+ aWriter.startElement("clipregion");
+
+ // FIXME for now we dump only the bounding box; this is
+ // enough for the tests we have, but may need extending to
+ // dumping the real polypolygon in the future
+ Rectangle aRectangle = pA->GetRegion().GetBoundRect();
+ aWriter.attribute("top", aRectangle.Top());
+ aWriter.attribute("left", aRectangle.Left());
+ aWriter.attribute("bottom", aRectangle.Bottom());
+ aWriter.attribute("right", aRectangle.Right());
+
+ aWriter.endElement();
+ }
+ break;
+
case META_ISECTRECTCLIPREGION_ACTION:
{
MetaISectRectClipRegionAction* pMetaISectRectClipRegionAction = static_cast<MetaISectRectClipRegionAction*>(pAction);