diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 09:04:31 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 09:05:09 +0100 |
commit | 93bb2101197c1ff64a5cc3ab9ffa64f66c0d9641 (patch) | |
tree | 514b272817f63b848a8cb74d19de8dc7e3450995 /test/source | |
parent | Blind attempt to fix PCH (diff) | |
download | core-93bb2101197c1ff64a5cc3ab9ffa64f66c0d9641.tar.gz core-93bb2101197c1ff64a5cc3ab9ffa64f66c0d9641.zip |
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.cxx | 7 |
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; |