summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-01-04 11:25:41 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-05 09:04:58 +0100
commit94fc02ddbdd5aaef701af9963f74050aed75468d (patch)
treed8d833fdce42988b37ca6aae265bd0d193276dd9 /sw/source
parent9e27e5a73625d56615ab406c3ad3114431b3e507 (diff)
tdf#104707 ooxmlexport: support RawText
fix TODO: docxattributeoutput::RawText The only time RawText is called is in OutEEField, an EE_FEATURE_FIELD, which always seems to be a hyperlink. So, even though it is a very generic sounding function, it is barely used. There are no other "make check" examples using this RawText function, so "proof" documents are limited to the two bug reports that this fixes. Confirmed in Word 2003 that the URL is active after RT. In LibreOffice, the url is not active on import... Change-Id: I6c385057be18ca253ebb2f20454694850a6da41f Reviewed-on: https://gerrit.libreoffice.org/47380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
2 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4c160c5376eb..e4c888e4fb5a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1291,6 +1291,12 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
}
m_pSerializer->mergeTopMarks(Tag_EndRun_1, sax_fastparser::MergeMarks::PREPEND); // merges with "postponed run start", see above
+ if ( !m_sRawText.isEmpty() )
+ {
+ RunText( m_sRawText );
+ m_sRawText.clear();
+ }
+
// write the run start + the run content
m_pSerializer->mergeTopMarks(Tag_StartRun_2); // merges the "actual run start"
// append the actual run end
@@ -2486,9 +2492,11 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pEnd, false );
}
-void DocxAttributeOutput::RawText(const OUString& /*rText*/, rtl_TextEncoding /*eCharSet*/)
+void DocxAttributeOutput::RawText(const OUString& rText, rtl_TextEncoding /*eCharSet*/)
{
- SAL_INFO("sw.ww8", "TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )" );
+ assert (m_pHyperlinkAttrList.is() && "jluth is at mail dot comand wants example documents that use RawText/EEField");
+ if ( m_pHyperlinkAttrList.is() )
+ m_sRawText = rText;
}
void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index c61b8b3ac6d7..7e77ba90648e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -788,6 +788,8 @@ private:
sal_Int32 m_nNextBookmarkId;
sal_Int32 m_nNextAnnotationMarkId;
+ OUString m_sRawText;
+
/// Bookmarks to output
std::vector<OUString> m_rBookmarksStart;
std::vector<OUString> m_rBookmarksEnd;