summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-07-02 10:07:24 +0200
committerLászló Németh <nemeth@numbertext.org>2019-07-03 11:14:57 +0200
commit3cdc1b35b9d86bcfa1277e3e94925ae7b18b8fde (patch)
tree538ae396fc66cd72dbf67dd2fe7ca54c6aaff546 /sc/source/filter
parent4e14253640faa8f3daada78b9462e6cfcd26b072 (diff)
tdf#126177 XLSX export: fix hyperlinks to documents
After export hyperlinks to documents didn't work, because the the hyperlink relationship targets contained also the anchor. Change-Id: I0bfc5bd1ef2b37f769d6a6b97e31c1b4bbfcb9aa Reviewed-on: https://gerrit.libreoffice.org/74988 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/excel/xecontent.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 234c681c59c3..3237ff1fca75 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -445,6 +445,10 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
aXclStrm << sal_uInt16( 0 );
mnFlags |= EXC_HLINK_MARK;
+
+ OUString location = XclXmlUtils::ToOUString(*mxTextMark);
+ if (msTarget.endsWith(location))
+ msTarget = msTarget.copy(0, msTarget.getLength() - location.getLength() - 1);
}
SetRecSize( 32 + mxVarData->Tell() );