diff options
author | Justin Luth <justin.luth@collabora.com> | 2018-06-05 19:30:58 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-27 06:40:26 +0200 |
commit | 62f2a8d44d27ebdb5641c5889f4867427a8134af (patch) | |
tree | 8a8a605c751756f2521044b635991937f97b5795 /sc/qa | |
parent | 28f94acf99d5a7b6caa431447263648913e29b7d (diff) |
tdf#114487 sc htmlimp: non-global sheet range names
Allow multiple file imports, each one having a
non-conflicting range name, by being sheet specific. As
Eike states, "This does *not* mean that they couldn't
be referenced from other sheets. By prefixing the sheet
name it can be used from any other sheet, for example
Sheet2.HTML_1. (This wasn't possible in early versions
with sheet-local names but it has been possible for
a while already)."
In theory, it would previously have been possible to create
a generic sheet with calculations using a range name
that doesn't exist yet, and then importing *any* file
to be analyzed.
In practice that has never been possible
since all names were relative, and imports always
create a new sheet, so the relative name would point
elsewhere. Also, the non-existant name only resolves
after a round-trip of the file, not immediately
upon file import.
So, it is logical to set the imported range names
to be sheet-local instead of global.
Change-Id: I3103f0655b2373bb731c192bb5d2c0757938ee28
Reviewed-on: https://gerrit.libreoffice.org/55349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 5720c85ccea9f1481bd604b806c5be728e59a13f)
Reviewed-on: https://gerrit.libreoffice.org/55648
(cherry picked from commit f62340a104813e4a6a34e7281d86407bc8314ffd)
Reviewed-on: https://gerrit.libreoffice.org/55698
Tested-by: Justin Luth <justin_luth@sil.org>
(cherry picked from commit 399bf0dcd26ed23d2864d60ccba0541d81f48cdc)
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 6e0aac4be3e2..916eea9229c1 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -3339,9 +3339,9 @@ void ScExportTest::testAbsNamedRangeHTML() xDocSh2->DoHardRecalc(); ScDocument& rDoc = xDocSh2->GetDocument(); - ScRangeData* pRangeData = rDoc.GetRangeName()->findByUpperName(OUString("HTML_1")); + ScRangeData* pRangeData = rDoc.GetRangeName(0)->findByUpperName(OUString("HTML_1")); ScSingleRefData* pRef = pRangeData->GetCode()->FirstToken()->GetSingleRef(); - CPPUNIT_ASSERT_MESSAGE("HTML_1 is an absolute reference",!pRef->IsTabRel()); + CPPUNIT_ASSERT_MESSAGE("Sheet1.HTML_1 is an absolute reference",!pRef->IsTabRel()); } void ScExportTest::testSheetLocalRangeNameXLS() |