diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 4 |
4 files changed, 14 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index e39d475d8718..3d185a72afb9 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -64,6 +64,8 @@ #include <comphelper/propertysequence.hxx> #include <osl/time.h> #include <comphelper/processfactory.hxx> +#include <vcl/TypeSerializer.hxx> + class Test : public SwModelTestBase { @@ -1554,7 +1556,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx") // Read it back and dump it as an XML file. Graphic aGraphic; - ReadGraphic(aStream, aGraphic); + TypeSerializer aSerializer(aStream); + aSerializer.readGraphic(aGraphic); const GDIMetaFile& rMetaFile = aGraphic.GetGDIMetaFile(); MetafileXmlDump dumper; xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, rMetaFile); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index c5aeeae93efb..9f5967b5d2ff 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -48,6 +48,7 @@ #include <AnnotationWin.hxx> #include <com/sun/star/text/XDefaultNumberingProvider.hpp> #include <com/sun/star/awt/FontUnderline.hpp> +#include <vcl/TypeSerializer.hxx> #include <svx/svdpage.hxx> #include <svx/svdview.hxx> @@ -2154,7 +2155,8 @@ void SwUiWriterTest::testFdo87448() // Read it back and dump it as an XML file. Graphic aGraphic; - ReadGraphic(aStream, aGraphic); + TypeSerializer aSerializer(aStream); + aSerializer.readGraphic(aGraphic); const GDIMetaFile& rMetaFile = aGraphic.GetGDIMetaFile(); MetafileXmlDump dumper; xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, rMetaFile); diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index a3a2a06a03a6..7177c8fa7576 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -10,6 +10,7 @@ #include <swmodeltestbase.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <vcl/scheduler.hxx> +#include <vcl/TypeSerializer.hxx> #include <com/sun/star/drawing/GraphicExportFilter.hpp> #include <IDocumentDrawModelAccess.hxx> #include <com/sun/star/text/TextContentAnchorType.hpp> @@ -2084,7 +2085,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477) // Read it back and check the color of the first pixel. Graphic aGraphic; - ReadGraphic(aStream, aGraphic); + TypeSerializer aSerializer(aStream); + aSerializer.readGraphic(aGraphic); + BitmapEx aBitmap = aGraphic.GetBitmapEx(); CPPUNIT_ASSERT_EQUAL(Color(0, 102, 204), aBitmap.GetPixelColor(0, 0)); } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 60ca05566069..dbb641f08e41 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -124,6 +124,7 @@ #include <vcl/GraphicNativeTransform.hxx> #include <vcl/GraphicNativeMetadata.hxx> +#include <vcl/TypeSerializer.hxx> #include <comphelper/lok.hxx> #include <sfx2/classificationhelper.hxx> #include <sfx2/sfxdlg.hxx> @@ -2768,7 +2769,8 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if(rData.GetSotStorageStream(SotClipboardFormatId::SVXB, xStm)) { - ReadGraphic( *xStm, aGraphic ); + TypeSerializer aSerializer(*xStm); + aSerializer.readGraphic(aGraphic); bRet = (GraphicType::NONE != aGraphic.GetType() && GraphicType::Default != aGraphic.GetType()); } |