include/svx/rulritem.hxx       |   18 +-
 svx/source/dialog/rulritem.cxx |  251 ++++++++++++++++++-----------------------
 svx/source/dialog/svxruler.cxx |    1 
 3 files changed, 126 insertions(+), 144 deletions(-)

New commits:
commit b0c3f45becac49ae05bff2b694c3ffe906439979
Author: Tomaž Vajngerl <qui...@gmail.com>
Date:   Sun Sep 15 16:10:39 2013 +0200

    include cmath
    
    Change-Id: I34fd87a7599884340adbf6e3ae7df321cfc85e23

diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 1d41531..6d9adee 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -19,6 +19,7 @@
 
 #include <cstring>
 #include <climits>
+#include <cmath>
 
 #include <tools/shl.hxx>
 #include <vcl/image.hxx>
commit 2acfc0a94c95ae579aca6f057949f59bd7c123b9
Author: Tomaž Vajngerl <qui...@gmail.com>
Date:   Sun Sep 15 16:09:24 2013 +0200

    cleanup ruler items (rulritem.hxx) - remove comments, identation
    
    Change-Id: I450ebe3ceab0acf03221970b33c8da4cbb2c6a52

diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx
index b2c6195..cd19467 100644
--- a/include/svx/rulritem.hxx
+++ b/include/svx/rulritem.hxx
@@ -21,7 +21,7 @@
 
 #include <tools/gen.hxx>
 #include <svl/poolitem.hxx>
-#include "svx/svxdllapi.h"
+#include <svx/svxdllapi.h>
 #include <vector>
 
 class SVX_DLLPUBLIC SvxLongLRSpaceItem : public SfxPoolItem
@@ -52,10 +52,10 @@ public:
     SvxLongLRSpaceItem(const SvxLongLRSpaceItem &);
     SvxLongLRSpaceItem();
 
-    long    GetLeft() const { return lLeft; }
-    long    GetRight() const { return lRight; }
-    void    SetLeft(long lArgLeft) {lLeft=lArgLeft;}
-    void    SetRight(long lArgRight) {lRight=lArgRight;}
+    long GetLeft() const;
+    long GetRight() const;
+    void SetLeft(long lArgLeft);
+    void SetRight(long lArgRight);
 };
 
 class SVX_DLLPUBLIC SvxLongULSpaceItem : public SfxPoolItem
@@ -86,10 +86,10 @@ public:
     SvxLongULSpaceItem(const SvxLongULSpaceItem &);
     SvxLongULSpaceItem();
 
-    long    GetUpper() const { return lLeft; }
-    long    GetLower() const { return lRight; }
-    void    SetUpper(long lArgLeft) {lLeft=lArgLeft;}
-    void    SetLower(long lArgRight) {lRight=lArgRight;}
+    long GetUpper() const;
+    long GetLower() const;
+    void SetUpper(long lArgLeft);
+    void SetLower(long lArgRight);
 };
 
 class SVX_DLLPUBLIC SvxPagePosSizeItem : public SfxPoolItem
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index efcf92e..3a17b58 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -23,15 +23,13 @@
 #include <com/sun/star/frame/status/LeftRightMargin.hpp>
 #include <com/sun/star/frame/status/UpperLowerMargin.hpp>
 
-//------------------------------------------------------------------------
-
 TYPEINIT1_AUTOFACTORY(SvxPagePosSizeItem, SfxPoolItem);
 TYPEINIT1_AUTOFACTORY(SvxLongLRSpaceItem, SfxPoolItem);
 TYPEINIT1_AUTOFACTORY(SvxLongULSpaceItem, SfxPoolItem);
 TYPEINIT1(SvxColumnItem, SfxPoolItem);
 TYPEINIT1(SvxObjectItem, SfxPoolItem);
 
-//------------------------------------------------------------------------
+/* SvxLongLRSpaceItem */
 
 int SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) const
 {
@@ -40,9 +38,6 @@ int SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) 
const
         lRight==((const SvxLongLRSpaceItem &)rCmp).lRight;
 }
 
