Kaydet (Commit) 1597dbb5 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Eike Rathke

tdf#119141 Revert "sc htmlimp: non-global sheet range names"

This reverts commit 5720c85c,
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/58761Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Tested-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 18e20676
...@@ -3343,9 +3343,10 @@ void ScExportTest::testAbsNamedRangeHTML() ...@@ -3343,9 +3343,10 @@ void ScExportTest::testAbsNamedRangeHTML()
xDocSh2->DoHardRecalc(); xDocSh2->DoHardRecalc();
ScDocument& rDoc = xDocSh2->GetDocument(); 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(); 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() void ScExportTest::testSheetLocalRangeNameXLS()
......
...@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const OUString& rName, con ...@@ -107,7 +107,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const OUString& rName, con
ScTokenArray aTokArray; ScTokenArray aTokArray;
aTokArray.AddDoubleReference( aRefData ); aTokArray.AddDoubleReference( aRefData );
ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray ); ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray );
pDoc->GetRangeName( rRange.aStart.Tab() )->insert( pRangeData ); pDoc->GetRangeName()->insert( pRangeData );
} }
void ScHTMLImport::WriteToDocument( void ScHTMLImport::WriteToDocument(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment