summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/test/mtfxmldump.hxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--test/source/mtfxmldump.cxx7
3 files changed, 7 insertions, 6 deletions
diff --git a/include/test/mtfxmldump.hxx b/include/test/mtfxmldump.hxx
index 997d023412b8..5c21765574f9 100644
--- a/include/test/mtfxmldump.hxx
+++ b/include/test/mtfxmldump.hxx
@@ -23,7 +23,7 @@ class OOO_DLLPUBLIC_TEST MetafileXmlDump
{
std::vector<bool> maFilter;
- void writeXml(GDIMetaFile& rMetaFile, XmlWriter& rWriter);
+ void writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter);
public:
MetafileXmlDump();
@@ -39,7 +39,7 @@ public:
pTempStreamName - this is useful when creating the test, to dump the
file for examination.
*/
- xmlDocPtr dumpAndParse(GDIMetaFile& rMetaFile, const OUString& rTempStreamName = OUString());
+ xmlDocPtr dumpAndParse(const GDIMetaFile& rMetaFile, const OUString& rTempStreamName = OUString());
};
#endif
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8073a4317b6f..0813dec72c80 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -789,7 +789,7 @@ void SwUiWriterTest::testFdo87448()
ReadGraphic(aStream, aGraphic);
const GDIMetaFile& rMetaFile = aGraphic.GetGDIMetaFile();
MetafileXmlDump dumper;
- xmlDocPtr pXmlDoc = dumper.dumpAndParse(const_cast<GDIMetaFile&>(rMetaFile));
+ xmlDocPtr pXmlDoc = dumper.dumpAndParse(rMetaFile);
// The first polyline in the document has a number of points to draw arcs,
// the last one jumps back to the start, so we call "end" the last but one.
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;