[Libreoffice-commits] .: comphelper/inc o3tl/inc oox/inc sc/inc sc/source sfx2/inc slideshow/source

Matus Kukan mkukan at kemper.freedesktop.org
Thu Sep 29 04:22:58 PDT 2011


 comphelper/inc/comphelper/InlineContainer.hxx |    2 +-
 o3tl/inc/o3tl/lazy_update.hxx                 |    6 +++---
 oox/inc/oox/drawingml/chart/modelbase.hxx     |    8 ++++----
 sc/inc/compressedarray.hxx                    |    8 ++++----
 sc/source/core/data/compressedarray.cxx       |   26 +++++++++++++-------------
 sfx2/inc/sfx2/controlwrapper.hxx              |    8 ++++----
 slideshow/source/inc/tools.hxx                |   17 +++++++++--------
 7 files changed, 38 insertions(+), 37 deletions(-)

New commits:
commit 8de6948e4f67b65d0320f7ec08ab9ad8328b2411
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Thu Sep 29 13:11:26 2011 +0200

    fix trunk gcc compile errors

diff --git a/comphelper/inc/comphelper/InlineContainer.hxx b/comphelper/inc/comphelper/InlineContainer.hxx
index 13ae8a5..c7da02f 100644
--- a/comphelper/inc/comphelper/InlineContainer.hxx
+++ b/comphelper/inc/comphelper/InlineContainer.hxx
@@ -100,7 +100,7 @@ public:
     explicit MakeSet(const T &a)
         : ::std::set< T >()
     {
-        insert(this->end(), a);
+        this->insert(this->end(), a);
     }
     MakeSet &operator()(const T &a)
     {
diff --git a/o3tl/inc/o3tl/lazy_update.hxx b/o3tl/inc/o3tl/lazy_update.hxx
index 08c7b12..5bae545 100644
--- a/o3tl/inc/o3tl/lazy_update.hxx
+++ b/o3tl/inc/o3tl/lazy_update.hxx
@@ -102,13 +102,13 @@ output( myValue.getOutValue() );
 
             void               setInValue( input_type const& rIn ) { Functor::m_bCacheDirty = true; m_aInput = rIn; }
             input_type const&  getInValue()  const                 { return m_aInput; }
-            output_type const& getOutValue() const                 { return implUpdateValue(m_aInput); }
+            output_type const& getOutValue() const                 { return this->implUpdateValue(m_aInput); }
 
             input_type& operator*()  { Functor::m_bCacheDirty = true; return m_aInput;  }
             input_type* operator->() { Functor::m_bCacheDirty = true; return &m_aInput; }
 
-            output_type const& operator*() const  { return implUpdateValue(m_aInput);  }
-            output_type const* operator->() const { return &implUpdateValue(m_aInput); }
+            output_type const& operator*() const  { return this->implUpdateValue(m_aInput);  }
+            output_type const* operator->() const { return &(this->implUpdateValue(m_aInput)); }
 
         private:
             input_type m_aInput;
diff --git a/oox/inc/oox/drawingml/chart/modelbase.hxx b/oox/inc/oox/drawingml/chart/modelbase.hxx
index a91b52c..206ee6b 100644
--- a/oox/inc/oox/drawingml/chart/modelbase.hxx
+++ b/oox/inc/oox/drawingml/chart/modelbase.hxx
@@ -51,13 +51,13 @@ public:
 
     inline bool         is() const { return this->get() != 0; }
 
-    inline ModelType&   create() { reset( new ModelType ); return **this; }
+    inline ModelType&   create() { this->reset( new ModelType ); return **this; }
     template< typename Param1Type >
-    inline ModelType&   create( const Param1Type& rParam1 ) { reset( new ModelType( rParam1 ) ); return **this; }
+    inline ModelType&   create( const Param1Type& rParam1 ) { this->reset( new ModelType( rParam1 ) ); return **this; }
 
-    inline ModelType&   getOrCreate() { if( !*this ) reset( new ModelType ); return **this; }
+    inline ModelType&   getOrCreate() { if( !*this ) this->reset( new ModelType ); return **this; }
     template< typename Param1Type >
-    inline ModelType&   getOrCreate( const Param1Type& rParam1 ) { if( !*this ) reset( new ModelType( rParam1 ) ); return **this; }
+    inline ModelType&   getOrCreate( const Param1Type& rParam1 ) { if( !*this ) this->reset( new ModelType( rParam1 ) ); return **this; }
 };
 
 // ============================================================================
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index c07eb43..3d1ea6d 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -397,18 +397,18 @@ public:
 template< typename A, typename D >
 void ScBitMaskCompressedArray<A,D>::AndValue( A nPos, const D& rValueToAnd )
 {
-    const D& rValue = GetValue( nPos);
+    const D& rValue = this->GetValue( nPos);
     if ((rValue & rValueToAnd) != rValue)
-        SetValue( nPos, rValue & rValueToAnd);
+        this->SetValue( nPos, rValue & rValueToAnd);
 }
 
 
 template< typename A, typename D >
 void ScBitMaskCompressedArray<A,D>::OrValue( A nPos, const D& rValueToOr )
 {
-    const D& rValue = GetValue( nPos);
+    const D& rValue = this->GetValue( nPos);
     if ((rValue | rValueToOr) != rValue)
-        SetValue( nPos, rValue | rValueToOr);
+        this->SetValue( nPos, rValue | rValueToOr);
 }
 
 
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 89abf3b..838280f 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -160,7 +160,7 @@ void ScCompressedArray<A,D>::SetValue( A nStart, A nEnd, const D& rValue )
             if (nStart > 0)
             {
                 // skip leading
-                ni = Search( nStart);
+                ni = this->Search( nStart);
 
                 nInsert = nMaxAccess+1;
                 if (!(pData[ni].aValue == aNewVal))
@@ -269,7 +269,7 @@ void ScCompressedArray<A,D>::CopyFrom( const ScCompressedArray<A,D>& rArray, A n
         nRegionEnd -= nSourceDy;
         if (nRegionEnd > nEnd)
             nRegionEnd = nEnd;
-        SetValue( j, nRegionEnd, rValue);
+        this->SetValue( j, nRegionEnd, rValue);
         j = nRegionEnd;
     }
 }
@@ -278,7 +278,7 @@ void ScCompressedArray<A,D>::CopyFrom( const ScCompressedArray<A,D>& rArray, A n
 template< typename A, typename D >
 const D& ScCompressedArray<A,D>::Insert( A nStart, size_t nAccessCount )
 {
-    size_t nIndex = Search( nStart);
+    size_t nIndex = this->Search( nStart);
     // No real insertion is needed, simply extend the one entry and adapt all
     // following. In case nStart points to the start row of an entry, extend
     // the previous entry (inserting before nStart).
@@ -302,10 +302,10 @@ template< typename A, typename D >
 void ScCompressedArray<A,D>::Remove( A nStart, size_t nAccessCount )
 {
     A nEnd = nStart + nAccessCount - 1;
-    size_t nIndex = Search( nStart);
+    size_t nIndex = this->Search( nStart);
     // equalize/combine/remove all entries in between
     if (nEnd > pData[nIndex].nEnd)
-        SetValue( nStart, nEnd, pData[nIndex].aValue);
+        this->SetValue( nStart, nEnd, pData[nIndex].aValue);
     // remove an exactly matching entry by shifting up all following by one
     if ((nStart == 0 || (nIndex > 0 && nStart == pData[nIndex-1].nEnd+1)) &&
             pData[nIndex].nEnd == nEnd && nIndex < nCount-1)
@@ -344,17 +344,17 @@ void ScBitMaskCompressedArray<A,D>::AndValue( A nStart, A nEnd,
     if (nStart > nEnd)
         return;
 
-    size_t nIndex = Search( nStart);
+    size_t nIndex = this->Search( nStart);
     do
     {
         if ((this->pData[nIndex].aValue & rValueToAnd) != this->pData[nIndex].aValue)
         {
             A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart);
             A nE = ::std::min( this->pData[nIndex].nEnd, nEnd);
-            SetValue( nS, nE, this->pData[nIndex].aValue & rValueToAnd);
+            this->SetValue( nS, nE, this->pData[nIndex].aValue & rValueToAnd);
             if (nE >= nEnd)
                 break;  // while
-            nIndex = Search( nE + 1);
+            nIndex = this->Search( nE + 1);
         }
         else if (this->pData[nIndex].nEnd >= nEnd)
             break;  // while
@@ -371,17 +371,17 @@ void ScBitMaskCompressedArray<A,D>::OrValue( A nStart, A nEnd,
     if (nStart > nEnd)
         return;
 
-    size_t nIndex = Search( nStart);
+    size_t nIndex = this->Search( nStart);
     do
     {
         if ((this->pData[nIndex].aValue | rValueToOr) != this->pData[nIndex].aValue)
         {
             A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart);
             A nE = ::std::min( this->pData[nIndex].nEnd, nEnd);
-            SetValue( nS, nE, this->pData[nIndex].aValue | rValueToOr);
+            this->SetValue( nS, nE, this->pData[nIndex].aValue | rValueToOr);
             if (nE >= nEnd)
                 break;  // while
-            nIndex = Search( nE + 1);
+            nIndex = this->Search( nE + 1);
         }
         else if (this->pData[nIndex].nEnd >= nEnd)
             break;  // while
@@ -406,7 +406,7 @@ void ScBitMaskCompressedArray<A,D>::CopyFromAnded(
         nRegionEnd -= nSourceDy;
         if (nRegionEnd > nEnd)
             nRegionEnd = nEnd;
-        SetValue( j, nRegionEnd, rValue & rValueToAnd);
+        this->SetValue( j, nRegionEnd, rValue & rValueToAnd);
         j = nRegionEnd;
     }
 }
@@ -415,7 +415,7 @@ template< typename A, typename D >
 A ScBitMaskCompressedArray<A,D>::GetFirstForCondition( A nStart, A nEnd,
         const D& rBitMask, const D& rMaskedCompare ) const
 {
-    size_t nIndex = Search( nStart);
+    size_t nIndex = this->Search( nStart);
     do
     {
         if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
diff --git a/sfx2/inc/sfx2/controlwrapper.hxx b/sfx2/inc/sfx2/controlwrapper.hxx
index 21210d4..850aae1 100644
--- a/sfx2/inc/sfx2/controlwrapper.hxx
+++ b/sfx2/inc/sfx2/controlwrapper.hxx
@@ -616,13 +616,13 @@ void MetricFieldWrapper< ValueT >::SetControlValue( ValueT nValue )
 template< typename ValueT >
 ValueT ListBoxWrapper< ValueT >::GetControlValue() const
 {
-    return GetValueFromPos( this->GetControl().GetSelectEntryPos() );
+    return this->GetValueFromPos( this->GetControl().GetSelectEntryPos() );
 }
 
 template< typename ValueT >
 void ListBoxWrapper< ValueT >::SetControlValue( ValueT nValue )
 {
-    sal_uInt16 nPos = GetPosFromValue( nValue );
+    sal_uInt16 nPos = this->GetPosFromValue( nValue );
     if( nPos != this->GetNotFoundPos() )
         this->GetControl().SelectEntryPos( nPos );
 }
@@ -632,13 +632,13 @@ void ListBoxWrapper< ValueT >::SetControlValue( ValueT nValue )
 template< typename ValueT >
 ValueT ValueSetWrapper< ValueT >::GetControlValue() const
 {
-    return GetValueFromPos( this->GetControl().GetSelectItemId() );
+    return this->GetValueFromPos( this->GetControl().GetSelectItemId() );
 }
 
 template< typename ValueT >
 void ValueSetWrapper< ValueT >::SetControlValue( ValueT nValue )
 {
-    sal_uInt16 nPos = GetPosFromValue( nValue );
+    sal_uInt16 nPos = this->GetPosFromValue( nValue );
     if( nPos != this->GetNotFoundPos() )
         this->GetControl().SelectItem( nPos );
 }
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index 0293fb8..ad3e79a 100644
--- a/slideshow/source/inc/tools.hxx
+++ b/slideshow/source/inc/tools.hxx
@@ -78,13 +78,6 @@ namespace slideshow
 
         // xxx todo: remove with boost::hash when 1.33 is available
         template <typename T>
-        struct hash : ::std::unary_function<T, ::std::size_t>
-        {
-            ::std::size_t operator()( T const& val ) const {
-                return hash_value(val);
-            }
-        };
-        template <typename T>
         inline ::std::size_t hash_value( T * const& p )
         {
             ::std::size_t d = static_cast< ::std::size_t >(
@@ -103,9 +96,17 @@ namespace slideshow
             ::com::sun::star::uno::Reference<
                   ::com::sun::star::uno::XInterface> const xRoot(
                       x, ::com::sun::star::uno::UNO_QUERY );
-            return hash<void *>()(xRoot.get());
+            return ::std::hash<void *>()(xRoot.get());
         }
 
+        template <typename T>
+        struct hash : ::std::unary_function<T, ::std::size_t>
+        {
+            ::std::size_t operator()( T const& val ) const {
+                return hash_value(val);
+            }
+        };
+
         /** Cycle mode of intrinsic animations
          */
         enum CycleMode


More information about the Libreoffice-commits mailing list