summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-30 14:14:38 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-30 14:20:44 +0100
commit8591de009a4fed6264f236bbcafb2accae70754f (patch)
tree226225c1f070ef1a685ec4ebc1b497c8a33fb864
parentee6eadfc617a1ce3bc2b489523ac713b99482404 (diff)
Related: fdo#70624 RTF export: fix crash when header contains a page break
I don't even try to imagine how such a thing can be created and/or how layout should handle that; but it turns out that the ODT bugdoc indeed contains a fo:break-before="page" in the header, and we at least should not crash on it. Fix the problem by simple moving the init of m_pSections before the WritePageDescTable() call. Change-Id: If414e2f6184c58fcfd8b761d3b43fa0fc22d3903
-rw-r--r--sw/qa/core/exportdata/rtf/pass/fdo70624.odtbin0 -> 33100 bytes
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx6
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/core/exportdata/rtf/pass/fdo70624.odt b/sw/qa/core/exportdata/rtf/pass/fdo70624.odt
new file mode 100644
index 000000000000..1b177e81999d
--- /dev/null
+++ b/sw/qa/core/exportdata/rtf/pass/fdo70624.odt
Binary files differ
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 89539ea47c40..5113f931f9a6 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -525,6 +525,9 @@ void RtfExport::ExportDocument_Impl()
// Record changes?
if (nsRedlineMode_t::REDLINE_ON & mnRedlineMode)
Strm() << OOO_STRING_SVTOOLS_RTF_REVISIONS;
+ // Init sections
+ m_pSections = new MSWordSections( *this );
+
// Page description
WritePageDescTable();
@@ -693,9 +696,6 @@ void RtfExport::ExportDocument_Impl()
Strm() << SAL_NEWLINE_STRING;
- // Init sections
- m_pSections = new MSWordSections( *this );
-
WriteMainText();
Strm() << '}';