diff options
author | Adam Co <rattles2013@gmail.com> | 2013-07-03 12:28:12 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-04 10:14:03 +0200 |
commit | 7baf286555396416ac30a473dd1e50a878cef011 (patch) | |
tree | 7de2247d86cb1747122c76b9867aa4210c4d9dc2 /sw | |
parent | 0f4348f49b864d13c6381d4d2dc4d1af4ab618fb (diff) |
fdo#66543: fixed line number attribute START VALUE wasnt imported and exported
Change-Id: I09e0356f994f5eb328f741723ac7dbfea51419ed
Reviewed-on: https://gerrit.libreoffice.org/4693
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo66543.docx | bin | 0 -> 16196 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66543.docx b/sw/qa/extras/ooxmlexport/data/fdo66543.docx Binary files differnew file mode 100644 index 000000000000..585eb41e4216 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo66543.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index db12382b32e2..84470813673e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -19,6 +19,7 @@ #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextFramesSupplier.hpp> #include <com/sun/star/text/XTextViewCursorSupplier.hpp> +#include <com/sun/star/text/XTextSection.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/table/BorderLine2.hpp> @@ -85,6 +86,7 @@ public: void testFdo64238_b(); void testFdo56679(); void testFdo65400(); + void testFdo66543(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -144,6 +146,7 @@ void Test::run() {"fdo64238_b.docx", &Test::testFdo64238_b}, {"fdo56679.docx", &Test::testFdo56679}, {"fdo65400.docx", &Test::testFdo65400}, + {"fdo66543.docx", &Test::testFdo66543}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -878,6 +881,15 @@ void Test::testFdo65400() CPPUNIT_ASSERT_EQUAL( sal_Int32( 0xd8d8d8 ), getProperty< sal_Int32 >( shaded, "CharBackColor" )); } +void Test::testFdo66543() +{ + // The problem was that when importing DOCX with 'line numbers' - the 'start value' was imported + // but nothing was done with it. + + uno::Reference< text::XTextRange > paragraph1 = getParagraph( 1 ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 1 ), getProperty< sal_Int32 >( paragraph1, "ParaLineNumberStartValue" )); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |