diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-08 12:18:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-08 16:02:01 +0200 |
commit | 3eeb5e19e73978b394d2610b776fbc7efbfa0c26 (patch) | |
tree | b416dc7b671b1c0d492717c795a7e57d87ce0995 | |
parent | 5a60a01af104b48aa9569ecb6204c865db74df9e (diff) |
use BitmapEx in BackgroundPreviewImpl
Change-Id: Iecbb528c526389d7eed0205c06a21c3cd0753644
Reviewed-on: https://gerrit.libreoffice.org/75211
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 1bec48871dfb..5b70f37d88e0 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -117,7 +117,7 @@ public: void setBmp(bool bBmp); void NotifyChange(const Color& rColor); - void NotifyChange(const Bitmap* pBitmap); + void NotifyChange(const BitmapEx* pBitmap); void SetFillColor(const Color& rColor) { aColor = rColor; } protected: @@ -130,7 +130,7 @@ private: void recalcDrawPos(); bool bIsBmp; - std::unique_ptr<Bitmap> pBitmap; + std::unique_ptr<BitmapEx> pBitmap; Point aDrawPos; Size aDrawSize; ::tools::Rectangle aDrawRect; @@ -168,14 +168,14 @@ void BackgroundPreviewImpl::NotifyChange( const Color& rColor ) } } -void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap ) +void BackgroundPreviewImpl::NotifyChange( const BitmapEx* pNewBitmap ) { if (bIsBmp && (pNewBitmap || pBitmap)) { if (pNewBitmap && pBitmap) *pBitmap = *pNewBitmap; else if (pNewBitmap && !pBitmap) - pBitmap.reset( new Bitmap(*pNewBitmap) ); + pBitmap.reset( new BitmapEx(*pNewBitmap) ); else if (!pNewBitmap) pBitmap.reset(); @@ -248,7 +248,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::to if (bIsBmp) { if (pBitmap) - rRenderContext.DrawBitmap(aDrawPos, aDrawSize, *pBitmap); + rRenderContext.DrawBitmapEx(aDrawPos, aDrawSize, *pBitmap); else { Size aSize(GetOutputSizePixel()); @@ -998,7 +998,7 @@ IMPL_LINK(SvxBackgroundTabPage, FileClickHdl_Impl, weld::ToggleButton&, rBox, vo if ( bIsGraphicValid ) { - Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); + BitmapEx aBmp = aBgdGraphic.GetBitmapEx(); m_xPreview2->NotifyChange( &aBmp ); } else @@ -1106,7 +1106,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void ) if (m_xBtnPreview->get_active() && bIsGraphicValid) { - Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); + BitmapEx aBmp = aBgdGraphic.GetBitmapEx(); m_xPreview2->NotifyChange( &aBmp ); } else @@ -1317,7 +1317,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, if (m_xBtnPreview->get_active() && bIsGraphicValid) { - Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap(); + BitmapEx aBmp = aBgdGraphic.GetBitmapEx(); m_xPreview2->NotifyChange( &aBmp ); } else |