diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/CppunitTest_sw_ooxmlexport14.mk | 14 | ||||
-rw-r--r-- | sw/Module_sw.mk | 1 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx | bin | 0 -> 7502 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 45 |
4 files changed, 60 insertions, 0 deletions
diff --git a/sw/CppunitTest_sw_ooxmlexport14.mk b/sw/CppunitTest_sw_ooxmlexport14.mk new file mode 100644 index 000000000000..b582b317c064 --- /dev/null +++ b/sw/CppunitTest_sw_ooxmlexport14.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#************************************************************************* + +$(eval $(call sw_ooxmlexport_test,14)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index f72ce87f6653..b16a4aea6e16 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -79,6 +79,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_ooxmlexport11 \ CppunitTest_sw_ooxmlexport12 \ CppunitTest_sw_ooxmlexport13 \ + CppunitTest_sw_ooxmlexport14 \ CppunitTest_sw_ooxmlexport_template \ CppunitTest_sw_ooxmlfieldexport \ CppunitTest_sw_ooxmllinks \ diff --git a/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx b/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx Binary files differnew file mode 100644 index 000000000000..ea81722799eb --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx new file mode 100644 index 000000000000..b06b342c7071 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <swmodeltestbase.hxx> + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <IDocumentSettingAccess.hxx> + +#include <editsh.hxx> +#include <frmatr.hxx> + +class Test : public SwModelTestBase +{ +public: + Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {} + +protected: + /** + * Blacklist handling + */ + bool mustTestImportOf(const char* filename) const override { + // If the testcase is stored in some other format, it's pointless to test. + return OString(filename).endsWith(".docx"); + } +}; + + +DECLARE_OOXMLEXPORT_TEST(testTdf108350_noFontdefaults, "tdf108350_noFontdefaults.docx") +{ + uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles"); + uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("NoParent"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xStyleProps, "CharFontName")); + //CPPUNIT_ASSERT_EQUAL_MESSAGE("Font size", 10.f, getProperty<float>(xStyleProps, "CharHeight")); +} + + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |