diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-07 12:17:25 +0900 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-07 09:57:50 +0200 |
commit | 7a11ec1992bf877f42edce8d1d930c5b00bd3d48 (patch) | |
tree | 840ee853772cedc4dfde9fbec20b54e0b9f532e0 | |
parent | 04c037d8a8f1ca954181d75ab3a7cc648a5d1d63 (diff) |
refactor ImageControl to use RenderContext
Change-Id: I1290757fa5d6b61b68bf6c985b657253dca83586
-rw-r--r-- | vcl/source/control/imgctrl.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index baaaa20e9d84..9050a9bd86c6 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/awt/ImageScaleMode.hpp> -namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; +namespace ImageScaleMode = css::awt::ImageScaleMode; ImageControl::ImageControl( vcl::Window* pParent, WinBits nStyle ) :FixedImage( pParent, nStyle ) @@ -67,7 +67,7 @@ namespace } } -void ImageControl::ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const +void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize) const { sal_uInt16 nStyle = 0; if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) @@ -135,25 +135,25 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* { ImplDraw(rRenderContext, 0, Point(), GetOutputSizePixel()); - if( HasFocus() ) + if (HasFocus()) { - vcl::Window *pWin = GetWindow( WINDOW_BORDER ); + vcl::Window* pBorderWindow = GetWindow(WINDOW_BORDER); bool bFlat = (GetBorderStyle() == WindowBorderStyle::MONO); - Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() ); - Color oldLineCol = pWin->GetLineColor(); - Color oldFillCol = pWin->GetFillColor(); - pWin->SetFillColor(); - pWin->SetLineColor( bFlat ? COL_WHITE : COL_BLACK ); - pWin->DrawRect( aRect ); + Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel()); + Color oldLineCol = pBorderWindow->GetLineColor(); + Color oldFillCol = pBorderWindow->GetFillColor(); + pBorderWindow->SetFillColor(); + pBorderWindow->SetLineColor(bFlat ? COL_WHITE : COL_BLACK); + pBorderWindow->DrawRect(aRect); ++aRect.Left(); --aRect.Right(); ++aRect.Top(); --aRect.Bottom(); - pWin->SetLineColor( bFlat ? COL_BLACK : COL_WHITE ); - pWin->DrawRect( aRect ); - pWin->SetLineColor( oldLineCol ); - pWin->SetFillColor( oldFillCol ); + pBorderWindow->SetLineColor(bFlat ? COL_BLACK : COL_WHITE); + pBorderWindow->DrawRect(aRect); + pBorderWindow->SetLineColor(oldLineCol); + pBorderWindow->SetFillColor(oldFillCol); } } |