summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-01-24 16:24:50 +0300
committerCaolán McNamara <caolanm@redhat.com>2018-01-28 14:33:08 +0100
commitc0fc7910f1bfb7159f6fd7022dfd838bfb66b624 (patch)
tree0c21314c35d1d8b0326324ca5d3d8d3c4b8061b0
parent1ede9f7ff6f2250fa2c75bc4dc099246a59dcec0 (diff)
tdf#104707 ooxmlexport: support RawText in textboxes
Thanks to Caolan, we got some more sample documents from tdf#43431 and tdf#33596 to help flesh this out a bit better. Change-Id: I47cf4b7e2af6854e0da1f8dbdc1e564494ee0e17 Reviewed-on: https://gerrit.libreoffice.org/48511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 03ee052f4053..b0d3060ea8a9 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2492,9 +2492,8 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh
void DocxAttributeOutput::RawText(const OUString& rText, rtl_TextEncoding /*eCharSet*/)
{
- assert (m_pHyperlinkAttrList.is() && "jluth is at mail dot com and wants example documents that use RawText/EEField");
- if ( m_pHyperlinkAttrList.is() )
- m_sRawText = rText;
+ assert ( (m_pHyperlinkAttrList.is() || m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen() /* || m_rExport.SdrExporter().IsDrawingOpen() */) && "jluth is at mail dot com-and wants example documents that use RawText/EEField");
+ m_sRawText = rText;
}
void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby )
@@ -5547,6 +5546,13 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
RunText(aOut);
}
+ if ( !m_sRawText.isEmpty() )
+ {
+ assert (bTextAtr && "jluth is at mail dot com-and is looking for sample documents");
+ RunText( m_sRawText );
+ m_sRawText.clear();
+ }
+
m_pSerializer->endElementNS( XML_w, XML_r );
nAktPos = nNextAttr;