diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-07-12 12:25:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-07-12 14:41:35 +0200 |
commit | d8dbf1b5dbfa0db2d765063a1d848d031835398a (patch) | |
tree | 0afe6c5fed33be4f42d61c36e92afc697a2e3eba /vcl | |
parent | b00a99e4af0cf47642a139778a230cc61d1347d9 (diff) |
Turn basebmp::Format into a proper enum
Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/android/androidinst.cxx | 2 | ||||
-rw-r--r-- | vcl/coretext/salgdi2.cxx | 6 | ||||
-rw-r--r-- | vcl/headless/svpbmp.cxx | 118 | ||||
-rw-r--r-- | vcl/headless/svpframe.cxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 28 | ||||
-rw-r--r-- | vcl/headless/svptext.cxx | 18 | ||||
-rw-r--r-- | vcl/headless/svpvd.cxx | 20 | ||||
-rw-r--r-- | vcl/inc/headless/svpbmp.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/headless/svpframe.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 2 | ||||
-rw-r--r-- | vcl/ios/iosinst.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 2 |
12 files changed, 104 insertions, 104 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index 51da080f22cc..1ac4a83871da 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -227,7 +227,7 @@ public: sal_uLong nSalFrameStyle, SystemParentData *pSysParent ) : SvpSalFrame( pInstance, pParent, nSalFrameStyle, - true, basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA, + true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA, pSysParent ) { enableDamageTracker(); diff --git a/vcl/coretext/salgdi2.cxx b/vcl/coretext/salgdi2.cxx index c99c90a02b18..909b5a973663 100644 --- a/vcl/coretext/salgdi2.cxx +++ b/vcl/coretext/salgdi2.cxx @@ -842,14 +842,14 @@ bool SvpSalGraphics::CheckContext() " bufferSize=(" << bufferSize.getX() << "," << bufferSize.getY() << ")" ); switch( m_aDevice->getScanlineFormat() ) { - case basebmp::Format::EIGHT_BIT_PAL: + case basebmp::FORMAT_EIGHT_BIT_PAL: mrContext = CGBitmapContextCreate(pixelBuffer.get(), bufferSize.getX(), bufferSize.getY(), 8, scanlineStride, CGColorSpaceCreateDeviceGray(), kCGImageAlphaNone); break; - case basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: mrContext = CGBitmapContextCreate(pixelBuffer.get(), bufferSize.getX(), bufferSize.getY(), 8, scanlineStride, @@ -857,7 +857,7 @@ bool SvpSalGraphics::CheckContext() kCGImageAlphaNoneSkipLast); break; default: - SAL_INFO( "vcl.ios", "CheckContext: unsupported color format " << basebmp::Format::formatName( m_aDevice->getScanlineFormat() ) ); + SAL_INFO( "vcl.ios", "CheckContext: unsupported color format " << basebmp::formatName( m_aDevice->getScanlineFormat() ) ); } SAL_WARN_IF( mrContext == NULL, "vcl.ios", "CheckContext() failed" ); diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index dc4d5b8a3302..a310addb1ae0 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -38,23 +38,23 @@ bool SvpSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPalette ) { - sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT; + basebmp::Format nFormat = SVP_DEFAULT_BITMAP_FORMAT; SAL_INFO( "vcl.headless", "SvpSalBitmap::Create(" << rSize.Width() << "," << rSize.Height() << "," << nBitCount << ")" ); switch( nBitCount ) { - case 1: nFormat = Format::ONE_BIT_MSB_PAL; break; - case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break; - case 8: nFormat = Format::EIGHT_BIT_PAL; break; + case 1: nFormat = FORMAT_ONE_BIT_MSB_PAL; break; + case 4: nFormat = FORMAT_FOUR_BIT_MSB_PAL; break; + case 8: nFormat = FORMAT_EIGHT_BIT_PAL; break; #ifdef OSL_BIGENDIAN - case 16: nFormat = Format::SIXTEEN_BIT_MSB_TC_MASK; break; + case 16: nFormat = FORMAT_SIXTEEN_BIT_MSB_TC_MASK; break; #else - case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break; + case 16: nFormat = FORMAT_SIXTEEN_BIT_LSB_TC_MASK; break; #endif - case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break; + case 24: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break; #if defined(ANDROID) || defined(IOS) - case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_RGBA; break; + case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA; break; #else - case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_BGRA; break; + case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA; break; #endif } B2IVector aSize( rSize.Width(), rSize.Height() ); @@ -152,49 +152,49 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) sal_uInt16 nBitCount = 1; switch( m_aBitmap->getScanlineFormat() ) { - case Format::ONE_BIT_MSB_GREY: - case Format::ONE_BIT_MSB_PAL: + case FORMAT_ONE_BIT_MSB_GREY: + case FORMAT_ONE_BIT_MSB_PAL: nBitCount = 1; pBuf->mnFormat = BMP_FORMAT_1BIT_MSB_PAL; break; - case Format::ONE_BIT_LSB_GREY: - case Format::ONE_BIT_LSB_PAL: + case FORMAT_ONE_BIT_LSB_GREY: + case FORMAT_ONE_BIT_LSB_PAL: nBitCount = 1; pBuf->mnFormat = BMP_FORMAT_1BIT_LSB_PAL; break; - case Format::FOUR_BIT_MSB_GREY: - case Format::FOUR_BIT_MSB_PAL: + case FORMAT_FOUR_BIT_MSB_GREY: + case FORMAT_FOUR_BIT_MSB_PAL: nBitCount = 4; pBuf->mnFormat = BMP_FORMAT_4BIT_MSN_PAL; break; - case Format::FOUR_BIT_LSB_GREY: - case Format::FOUR_BIT_LSB_PAL: + case FORMAT_FOUR_BIT_LSB_GREY: + case FORMAT_FOUR_BIT_LSB_PAL: nBitCount = 4; pBuf->mnFormat = BMP_FORMAT_4BIT_LSN_PAL; break; - case Format::EIGHT_BIT_PAL: + case FORMAT_EIGHT_BIT_PAL: nBitCount = 8; pBuf->mnFormat = BMP_FORMAT_8BIT_PAL; break; - case Format::EIGHT_BIT_GREY: + case FORMAT_EIGHT_BIT_GREY: nBitCount = 8; pBuf->mnFormat = BMP_FORMAT_8BIT_PAL; break; - case Format::SIXTEEN_BIT_LSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_LSB_TC_MASK: nBitCount = 16; pBuf->mnFormat = BMP_FORMAT_16BIT_TC_LSB_MASK; pBuf->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); break; - case Format::SIXTEEN_BIT_MSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_MSB_TC_MASK: nBitCount = 16; pBuf->mnFormat = BMP_FORMAT_16BIT_TC_MSB_MASK; pBuf->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f ); break; - case Format::TWENTYFOUR_BIT_TC_MASK: + case FORMAT_TWENTYFOUR_BIT_TC_MASK: nBitCount = 24; pBuf->mnFormat = BMP_FORMAT_24BIT_TC_BGR; break; - case Format::THIRTYTWO_BIT_TC_MASK_BGRA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN @@ -203,7 +203,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff ); #endif break; - case Format::THIRTYTWO_BIT_TC_MASK_ARGB: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN @@ -212,7 +212,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000 ); #endif break; - case Format::THIRTYTWO_BIT_TC_MASK_ABGR: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN @@ -221,7 +221,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00 ); #endif break; - case Format::THIRTYTWO_BIT_TC_MASK_RGBA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN @@ -248,11 +248,11 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) pBuf->mpBits = (sal_uInt8*)m_aBitmap->getBuffer().get(); if( nBitCount <= 8 ) { - if( m_aBitmap->getScanlineFormat() == Format::EIGHT_BIT_GREY || - m_aBitmap->getScanlineFormat() == Format::FOUR_BIT_LSB_GREY || - m_aBitmap->getScanlineFormat() == Format::FOUR_BIT_MSB_GREY || - m_aBitmap->getScanlineFormat() == Format::ONE_BIT_LSB_GREY || - m_aBitmap->getScanlineFormat() == Format::ONE_BIT_MSB_GREY + if( m_aBitmap->getScanlineFormat() == FORMAT_EIGHT_BIT_GREY || + m_aBitmap->getScanlineFormat() == FORMAT_FOUR_BIT_LSB_GREY || + m_aBitmap->getScanlineFormat() == FORMAT_FOUR_BIT_MSB_GREY || + m_aBitmap->getScanlineFormat() == FORMAT_ONE_BIT_LSB_GREY || + m_aBitmap->getScanlineFormat() == FORMAT_ONE_BIT_MSB_GREY ) pBuf->maPalette = Bitmap::GetGreyPalette( 1U << nBitCount ); else @@ -287,29 +287,29 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) sal_uInt16 nBitCount = 0; switch( m_aBitmap->getScanlineFormat() ) { - case Format::ONE_BIT_MSB_GREY: + case FORMAT_ONE_BIT_MSB_GREY: // FALLTHROUGH intended - case Format::ONE_BIT_MSB_PAL: + case FORMAT_ONE_BIT_MSB_PAL: // FALLTHROUGH intended - case Format::ONE_BIT_LSB_GREY: + case FORMAT_ONE_BIT_LSB_GREY: // FALLTHROUGH intended - case Format::ONE_BIT_LSB_PAL: + case FORMAT_ONE_BIT_LSB_PAL: nBitCount = 1; break; - case Format::FOUR_BIT_MSB_GREY: + case FORMAT_FOUR_BIT_MSB_GREY: // FALLTHROUGH intended - case Format::FOUR_BIT_MSB_PAL: + case FORMAT_FOUR_BIT_MSB_PAL: // FALLTHROUGH intended - case Format::FOUR_BIT_LSB_GREY: + case FORMAT_FOUR_BIT_LSB_GREY: // FALLTHROUGH intended - case Format::FOUR_BIT_LSB_PAL: + case FORMAT_FOUR_BIT_LSB_PAL: nBitCount = 4; break; - case Format::EIGHT_BIT_PAL: + case FORMAT_EIGHT_BIT_PAL: // FALLTHROUGH intended - case Format::EIGHT_BIT_GREY: + case FORMAT_EIGHT_BIT_GREY: nBitCount = 8; break; @@ -349,38 +349,38 @@ bool SvpSalBitmap::GetSystemData( BitmapSystemData& ) return false; } -sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( sal_Int32 nFormat ) +sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( basebmp::Format nFormat ) { sal_uInt32 nBitCount = 1; switch( nFormat ) { - case Format::ONE_BIT_MSB_GREY: - case Format::ONE_BIT_LSB_GREY: - case Format::ONE_BIT_MSB_PAL: - case Format::ONE_BIT_LSB_PAL: + case FORMAT_ONE_BIT_MSB_GREY: + case FORMAT_ONE_BIT_LSB_GREY: + case FORMAT_ONE_BIT_MSB_PAL: + case FORMAT_ONE_BIT_LSB_PAL: nBitCount = 1; break; - case Format::FOUR_BIT_MSB_GREY: - case Format::FOUR_BIT_LSB_GREY: - case Format::FOUR_BIT_MSB_PAL: - case Format::FOUR_BIT_LSB_PAL: + case FORMAT_FOUR_BIT_MSB_GREY: + case FORMAT_FOUR_BIT_LSB_GREY: + case FORMAT_FOUR_BIT_MSB_PAL: + case FORMAT_FOUR_BIT_LSB_PAL: nBitCount = 4; break; - case Format::EIGHT_BIT_PAL: - case Format::EIGHT_BIT_GREY: + case FORMAT_EIGHT_BIT_PAL: + case FORMAT_EIGHT_BIT_GREY: nBitCount = 8; break; - case Format::SIXTEEN_BIT_LSB_TC_MASK: - case Format::SIXTEEN_BIT_MSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_LSB_TC_MASK: + case FORMAT_SIXTEEN_BIT_MSB_TC_MASK: nBitCount = 16; break; - case Format::TWENTYFOUR_BIT_TC_MASK: + case FORMAT_TWENTYFOUR_BIT_TC_MASK: nBitCount = 24; break; - case Format::THIRTYTWO_BIT_TC_MASK_BGRA: - case Format::THIRTYTWO_BIT_TC_MASK_ARGB: - case Format::THIRTYTWO_BIT_TC_MASK_ABGR: - case Format::THIRTYTWO_BIT_TC_MASK_RGBA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: + case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: + case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: nBitCount = 32; break; default: diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 18c84f3ef9e5..79b231ff3009 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -65,7 +65,7 @@ SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance, SalFrame* pParent, sal_uLong nSalFrameStyle, bool bTopDown, - sal_Int32 nScanlineFormat, + basebmp::Format nScanlineFormat, SystemParentData* ) : m_pInstance( pInstance ), m_pParent( static_cast<SvpSalFrame*>(pParent) ), diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index c7d75a0f67ab..d6bd0f170824 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -95,7 +95,7 @@ SvpSalGraphics::SvpSalGraphics() : m_aFillColor( COL_WHITE ), m_aDrawMode( basebmp::DrawMode_PAINT ), m_aTextColor( COL_BLACK ), - m_eTextFmt( basebmp::Format::EIGHT_BIT_GREY ), + m_eTextFmt( basebmp::FORMAT_EIGHT_BIT_GREY ), m_bClipSetup( false ) { for( int i = 0; i < MAX_FALLBACK; ++i ) @@ -115,22 +115,22 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice ) #ifndef IOS // determine matching bitmap format for masks - sal_uInt32 nDeviceFmt = m_aDevice->getScanlineFormat(); - DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)basebmp::Format::MAX), "SVP::setDevice() with invalid bitmap format" ); + basebmp::Format nDeviceFmt = m_aDevice->getScanlineFormat(); + DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)basebmp::FORMAT_MAX), "SVP::setDevice() with invalid bitmap format" ); switch( nDeviceFmt ) { - case basebmp::Format::EIGHT_BIT_GREY: - case basebmp::Format::SIXTEEN_BIT_LSB_TC_MASK: - case basebmp::Format::SIXTEEN_BIT_MSB_TC_MASK: - case basebmp::Format::TWENTYFOUR_BIT_TC_MASK: - case basebmp::Format::THIRTYTWO_BIT_TC_MASK_BGRA: - case basebmp::Format::THIRTYTWO_BIT_TC_MASK_ARGB: - case basebmp::Format::THIRTYTWO_BIT_TC_MASK_ABGR: - case basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA: - m_eTextFmt = basebmp::Format::EIGHT_BIT_GREY; + case basebmp::FORMAT_EIGHT_BIT_GREY: + case basebmp::FORMAT_SIXTEEN_BIT_LSB_TC_MASK: + case basebmp::FORMAT_SIXTEEN_BIT_MSB_TC_MASK: + case basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: + m_eTextFmt = basebmp::FORMAT_EIGHT_BIT_GREY; break; default: - m_eTextFmt = basebmp::Format::ONE_BIT_LSB_GREY; + m_eTextFmt = basebmp::FORMAT_ONE_BIT_LSB_GREY; break; } #endif @@ -173,7 +173,7 @@ void SvpSalGraphics::ensureClip() m_aDevice = m_aOrigDevice; basegfx::B2IVector aSize = m_aDevice->getSize(); - m_aClipMap = basebmp::createBitmapDevice( aSize, false, basebmp::Format::ONE_BIT_MSB_GREY ); + m_aClipMap = basebmp::createBitmapDevice( aSize, false, basebmp::FORMAT_ONE_BIT_MSB_GREY ); m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) ); RectangleVector aRectangles; diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index 2b657461036d..bbe38f465648 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -46,7 +46,7 @@ public: SvpGlyphPeer() {} BitmapDeviceSharedPtr GetGlyphBmp( ServerFont&, int nGlyphIndex, - sal_uInt32 nBmpFormat, B2IPoint& rTargetPos ); + basebmp::Format nBmpFormat, B2IPoint& rTargetPos ); protected: virtual void RemovingFont( ServerFont& ); @@ -110,15 +110,15 @@ SvpGlyphCache& SvpGlyphCache::GetInstance() BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont, - int nGlyphIndex, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos ) + int nGlyphIndex, basebmp::Format nBmpFormat, B2IPoint& rTargetPos ) { GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData; // nothing to do if the GlyphPeer hasn't allocated resources for the glyph - if( rGlyphData.ExtDataRef().meInfo != sal::static_int_cast<int>(nBmpFormat) ) + if( rGlyphData.ExtDataRef().meInfo != nBmpFormat ) { - if( rGlyphData.ExtDataRef().meInfo == Format::NONE ) + if( rGlyphData.ExtDataRef().meInfo == FORMAT_NONE ) pGcpHelper = new SvpGcpHelper; RawBitmap& rRawBitmap = pGcpHelper->maRawBitmap; @@ -126,16 +126,16 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont, bool bFound = false; switch( nBmpFormat ) { - case Format::ONE_BIT_LSB_GREY: + case FORMAT_ONE_BIT_LSB_GREY: bFound = rServerFont.GetGlyphBitmap1( nGlyphIndex, pGcpHelper->maRawBitmap ); break; - case Format::EIGHT_BIT_GREY: + case FORMAT_EIGHT_BIT_GREY: bFound = rServerFont.GetGlyphBitmap8( nGlyphIndex, pGcpHelper->maRawBitmap ); break; default: OSL_FAIL( "SVP GCP::GetGlyphBmp(): illegal scanline format"); // fall back to black&white mask - nBmpFormat = Format::ONE_BIT_LSB_GREY; + nBmpFormat = FORMAT_ONE_BIT_LSB_GREY; bFound = false; break; } @@ -172,10 +172,10 @@ void SvpGlyphPeer::RemovingFont( ServerFont& ) void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGlyphIndex*/ ) { - if( rGlyphData.ExtDataRef().mpData != Format::NONE ) + if( rGlyphData.ExtDataRef().mpData != 0 ) { // release the glyph related resources - DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= Format::MAX), "SVP::RG() invalid alpha format" ); + DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= FORMAT_MAX), "SVP::RG() invalid alpha format" ); SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData; delete[] pGcpHelper->maRawBitmap.mpBits; delete pGcpHelper; diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx index 82f34f432c50..56c7ed73e92b 100644 --- a/vcl/headless/svpvd.cxx +++ b/vcl/headless/svpvd.cxx @@ -61,28 +61,28 @@ sal_Bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY, cons aDevSize.setY( 1 ); if( ! m_aDevice.get() || m_aDevice->getSize() != aDevSize ) { - sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT; + basebmp::Format nFormat = SVP_DEFAULT_BITMAP_FORMAT; std::vector< basebmp::Color > aDevPal; switch( m_nBitCount ) { - case 1: nFormat = Format::ONE_BIT_MSB_PAL; + case 1: nFormat = FORMAT_ONE_BIT_MSB_PAL; aDevPal.reserve(2); aDevPal.push_back( basebmp::Color( 0, 0, 0 ) ); aDevPal.push_back( basebmp::Color( 0xff, 0xff, 0xff ) ); break; - case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break; - case 8: nFormat = Format::EIGHT_BIT_PAL; break; + case 4: nFormat = FORMAT_FOUR_BIT_MSB_PAL; break; + case 8: nFormat = FORMAT_EIGHT_BIT_PAL; break; #ifdef OSL_BIGENDIAN - case 16: nFormat = Format::SIXTEEN_BIT_MSB_TC_MASK; break; + case 16: nFormat = FORMAT_SIXTEEN_BIT_MSB_TC_MASK; break; #else - case 16: nFormat = Format::SIXTEEN_BIT_LSB_TC_MASK; break; + case 16: nFormat = FORMAT_SIXTEEN_BIT_LSB_TC_MASK; break; #endif - case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break; - case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK_BGRA; break; + case 24: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break; + case 32: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA; break; #if defined(ANDROID) || defined(IOS) - case 0: nFormat = Format::THIRTYTWO_BIT_TC_MASK_RGBA; break; + case 0: nFormat = FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA; break; #else - case 0: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break; + case 0: nFormat = FORMAT_TWENTYFOUR_BIT_TC_MASK; break; #endif } m_aDevice = aDevPal.empty() diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx index f769cf5e5687..d081e2e648b4 100644 --- a/vcl/inc/headless/svpbmp.hxx +++ b/vcl/inc/headless/svpbmp.hxx @@ -26,7 +26,7 @@ #include <salbmp.hxx> -#define SVP_DEFAULT_BITMAP_FORMAT basebmp::Format::TWENTYFOUR_BIT_TC_MASK +#define SVP_DEFAULT_BITMAP_FORMAT basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK class SvpSalBitmap : public SalBitmap { @@ -58,7 +58,7 @@ public: virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); virtual bool GetSystemData( BitmapSystemData& rData ); - static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat ); + static sal_uInt32 getBitCountFromScanlineFormat( basebmp::Format nFormat ); }; #endif diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index 4a052c079197..64853308d94e 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -43,7 +43,7 @@ class SvpSalFrame : public SalFrame bool m_bVisible; bool m_bDamageTracking; bool m_bTopDown; - sal_Int32 m_nScanlineFormat; + basebmp::Format m_nScanlineFormat; long m_nMinWidth; long m_nMinHeight; long m_nMaxWidth; @@ -60,7 +60,7 @@ public: SalFrame* pParent, sal_uLong nSalFrameStyle, bool bTopDown, - sal_Int32 nScanlineFormat, + basebmp::Format nScanlineFormat, SystemParentData* pSystemParent = NULL ); virtual ~SvpSalFrame(); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index c0fdb4e4e853..e2d9b735776c 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -60,7 +60,7 @@ class SvpSalGraphics : public SalGraphics // headless backend, i.e. not on iOS. basebmp::Color m_aTextColor; ServerFont* m_pServerFont[ MAX_FALLBACK ]; - sal_uInt32 m_eTextFmt; + basebmp::Format m_eTextFmt; #endif basebmp::BitmapDeviceSharedPtr m_aClipMap; diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 7ba2656f7359..b316d34269ed 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -152,7 +152,7 @@ public: sal_uLong nSalFrameStyle, SystemParentData *pSysParent ) : SvpSalFrame( pInstance, pParent, nSalFrameStyle, - true, basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA, + true, basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA, pSysParent ) { enableDamageTracker(); diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 254437f53a14..dfcc1a8726cc 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1778,7 +1778,7 @@ void GtkSalFrame::AllocateFrame() if( aFrameSize.getY() == 0 ) aFrameSize.setY( 1 ); m_aFrame = basebmp::createBitmapDevice( aFrameSize, true, - basebmp::Format::TWENTYFOUR_BIT_TC_MASK ); + basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK ); m_aFrame->setDamageTracker( basebmp::IBitmapDeviceDamageTrackerSharedPtr(new DamageTracker(*this)) ); fprintf( stderr, "allocated m_aFrame size of %dx%d \n", |