Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1650

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/50/1650/1

docx export: add test case for paragraph mark export

Change-Id: I2701ee12221460f8ff19397ea215cc1484648d18
---
A sw/qa/extras/ooxmlexport/data/1-table-1-page.docx
M sw/qa/extras/ooxmlexport/ooxmlexport.cxx
2 files changed, 15 insertions(+), 0 deletions(-)



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..07d91ae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx
Binary files 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 @@
     void testTableBorders();
     void testFdo51550();
     void testN789482();
+    void test1Table1Page();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -104,6 +106,7 @@
         {"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 @@
     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();

-- 
To view, visit https://gerrit.libreoffice.org/1650
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2701ee12221460f8ff19397ea215cc1484648d18
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.