[Libreoffice-commits] .: 3 commits - comphelper/source oox/inc svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Sep 15 09:02:39 PDT 2011


 comphelper/source/property/ChainablePropertySet.cxx |   10 ++++-----
 comphelper/source/property/MasterPropertySet.cxx    |   22 ++++++++++----------
 oox/inc/oox/helper/refmap.hxx                       |    8 +++----
 svtools/source/control/roadmap.cxx                  |    1 
 4 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit 87891c1c8bb82904fd68c523cb1aa11ddcfaaa3d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 15 16:59:30 2011 +0100

    Related gcc#50394 pernickety gcc 4.7.0

diff --git a/oox/inc/oox/helper/refmap.hxx b/oox/inc/oox/helper/refmap.hxx
index dc1089a..8afaa10 100644
--- a/oox/inc/oox/helper/refmap.hxx
+++ b/oox/inc/oox/helper/refmap.hxx
@@ -178,10 +178,10 @@ private:
     };
 
     inline const mapped_type* getRef( key_type nKey ) const
-                        {
-                            typename container_type::const_iterator aIt = find( nKey );
-                            return (aIt == this->end()) ? 0 : &aIt->second;
-                        }
+    {
+        typename container_type::const_iterator aIt = this->find( nKey );
+        return (aIt == this->end()) ? 0 : &aIt->second;
+    }
 };
 
 // ============================================================================
commit 346849d646e4821b2d85559130c5aba44c94b8a5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 15 16:11:23 2011 +0100

    unused define

diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index c8ec87b..ae96215 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -46,7 +46,6 @@
 #define ROADMAP_ITEM_DISTANCE_Y 6
 #define RMINCOMPLETE        -1
 #define NADDITEM            1
-#define INCOMPLETELABEL     ::String::CreateFromAscii("...")        // TODO: Cast to String
 
 //.........................................................................
 namespace svt
commit 1b69a16689bb87ec9c9db66f4e154aca79085edb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 15 14:46:08 2011 +0100

    boost::scoped_ptr is sufficient here

diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx
index e3a02dc..2519b8f 100644
--- a/comphelper/source/property/ChainablePropertySet.cxx
+++ b/comphelper/source/property/ChainablePropertySet.cxx
@@ -32,7 +32,7 @@
 #include <comphelper/ChainablePropertySetInfo.hxx>
 #include <osl/mutex.hxx>
 
-#include <memory>       // STL auto_ptr
+#include <boost/scoped_ptr.hpp>
 
 
 using namespace ::rtl;
@@ -78,7 +78,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr
     throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -96,7 +96,7 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro
     throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -142,7 +142,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU
     throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -176,7 +176,7 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence
     throw(RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index 78f33af..fa44c87 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -35,26 +35,26 @@
 #include <comphelper/ChainablePropertySetInfo.hxx>
 #include <osl/mutex.hxx>
 
-#include <memory>       // STL auto_ptr
+#include <boost/scoped_ptr.hpp>
 
 //////////////////////////////////////////////////////////////////////
 
 class AutoOGuardArray
 {
     sal_Int32                       nSize;
-    std::auto_ptr< osl::SolarGuard > *  pGuardArray;
+    boost::scoped_ptr< osl::SolarGuard > *  pGuardArray;
 
 public:
     AutoOGuardArray( sal_Int32 nNumElements );
     ~AutoOGuardArray();
 
-    std::auto_ptr< osl::SolarGuard > &  operator[] ( sal_Int32 i ) { return pGuardArray[i]; }
+    boost::scoped_ptr< osl::SolarGuard > &  operator[] ( sal_Int32 i ) { return pGuardArray[i]; }
 };
 
 AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements )
 {
     nSize       = nNumElements;
-    pGuardArray = new std::auto_ptr< osl::SolarGuard >[ nSize ];
+    pGuardArray = new boost::scoped_ptr< osl::SolarGuard >[ nSize ];
 }
 
 AutoOGuardArray::~AutoOGuardArray()
@@ -130,7 +130,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
     throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -150,7 +150,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
         ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
 
         // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-        std::auto_ptr< osl::SolarGuard > pMutexGuard2;
+        boost::scoped_ptr< osl::SolarGuard > pMutexGuard2;
         if (pSlave->mpMutex)
             pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) );
 
@@ -164,7 +164,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
     throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -185,7 +185,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
         ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
 
         // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-        std::auto_ptr< osl::SolarGuard > pMutexGuard2;
+        boost::scoped_ptr< osl::SolarGuard > pMutexGuard2;
         if (pSlave->mpMutex)
             pMutexGuard2.reset( new osl::SolarGuard(pSlave->mpMutex) );
 
@@ -225,7 +225,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr
     throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -291,7 +291,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< :
     throw(RuntimeException)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-    std::auto_ptr< osl::SolarGuard > pMutexGuard;
+    boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
     if (mpMutex)
         pMutexGuard.reset( new osl::SolarGuard(mpMutex) );
 
@@ -392,7 +392,7 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin
         ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
 
         // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-        std::auto_ptr< osl::SolarGuard > pMutexGuard;
+        boost::scoped_ptr< osl::SolarGuard > pMutexGuard;
         if (pSlave->mpMutex)
             pMutexGuard.reset( new osl::SolarGuard(pSlave->mpMutex) );
 


More information about the Libreoffice-commits mailing list