summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMark Page <aptitude@btconnect.com>2016-12-05 14:03:12 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-06 18:17:56 +0000
commitd08db164dcac8f6aa88158b2848abb5ad66a4052 (patch)
treebacb0e7b183115e3b00bd4c375b37908264f0f87 /sw
parent0c6c37cb01c242ad9324bc91ac15c974529086c5 (diff)
Change Read/Write access to Scoped Read/Write access
Change-Id: Idbe8e393b64f2a151e20c1851d7c14fa161acf97 Reviewed-on: https://gerrit.libreoffice.org/31635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index eff96c776d12..4b3f75705b90 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -1414,7 +1414,7 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
uno::Reference<graphic::XGraphic> xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
Graphic aVclGraphic(xGraphic);
Bitmap aBitmap(aVclGraphic.GetBitmap());
- BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess();
+ Bitmap::ScopedReadAccess pAccess(aBitmap);
CPPUNIT_ASSERT(pAccess);
CPPUNIT_ASSERT_EQUAL(341L, pAccess->Width());
CPPUNIT_ASSERT_EQUAL(181L, pAccess->Height());
@@ -1422,7 +1422,6 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xb1, 0xc8, 0xdd ));
aColor = pAccess->GetPixel(130, 260);
CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xb1, 0xc8, 0xdd ));
- Bitmap::ReleaseAccess(pAccess);
}
DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
@@ -1593,13 +1592,12 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx"
uno::Reference<awt::XBitmap> bitmap(graphic, uno::UNO_QUERY);
Graphic aVclGraphic(graphic);
Bitmap aBitmap(aVclGraphic.GetBitmap());
- BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess();
+ Bitmap::ScopedReadAccess pAccess(aBitmap);
CPPUNIT_ASSERT(pAccess);
CPPUNIT_ASSERT_EQUAL(58L, pAccess->Width());
CPPUNIT_ASSERT_EQUAL(320L, pAccess->Height());
Color aColor(pAccess->GetPixel(30, 20));
CPPUNIT_ASSERT_EQUAL(aColor.GetColor(), RGB_COLORDATA( 0xce, 0xce, 0xce ));
- Bitmap::ReleaseAccess(pAccess);
}
DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")