[Libreoffice-commits] core.git: sw/source
Justin Luth
justin_luth at sil.org
Sun Jan 28 13:33:29 UTC 2018
sw/source/filter/ww8/docxattributeoutput.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit c0fc7910f1bfb7159f6fd7022dfd838bfb66b624
Author: Justin Luth <justin_luth at sil.org>
Date: Wed Jan 24 16:24:50 2018 +0300
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 at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list