[Libreoffice-commits] core.git: 2 commits - sc/source unotools/source

Noel Grandin noel at peralex.com
Mon Jul 14 05:49:40 PDT 2014


 sc/source/filter/oox/formulaparser.cxx          |    8 ++++++++
 unotools/source/config/configvaluecontainer.cxx |   10 ++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit c72498d7adb1345aeed9df3398b0007549e6e0da
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 14 14:12:31 2014 +0200

    Revert "loplugin:unreffun"
    
    This reverts commit e3246e806cad5f9d2c05c3408adc3019da5a575d.
    Which was a mistake.

diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index 1e63e9d..41331fb 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -472,6 +472,7 @@ protected:
     size_t              appendWhiteSpaceTokens( const WhiteSpaceVec* pSpaces );
     size_t              insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces, size_t nIndexFromEnd );
 
+    size_t              getOperandSize( size_t nOpCountFromEnd, size_t nOpIndex ) const;
     void                pushOperandSize( size_t nSize );
     size_t              popOperandSize();
 
@@ -724,6 +725,13 @@ size_t FormulaParserImpl::insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces,
     return pSpaces ? pSpaces->size() : 0;
 }
 
+size_t FormulaParserImpl::getOperandSize( size_t nOpCountFromEnd, size_t nOpIndex ) const
+{
+    OSL_ENSURE( (nOpIndex < nOpCountFromEnd) && (nOpCountFromEnd <= maOperandSizeStack.size()),
+        "FormulaParserImpl::getOperandSize - invalid parameters" );
+    return maOperandSizeStack[ maOperandSizeStack.size() - nOpCountFromEnd + nOpIndex ];
+}
+
 void FormulaParserImpl::pushOperandSize( size_t nSize )
 {
     maOperandSizeStack.push_back( nSize );
commit c29338e6e13e6f9d1b78280d8af9a92c781eb8bd
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 14 13:40:03 2014 +0200

    revert bad fix
    
    partially revert my commit 34cabe837dbb78 "loplugin:unreffun"
    
    Change-Id: Idbfc9d1e43180c7c14e58c7b9417f3001d9805d4

diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx
index 3c526e9..99a2e97 100644
--- a/unotools/source/config/configvaluecontainer.cxx
+++ b/unotools/source/config/configvaluecontainer.cxx
@@ -57,10 +57,13 @@ namespace utl
 
         void bind( void* _pLocation, const Type& _rType );
 
+        bool                    isBound( ) const        { return ( ltUnbound != eLocationType ) && ( NULL != pLocation ); }
         const OUString&  getPath( ) const        { return sRelativePath; }
         LocationType            getLocType( ) const     { return eLocationType; }
         void*                   getLocation( ) const    { return pLocation; }
         const Type&             getDataType( ) const    { return aDataType; }
+
+        bool operator == ( const NodeValueAccessor& rhs ) const;
     };
 
     NodeValueAccessor::NodeValueAccessor( const OUString& _rNodePath )
@@ -70,6 +73,13 @@ namespace utl
     {
     }
 
+    bool NodeValueAccessor::operator == ( const NodeValueAccessor& rhs ) const
+    {
+        return  (   sRelativePath   ==  rhs.sRelativePath   )
+            &&  (   eLocationType   ==  rhs.eLocationType   )
+            &&  (   pLocation       ==  rhs.pLocation       );
+    }
+
     void NodeValueAccessor::bind( void* _pLocation, const Type& _rType )
     {
         DBG_ASSERT( !isBound(), "NodeValueAccessor::bind: already bound!" );


More information about the Libreoffice-commits mailing list