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

Eike Rathke erack at redhat.com
Thu Jul 16 16:01:12 PDT 2015


 sc/source/ui/docshell/docsh5.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 98b0cd76606935fb03476837f8d44acfab62e249
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jul 17 00:57:18 2015 +0200

    do not reset existing HasHeader on anonymous database range
    
    tdf#88402 related
    
    Change-Id: I401c67da383227496e9d8c2b2ed0671e2a2796f2

diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 050ace4..3ee3d00 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -315,9 +315,6 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
 
 ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
 {
-    bool bHasHeader = aDocument.HasColHeader(
-        rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab());
-
     ScDBCollection* pColl = aDocument.GetDBCollection();
     if (!pColl)
         return NULL;
@@ -326,7 +323,13 @@ ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
     if (!pData)
         return NULL;
 
-    pData->SetHeader(bHasHeader);
+    if (!pData->HasHeader())
+    {
+        bool bHasHeader = aDocument.HasColHeader(
+                rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab());
+        pData->SetHeader(bHasHeader);
+    }
+
     return pData;
 }
 


More information about the Libreoffice-commits mailing list