diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-26 11:05:04 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-08-26 19:32:50 +0000 |
commit | dbce1c855a9a8a61f1636b1e37bd83e176eb8e2a (patch) | |
tree | 1b1d59990d1a7e6deef3412531e79c909892a620 /filter | |
parent | 4760c79afe37eaa95a93f3e8ad0a2775c86359dd (diff) |
bnc#834035 DOCX export: fix hyperlinks of illustration index
We used to export raw Writer bookmarks, but that's not valid in OOXML.
Instead, it has normal bookmarks around the sequence fields, so use them
if they are available.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
(cherry picked from commits 750f0ebf97d19d1cf305dabe72d52ad6e90adf70,
e9275c08acc2f4f1c925f78b56a1089515cd9a37 and
8f146a8042dd8f3c88f39f8317372cd9c02ce4ad)
Change-Id: I0ef2ff7967c2802b53752c9505ef6db4cc2b8265
Reviewed-on: https://gerrit.libreoffice.org/5635
Reviewed-by: Jan Holesovsky <kendy@suse.cz>
Tested-by: Jan Holesovsky <kendy@suse.cz>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/util.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index bf612c33c169..a10e4381d510 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -427,6 +427,25 @@ const ApiPaperSize& PaperSizeConv::getApiSizeForMSPaperSizeIndex( sal_Int32 nMSO return spPaperSizeTable[ nMSOPaperIndex ]; } +OUString findQuotedText( const OUString& rCommand, + const sal_Char* cStartQuote, const sal_Unicode uEndQuote ) +{ + OUString sRet; + OUString sStartQuote( OUString::createFromAscii(cStartQuote) ); + sal_Int32 nStartIndex = rCommand.indexOf( sStartQuote ); + if( nStartIndex >= 0 ) + { + sal_Int32 nStartLength = sStartQuote.getLength(); + sal_Int32 nEndIndex = rCommand.indexOf( uEndQuote, nStartIndex + nStartLength); + if( nEndIndex > nStartIndex ) + { + sRet = rCommand.copy( nStartIndex + nStartLength, nEndIndex - nStartIndex - nStartLength); + } + } + return sRet; + +} + } } |