From dbce1c855a9a8a61f1636b1e37bd83e176eb8e2a Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 26 Aug 2013 11:05:04 +0200 Subject: 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 Tested-by: Jan Holesovsky --- filter/source/msfilter/util.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'filter') 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; + +} + } } -- cgit