[Libreoffice-commits] core.git: dbaccess/source

Stephan Bergmann sbergman at redhat.com
Sun May 17 13:02:31 PDT 2015


 dbaccess/source/ui/inc/TableWindow.hxx         |    1 
 dbaccess/source/ui/querydesign/TableWindow.cxx |   48 +++++++++++++------------
 2 files changed, 26 insertions(+), 23 deletions(-)

New commits:
commit c73a9119429ba72a87ee000b4c84490629529927
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun May 17 22:02:06 2015 +0200

    loplugin:staticmethods
    
    Change-Id: Id3a8fee18a954a14b63fd922803f8a7f13b49727

diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 4565d77..a2c704a 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 3b960ad..fefb91d 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() );


More information about the Libreoffice-commits mailing list