[Libreoffice-commits] .: 3 commits - cli_ure/source dtrans/source editeng/source extensions/test io/test sfx2/source writerperfect/source

Michael Meeks michael at kemper.freedesktop.org
Fri Feb 17 07:26:52 PST 2012


 cli_ure/source/uno_bridge/cli_bridge.h       |    2 +-
 dtrans/source/win32/dtobj/FetcList.cxx       |    2 +-
 dtrans/source/win32/dtobj/FmtFilter.cxx      |    2 +-
 editeng/source/items/borderline.cxx          |   21 ++++++---------------
 extensions/test/ole/cpnt/cpnt.cxx            |    2 +-
 extensions/test/stm/datatest.cxx             |    4 ++--
 io/test/stm/datatest.cxx                     |    4 ++--
 sfx2/source/doc/printhelper.cxx              |    2 +-
 writerperfect/source/filter/FontStyle.hxx    |    2 +-
 writerperfect/source/filter/TextRunStyle.hxx |    4 ++--
 10 files changed, 18 insertions(+), 27 deletions(-)

New commits:
commit 51b3eb3a391cc5329d358a2d4159861537feab26
Author: Mariusz Dykierek <mariuszdykierek at gmail.com>
Date:   Fri Feb 17 15:25:28 2012 +0000

    clean up logic

diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index b617ff4..1677141 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -492,29 +492,20 @@ bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const
     const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth();
     const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth();
 
-    if (nThisSize > nOtherSize)
+    if ( nThisSize > nOtherSize )
     {
         return true;
     }
-    else if (nThisSize < nOtherSize)
+    else if ( nThisSize < nOtherSize )
     {
         return false;
     }
-    else
+    else if ( rOtherLine.GetInWidth() && !GetInWidth() )
     {
-        if ( rOtherLine.GetInWidth() && !GetInWidth() )
-        {
-            return true;
-        }
-        else if ( GetInWidth() && !rOtherLine.GetInWidth() )
-        {
-            return false;
-        }
-        else
-        {
-            return false;
-        }
+        return true;
     }
+
+    return false;
 }
 
 } // namespace editeng
commit b8f007d05250258a8d8b5113298867f142af6e09
Author: Mariusz Dykierek <mariuszdykierek at gmail.com>
Date:   Fri Feb 17 15:22:46 2012 +0000

    remove extraneous qualifiers that break some compilers

diff --git a/cli_ure/source/uno_bridge/cli_bridge.h b/cli_ure/source/uno_bridge/cli_bridge.h
index 0306e4d..b9297d0 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.h
+++ b/cli_ure/source/uno_bridge/cli_bridge.h
@@ -96,7 +96,7 @@ struct Bridge
 
     System::Object* map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription* pTD) const;
 
-    System::Object* Bridge::call_uno(uno_Interface * pUnoI,
+    System::Object* call_uno(uno_Interface * pUnoI,
                       typelib_TypeDescription* member_td,
                       typelib_TypeDescriptionReference * return_type,
                       sal_Int32 nParams, typelib_MethodParameter const * pParams,
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index 0435ced..b20795e 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -315,7 +315,7 @@ public: // XTestSequence
 class EventListener: public WeakImplHelper1<XEventListener>
 {
 public:
-    EventListener::EventListener(): bCalled( sal_False)
+    EventListener(): bCalled( sal_False)
         {}
     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (RuntimeException);
 
diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx
index b084ac2..2bdc349 100644
--- a/extensions/test/stm/datatest.cxx
+++ b/extensions/test/stm/datatest.cxx
@@ -662,8 +662,8 @@ public:
 
 
 private:
-    void OObjectStreamTest::testObject(     const XObjectOutputStreamRef &rOut,
-                                            const XObjectInputStreamRef &rIn );
+    void testObject(     const XObjectOutputStreamRef &rOut,
+                         const XObjectInputStreamRef &rIn );
 
 private:
 };
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index 47b7769..4504403 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -668,8 +668,8 @@ public:
 
 
 private:
-    void OObjectStreamTest::testObject(     const Reference <XObjectOutputStream > &rOut,
-                                            const Reference <XObjectInputStream> &rIn );
+    void testObject(     const Reference <XObjectOutputStream > &rOut,
+                         const Reference <XObjectInputStream> &rIn );
 
 private:
 };
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 9206d3a..33b33a6 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -511,7 +511,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
 
             // lock for further using of our member isn't neccessary - because
             // we truns alone by defenition. Nobody join for us nor use us ...
-            ImplUCBPrintWatcher::moveAndDeleteTemp(&m_pTempFile,m_sTargetURL);
+            moveAndDeleteTemp(&m_pTempFile,m_sTargetURL);
 
             // finishing of this run() method will call onTerminate() automaticly
             // kill this thread there!
diff --git a/writerperfect/source/filter/FontStyle.hxx b/writerperfect/source/filter/FontStyle.hxx
index 82efa74..a27c723 100644
--- a/writerperfect/source/filter/FontStyle.hxx
+++ b/writerperfect/source/filter/FontStyle.hxx
@@ -57,7 +57,7 @@ public:
     FontStyleManager() : mStyleHash() {}
     virtual ~FontStyleManager()
     {
-        FontStyleManager::clean();
+        clean();
     }
 
     /* create a new font if the font does not exists and returns a font name
diff --git a/writerperfect/source/filter/TextRunStyle.hxx b/writerperfect/source/filter/TextRunStyle.hxx
index 98fc6b4..0771912 100644
--- a/writerperfect/source/filter/TextRunStyle.hxx
+++ b/writerperfect/source/filter/TextRunStyle.hxx
@@ -76,7 +76,7 @@ public:
     ParagraphStyleManager() : mNameHash(), mStyleHash() {}
     virtual ~ParagraphStyleManager()
     {
-        ParagraphStyleManager::clean();
+        clean();
     }
 
     /* create a new style if it does not exists. In all case, returns the name of the style
@@ -107,7 +107,7 @@ public:
     SpanStyleManager() : mNameHash(), mStyleHash() {}
     virtual ~SpanStyleManager()
     {
-        SpanStyleManager::clean();
+        clean();
     }
 
     /* create a new style if it does not exists. In all case, returns the name of the style
commit df69ab8a803f87c85d516bcfcc544c19c94ade85
Author: Mariusz Dykierek <mariuszdykierek at gmail.com>
Date:   Fri Feb 17 15:18:29 2012 +0000

    Use emptiness check rather than size check for efficiency

diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 3bb3beb..3599da8 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -120,7 +120,7 @@ sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const
 
 sal_Bool CFormatEtcContainer::hasElements( ) const
 {
-    return ( m_FormatMap.size( ) > 0 );
+    return !m_FormatMap.empty();
 }
 
 //------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index c012115..4093e92 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -482,7 +482,7 @@ typedef Sequence<sal_Int8> ByteSequence_t;
    a double '\0' terminated string buffer */
 size_t CalcSizeForStringListBuffer(const FileList_t& fileList)
 {
-    if (fileList.size() == 0)
+    if ( fileList.empty() )
         return 0;
 
     size_t size = 1; // one for the very final '\0'


More information about the Libreoffice-commits mailing list