summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2014-02-03 18:55:13 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-13 15:18:43 +0100
commit78c5cbc720993e9cc01fceadd73678ed1a45d37f (patch)
tree08a0c10953b2ad0ba0e1b8d608e6e24137a40832
parent1b2da3df5449f5bc517418cc632157780984e275 (diff)
fdo#74153 : Preservation of Column Break with column_count = 0
Issue : 1] DOCX containing column break with column_count = 0 was not getting preserved after RT. 2] LO was writing column break only when column_count > 1 Implementation : 1] Removed check column_count > 1. So that if LO encounters a column break with column_count >=0, it should preserve it. 2] Added export Unit Test case. Behavior after Fix : LO is able to preserve Column Break with column_count = 0. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7815 Change-Id: I29c77f27184ec5afed354be01fc68e0d3471bfee
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74153.docxbin0 -> 11506 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx5
3 files changed, 12 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74153.docx b/sw/qa/extras/ooxmlexport/data/fdo74153.docx
new file mode 100644
index 000000000000..4cbdd7bba94e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74153.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 021c8d270770..e4789edc39fa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3027,6 +3027,17 @@ DECLARE_OOXMLEXPORT_TEST(testFdo74110,"fdo74110.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]",0);
}
+DECLARE_OOXMLEXPORT_TEST(testColumnBreak_ColumnCountIsZero,"fdo74153.docx")
+{
+ /* fdo73545: Column Break with Column_count = 0 was not getting preserved.
+ * The <w:br w:type="column" /> was missing after roundtrip
+ */
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:br","type","column");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index fb261f989bb7..a6f711e94227 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3627,10 +3627,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
// no break;
case SVX_BREAK_COLUMN_AFTER:
case SVX_BREAK_COLUMN_BOTH:
- if ( GetExport().Sections().CurrentNumberOfColumns( *GetExport().pDoc ) > 1 )
- {
- nC = msword::ColumnBreak;
- }
+ nC = msword::ColumnBreak;
break;
case SVX_BREAK_PAGE_BEFORE: // PageBreak