summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-01 15:06:25 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-01 15:13:50 +0200
commit738d5dab435084737aab2e0519fd817f62f1e83b (patch)
tree8bb157bcf4d8a6ce26577c4b0cdb6db038832a39 /sw
parent40d93d978d4f8fa709bdeb061b106122789d8e32 (diff)
n#782345 testcase
Change-Id: Id5204572ab9fddf3f15b5fd1b96d8f25e7166878
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n782345.docxbin0 -> 12607 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n782345.docx b/sw/qa/extras/ooxmlimport/data/n782345.docx
new file mode 100644
index 000000000000..f25709fedf4f
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n782345.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index a83a398ff593..c545a898df45 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/text/XTextFrame.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
@@ -97,6 +98,7 @@ public:
void testN780843();
void testShadow();
void testN782061();
+ void testN782345();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -140,6 +142,7 @@ public:
CPPUNIT_TEST(testN780843);
CPPUNIT_TEST(testShadow);
CPPUNIT_TEST(testN782061);
+ CPPUNIT_TEST(testN782345);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -993,6 +996,16 @@ void Test::testN782061()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-9), getProperty<sal_Int32>(getRun(getParagraph(1), 2), "CharEscapement"));
}
+void Test::testN782345()
+{
+ /*
+ * The problem was that the page break was inserted before the 3rd para, instead of before the 2nd para.
+ */
+ load("n782345.docx");
+
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();