diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-17 22:02:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-17 22:02:06 +0200 |
commit | c73a9119429ba72a87ee000b4c84490629529927 (patch) | |
tree | 360f1bfea3039cb03e4c15e2556a881a05e593dc /dbaccess | |
parent | 5862ed1851ecc755aa6c49789e00cd920f6a5036 (diff) |
loplugin:staticmethods
Change-Id: Id3a8fee18a954a14b63fd922803f8a7f13b49727
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/inc/TableWindow.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindow.cxx | 48 |
2 files changed, 26 insertions, 23 deletions
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index 4565d7719806..a2c704ab18d4 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -69,7 +69,6 @@ namespace dbaui sal_uInt16 m_nSizingFlags; bool m_bActive; - void Draw3DBorder(vcl::RenderContext& rRenderContext,const Rectangle& rRect); // OContainerListener virtual void _elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void _elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 3b960ade7047..fefb91da63ee 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -65,6 +65,32 @@ namespace DatabaseObject = css::sdb::application::DatabaseObject; #define TABWIN_WIDTH_MIN 90 #define TABWIN_HEIGHT_MIN 80 +namespace { + +void Draw3DBorder(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +{ + // Use the System Style-Settings for my colours + const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings(); + + // Black lines for bottom and right + rRenderContext.SetLineColor(aSystemStyle.GetDarkShadowColor()); + rRenderContext.DrawLine(rRect.BottomLeft(), rRect.BottomRight()); + rRenderContext.DrawLine(rRect.BottomRight(), rRect.TopRight()); + + // Dark grey lines over the black lines + rRenderContext.SetLineColor(aSystemStyle.GetShadowColor()); + Point aEHvector(1, 1); + rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -1), rRect.BottomRight() - aEHvector); + rRenderContext.DrawLine(rRect.BottomRight() - aEHvector, rRect.TopRight() + Point(-1, 1)); + + // Light grey lines for top and left + rRenderContext.SetLineColor(aSystemStyle.GetLightColor()); + rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -2), rRect.TopLeft() + aEHvector); + rRenderContext.DrawLine(rRect.TopLeft() + aEHvector, rRect.TopRight() + Point(-2, 1)); +} + +} + // class OTableWindow OTableWindow::OTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData ) : ::comphelper::OContainerListener(m_aMutex) @@ -319,28 +345,6 @@ void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR Draw3DBorder(rRenderContext, aRect); } -void OTableWindow::Draw3DBorder(vcl::RenderContext& rRenderContext, const Rectangle& rRect) -{ - // Use the System Style-Settings for my colours - const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings(); - - // Black lines for bottom and right - rRenderContext.SetLineColor(aSystemStyle.GetDarkShadowColor()); - rRenderContext.DrawLine(rRect.BottomLeft(), rRect.BottomRight()); - rRenderContext.DrawLine(rRect.BottomRight(), rRect.TopRight()); - - // Dark grey lines over the black lines - rRenderContext.SetLineColor(aSystemStyle.GetShadowColor()); - Point aEHvector(1, 1); - rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -1), rRect.BottomRight() - aEHvector); - rRenderContext.DrawLine(rRect.BottomRight() - aEHvector, rRect.TopRight() + Point(-1, 1)); - - // Light grey lines for top and left - rRenderContext.SetLineColor(aSystemStyle.GetLightColor()); - rRenderContext.DrawLine(rRect.BottomLeft() + Point(1, -2), rRect.TopLeft() + aEHvector); - rRenderContext.DrawLine(rRect.TopLeft() + aEHvector, rRect.TopRight() + Point(-2, 1)); -} - Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() ); |