[Libreoffice-commits] .: 2 commits - tools/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 13 03:40:38 PST 2012


 tools/inc/tools/gen.hxx |   80 ++++++++++++++++++++++++------------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

New commits:
commit 805ec83f188af51906a8d3a25ba9f5bc2e7f61c8
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Dec 13 13:39:18 2012 +0200

    whitespace cleanup
    
    Since I'm hacking in this file anyhow, make the class definition
    a little prettier.
    
    Change-Id: Id47f1084fe103e85cf1dacc84a9e536774767e61

diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 568d873..1819a90 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -41,8 +41,8 @@ public:
     long&               A() { return nA; }
     long&               B() { return nB; }
 
-    sal_Bool                operator == ( const Pair& rPair ) const;
-    sal_Bool                operator != ( const Pair& rPair ) const;
+    sal_Bool            operator == ( const Pair& rPair ) const;
+    sal_Bool            operator != ( const Pair& rPair ) const;
 
     TOOLS_DLLPUBLIC friend SvStream&    operator>>( SvStream& rIStream, Pair& rPair );
     TOOLS_DLLPUBLIC friend SvStream&    operator<<( SvStream& rOStream, const Pair& rPair );
@@ -88,10 +88,10 @@ public:
     long&               Y() { return nB; }
 
     void                Move( long nHorzMove, long nVertMove );
-    sal_Bool                IsAbove( const Point& rPoint ) const;
-    sal_Bool                IsBelow( const Point& rPoint ) const;
-    sal_Bool                IsLeft( const Point& rPoint ) const;
-    sal_Bool                IsRight( const Point& rPoint ) const;
+    sal_Bool            IsAbove( const Point& rPoint ) const;
+    sal_Bool            IsBelow( const Point& rPoint ) const;
+    sal_Bool            IsLeft( const Point& rPoint ) const;
+    sal_Bool            IsRight( const Point& rPoint ) const;
 
     Point&              operator += ( const Point& rPoint );
     Point&              operator -= ( const Point& rPoint );
@@ -212,10 +212,10 @@ public:
     long&           Width()  { return nA; }
     long&           Height() { return nB; }
 
-    long                getWidth() const { return Width(); }
-    long                getHeight() const { return Height(); }
-    void                setWidth(long nWidth)  { Width() = nWidth; }
-    void                setHeight(long nHeight)  { Height() = nHeight; }
+    long            getWidth() const { return Width(); }
+    long            getHeight() const { return Height(); }
+    void            setWidth(long nWidth)  { Width() = nWidth; }
+    void            setHeight(long nHeight)  { Height() = nHeight; }
 };
 
 inline Size::Size()
@@ -251,7 +251,7 @@ public:
     long&           Min() { return nA; }
     long&           Max() { return nB; }
 
-    sal_Bool            IsInside( long nIs ) const;
+    sal_Bool        IsInside( long nIs ) const;
 
     void            Justify();
 };
@@ -305,16 +305,16 @@ public:
     long&           Min() { return nA; }
     long&           Max() { return nB; }
 
-    sal_Bool            IsInside( long nIs ) const;
+    sal_Bool        IsInside( long nIs ) const;
 
     void            Justify();
 
-    sal_Bool            operator !() const { return !Len(); }
+    sal_Bool        operator !() const { return !Len(); }
 
-    long                getMin() const { return Min(); }
-    long                getMax() const { return Max(); }
-    void                setMin(long nMin)  { Min() = nMin; }
-    void                setMax(long nMax)  { Max() = nMax; }
+    long            getMin() const { return Min(); }
+    long            getMax() const { return Max(); }
+    void            setMin(long nMin)  { Min() = nMin; }
+    void            setMax(long nMax)  { Max() = nMax; }
 };
 
 inline Selection::Selection()
commit c317b7f963f6d3fb2f325bc212c148d61b3dfa31
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Dec 13 13:36:57 2012 +0200

    make the "inline" method attributes match with the method definition.
    
    And make the whitespace layout a little cleaner.
    
    Change-Id: I12b042600f061e74825de92ce836ee34ebdfabdb

diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 2ddb21f..568d873 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -374,44 +374,44 @@ public:
     long&               Top()           { return nTop;    }
     long&               Bottom()        { return nBottom; }
 
-    inline Point                TopLeft() const;
-    Point               TopRight() const;
-    Point               TopCenter() const;
-    Point               BottomLeft() const;
-    Point               BottomRight() const;
-    Point               BottomCenter() const;
-    Point               LeftCenter() const;
-    Point               RightCenter() const;
-    Point               Center() const;
-
-    void                Move( long nHorzMove, long nVertMove );
+    inline Point        TopLeft() const;
+    inline Point        TopRight() const;
+    inline Point        TopCenter() const;
+    inline Point        BottomLeft() const;
+    inline Point        BottomRight() const;
+    inline Point        BottomCenter() const;
+    inline Point        LeftCenter() const;
+    inline Point        RightCenter() const;
+    inline Point        Center() const;
+
+    inline void         Move( long nHorzMove, long nVertMove );
     inline void         Transpose();
     inline void         SetPos( const Point& rPoint );
     void                SetSize( const Size& rSize );
     inline Size         GetSize() const;
 
-    long                GetWidth() const;
-    long                GetHeight() const;
+    inline long         GetWidth() const;
+    inline long         GetHeight() const;
 
     Rectangle&          Union( const Rectangle& rRect );
     Rectangle&          Intersection( const Rectangle& rRect );
-    Rectangle           GetUnion( const Rectangle& rRect ) const;
-    Rectangle           GetIntersection( const Rectangle& rRect ) const;
+    inline Rectangle    GetUnion( const Rectangle& rRect ) const;
+    inline Rectangle    GetIntersection( const Rectangle& rRect ) const;
 
     void                Justify();
 
-    sal_Bool                IsInside( const Point& rPOINT ) const;
-    sal_Bool                IsInside( const Rectangle& rRect ) const;
-    sal_Bool                IsOver( const Rectangle& rRect ) const;
+    sal_Bool            IsInside( const Point& rPOINT ) const;
+    sal_Bool            IsInside( const Rectangle& rRect ) const;
+    sal_Bool            IsOver( const Rectangle& rRect ) const;
 
     void                SetEmpty() { nRight = nBottom = RECT_EMPTY; }
-    sal_Bool                IsEmpty() const;
+    inline sal_Bool     IsEmpty() const;
 
-    sal_Bool                operator == ( const Rectangle& rRect ) const;
-    sal_Bool                operator != ( const Rectangle& rRect ) const;
+    inline sal_Bool     operator == ( const Rectangle& rRect ) const;
+    inline sal_Bool     operator != ( const Rectangle& rRect ) const;
 
-    Rectangle&          operator += ( const Point& rPt );
-    Rectangle&          operator -= ( const Point& rPt );
+    inline Rectangle&   operator += ( const Point& rPt );
+    inline Rectangle&   operator -= ( const Point& rPt );
 
     friend inline Rectangle operator + ( const Rectangle& rRect, const Point& rPt );
     friend inline Rectangle operator - ( const Rectangle& rRect, const Point& rPt );


More information about the Libreoffice-commits mailing list