[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/qa sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 15 12:59:11 UTC 2018


 sc/qa/unit/subsequent_export-test.cxx |    5 +++--
 sc/source/filter/html/htmlimp.cxx     |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8b2b2010f98e4e5997b3d4ecb83a1c5b0c9e49ab
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Thu Aug 9 15:04:20 2018 +0300
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Wed Aug 15 14:58:49 2018 +0200

    tdf#119141 Revert "sc htmlimp: non-global sheet range names"
    
    This reverts commit 5720c85ccea9f1481bd604b806c5be728e59a13f,
    which was made in response to the suggestion in
    comment 6 of bug 114487 and backported to 6.0.6.
    
    But ScAreaLink::FindExtRange doesn't bother to search the
    local rangenames, and the Links to External Files dialog also
    doesn't give non-global variables as options.
    
    Since this was just a "logical" change, simply revert it
    to repair the regression. Any attempt to support local rangenames
    is something bigger that isn't appropriate for backport to stable.
    
    Change-Id: I8bd4dcc6492da2712e13b2e54cf81609cdc5936e
    Reviewed-on: https://gerrit.libreoffice.org/58761
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Tested-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 1597dbb5ba5d68b5807236c1d045f5215f221c91)
    Reviewed-on: https://gerrit.libreoffice.org/59065
    Tested-by: Jenkins

diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 168dc7f572d2..1444ebd39b5a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3318,9 +3318,10 @@ void ScExportTest::testAbsNamedRangeHTML()
     xDocSh2->DoHardRecalc();
 
     ScDocument& rDoc = xDocSh2->GetDocument();
-    ScRangeData* pRangeData = rDoc.GetRangeName(0)->findByUpperName(OUString("HTML_1"));
+    ScRangeData* pRangeData = rDoc.GetRangeName()->findByUpperName(OUString("HTML_1"));
     ScSingleRefData* pRef = pRangeData->GetCode()->FirstToken()->GetSingleRef();
-    CPPUNIT_ASSERT_MESSAGE("Sheet1.HTML_1 is an absolute reference",!pRef->IsTabRel());
+    // see tdf#119141 for the reason why this isn't Sheet1.HTML_1
+    CPPUNIT_ASSERT_MESSAGE("HTML_1 is an absolute reference",!pRef->IsTabRel());
 }
 
 void ScExportTest::testSheetLocalRangeNameXLS()
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index a4d79d21ae14..f601903bfde9 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const OUString& rName, con
     ScTokenArray aTokArray;
     aTokArray.AddDoubleReference( aRefData );
     ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray );
-    pDoc->GetRangeName( rRange.aStart.Tab() )->insert( pRangeData );
+    pDoc->GetRangeName()->insert( pRangeData );
 }
 
 void ScHTMLImport::WriteToDocument(


More information about the Libreoffice-commits mailing list