summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVinaya Mandke <vinaya.mandke@synerzip.com>2013-12-05 18:22:56 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-09 08:50:52 +0100
commit0c61ffc15ecd8122cb9102d2591561e1d4e37327 (patch)
tree1547707e02c6afc321af6c71ff27dbd5280fa931 /sw
parent496ae60435db1c7b508cbdf85bd5cc00c351cf88 (diff)
Fix for Column Break if it appears in w:r which is not the first run.
Explicitly ended paragraph when the column break appears in a run (which is not the first run in the paragraph), as Writer adds a column break only for new paragraph. Also the created paragraph must have the same para properties as the earlier one. Hence avoided pushing new para properties if paragraph is split to adjust a col break. Added UT for the same. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/6953 Change-Id: If7d503b7a4bfab31f40ceb0119876e5909252b2f
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/columnbreak.docxbin0 -> 12703 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/columnbreak.docx b/sw/qa/extras/ooxmlexport/data/columnbreak.docx
new file mode 100644
index 000000000000..f55780e896c1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/columnbreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index aea310f8ba63..c4efcfda32d8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
-
+#include <com/sun/star/style/BreakType.hpp>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <rtl/strbuf.hxx>
@@ -2084,6 +2084,15 @@ DECLARE_OOXMLEXPORT_TEST(testExtraSectionBreak, "1_page.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
}
+DECLARE_OOXMLEXPORT_TEST(testcolumnbreak, "columnbreak.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(5, "This is first line after col brk."), "BreakType"));
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r[1]/w:br", "type", "column");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();