-
-//------------------------------------------------------------------------
-
 OUString SvxLongLRSpaceItem::GetValueText() const
 {
     return OUString();
@@ -80,7 +75,6 @@ bool SvxLongLRSpaceItem::QueryValue( 
::com::sun::star::uno::Any& rVal, sal_uInt8
     return true;
 }
 
-// -----------------------------------------------------------------------
 bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, 
sal_uInt8 nMemberId )
 {
     bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
@@ -92,8 +86,8 @@ bool SvxLongLRSpaceItem::PutValue( const 
::com::sun::star::uno::Any& rVal, sal_u
         ::com::sun::star::frame::status::LeftRightMargin aLeftRightMargin;
         if ( rVal >>= aLeftRightMargin )
         {
-            lLeft    = bConvert ? MM100_TO_TWIP( aLeftRightMargin.Left ) : 
aLeftRightMargin.Left;
-            lRight   = bConvert ? MM100_TO_TWIP( aLeftRightMargin.Right ) : 
aLeftRightMargin.Right;
+            lLeft  = bConvert ? MM100_TO_TWIP(aLeftRightMargin.Left) : 
aLeftRightMargin.Left;
+            lRight = bConvert ? MM100_TO_TWIP(aLeftRightMargin.Right) : 
aLeftRightMargin.Right;
             return true;
         }
     }
@@ -115,63 +109,69 @@ bool SvxLongLRSpaceItem::PutValue( const 
::com::sun::star::uno::Any& rVal, sal_u
     return false;
 }
 
-//------------------------------------------------------------------------
-
-SfxItemPresentation SvxLongLRSpaceItem::GetPresentation
-(
-    SfxItemPresentation /*ePres*/,
-    SfxMapUnit          /*eCoreUnit*/,
-    SfxMapUnit          /*ePresUnit*/,
-    OUString&           /*rText*/, const IntlWrapper *
-)   const
+SfxItemPresentation SvxLongLRSpaceItem::GetPresentation(
+                        SfxItemPresentation /*ePres*/,
+                        SfxMapUnit          /*eCoreUnit*/,
+                        SfxMapUnit          /*ePresUnit*/,
+                        OUString&           /*rText*/,
+                        const IntlWrapper*  /*pWrapper*/) const
 {
-
     return SFX_ITEM_PRESENTATION_NONE;
 }
 
-//------------------------------------------------------------------------
-
 SfxPoolItem* SvxLongLRSpaceItem::Clone(SfxItemPool *) const
 {
     return new SvxLongLRSpaceItem(*this);
 }
 
-//------------------------------------------------------------------------
-
-SvxLongLRSpaceItem::SvxLongLRSpaceItem(long lL, long lR, sal_uInt16 nId)
-    : SfxPoolItem(nId),
-    lLeft(lL),
-    lRight(lR)
+SvxLongLRSpaceItem::SvxLongLRSpaceItem(long lL, long lR, sal_uInt16 nId) :
+    SfxPoolItem (nId),
+    lLeft       (lL),
+    lRight      (lR)
 {}
 
-//------------------------------------------------------------------------
-
 SvxLongLRSpaceItem::SvxLongLRSpaceItem() :
-    SfxPoolItem( 0 ),
-    lLeft( 0 ),
-    lRight( 0 )
+    SfxPoolItem (0),
+    lLeft       (0),
+    lRight      (0)
+{}
+
+SvxLongLRSpaceItem::SvxLongLRSpaceItem(const SvxLongLRSpaceItem &rCpy) :
+    SfxPoolItem (rCpy),
+    lLeft       (rCpy.lLeft),
+    lRight      (rCpy.lRight)
 {}
 
-//------------------------------------------------------------------------
+long SvxLongLRSpaceItem::GetLeft() const
+{
+    return lLeft;
+}
+
+long SvxLongLRSpaceItem::GetRight() const
+{
+    return lRight;
+}
+
+void SvxLongLRSpaceItem::SetLeft(long lArgLeft)
+{
+    lLeft = lArgLeft;
+}
 
-SvxLongLRSpaceItem::SvxLongLRSpaceItem(const SvxLongLRSpaceItem &rCpy)
-    : SfxPoolItem(rCpy),
-    lLeft(rCpy.lLeft),
-    lRight(rCpy.lRight)
-        {}
+void SvxLongLRSpaceItem::SetRight(long lArgRight)
+{
+    lRight = lArgRight;
+}
 
-//------------------------------------------------------------------------
+/* SvxLongULSpaceItem */
 
 int SvxLongULSpaceItem::operator==( const SfxPoolItem& rCmp) const
 {
     return SfxPoolItem::operator==(rCmp) &&
-        lLeft==((const SvxLongULSpaceItem &)rCmp).lLeft &&
-        lRight==((const SvxLongULSpaceItem &)rCmp).lRight;
+        lLeft == ((const SvxLongULSpaceItem&)rCmp).lLeft &&
+        lRight == ((const SvxLongULSpaceItem&)rCmp).lRight;
 }
 
 
-//------------------------------------------------------------------------
-
 OUString SvxLongULSpaceItem::GetValueText() const
 {
     return OUString();
@@ -206,7 +206,6 @@ bool SvxLongULSpaceItem::QueryValue( 
::com::sun::star::uno::Any& rVal, sal_uInt8
     return true;
 }
 
-// -----------------------------------------------------------------------
 bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, 
sal_uInt8 nMemberId )
 {
     bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
@@ -241,51 +240,60 @@ bool SvxLongULSpaceItem::PutValue( const 
::com::sun::star::uno::Any& rVal, sal_u
     return false;
 }
 
-//------------------------------------------------------------------------
-
-SfxItemPresentation SvxLongULSpaceItem::GetPresentation
-(
-    SfxItemPresentation /*ePres*/,
-    SfxMapUnit          /*eCoreUnit*/,
-    SfxMapUnit          /*ePresUnit*/,
-    OUString&           /*rText*/, const IntlWrapper *
-)   const
+SfxItemPresentation SvxLongULSpaceItem::GetPresentation(
+                        SfxItemPresentation /*ePres*/,
+                        SfxMapUnit          /*eCoreUnit*/,
+                        SfxMapUnit          /*ePresUnit*/,
+                        OUString&           /*rText*/,
+                        const IntlWrapper*  /*pWrapper*/ ) const
 {
     return SFX_ITEM_PRESENTATION_NONE;
 }
 
-//------------------------------------------------------------------------
-
 SfxPoolItem* SvxLongULSpaceItem::Clone(SfxItemPool *) const
 {
     return new SvxLongULSpaceItem(*this);
 }
 
-//------------------------------------------------------------------------
+SvxLongULSpaceItem::SvxLongULSpaceItem(long lL, long lR, sal_uInt16 nId) :
+    SfxPoolItem (nId),
+    lLeft       (lL),
+    lRight      (lR)
+{}
 
-SvxLongULSpaceItem::SvxLongULSpaceItem(long lL, long lR, sal_uInt16 nId)
-    : SfxPoolItem(nId),
-    lLeft(lL),
-    lRight(lR)
+SvxLongULSpaceItem::SvxLongULSpaceItem(const SvxLongULSpaceItem &rCpy) :
+    SfxPoolItem (rCpy),
+    lLeft       (rCpy.lLeft),
+    lRight      (rCpy.lRight)
 {}
 
-//------------------------------------------------------------------------
+SvxLongULSpaceItem::SvxLongULSpaceItem() :
+    SfxPoolItem (0),
+    lLeft       (0),
+    lRight      (0)
+{}
+
+long SvxLongULSpaceItem::GetUpper() const
+{
+    return lLeft;
+}
 
-SvxLongULSpaceItem::SvxLongULSpaceItem(const SvxLongULSpaceItem &rCpy)
-    : SfxPoolItem(rCpy),
-    lLeft(rCpy.lLeft),
-    lRight(rCpy.lRight)
-        {}
+long SvxLongULSpaceItem::GetLower() const
+{
+    return lRight;
+}
 
-//------------------------------------------------------------------------
+void SvxLongULSpaceItem::SetUpper(long lArgLeft)
+{
+    lLeft = lArgLeft;
+}
 
-SvxLongULSpaceItem::SvxLongULSpaceItem() :
-    SfxPoolItem( 0 ),
-    lLeft( 0 ),
-    lRight( 0 )
-{}
+void SvxLongULSpaceItem::SetLower(long lArgRight)
+{
+    lRight = lArgRight;
+}
 
-//------------------------------------------------------------------------
+/* SvxPagePosSizeItem */
 
 int SvxPagePosSizeItem::operator==( const SfxPoolItem& rCmp) const
 {
@@ -362,61 +370,48 @@ bool SvxPagePosSizeItem::PutValue( const 
::com::sun::star::uno::Any& rVal, sal_u
     return false;
 }
 
-//------------------------------------------------------------------------
-
 OUString SvxPagePosSizeItem::GetValueText() const
 {
     return OUString();
 }
 
-//------------------------------------------------------------------------
-
-SfxItemPresentation SvxPagePosSizeItem::GetPresentation
-(
-    SfxItemPresentation /*ePres*/,
-    SfxMapUnit          /*eCoreUnit*/,
-    SfxMapUnit          /*ePresUnit*/,
-    OUString&           /*rText*/, const IntlWrapper *
-)   const
+SfxItemPresentation SvxPagePosSizeItem::GetPresentation(
+                        SfxItemPresentation /*ePres*/,
+                        SfxMapUnit          /*eCoreUnit*/,
+                        SfxMapUnit          /*ePresUnit*/,
+                        OUString&           /*rText*/,
+                        const IntlWrapper*  /*pWrapper*/ ) const
 {
     return SFX_ITEM_PRESENTATION_NONE;
 }
 
-//------------------------------------------------------------------------
-
 SfxPoolItem* SvxPagePosSizeItem::Clone(SfxItemPool *) const
 {
     return new SvxPagePosSizeItem(*this);
 }
 
-//------------------------------------------------------------------------
-
-SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, long lW, long lH)
-    : SfxPoolItem(SID_RULER_PAGE_POS),
-    aPos(rP),
-    lWidth(lW),
-    lHeight(lH)
+SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, long lW, long lH) :
+    SfxPoolItem (SID_RULER_PAGE_POS),
+    aPos        (rP),
+    lWidth      (lW),
+    lHeight     (lH)
 {}
 
-//------------------------------------------------------------------------
-
-SvxPagePosSizeItem::SvxPagePosSizeItem(const SvxPagePosSizeItem &rCpy)
-    : SfxPoolItem(rCpy),
-    aPos(rCpy.aPos),
-    lWidth(rCpy.lWidth),
-    lHeight(rCpy.lHeight)
-        {}
-
-//------------------------------------------------------------------------
+SvxPagePosSizeItem::SvxPagePosSizeItem(const SvxPagePosSizeItem &rCpy) :
+    SfxPoolItem (rCpy),
+    aPos        (rCpy.aPos),
+    lWidth      (rCpy.lWidth),
+    lHeight     (rCpy.lHeight)
+{}
 
-SvxPagePosSizeItem::SvxPagePosSizeItem()
-    : SfxPoolItem( 0 ),
-    aPos( 0, 0 ),
-    lWidth( 0 ),
-    lHeight( 0 )
+SvxPagePosSizeItem::SvxPagePosSizeItem() :
+    SfxPoolItem (0),
+    aPos        (0, 0),
+    lWidth      (0),
+    lHeight     (0)
 {}
 
-//------------------------------------------------------------------------
+/* SvxColumnItem */
 
 int SvxColumnItem::operator==(const SfxPoolItem& rCmp) const
 {
@@ -429,15 +424,14 @@ int SvxColumnItem::operator==(const SfxPoolItem& rCmp) 
const
         return sal_False;
 
     const sal_uInt16 nCount = ((const SvxColumnItem&)rCmp).Count();
-    for(sal_uInt16 i = 0; i < nCount;++i) {
+    for(sal_uInt16 i = 0; i < nCount;++i)
+    {
         if( (*this)[i] != ((const SvxColumnItem&)rCmp)[i] )
             return sal_False;
     }
     return sal_True;
 }
 
-//------------------------------------------------------------------------
-
 SvxColumnItem::SvxColumnItem( sal_uInt16 nAct ) :
     SfxPoolItem (SID_RULER_BORDERS),
     nLeft       (0),
@@ -446,8 +440,7 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nAct ) :
     bTable      (sal_False),
     bOrtho      (sal_True)
 
-{
-}
+{}
 
 SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 
right ) :
     SfxPoolItem (SID_RULER_BORDERS),
