diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-17 22:52:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-17 22:52:55 +0200 |
commit | 1a2479c93a013ba2d67319849869693bd01cf1ad (patch) | |
tree | 383d9196eccca9c978e40ee8f9ec36c8b1c0e001 /sw/source/uibase | |
parent | c73a9119429ba72a87ee000b4c84490629529927 (diff) |
loplugin:staticmethods
Change-Id: I441cafcd641477626eb8de9d4b35212fd29af248
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/swruler.hxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/misc/swruler.cxx | 51 |
2 files changed, 31 insertions, 28 deletions
diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 4136026ecba4..b31d33acaa18 100644 --- a/sw/source/uibase/inc/swruler.hxx +++ b/sw/source/uibase/inc/swruler.hxx @@ -88,14 +88,6 @@ protected: * Paint the comment control on VirtualDevice. */ void DrawCommentControl(vcl::RenderContext& rRenderContext); - /** - * Draw a little horizontal arrow tip on VirtualDevice. - * \param nX left coordinate of arrow - * \param nY top coordinate of arrow - * \param Color arrow color - * \param bPointRight if arrow should point to right. Otherwise, it will point left. - */ - void ImplDrawArrow(vcl::RenderContext& rRenderContext, long nX, long nY, const Color& rColor, bool bPointRight); /** * Update the tooltip text. diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 665ca0f6e08d..5eabc7c1589d 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -34,6 +34,37 @@ #define CONTROL_TRIANGLE_WIDTH 4 #define CONTROL_TRIANGLE_PAD 3 +namespace { + +/** + * Draw a little horizontal arrow tip on VirtualDevice. + * \param nX left coordinate of arrow + * \param nY top coordinate of arrow + * \param Color arrow color + * \param bPointRight if arrow should point to right. Otherwise, it will point left. + */ +void ImplDrawArrow(vcl::RenderContext& rRenderContext, long nX, long nY, const Color& rColor, bool bPointRight) +{ + rRenderContext.SetLineColor(); + rRenderContext.SetFillColor(rColor); + if (bPointRight) + { + rRenderContext.DrawRect(Rectangle(nX + 0, nY + 0, nX + 0, nY + 6) ); + rRenderContext.DrawRect(Rectangle(nX + 1, nY + 1, nX + 1, nY + 5) ); + rRenderContext.DrawRect(Rectangle(nX + 2, nY + 2, nX + 2, nY + 4) ); + rRenderContext.DrawRect(Rectangle(nX + 3, nY + 3, nX + 3, nY + 3) ); + } + else + { + rRenderContext.DrawRect(Rectangle(nX + 0, nY + 3, nX + 0, nY + 3)); + rRenderContext.DrawRect(Rectangle(nX + 1, nY + 2, nX + 1, nY + 4)); + rRenderContext.DrawRect(Rectangle(nX + 2, nY + 1, nX + 2, nY + 5)); + rRenderContext.DrawRect(Rectangle(nX + 3, nY + 0, nX + 3, nY + 6)); + } +} + +} + // Constructor SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEditWin* pWin, SvxRulerSupportFlags nRulerFlags, SfxBindings& rBindings, WinBits nWinStyle) : SvxRuler(pParent, pWin, nRulerFlags, rBindings, nWinStyle | WB_HSCROLL) @@ -155,26 +186,6 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext) rRenderContext.DrawOutDev(aControlRect.TopLeft(), aControlRect.GetSize(), Point(), aControlRect.GetSize(), *maVirDev.get()); } -void SwCommentRuler::ImplDrawArrow(vcl::RenderContext& rRenderContext, long nX, long nY, const Color& rColor, bool bPointRight) -{ - rRenderContext.SetLineColor(); - rRenderContext.SetFillColor(rColor); - if (bPointRight) - { - rRenderContext.DrawRect(Rectangle(nX + 0, nY + 0, nX + 0, nY + 6) ); - rRenderContext.DrawRect(Rectangle(nX + 1, nY + 1, nX + 1, nY + 5) ); - rRenderContext.DrawRect(Rectangle(nX + 2, nY + 2, nX + 2, nY + 4) ); - rRenderContext.DrawRect(Rectangle(nX + 3, nY + 3, nX + 3, nY + 3) ); - } - else - { - rRenderContext.DrawRect(Rectangle(nX + 0, nY + 3, nX + 0, nY + 3)); - rRenderContext.DrawRect(Rectangle(nX + 1, nY + 2, nX + 1, nY + 4)); - rRenderContext.DrawRect(Rectangle(nX + 2, nY + 1, nX + 2, nY + 5)); - rRenderContext.DrawRect(Rectangle(nX + 3, nY + 0, nX + 3, nY + 6)); - } -} - // Just accept double-click outside comment control void SwCommentRuler::Command( const CommandEvent& rCEvt ) { |