summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx (renamed from sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakB.docx)bin13971 -> 13971 bytes
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx (renamed from sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakC.docx)bin13955 -> 13955 bytes
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx (renamed from sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakD.docx)bin21482 -> 21482 bytes
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx (renamed from sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakE.docx)bin14047 -> 14047 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx71
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx70
6 files changed, 71 insertions, 70 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakB.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx
index a7b880d00e60..a7b880d00e60 100755
--- a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakB.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakC.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx
index 52767abb8ce3..52767abb8ce3 100755
--- a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakC.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakD.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx
index 37c752499f08..37c752499f08 100755
--- a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakD.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakE.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx
index ac3eb9f7c7ff..ac3eb9f7c7ff 100755
--- a/sw/qa/extras/ooxmlimport/data/tdf103975_notPageBreakE.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 186f7a8d1eb9..d38a6ff46364 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -259,6 +260,76 @@ DECLARE_OOXMLEXPORT_TEST(testRhbz988516, "rhbz988516.docx")
CPPUNIT_ASSERT_EQUAL( 2, getPages() );
}
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakB, "tdf103975_notPageBreakB.docx")
+{
+ // turn on View Formatting Marks to see these documents.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakC, "tdf103975_notPageBreakC.docx")
+{
+ // turn on View Formatting Marks to see these documents.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakD, "tdf103975_notPageBreakD.docx")
+{
+ // The problem was that the column break was moving outside of the columns, making a page break.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakE, "tdf103975_notPageBreakE.docx")
+{
+ // The problem was that the column break was getting lost.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
+
DECLARE_OOXMLEXPORT_TEST(testTdf103389, "tdf103389.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 90e36f1ef593..dee3ad3d3596 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
@@ -142,75 +141,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf103931, "tdf103931.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xTextSections->getCount());
}
-DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakB, "tdf103975_notPageBreakB.docx")
-{
- // turn on View Formatting Marks to see these documents.
- uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
-
- CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
- CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
- CPPUNIT_ASSERT_EQUAL( 1, getPages() );
-}
-
-DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakC, "tdf103975_notPageBreakC.docx")
-{
- // turn on View Formatting Marks to see these documents.
- uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
-
- xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
- CPPUNIT_ASSERT(xTextSection.is());
- xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
- CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
-
- CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
- CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
- CPPUNIT_ASSERT_EQUAL( 1, getPages() );
-}
-
-DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakD, "tdf103975_notPageBreakD.docx")
-{
- // The problem was that the column break was moving outside of the columns, making a page break.
- CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
- CPPUNIT_ASSERT_EQUAL( 1, getPages() );
-}
-
-DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakE, "tdf103975_notPageBreakE.docx")
-{
- // The problem was that the column break was getting lost.
- CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
-}
-
DECLARE_OOXMLIMPORT_TEST(testN751017, "n751017.docx")
{
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);