From d8dbf1b5dbfa0db2d765063a1d848d031835398a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jul 2013 12:25:39 +0200 Subject: Turn basebmp::Format into a proper enum Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf --- basebmp/source/bitmapdevice.cxx | 72 ++++++++++++++++++---------------- basebmp/source/debug.cxx | 85 ++++++++++++++++++++--------------------- basebmp/test/basictest.cxx | 18 ++++----- basebmp/test/bmpdemo.cxx | 4 +- basebmp/test/bmpmasktest.cxx | 10 ++--- basebmp/test/bmptest.cxx | 8 ++-- basebmp/test/cliptest.cxx | 8 ++-- basebmp/test/filltest.cxx | 4 +- basebmp/test/linetest.cxx | 8 ++-- basebmp/test/masktest.cxx | 6 +-- basebmp/test/polytest.cxx | 4 +- 11 files changed, 115 insertions(+), 112 deletions(-) (limited to 'basebmp') diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index ff017ec50e34..fb08e322ea62 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + +#include #include #include "basebmp/bitmapdevice.hxx" @@ -284,7 +287,7 @@ namespace BitmapRenderer( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, dest_iterator_type begin, @@ -1049,7 +1052,7 @@ struct ImplBitmapDevice basegfx::B2IVector maBufferSize; /// Scanline format, as provided at the constructor - sal_Int32 mnScanlineFormat; + Format mnScanlineFormat; /// Scanline stride. Negative for bottom-to-top formats sal_Int32 mnScanlineStride; @@ -1077,7 +1080,7 @@ struct ImplBitmapDevice BitmapDevice::BitmapDevice( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, const RawMemorySharedArray& rMem, @@ -1116,7 +1119,7 @@ basegfx::B2IVector BitmapDevice::getBufferSize() const return mpImpl->maBufferSize; } -sal_Int32 BitmapDevice::getScanlineFormat() const +Format BitmapDevice::getScanlineFormat() const { return mpImpl->mnScanlineFormat; } @@ -1691,7 +1694,7 @@ template< class FormatTraits, class MaskTraits > BitmapDeviceSharedPtr createRenderer( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, typename FormatTraits::raw_accessor_type const& rRawAccessor, @@ -1706,7 +1709,7 @@ template< class FormatTraits, class MaskTraits, class Accessor > BitmapDeviceSharedPtr createRenderer( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, typename FormatTraits::raw_accessor_type const& rRawAccessor, @@ -1765,7 +1768,7 @@ template< class FormatTraits, class MaskTraits > BitmapDeviceSharedPtr createRenderer( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, boost::shared_array< sal_uInt8 > pMem, @@ -1791,7 +1794,7 @@ template< class FormatTraits, class MaskTraits > BitmapDeviceSharedPtr createRenderer( const basegfx::B2IBox& rBounds, const basegfx::B2IVector& rBufferSize, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, boost::shared_array< sal_uInt8 > pMem, @@ -1850,7 +1853,7 @@ namespace { BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, boost::shared_array< sal_uInt8 > pMem, PaletteMemorySharedVector pPal, const basegfx::B2IBox* pSubset, @@ -1858,8 +1861,8 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& { OSL_ASSERT(rSize.getX() > 0 && rSize.getY() > 0); - if( nScanlineFormat <= Format::NONE || - nScanlineFormat > Format::MAX ) + if( nScanlineFormat <= FORMAT_NONE || + nScanlineFormat > FORMAT_MAX ) return BitmapDeviceSharedPtr(); static const sal_uInt8 bitsPerPixel[] = @@ -1933,23 +1936,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // one bit formats - case Format::ONE_BIT_MSB_GREY: + case FORMAT_ONE_BIT_MSB_GREY: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::ONE_BIT_LSB_GREY: + case FORMAT_ONE_BIT_LSB_GREY: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::ONE_BIT_MSB_PAL: + case FORMAT_ONE_BIT_MSB_PAL: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, bitsPerPixel[nScanlineFormat], rDamage ); - case Format::ONE_BIT_LSB_PAL: + case FORMAT_ONE_BIT_LSB_PAL: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, @@ -1959,23 +1962,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // four bit formats - case Format::FOUR_BIT_MSB_GREY: + case FORMAT_FOUR_BIT_MSB_GREY: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::FOUR_BIT_LSB_GREY: + case FORMAT_FOUR_BIT_LSB_GREY: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::FOUR_BIT_MSB_PAL: + case FORMAT_FOUR_BIT_MSB_PAL: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, bitsPerPixel[nScanlineFormat], rDamage ); - case Format::FOUR_BIT_LSB_PAL: + case FORMAT_FOUR_BIT_LSB_PAL: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, @@ -1985,12 +1988,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // eight bit formats - case Format::EIGHT_BIT_GREY: + case FORMAT_EIGHT_BIT_GREY: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::EIGHT_BIT_PAL: + case FORMAT_EIGHT_BIT_PAL: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, @@ -2000,12 +2003,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // sixteen bit formats - case Format::SIXTEEN_BIT_LSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_LSB_TC_MASK: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::SIXTEEN_BIT_MSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_MSB_TC_MASK: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); @@ -2013,7 +2016,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // twentyfour bit formats - case Format::TWENTYFOUR_BIT_TC_MASK: + case FORMAT_TWENTYFOUR_BIT_TC_MASK: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); @@ -2022,25 +2025,28 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& // ---------------------------------------------------------------------- // thirtytwo bit formats - case Format::THIRTYTWO_BIT_TC_MASK_BGRA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::THIRTYTWO_BIT_TC_MASK_ARGB: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::THIRTYTWO_BIT_TC_MASK_ABGR: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); - case Format::THIRTYTWO_BIT_TC_MASK_RGBA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: return createRenderer( aBounds, rSize, nScanlineFormat, nScanlineStride, pFirstScanline, pMem, pPal, rDamage ); + + default: + assert(false); // this cannot happen } // TODO(F3): other formats not yet implemented @@ -2049,7 +2055,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImplInner( const basegfx::B2IVector& BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, boost::shared_array< sal_uInt8 > pMem, PaletteMemorySharedVector pPal, const basegfx::B2IBox* pSubset, @@ -2067,7 +2073,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& "createBitmapDevice: " << rSize.getX() << "x" << rSize.getY() << (bTopDown ? " top-down " : " bottom-up ") - << Format::formatName(nScanlineFormat) + << formatName(nScanlineFormat) << subset.str() << " = " << result.get() ); #endif @@ -2078,7 +2084,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat ) + Format nScanlineFormat ) { return createBitmapDeviceImpl( rSize, bTopDown, @@ -2091,7 +2097,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, const PaletteMemorySharedVector& rPalette ) { return createBitmapDeviceImpl( rSize, @@ -2105,7 +2111,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat, + Format nScanlineFormat, const RawMemorySharedArray& rMem, const PaletteMemorySharedVector& rPalette ) { diff --git a/basebmp/source/debug.cxx b/basebmp/source/debug.cxx index 765005811b48..d8348ffd379b 100644 --- a/basebmp/source/debug.cxx +++ b/basebmp/source/debug.cxx @@ -31,51 +31,48 @@ namespace basebmp { - namespace Format + const char* formatName( Format nScanlineFormat ) { - const char* formatName( sal_Int32 nScanlineFormat ) + switch( nScanlineFormat ) { - switch( nScanlineFormat ) - { - case Format::NONE: - return "NONE"; - case Format::ONE_BIT_MSB_GREY: - return "ONE_BIT_MSB_GREY"; - case Format::ONE_BIT_LSB_GREY: - return "ONE_BIT_LSB_GREY"; - case Format::ONE_BIT_MSB_PAL: - return "ONE_BIT_MSB_PAL"; - case Format::ONE_BIT_LSB_PAL: - return "ONE_BIT_LSB_PAL"; - case Format::FOUR_BIT_MSB_GREY: - return "FOUR_BIT_MSB_GREY"; - case Format::FOUR_BIT_LSB_GREY: - return "FOUR_BIT_LSB_GREY"; - case Format::FOUR_BIT_MSB_PAL: - return "FOUR_BIT_MSB_PAL"; - case Format::FOUR_BIT_LSB_PAL: - return "FOUR_BIT_LSB_PAL"; - case Format::EIGHT_BIT_PAL: - return "EIGHT_BIT_PAL"; - case Format::EIGHT_BIT_GREY: - return "EIGHT_BIT_GREY"; - case Format::SIXTEEN_BIT_LSB_TC_MASK: - return "SIXTEEN_BIT_LSB_TC_MASK"; - case Format::SIXTEEN_BIT_MSB_TC_MASK: - return "SIXTEEN_BIT_MSB_TC_MASK"; - case Format::TWENTYFOUR_BIT_TC_MASK: - return "TWENTYFOUR_BIT_TC_MASK"; - case Format::THIRTYTWO_BIT_TC_MASK_BGRA: - return "THIRTYTWO_BIT_TC_MASK_BGRA"; - case Format::THIRTYTWO_BIT_TC_MASK_ARGB: - return "THIRTYTWO_BIT_TC_MASK_ARGB"; - case Format::THIRTYTWO_BIT_TC_MASK_ABGR: - return "THIRTYTWO_BIT_TC_MASK_ABGR"; - case Format::THIRTYTWO_BIT_TC_MASK_RGBA: - return "THIRTYTWO_BIT_TC_MASK_RGBA"; - default: - return ""; - } + case FORMAT_NONE: + return "NONE"; + case FORMAT_ONE_BIT_MSB_GREY: + return "ONE_BIT_MSB_GREY"; + case FORMAT_ONE_BIT_LSB_GREY: + return "ONE_BIT_LSB_GREY"; + case FORMAT_ONE_BIT_MSB_PAL: + return "ONE_BIT_MSB_PAL"; + case FORMAT_ONE_BIT_LSB_PAL: + return "ONE_BIT_LSB_PAL"; + case FORMAT_FOUR_BIT_MSB_GREY: + return "FOUR_BIT_MSB_GREY"; + case FORMAT_FOUR_BIT_LSB_GREY: + return "FOUR_BIT_LSB_GREY"; + case FORMAT_FOUR_BIT_MSB_PAL: + return "FOUR_BIT_MSB_PAL"; + case FORMAT_FOUR_BIT_LSB_PAL: + return "FOUR_BIT_LSB_PAL"; + case FORMAT_EIGHT_BIT_PAL: + return "EIGHT_BIT_PAL"; + case FORMAT_EIGHT_BIT_GREY: + return "EIGHT_BIT_GREY"; + case FORMAT_SIXTEEN_BIT_LSB_TC_MASK: + return "SIXTEEN_BIT_LSB_TC_MASK"; + case FORMAT_SIXTEEN_BIT_MSB_TC_MASK: + return "SIXTEEN_BIT_MSB_TC_MASK"; + case FORMAT_TWENTYFOUR_BIT_TC_MASK: + return "TWENTYFOUR_BIT_TC_MASK"; + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: + return "THIRTYTWO_BIT_TC_MASK_BGRA"; + case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: + return "THIRTYTWO_BIT_TC_MASK_ARGB"; + case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: + return "THIRTYTWO_BIT_TC_MASK_ABGR"; + case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: + return "THIRTYTWO_BIT_TC_MASK_RGBA"; + default: + return ""; } } @@ -86,7 +83,7 @@ namespace basebmp { const basegfx::B2IVector aSize( rDevice->getSize() ); const bool bTopDown( rDevice->isTopDown() ); - const sal_Int32 nScanlineFormat( rDevice->getScanlineFormat() ); + const Format nScanlineFormat( rDevice->getScanlineFormat() ); rOutputStream << "/* basebmp::BitmapDevice content dump */" << std::endl diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx index e9e2dbe67ed8..062e4f0a08e9 100644 --- a/basebmp/test/basictest.cxx +++ b/basebmp/test/basictest.cxx @@ -83,13 +83,13 @@ public: basegfx::B2ISize aSize2(aSize); BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL )); + FORMAT_ONE_BIT_MSB_PAL )); CPPUNIT_ASSERT_MESSAGE("right size", pDevice->getSize() == aSize2 ); CPPUNIT_ASSERT_MESSAGE("Top down format", pDevice->isTopDown() == true ); CPPUNIT_ASSERT_MESSAGE("Scanline format", - pDevice->getScanlineFormat() == Format::ONE_BIT_MSB_PAL ); + pDevice->getScanlineFormat() == FORMAT_ONE_BIT_MSB_PAL ); CPPUNIT_ASSERT_MESSAGE("Scanline len", pDevice->getScanlineStride() == (aSize2.getY() + 7)/8 ); CPPUNIT_ASSERT_MESSAGE("Palette existence", @@ -106,7 +106,7 @@ public: basegfx::B2ISize aSize2(3,3); BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL )); + FORMAT_ONE_BIT_MSB_PAL )); BitmapDeviceSharedPtr pClone( cloneBitmapDevice( aSize2, @@ -121,7 +121,7 @@ public: const basegfx::B2ISize aSize(64,64); BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL )); + FORMAT_ONE_BIT_MSB_PAL )); const basegfx::B2IPoint aPt(3,3); CPPUNIT_ASSERT_MESSAGE("getPixelData for virgin device", @@ -168,7 +168,7 @@ public: { pDevice = createBitmapDevice( aSize, true, - Format::ONE_BIT_LSB_PAL ); + FORMAT_ONE_BIT_LSB_PAL ); pDevice->setPixel( aPt2, aCol, DrawMode_PAINT ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #4", @@ -193,7 +193,7 @@ public: { pDevice = createBitmapDevice( aSize, true, - Format::EIGHT_BIT_GREY ); + FORMAT_EIGHT_BIT_GREY ); const Color aCol4(0x010101); pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); @@ -215,7 +215,7 @@ public: { pDevice = createBitmapDevice( aSize, true, - Format::SIXTEEN_BIT_LSB_TC_MASK ); + FORMAT_SIXTEEN_BIT_LSB_TC_MASK ); const Color aCol7(0); pDevice->clear( aCol7 ); @@ -239,7 +239,7 @@ public: { pDevice = createBitmapDevice( aSize, true, - Format::TWENTYFOUR_BIT_TC_MASK ); + FORMAT_TWENTYFOUR_BIT_TC_MASK ); const Color aCol4(0x01010101); pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); @@ -266,7 +266,7 @@ public: { pDevice = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); const Color aCol4(0x01010101); pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx index 62d9b2262c8a..fc9e1ae26a2a 100644 --- a/basebmp/test/bmpdemo.cxx +++ b/basebmp/test/bmpdemo.cxx @@ -1055,7 +1055,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ ) basegfx::B2ISize aTestSize(1000,1000); basebmp::BitmapDeviceSharedPtr pDevice( basebmp::createBitmapDevice( aTestSize, false, - basebmp::Format::THIRTYTWO_BIT_TC_MASK_BGRA )); + basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA )); { OUString aSvg; @@ -1074,7 +1074,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ ) { basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aTestSize, false, - basebmp::Format::ONE_BIT_MSB_GREY )); + basebmp::FORMAT_ONE_BIT_MSB_GREY )); const basegfx::B2IPoint aPt111(10,10); const basegfx::B2IPoint aPt222(0,10); diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx index 6f9a604a2503..d98fb6209606 100644 --- a/basebmp/test/bmpmasktest.cxx +++ b/basebmp/test/bmpmasktest.cxx @@ -93,21 +93,21 @@ public: const basegfx::B2ISize aSize(10,10); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); mpMaskBmp1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_GREY ); + FORMAT_ONE_BIT_MSB_GREY ); mpBmp1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpBmp32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); OUString aSvg( "m 0 0h5v10h5v-5h-10z" ); diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx index 37fd4b5155d9..59adac5feeae 100644 --- a/basebmp/test/bmptest.cxx +++ b/basebmp/test/bmptest.cxx @@ -150,17 +150,17 @@ public: const basegfx::B2ISize aSize(10,10); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); mpBmp1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpBmp32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); OUString aSvg( "m 0 0h5v10h5v-5h-10z" ); diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx index aa0c15a01483..cc1dbb0ce384 100644 --- a/basebmp/test/cliptest.cxx +++ b/basebmp/test/cliptest.cxx @@ -156,7 +156,7 @@ private: { BitmapDeviceSharedPtr pBmp( createBitmapDevice( rDevice->getSize(), true, - Format::EIGHT_BIT_GREY )); + FORMAT_EIGHT_BIT_GREY )); OUString aSvg( "m 0 0h5v10h5v-5h-10z" ); @@ -190,13 +190,13 @@ public: const basegfx::B2ISize aSize(11,11); mpClipMask = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_GREY ); + FORMAT_ONE_BIT_MSB_GREY ); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); OUString aSvg( "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" ); basegfx::B2DPolyPolygon aPoly; diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx index a393144ab411..6c0079583cd5 100644 --- a/basebmp/test/filltest.cxx +++ b/basebmp/test/filltest.cxx @@ -211,10 +211,10 @@ public: const basegfx::B2ISize aSize(11,11); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); } void testRectFill() diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx index 9943a399a335..211dabf98b49 100644 --- a/basebmp/test/linetest.cxx +++ b/basebmp/test/linetest.cxx @@ -151,10 +151,10 @@ public: const basegfx::B2ISize aSize(11,11); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); } void testCornerCases() @@ -163,7 +163,7 @@ public: BitmapDeviceSharedPtr pDevice = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); const basegfx::B2IPoint aPt1(0,0); const basegfx::B2IPoint aPt2(10,10); @@ -179,7 +179,7 @@ public: pDevice = createBitmapDevice( aSize2, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); CPPUNIT_ASSERT_MESSAGE("only pixel cleared", pDevice->getPixelData(aPt1) == 0); diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx index 4b2aebb70640..bdc870d28193 100644 --- a/basebmp/test/masktest.cxx +++ b/basebmp/test/masktest.cxx @@ -104,14 +104,14 @@ public: const basegfx::B2ISize aSize(10,10); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); mpMask = createBitmapDevice( aSize, true, - Format::EIGHT_BIT_GREY ); + FORMAT_EIGHT_BIT_GREY ); OUString aSvg( "m 0 0h5v10h5v-5h-10z" ); diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx index e07508b16c90..a32d099c3834 100644 --- a/basebmp/test/polytest.cxx +++ b/basebmp/test/polytest.cxx @@ -292,10 +292,10 @@ public: const basegfx::B2ISize aSize(10,10); mpDevice1bpp = createBitmapDevice( aSize, true, - Format::ONE_BIT_MSB_PAL ); + FORMAT_ONE_BIT_MSB_PAL ); mpDevice32bpp = createBitmapDevice( aSize, true, - Format::THIRTYTWO_BIT_TC_MASK_BGRA ); + FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA ); } void testEmpty() -- cgit