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

Eike Rathke erack at redhat.com
Sun Dec 17 13:34:52 UTC 2017


 include/svx/galtheme.hxx                    |    4 ++--
 sc/source/core/data/grouptokenconverter.cxx |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit ecac94f3a6872538c19827603b52f1ed7e671a4c
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Dec 16 22:52:09 2017 +0100

    Type svIndex does not necessarily mean range name, tdf#114251 related
    
    Change-Id: I5e7930b7f93ee44fb0d6b4c86f261afde8ed2ccc
    Reviewed-on: https://gerrit.libreoffice.org/46615
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index f13daaf0384a..c0818287cf33 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -241,6 +241,13 @@ bool ScGroupTokenConverter::convert( const ScTokenArray& rCode, sc::FormulaLogge
             break;
             case svIndex:
             {
+                if (p->GetOpCode() != ocName)
+                {
+                    // May be DB-range or TableRef
+                    mrGroupTokens.AddToken(*p);
+                    break;
+                }
+
                 // Named range.
                 ScRangeName* pNames = mrDoc.GetRangeName();
                 if (!pNames)
commit 455f2af8938904c2a6d196a9eb5dd59adda43ceb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 16 16:21:49 2017 +0000

    coverity#1426163 Improper use of negative value
    
    Change-Id: I2c9fea13981ac9c429d55461869b22097cc1b330
    Reviewed-on: https://gerrit.libreoffice.org/46604
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 4089dcdba47f..903ed7e451bf 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -94,10 +94,10 @@ private:
     SAL_DLLPRIVATE bool         ImplWriteSgaObject( const SgaObject& rObj, sal_Int32 nPos, GalleryObject* pExistentEntry );
     SAL_DLLPRIVATE void         ImplWrite();
     SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject( sal_Int32 nPos ) const
-                                { return ( nPos < sal_Int32(aObjectList.size()) ) ? aObjectList[ nPos ] : nullptr; }
+                                { return ( nPos >= 0 && nPos < sal_Int32(aObjectList.size()) ) ? aObjectList[nPos] : nullptr; }
     const GalleryObject*        ImplGetGalleryObject( const INetURLObject& rURL );
 
-    SAL_DLLPRIVATE sal_Int32       ImplGetGalleryObjectPos( const GalleryObject* pObj ) const
+    SAL_DLLPRIVATE sal_Int32    ImplGetGalleryObjectPos( const GalleryObject* pObj ) const
                                 {
                                     for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
                                         if ( pObj == aObjectList[ i ] )


More information about the Libreoffice-commits mailing list