summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/CppunitTest_sc_bugfix_test.mk126
-rw-r--r--sc/Module_sc.mk1
-rw-r--r--sc/qa/unit/bugfix-test.cxx113
3 files changed, 240 insertions, 0 deletions
diff --git a/sc/CppunitTest_sc_bugfix_test.mk b/sc/CppunitTest_sc_bugfix_test.mk
new file mode 100644
index 000000000000..55311cde3643
--- /dev/null
+++ b/sc/CppunitTest_sc_bugfix_test.mk
@@ -0,0 +1,126 @@
+# -*- 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 gb_CppunitTest_CppunitTest,sc_bugfix_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_bugfix_test, \
+ sc/qa/unit/bugfix-test \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_bugfix_test, \
+ boost_headers \
+ mdds_headers \
+ orcus \
+ orcus-parser \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_bugfix_test, \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ drawinglayer \
+ editeng \
+ for \
+ forui \
+ i18nlangtag \
+ msfilter \
+ oox \
+ sal \
+ salhelper \
+ sax \
+ sb \
+ sc \
+ scqahelper \
+ sfx \
+ sot \
+ subsequenttest \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ test \
+ tk \
+ tl \
+ ucbhelper \
+ unotest \
+ utl \
+ vbahelper \
+ vcl \
+ xo \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_bugfix_test,\
+ -I$(SRCDIR)/sc/source/ui/inc \
+ -I$(SRCDIR)/sc/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_bugfix_test,\
+ offapi \
+ udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_bugfix_test))
+$(eval $(call gb_CppunitTest_use_vcl,sc_bugfix_test))
+
+$(eval $(call gb_CppunitTest_use_components,sc_bugfix_test,\
+ basic/util/sb \
+ chart2/source/chartcore \
+ chart2/source/controller/chartcontroller \
+ comphelper/util/comphelp \
+ configmgr/source/configmgr \
+ dbaccess/util/dba \
+ embeddedobj/util/embobj \
+ eventattacher/source/evtatt \
+ filter/source/config/cache/filterconfig1 \
+ forms/util/frm \
+ framework/util/fwk \
+ i18npool/source/search/i18nsearch \
+ i18npool/util/i18npool \
+ linguistic/source/lng \
+ oox/util/oox \
+ package/source/xstor/xstor \
+ package/util/package2 \
+ sax/source/expatwrap/expwrap \
+ scaddins/source/analysis/analysis \
+ scaddins/source/datefunc/date \
+ sc/util/sc \
+ sc/util/scfilt \
+ sfx2/util/sfx \
+ sot/util/sot \
+ svl/util/svl \
+ svtools/util/svt \
+ toolkit/util/tk \
+ ucb/source/core/ucb1 \
+ ucb/source/ucp/file/ucpfile1 \
+ ucb/source/ucp/tdoc/ucptdoc1 \
+ unotools/util/utl \
+ unoxml/source/rdf/unordf \
+ unoxml/source/service/unoxml \
+ xmloff/util/xo \
+ xmlsecurity/util/xmlsecurity \
+ xmlsecurity/util/xsec_fw \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_CppunitTest_use_components,sc_bugfix_test,\
+ xmlsecurity/util/xsec_xmlsec.windows \
+))
+else
+$(eval $(call gb_CppunitTest_use_components,sc_bugfix_test,\
+ xmlsecurity/util/xsec_xmlsec \
+))
+endif
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_bugfix_test))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 18a1eb8f2568..63541d23e54b 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
CppunitTest_sc_condformats \
CppunitTest_sc_subsequent_filters_test \
CppunitTest_sc_subsequent_export_test \
+ CppunitTest_sc_bugfix_test \
CppunitTest_sc_html_export_test \
CppunitTest_sc_opencl_test \
))
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
new file mode 100644
index 000000000000..544235bb2e6c
--- /dev/null
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -0,0 +1,113 @@
+/* -*- 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 <sal/config.h>
+#include <unotest/filters-test.hxx>
+#include <test/bootstrapfixture.hxx>
+#include <rtl/strbuf.hxx>
+#include <osl/file.hxx>
+
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
+#include <svl/stritem.hxx>
+#include <svx/svdograf.hxx>
+
+#include "drwlayer.hxx"
+#include <svx/svdpage.hxx>
+#include <svx/svdoole2.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/editobj.hxx>
+#include <editeng/borderline.hxx>
+#include <editeng/flditem.hxx>
+#include <dbdata.hxx>
+#include "validat.hxx"
+#include "formulacell.hxx"
+#include "userdat.hxx"
+#include "dpobject.hxx"
+#include "dpsave.hxx"
+#include "stlsheet.hxx"
+#include "docfunc.hxx"
+#include "markdata.hxx"
+#include "colorscale.hxx"
+#include "olinetab.hxx"
+#include "patattr.hxx"
+#include "scitems.hxx"
+#include "docsh.hxx"
+#include "editutil.hxx"
+#include "cellvalue.hxx"
+#include "attrib.hxx"
+#include "dpshttab.hxx"
+#include <scopetools.hxx>
+#include <columnspanset.hxx>
+#include <tokenstringcontext.hxx>
+
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
+#include <com/sun/star/sheet/GeneralFunction.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/text/textfield/Type.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+
+#include "helper/qahelper.hxx"
+#include "helper/shared_test_impl.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+class ScFiltersTest : public ScBootstrapFixture
+{
+public:
+
+ ScFiltersTest();
+
+ virtual void setUp() SAL_OVERRIDE;
+ virtual void tearDown() SAL_OVERRIDE;
+
+ CPPUNIT_TEST_SUITE(ScFiltersTest);
+ CPPUNIT_TEST_SUITE_END();
+private:
+ uno::Reference<uno::XInterface> m_xCalcComponent;
+};
+
+ScFiltersTest::ScFiltersTest()
+ : ScBootstrapFixture( "/sc/qa/unit/data" )
+{
+}
+
+void ScFiltersTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
+ // which is a private symbol to us, gets called
+ m_xCalcComponent =
+ getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument");
+ CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
+}
+
+void ScFiltersTest::tearDown()
+{
+ uno::Reference< lang::XComponent >( m_xCalcComponent, UNO_QUERY_THROW )->dispose();
+ test::BootstrapFixture::tearDown();
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(ScFiltersTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */