[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source

Eike Rathke erack at redhat.com
Tue May 27 03:44:01 PDT 2014


 sc/source/core/data/document.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 1c567ffed15e2223e91e4e4855ee0a425eea9df6
Author: Eike Rathke <erack at redhat.com>
Date:   Tue May 27 12:31:30 2014 +0200

    resolved rhbz#1101224 do not attempt to obtain names for NULL tabs
    
    This happened when the HTML export via clipboard tried to resolve
    conditional formats, where we have a temporary instance of a document
    containing only the sheet to be exported.
    
    Change-Id: Ic7498a1cab3eabede74773868287a2cc3edef052
    (cherry picked from commit 17979abf4fde202cae231be19a218be3fe27d04c)

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 97c10ca..95894d2 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -268,9 +268,14 @@ std::vector<OUString> ScDocument::GetAllTableNames() const
     TableContainer::const_iterator it = maTabs.begin(), itEnd = maTabs.end();
     for (; it != itEnd; ++it)
     {
+        // Positions need to be preserved for ScCompiler and address convention
+        // context, so still push an empty string for NULL tabs.
         OUString aName;
-        const ScTable& rTab = **it;
-        rTab.GetName(aName);
+        if (*it)
+        {
+            const ScTable& rTab = **it;
+            rTab.GetName(aName);
+        }
         aNames.push_back(aName);
     }
 


More information about the Libreoffice-commits mailing list