MetafileXmlDump: Add dumping of META_CLIPREGION_ACTION's.
Change-Id: I4b51abf6193c33367edebc82772054875b5b9bba
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user