[Libreoffice-commits] .: sw/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 15 07:41:53 PST 2013
sw/qa/extras/ooxmlexport/data/1-table-1-page.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 15 +++++++++++++++
2 files changed, 15 insertions(+)
New commits:
commit 57ca766ab44e0d55ce21ee734aa0aafbff94eb45
Author: Pierre-Eric Pelloux-Prayer <pierre-eric at lanedo.com>
Date: Fri Jan 11 14:39:13 2013 +0100
docx export: add test case for paragraph mark export
Change-Id: I2701ee12221460f8ff19397ea215cc1484648d18
Reviewed-on: https://gerrit.libreoffice.org/1650
Reviewed-by: Noel Power <noel.power at suse.com>
Tested-by: Noel Power <noel.power at suse.com>
diff --git a/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx
new file mode 100755
index 0000000..d821c66
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0f99cf5..8d14409 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
#include <unotools/tempfile.hxx>
#include <swmodeltestbase.hxx>
@@ -66,6 +67,7 @@ public:
void testTableBorders();
void testFdo51550();
void testN789482();
+ void test1Table1Page();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -104,6 +106,7 @@ void Test::run()
{"table-borders.docx", &Test::testTableBorders},
{"fdo51550.odt", &Test::testFdo51550},
{"n789482.docx", &Test::testN789482},
+ {"1-table-1-page.docx", &Test::test1Table1Page},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -494,6 +497,18 @@ void Test::testN789482()
getRun(xParagraph, 5, " After.");
}
+void Test::test1Table1Page()
+{
+ // 2 problem for this document after export:
+ // - invalid sectPr inserted at the beginning of the page
+ // - font of empty cell is not preserved, leading to change in rows height
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+ xCursor->jumpToLastPage();
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list