summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-19 09:04:31 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-19 09:05:09 +0100
commit93bb2101197c1ff64a5cc3ab9ffa64f66c0d9641 (patch)
tree514b272817f63b848a8cb74d19de8dc7e3450995 /test/source
parent9c928971167b6fc553f105b8141e214e6d06785f (diff)
Let MetafileXmlDump::dumpAndParse() take a const GDIMetaFile
So the const_cast<> in CppunitTest_sw_uiwriter can go away. Change-Id: Id7d4234154cd6bed43cb5270b50208061038dcf7
Diffstat (limited to 'test/source')
-rw-r--r--test/source/mtfxmldump.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 43098d0d5ca7..ee896581e48f 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -231,7 +231,7 @@ void MetafileXmlDump::filterAllActionTypes()
maFilter.assign(constMaxActionType, true);
}
-xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString& rTempStreamName)
+xmlDocPtr MetafileXmlDump::dumpAndParse(const GDIMetaFile& rMetaFile, const OUString& rTempStreamName)
{
boost::scoped_ptr<SvStream> pStream;
@@ -256,10 +256,11 @@ xmlDocPtr MetafileXmlDump::dumpAndParse(GDIMetaFile& rMetaFile, const OUString&
return pDoc;
}
-void MetafileXmlDump::writeXml(GDIMetaFile& rMetaFile, XmlWriter& rWriter)
+void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
{
- for(MetaAction* pAction = rMetaFile.FirstAction(); pAction != NULL; pAction = rMetaFile.NextAction())
+ for(size_t nAction = 0; nAction < rMetaFile.GetActionSize(); ++nAction)
{
+ MetaAction* pAction = rMetaFile.GetAction(nAction);
const sal_uInt16 nActionType = pAction->GetType();
if (maFilter[nActionType])
continue;