diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-14 16:18:27 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-15 08:56:25 +0900 |
commit | 3047de0f92c9d18cb77d78e26542ca004d3e4958 (patch) | |
tree | 3993412b8df6ee339041fa4fe4d0accba78887db /reportdesign/source/ui/report | |
parent | a4cb27f61376d8f2d8faed0022c291af68d437bd (diff) |
refactor ViewsWindow of reportdesign to use RenderContext
Change-Id: I0c1c2df38894f250aa2bec6ab6532ccaca090fa9
Diffstat (limited to 'reportdesign/source/ui/report')
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index e7d8e9709b83..1d491d29fd82 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -172,13 +172,13 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) -: Window( _pReportWindow,WB_DIALOGCONTROL) -,m_pParent(_pReportWindow) -,m_bInUnmark(false) + : Window( _pReportWindow,WB_DIALOGCONTROL) + , m_pParent(_pReportWindow) + , m_bInUnmark(false) { SetPaintTransparent(true); SetUniqueId(UID_RPT_VIEWSWINDOW); - SetMapMode( MapMode( MAP_100TH_MM ) ); + SetMapMode(MapMode(MAP_100TH_MM)); m_aColorConfig.AddListener(this); ImplInitSettings(); } @@ -265,24 +265,25 @@ void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR { Window::Paint(rRenderContext, rRect); - Size aOut = GetOutputSizePixel(); + rRenderContext.SetBackground(); + rRenderContext.SetFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); + rRenderContext.SetTextFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); + + Size aOut = rRenderContext.GetOutputSizePixel(); Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); - aStartWidth *= GetMapMode().GetScaleX(); + aStartWidth *= rRenderContext.GetMapMode().GetScaleX(); - aOut.Width() -= (long)aStartWidth; - aOut = PixelToLogic(aOut); + aOut.Width() -= long(aStartWidth); + aOut = rRenderContext.PixelToLogic(aOut); - Rectangle aRect(PixelToLogic(Point(aStartWidth,0)),aOut); - Wallpaper aWall( m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor ); - DrawWallpaper(aRect,aWall); + Rectangle aRect(rRenderContext.PixelToLogic(Point(aStartWidth,0)), aOut); + Wallpaper aWall(m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor); + rRenderContext.DrawWallpaper(aRect, aWall); } void OViewsWindow::ImplInitSettings() { - EnableChildTransparentMode( true ); - SetBackground( ); - SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); - SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); + EnableChildTransparentMode(true); } void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt ) |