summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtw8nds.cxx
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2022-04-29 11:10:48 +0300
committerMichael Stahl <michael.stahl@allotropia.de>2022-05-12 11:21:14 +0200
commitf2bf1cc2a9a4a09ec16900e91949e1669963c392 (patch)
treef8186a90232712827b1eb373fe260a6e74700178 /sw/source/filter/ww8/wrtw8nds.cxx
parentdff967f47a9bd7b3ff141925585ae9ced2aed01f (diff)
tdf#142840: doc export: use BookmarkToWord() for hyperlinks
Inernal hyperlinks to bookmarks should not contain spaces. This is not required for RTF or DOC: MS Word is okay with spaces there (unlike in DOCX). But since we are replacing spaces in bookmark names we should do this also in links to these bookmarks. Change-Id: I7a3e530817572ed53032c2be1ad96f8e8498bac3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133590 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit d45315c8eb91862958b29ead09cec58e03a80096) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134177 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/filter/ww8/wrtw8nds.cxx')
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 6081ab30af1d..ff23fc6fa9c1 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1028,8 +1028,11 @@ bool WW8AttributeOutput::AnalyzeURL( const OUString& rUrl, const OUString& rTarg
if ( !sURL.isEmpty() )
sURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), sURL );
- if ( bBookMarkOnly )
- sURL = FieldString( ww::eHYPERLINK );
+ if (bBookMarkOnly)
+ {
+ sURL = FieldString(ww::eHYPERLINK);
+ *pMark = BookmarkToWord(*pMark);
+ }
else
sURL = FieldString( ww::eHYPERLINK ) + "\"" + sURL + "\"";