summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2021-10-19 14:15:37 +0200
committerLászló Németh <nemeth@numbertext.org>2021-11-04 08:58:42 +0100
commit85a86ba6ba34ff0dfc92c3ce38cba86daf547121 (patch)
treebd2fc32a7c88215a9e216ba75e05a267d6e87808 /sc/source
parent61be5d41e80cbce8e382cb468eb340a97bb4f508 (diff)
tdf#145079 XLSX export: fix regression of internal hyperlinks
Hyperlinks with internal named range targets didn't work. Regression from commit 3c3b9ad8886da916027f0fb940a2df822d63d4d7 (tdf#143220 XLSX export: fix hyperlink to sheet target) Note: original test case of the unit test document of tdf#143220 wasn't changed. It's only extended with two new test cases for verifying the fix for the regression. Change-Id: I8128ebb977dba7304bc9c69e45f6c55c71f800cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123816 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/excel/xecontent.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 4baa6c00e9ad..006e3cb2c956 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -438,7 +438,11 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
}
}
else
- aTextMark += "!A1"; // tdf#143220 link to sheet not valid without cell reference
+ {
+ SCTAB nTab;
+ if (rRoot.GetDoc().GetTable(aTextMark, nTab))
+ aTextMark += "!A1"; // tdf#143220 link to sheet not valid without cell reference
+ }
mxTextMark.reset( new XclExpString( aTextMark, XclStrFlags::ForceUnicode, 255 ) );
}