@@ -456,8 +449,7 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, 
sal_uInt16 left, sal_uInt16 ri
     nActColumn  (nActCol),
     bTable      (sal_True),
     bOrtho      (sal_True)
-{
-}
+{}
 
 SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) :
     SfxPoolItem (rCopy),
@@ -472,8 +464,7 @@ SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) :
 }
 
 SvxColumnItem::~SvxColumnItem()
-{
-}
+{}
 
 OUString SvxColumnItem::GetValueText() const
 {
@@ -481,11 +472,11 @@ OUString SvxColumnItem::GetValueText() const
 }
 
 SfxItemPresentation SvxColumnItem::GetPresentation(
-                                        SfxItemPresentation /*ePres*/,
-                                        SfxMapUnit          /*eCoreUnit*/,
-                                        SfxMapUnit          /*ePresUnit*/,
-                                        OUString&           /*rText*/,
-                                        const IntlWrapper*) const
+                        SfxItemPresentation /*ePres*/,
+                        SfxMapUnit          /*eCoreUnit*/,
+                        SfxMapUnit          /*ePresUnit*/,
+                        OUString&           /*rText*/,
+                        const IntlWrapper*  /*pWrapper*/ ) const
 {
     return SFX_ITEM_PRESENTATION_NONE;
 }
