diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-18 11:30:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-18 11:30:02 +0200 |
commit | 968e6b5e66da73d6cd1f07d46db015d1f339c509 (patch) | |
tree | 9b25a2d9b376214fd32f1138d87ab4d0bb1f4b2e /sw | |
parent | 77b3bd22b208c1764923eaaed267c3dee7447ecb (diff) |
loplugin:staticmethods
Change-Id: I8ab9bc20ae293fc066239b81e80f4b62bafe9d35
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 32 | ||||
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 3 |
2 files changed, 18 insertions, 17 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 1203f657803f..47bfd670a5b1 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -70,6 +70,17 @@ using namespace ::com::sun::star; +namespace { + +void drawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) +{ + rRenderContext.SetFillColor(rFillColor); + rRenderContext.SetLineColor(rLineColor); + rRenderContext.DrawRect(rRect); +} + +} + // Tools->Options->Writer->View // Tools->Options->Writer/Web->View SwContentOptPage::SwContentOptPage( vcl::Window* pParent, @@ -1670,16 +1681,16 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ // draw shadow Rectangle aShadow(aPage); aShadow += Point(3, 3); - DrawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol); + drawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol); // draw page - DrawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol); + drawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol); // draw separator Rectangle aPageSeparator(aPage); aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight())); aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0); - DrawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol); + drawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol); PaintPage(rRenderContext, aLeftPagePrtArea); PaintPage(rRenderContext, aRightPagePrtArea); @@ -1709,14 +1720,14 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ default: return; } - DrawRect(rRenderContext, aLeftMark, m_aMarkCol, m_aTransCol); - DrawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol); + drawRect(rRenderContext, aLeftMark, m_aMarkCol, m_aTransCol); + drawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol); } void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect) { // draw PrintArea - DrawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol); + drawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol); // draw Testparagraph sal_uLong nLTxtBorder = 4; @@ -1739,20 +1750,13 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangl aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight())); if (aPage.IsInside(aTextLine)) - DrawRect(rRenderContext, aTextLine, m_aTxtCol, m_aTransCol); + drawRect(rRenderContext, aTextLine, m_aTxtCol, m_aTransCol); aTextLine.Move(0, nStep); } aTextLine.Move(0, -nStep); } -void SwMarkPreview::DrawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) -{ - rRenderContext.SetFillColor(rFillColor); - rRenderContext.SetLineColor(rLineColor); - rRenderContext.DrawRect(rRect); -} - Size SwMarkPreview::GetOptimalSize() const { return m_aInitialSize; diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 02f659812855..8797615dd99d 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -308,9 +308,6 @@ class SwMarkPreview : public vcl::Window sal_uInt16 nMarkPos; - using OutputDevice::DrawRect; - void DrawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; void PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect); void InitColors(); |