diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-15 14:34:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 10:16:35 +0200 |
commit | a903b9ba625b7fc09640007794d6f6a6fc6addba (patch) | |
tree | ca3f2d9a29cc756a7edbd3b830d9631a8ae4b42b /vcl/qa | |
parent | f91c856e9be2f9a2dc15740b7cae78954d574d91 (diff) |
loplugin:useuniqueptr in GraphicFilter
Change-Id: Ib359da131c84c291504a9df210a3b222fd77bd0c
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/filters-test.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx index bdfa85a403b0..a423a17081e8 100644 --- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx +++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx @@ -25,11 +25,11 @@ class VclFiltersTest : public test::FiltersTest, public test::BootstrapFixture { - GraphicFilter mGraphicFilter; + std::unique_ptr<GraphicFilter> mpGraphicFilter; public: VclFiltersTest() : BootstrapFixture(true, false), - mGraphicFilter(GraphicFilter(false)) + mpGraphicFilter(new GraphicFilter(false)) {} virtual bool load(const OUString &, @@ -59,7 +59,7 @@ bool VclFiltersTest::load(const OUString &, { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; - bool bRetval(ERRCODE_NONE == mGraphicFilter.ImportGraphic(aGraphic, rURL, aFileStream)); + bool bRetval(ERRCODE_NONE == mpGraphicFilter->ImportGraphic(aGraphic, rURL, aFileStream)); if (!bRetval) { @@ -116,15 +116,15 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName) aFilterData[ 2 ].Name = "Quality"; aFilterData[ 2 ].Value <<= sal_Int32(90); - sal_uInt16 aFilterType = mGraphicFilter.GetExportFormatNumberForShortName(aFilterShortName); - mGraphicFilter.ExportGraphic( aBitmap, OUString(), aStream, aFilterType, &aFilterData ); + sal_uInt16 aFilterType = mpGraphicFilter->GetExportFormatNumberForShortName(aFilterShortName); + mpGraphicFilter->ExportGraphic( aBitmap, OUString(), aStream, aFilterType, &aFilterData ); CPPUNIT_ASSERT(aStream.Tell() > 0); aStream.Seek( STREAM_SEEK_TO_BEGIN ); Graphic aLoadedGraphic; - mGraphicFilter.ImportGraphic( aLoadedGraphic, OUString(), aStream ); + mpGraphicFilter->ImportGraphic( aLoadedGraphic, OUString(), aStream ); BitmapEx aLoadedBitmapEx = aLoadedGraphic.GetBitmapEx(); Size aSize = aLoadedBitmapEx.GetSizePixel(); |