@@ -595,6 +586,8 @@ sal_uInt16 SvxColumnItem::Count() const
     return aColumns.size();
 }
 
+/* SvxColumnDescription */
+
 SvxColumnDescription& SvxColumnItem::At(sal_uInt16 index)
 {
     return aColumns[index];
@@ -690,8 +683,6 @@ sal_Bool SvxColumnItem::IsConsistent() const
     return nActColumn < aColumns.size();
 }
 
-//------------------------------------------------------------------------
-
 int SvxObjectItem::operator==( const SfxPoolItem& rCmp ) const
 {
     return SfxPoolItem::operator==(rCmp) &&
@@ -702,15 +693,11 @@ int SvxObjectItem::operator==( const SfxPoolItem& rCmp ) 
const
        bLimits == ((const SvxObjectItem&)rCmp).bLimits;
 }
 
-//------------------------------------------------------------------------
-
 OUString SvxObjectItem::GetValueText() const
 {
     return OUString();
 }
 
-//------------------------------------------------------------------------
-
 SfxItemPresentation SvxObjectItem::GetPresentation
 (
     SfxItemPresentation /*ePres*/,
@@ -722,15 +709,11 @@ SfxItemPresentation SvxObjectItem::GetPresentation
     return SFX_ITEM_PRESENTATION_NONE;
 }
 
-//------------------------------------------------------------------------
-
 SfxPoolItem* SvxObjectItem::Clone(SfxItemPool *) const
 {
     return new SvxObjectItem(*this);
 }
 
-//------------------------------------------------------------------------
-
 SvxObjectItem::SvxObjectItem( long nSX, long nEX,
                               long nSY, long nEY, sal_Bool limits ) :
 
@@ -745,8 +728,6 @@ SvxObjectItem::SvxObjectItem( long nSX, long nEX,
 {
 }
 
-//------------------------------------------------------------------------
-
 SvxObjectItem::SvxObjectItem( const SvxObjectItem& rCopy ) :
 
     SfxPoolItem( rCopy ),
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to