sw/qa/extras/ooxmlexport/data/empty.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit d74b14892486a401682a2b33cd12812354220e59 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Fri Jul 13 19:20:06 2012 +0200 testcase for the recent fix with (not) exporting default tab stop to style Change-Id: I112fe5d21ad25b7f37c0ebc08ee28e6efebaa960 diff --git a/sw/qa/extras/ooxmlexport/data/empty.odt b/sw/qa/extras/ooxmlexport/data/empty.odt new file mode 100644 index 0000000..ba68860 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/empty.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index e9657dd..96be2a7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -28,6 +28,7 @@ #include "../swmodeltestbase.hxx" #include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/style/TabStop.hpp> #include <com/sun/star/view/XViewSettingsSupplier.hpp> #include <unotools/tempfile.hxx> @@ -38,10 +39,12 @@ class Test : public SwModelTestBase { public: void testZoom(); + void defaultTabStopNotInStyles(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) CPPUNIT_TEST(testZoom); + CPPUNIT_TEST(defaultTabStopNotInStyles); #endif CPPUNIT_TEST_SUITE_END(); @@ -76,6 +79,18 @@ void Test::testZoom() CPPUNIT_ASSERT_EQUAL(sal_Int16(42), nValue); } +void Test::defaultTabStopNotInStyles() +{ + roundtrip( "empty.odt" ); +// The default tab stop was mistakenly exported to a style. +// xray ThisComponent.StyleFamilies(1)(0).ParaTabStop + uno::Reference< container::XNameAccess > paragraphStyles = getStyles( "ParagraphStyles" ); + uno::Reference< beans::XPropertySet > properties( paragraphStyles->getByName( "Standard" ), uno::UNO_QUERY ); + uno::Sequence< style::TabStop > stops; + properties->getPropertyValue( "ParaTabStops" ) >>= stops; + CPPUNIT_ASSERT_EQUAL( 0, stops.getLength()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits