sw/source/ui/config/optpage.cxx | 32 ++++++++++++++++++-------------- sw/source/uibase/inc/optpage.hxx | 3 --- 2 files changed, 18 insertions(+), 17 deletions(-)
New commits: commit 968e6b5e66da73d6cd1f07d46db015d1f339c509 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon May 18 11:30:02 2015 +0200 loplugin:staticmethods Change-Id: I8ab9bc20ae293fc066239b81e80f4b62bafe9d35 diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 1203f65..47bfd67 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 02f6598..8797615 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits