[Libreoffice-commits] .: sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Mon Jul 25 03:08:04 PDT 2011
sw/source/filter/ww8/rtfattributeoutput.cxx | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit bcc8fe1b7fd77af60f1c077ea65102ca73b446c4
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon Jul 25 12:02:11 2011 +0200
RTF: emit row properties at the end of the row as well
The spec suggests this, but the old parser can't cope with it, so enable
it only when the new parser is active.
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5c52d4c..b451bd9 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -92,6 +92,7 @@
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
#include <filter/msfilter/msoleexp.hxx>
+#include <svtools/miscopt.hxx>
#include <docufld.hxx>
#include <flddropdown.hxx>
@@ -926,6 +927,19 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
TableDefinition(pTableTextNodeInfoInner);
+ SvtMiscOptions aMiscOptions;
+ if (aMiscOptions.IsExperimentalMode())
+ {
+ m_aTables.push_back(m_aRowDefs.toString());
+ // Emit row properties at the start of the row as well for non-nested
+ // tables, to support old readers.
+ if ( nCurrentDepth <= 1 )
+ m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
+ m_aRowDefs.setLength(0);
+ return;
+ }
+ else
+ {
if (!m_bLastTable)
m_aTables.push_back(m_aRowDefs.makeStringAndClear());
@@ -933,6 +947,7 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
if ( nCurrentDepth > 1 )
return;
m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
+ }
}
void RtfAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
More information about the Libreoffice-commits
mailing list