diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-18 18:26:28 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-23 22:20:31 +0200 |
commit | b9337e22ce1dbf2eba0e8c8db294ae99f4111f91 (patch) | |
tree | 53ee1bd3dfd213815a21579151983cb997922b05 /include/test | |
parent | f4e1642a1761d5eab6ccdd89928869c2b2f1528a (diff) |
execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details
Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
Diffstat (limited to 'include/test')
35 files changed, 1501 insertions, 0 deletions
diff --git a/include/test/beans/xpropertyset.hxx b/include/test/beans/xpropertyset.hxx new file mode 100644 index 000000000000..b5962665f56b --- /dev/null +++ b/include/test/beans/xpropertyset.hxx @@ -0,0 +1,70 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + */ + +#ifndef __TEST_BEANS_XPROPERTYSET_HXX__ +#define __TEST_BEANS_XPROPERTYSET_HXX__ + +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> + +#include "test/testdllapi.hxx" + +#include <vector> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XPropertySet +{ +public: + virtual ~XPropertySet(); + + virtual uno::Reference<uno::XInterface> init() = 0; + + void testGetPropertySetInfo(); + void testAddPropertyChangeListener(); + void testAddVetoableChangeListener(); + void testSetPropertyValue(); + void testGetPropertyValue(); + void testRemovePropertyChangeListener(); + void testRemoveVetoableChangeListener(); + +protected: + virtual bool isPropertyValueChangeable(const OUString& rName); + +private: + void fillPropsToTest(const uno::Reference<beans::XPropertySetInfo>& xPropInfo); + static bool getSinglePropertyValue( + const uno::Reference<beans::XPropertySet>& xPropSet, const OUString& rName); + + struct OOO_DLLPUBLIC_TEST PropsToTest + { + std::vector<OUString> constrained; + std::vector<OUString> bound; + std::vector<OUString> normal; + std::vector<OUString> readonly; + + bool initialized; + + PropsToTest(); + }; + + PropsToTest maPropsToTest; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/bootstrapfixture.hxx b/include/test/bootstrapfixture.hxx new file mode 100644 index 000000000000..d8eaa1d3831b --- /dev/null +++ b/include/test/bootstrapfixture.hxx @@ -0,0 +1,56 @@ +/* -*- 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/. + */ +#ifndef INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX +#define INCLUDED_TEST_BOOTSTRAPFIXTURE_HXX + +#include <sal/config.h> + +#include <rtl/string.hxx> +#include <tools/link.hxx> +#include <vcl/salctype.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> + +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" +#include "unotest/bootstrapfixturebase.hxx" +#include "test/testdllapi.hxx" + +namespace test { + +// Class to do lots of heavy-lifting UNO & environment +// bootstrapping for unit tests, such that we can use +// almost an entire LibreOffice during compile - so +// that we can get pieces of code alone to beat them up. + +// NB. this class is instantiated multiple times during a +// run of unit tests ... +class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase +{ + bool m_bNeedUCB; + bool m_bAssertOnDialog; + +public: + DECL_STATIC_LINK( BootstrapFixture, ImplInitFilterHdl, ConvertData* ); + + BootstrapFixture( bool bAssertOnDialog = true, bool bNeedUCB = true ); + virtual ~BootstrapFixture(); + + virtual void setUp(); + virtual void tearDown(); +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/container/xelementaccess.hxx b/include/test/container/xelementaccess.hxx new file mode 100644 index 000000000000..71306d345df7 --- /dev/null +++ b/include/test/container/xelementaccess.hxx @@ -0,0 +1,35 @@ +/* -*- 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 <com/sun/star/uno/Type.hxx> +#include <com/sun/star/uno/Reference.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class XElementAccess +{ +public: + XElementAccess(uno::Type& rType): maType(rType) {} + + void testGetElementType(); + void testHasElements(); + + virtual uno::Reference< uno::XInterface > init() = 0; + + virtual ~XElementAccess() {} + +private: + uno::Type maType; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/container/xindexaccess.hxx b/include/test/container/xindexaccess.hxx new file mode 100644 index 000000000000..1962f9f6eb13 --- /dev/null +++ b/include/test/container/xindexaccess.hxx @@ -0,0 +1,36 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class XIndexAccess +{ +public: + XIndexAccess(sal_Int32 nItems); + + virtual uno::Reference< uno::XInterface > init() = 0; + void testGetCount(); + void testGetByIndex(); + // will throw an exception and should fail if not + void testGetByIndexException(); + +protected: + ~XIndexAccess() {} + +private: + sal_Int32 mnItems; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx new file mode 100644 index 000000000000..c231daecc0c9 --- /dev/null +++ b/include/test/container/xnamecontainer.hxx @@ -0,0 +1,38 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XNameContainer +{ +public: + // removes default entry + XNameContainer(); + // removes given entry + XNameContainer(const OUString& rName); + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testRemoveByName(); + + virtual ~XNameContainer() {} + +private: + OUString maNameToRemove; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx new file mode 100644 index 000000000000..acb367ead4a8 --- /dev/null +++ b/include/test/container/xnamed.hxx @@ -0,0 +1,35 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XNamed +{ +public: + XNamed(const OUString& rName): maName(rName) {} + virtual ~XNamed(); + + void testGetName(); + void testSetName(); + + virtual uno::Reference< uno::XInterface > init() = 0; +private: + OUString maName; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/container/xnamereplace.hxx b/include/test/container/xnamereplace.hxx new file mode 100644 index 000000000000..6b616cdec1a8 --- /dev/null +++ b/include/test/container/xnamereplace.hxx @@ -0,0 +1,39 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> +#include <com/sun/star/uno/Any.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XNameReplace +{ +public: + XNameReplace(const OUString& rName): maName(rName) {} + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testReplaceByName(); + + virtual uno::Any getAnyElementForNameReplace() = 0; + + virtual ~XNameReplace() {} + +private: + OUString maName; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/cellproperties.hxx b/include/test/sheet/cellproperties.hxx new file mode 100644 index 000000000000..49f9c37246cb --- /dev/null +++ b/include/test/sheet/cellproperties.hxx @@ -0,0 +1,32 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/XInterface.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST CellProperties +{ +public: + virtual uno::Reference < uno::XInterface > init() = 0; + + void testVertJustify(); + void testRotateReference(); + +protected: + ~CellProperties() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/datapilotfield.hxx b/include/test/sheet/datapilotfield.hxx new file mode 100644 index 000000000000..253bdf474ac2 --- /dev/null +++ b/include/test/sheet/datapilotfield.hxx @@ -0,0 +1,34 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST DataPilotField +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + void testSortInfo(); + void testLayoutInfo(); + void testAutoShowInfo(); + void testReference(); + void testIsGroupField(); + +protected: + ~DataPilotField() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/tableautoformatfield.hxx b/include/test/sheet/tableautoformatfield.hxx new file mode 100644 index 000000000000..6b6d79f1fe57 --- /dev/null +++ b/include/test/sheet/tableautoformatfield.hxx @@ -0,0 +1,30 @@ +/* -*- 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 <com/sun/star/beans/XPropertySet.hpp> + +using namespace com::sun::star; + +namespace apitest { + +class TableAutoFormatField +{ +public: + //don't use virtual init() here + uno::Reference< beans::XPropertySet > initTest(); + + virtual uno::Reference< > getServiceFactory() = 0; + + void testRotateReference(); + void testVertJustify(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xcellrangedata.hxx b/include/test/sheet/xcellrangedata.hxx new file mode 100644 index 000000000000..dd56045b8649 --- /dev/null +++ b/include/test/sheet/xcellrangedata.hxx @@ -0,0 +1,32 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XCellRangeData +{ +public: + + virtual uno::Reference< uno::XInterface > getXCellRangeData() = 0; + + void testGetDataArray(); + void testSetDataArray(); + +protected: + ~XCellRangeData() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xcellrangereferrer.hxx b/include/test/sheet/xcellrangereferrer.hxx new file mode 100644 index 000000000000..22044302b087 --- /dev/null +++ b/include/test/sheet/xcellrangereferrer.hxx @@ -0,0 +1,36 @@ +/* -*- 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 <com/sun/star/table/CellRangeAddress.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XCellRangeReferrer +{ +public: + XCellRangeReferrer( table::CellRangeAddress aCellRange ): + maCellRange( aCellRange ) {} + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testGetReferredCells(); + +protected: + ~XCellRangeReferrer() {} + +private: + table::CellRangeAddress maCellRange; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xcellrangesquery.hxx b/include/test/sheet/xcellrangesquery.hxx new file mode 100644 index 000000000000..3d419b7c8203 --- /dev/null +++ b/include/test/sheet/xcellrangesquery.hxx @@ -0,0 +1,40 @@ +/* -*- 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 <com/sun/star/uno/XInterface.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + + +namespace apitest { + + +class OOO_DLLPUBLIC_TEST XCellRangesQuery +{ +public: + + virtual uno::Reference< uno::XInterface > init() = 0; + + //Testcases + void testQueryColumnDifference(); + void testQueryContentDifference(); + void testQueryEmptyCells(); + void testQueryFormulaCells(); + void testQueryIntersection(); + void testQueryRowDifference(); + void testQueryVisibleCells(); + +protected: + ~XCellRangesQuery() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xdatabaserange.hxx b/include/test/sheet/xdatabaserange.hxx new file mode 100644 index 000000000000..2be7e4dc663f --- /dev/null +++ b/include/test/sheet/xdatabaserange.hxx @@ -0,0 +1,37 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XDatabaseRange +{ +public: + virtual uno::Reference< uno::XInterface > init(const OUString& rDBName) = 0; + + void testDataArea(); + void testGetSortDescriptor(); + void testGetSubtotalDescriptor(); + void testGetImportDescriptor(); + void testGetFilterDescriptor(); + void testRefresh(); + +protected: + ~XDatabaseRange() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xdatapilotdescriptor.hxx b/include/test/sheet/xdatapilotdescriptor.hxx new file mode 100644 index 000000000000..55b26a3bbfe7 --- /dev/null +++ b/include/test/sheet/xdatapilotdescriptor.hxx @@ -0,0 +1,50 @@ +/* -*- 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 <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/sheet/XDataPilotDescriptor.hpp> + +#include <test/testdllapi.hxx> + +#include <vector> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XDataPilotDescriptor +{ +public: + void testSourceRange(); + void testTag(); + void testGetFilterDescriptor(); + void testGetDataPilotFields(); + void testGetColumnFields(); + void testGetRowFields(); + void testGetPageFields(); + void testGetDataFields(); + void testGetHiddenFields(); + + virtual uno::Reference< uno::XInterface > init() = 0; + +protected: + ~XDataPilotDescriptor() {} + +private: + + void testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > xDescr ); + + void checkName( uno::Reference< container::XIndexAccess > xIndex, sal_Int32 nIndex ); + static std::vector<OUString> maFieldNames; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xdatapilotfieldgrouping.hxx b/include/test/sheet/xdatapilotfieldgrouping.hxx new file mode 100644 index 000000000000..fd11a45cb051 --- /dev/null +++ b/include/test/sheet/xdatapilotfieldgrouping.hxx @@ -0,0 +1,32 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/XInterface.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XDataPilotFieldGrouping +{ +public: + void testCreateNameGroup(); + void testCreateDateGroup(); + + virtual uno::Reference< uno::XInterface > init() = 0; + +protected: + ~XDataPilotFieldGrouping() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xdatapilottable.hxx b/include/test/sheet/xdatapilottable.hxx new file mode 100644 index 000000000000..27c5f2a7ca8c --- /dev/null +++ b/include/test/sheet/xdatapilottable.hxx @@ -0,0 +1,36 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/table/XCell.hpp> +#include <test/testdllapi.hxx> + +#include "cppunit/extensions/HelperMacros.h" + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XDataPilotTable +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + virtual ~XDataPilotTable(); + + void testGetOutputRange(); + void testRefresh(); + +protected: + uno::Reference< table::XCell > xCellForChange; + uno::Reference< table::XCell > xCellForCheck; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xdatapilottable2.hxx b/include/test/sheet/xdatapilottable2.hxx new file mode 100644 index 000000000000..b1dc31159af3 --- /dev/null +++ b/include/test/sheet/xdatapilottable2.hxx @@ -0,0 +1,55 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/table/CellRangeAddress.hpp> +#include <com/sun/star/table/CellAddress.hpp> +#include <com/sun/star/sheet/XDataPilotTable2.hpp> +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <com/sun/star/uno/Sequence.h> + +#include "test/testdllapi.hxx" + +#include <vector> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XDataPilotTable2 +{ +public: + void testGetPositionData(); + void testGetDrillDownData(); + void testGetOutputRangeByType(); + void testInsertDrillDownSheet(); + virtual ~XDataPilotTable2(); + + virtual uno::Reference< uno::XInterface > initDP2() = 0; + virtual uno::Reference< uno::XInterface > getSheets() = 0; + +protected: + +private: + bool checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet >, uno::Sequence< uno::Sequence < uno::Any > > aData); + + void getOutputRanges(uno::Reference< sheet::XDataPilotTable2 >); + void buildDataFields(uno::Reference< sheet::XDataPilotTable2 >); + void buildResultCells(uno::Reference< sheet::XDataPilotTable2 >); + + std::vector< table::CellAddress > maResultCells; + std::vector< sal_Int32 > maDataFieldDims; + table::CellRangeAddress maRangeWhole; + table::CellRangeAddress maRangeTable; + table::CellRangeAddress maRangeResult; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xgoalseek.hxx b/include/test/sheet/xgoalseek.hxx new file mode 100644 index 000000000000..71fce12a356b --- /dev/null +++ b/include/test/sheet/xgoalseek.hxx @@ -0,0 +1,31 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XGoalSeek +{ +public: + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testSeekGoal(); + +protected: + virtual ~XGoalSeek() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xnamedrange.hxx b/include/test/sheet/xnamedrange.hxx new file mode 100644 index 000000000000..97a6afdf4926 --- /dev/null +++ b/include/test/sheet/xnamedrange.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <rtl/ustring.hxx> +#include <com/sun/star/sheet/XNamedRange.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XNamedRange +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + // XNamedRange + void testGetContent(); + void testSetContent(); + void testGetType(); + void testSetType(); + void testGetReferencePosition(); + void testSetReferencePosition(); +protected: + ~XNamedRange() {} + + virtual uno::Reference< sheet::XNamedRange> getNamedRange(const OUString&) = 0; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xnamedranges.hxx b/include/test/sheet/xnamedranges.hxx new file mode 100644 index 000000000000..d0d2eeedb66f --- /dev/null +++ b/include/test/sheet/xnamedranges.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XNamedRanges +{ +public: + // remove default entry + XNamedRanges(); + // removes given entry + XNamedRanges(const OUString& rNameToRemove); + + virtual ~XNamedRanges(); + + virtual uno::Reference< uno::XInterface > init(sal_Int32 nSheets = 0) = 0; + + // XNamedRanges + void testAddNewByName(); + void testAddNewFromTitles(); + void testRemoveByName(); + void testOutputList(); + +protected: + uno::Reference< sheet::XSpreadsheet > xSheet; + +private: + OUString maNameToRemove; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xprintareas.hxx b/include/test/sheet/xprintareas.hxx new file mode 100644 index 000000000000..08f534877690 --- /dev/null +++ b/include/test/sheet/xprintareas.hxx @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2012 Artur Dorda <artur.dorda+libo@gmail.com> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + + #include <com/sun/star/sheet/XPrintAreas.hpp> + #include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XPrintAreas +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + void testSetAndGetPrintTitleColumns(); //getter and setter in one test case + void testSetAndGetPrintTitleRows(); + + void testGetPrintAreas(); // returns a sequence containing all print areas of the sheet. + void testSetPrintAreas(); // sets the print areas of the sheet. + void testGetTitleColumns(); // returns the range that is specified as title columns range. + void testSetTitleColumns(); // specifies a range of columns as title columns range. + void testGetTitleRows(); // returns the range that is specified as title rows range. + void testSetTitleRows(); // specifies a range of rows as title rows range. + +protected: + ~XPrintAreas() {} + + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xsheetannotation.hxx b/include/test/sheet/xsheetannotation.hxx new file mode 100644 index 000000000000..9dd552d2803d --- /dev/null +++ b/include/test/sheet/xsheetannotation.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2013 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <rtl/ustring.hxx> +#include <com/sun/star/sheet/XSheetAnnotation.hpp> +#include <test/testdllapi.hxx> + +#include <com/sun/star/table/CellAddress.hpp> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSheetAnnotation +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + // XSheetAnnotation + void testGetPosition(); + void testGetAuthor(); + void testGetDate(); + void testGetIsVisible(); + void testSetIsVisible(); + +protected: + ~XSheetAnnotation() {} + + virtual uno::Reference< sheet::XSheetAnnotation> getAnnotation(table::CellAddress&) = 0; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xsheetannotations.hxx b/include/test/sheet/xsheetannotations.hxx new file mode 100644 index 000000000000..9c1c2111008c --- /dev/null +++ b/include/test/sheet/xsheetannotations.hxx @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2013 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <rtl/ustring.hxx> +#include <com/sun/star/sheet/XSheetAnnotations.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSheetAnnotations +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + // XSheetAnnotations + void testInsertNew(); + void testRemoveByIndex(); + + +protected: + ~XSheetAnnotations() {} + + virtual uno::Reference< sheet::XSheetAnnotations> getAnnotations() = 0; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xsheetoutline.hxx b/include/test/sheet/xsheetoutline.hxx new file mode 100644 index 000000000000..b52ac0eeb7aa --- /dev/null +++ b/include/test/sheet/xsheetoutline.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2013 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <rtl/ustring.hxx> +#include <com/sun/star/sheet/XSheetOutline.hpp> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSheetOutline +{ +public: + virtual uno::Reference< uno::XInterface > init() = 0; + + // XSheetOutline + void testHideDetail(); + void testShowDetail(); + void testShowLevel(); + void testUngroup(); + void testGroup(); + void testAutoOutline(); + void testClearOutline(); + +protected: + ~XSheetOutline() {} +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xspreadsheetdocument.hxx b/include/test/sheet/xspreadsheetdocument.hxx new file mode 100644 index 000000000000..edeef9c4891c --- /dev/null +++ b/include/test/sheet/xspreadsheetdocument.hxx @@ -0,0 +1,35 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class XSpreadsheetDocument +{ +public: + XSpreadsheetDocument(sal_Int32 nSheets) : mnSheets(nSheets) {} + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testGetSheets(); + +protected: + ~XSpreadsheetDocument() {} + +private: + sal_Int32 mnSheets; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/sheet/xspreadsheets2.hxx b/include/test/sheet/xspreadsheets2.hxx new file mode 100644 index 000000000000..83b9eddd15e7 --- /dev/null +++ b/include/test/sheet/xspreadsheets2.hxx @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Laurent Godard lgodard.libre@laposte.net (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include "test/testdllapi.hxx" + +#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <com/sun/star/sheet/XNamedRanges.hpp> +#include <com/sun/star/lang/XComponent.hpp> + +#include <rtl/ustring.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSpreadsheets2 +{ +public: + XSpreadsheets2(); + virtual ~XSpreadsheets2(); + + // XSpreadsheets2 + void testImportedSheetNameAndIndex(); + void testImportString(); + void testImportValue(); + void testImportFormulaBasicMath(); + void testImportFormulaWithNamedRange(); + void testImportOverExistingNamedRange(); + void testImportNamedRangeDefinedInSource(); + void testImportNamedRangeRedefinedInSource(); + void testImportNewNamedRange(); + void testImportCellStyle(); + + virtual uno::Reference< lang::XComponent > getComponent() = 0; + virtual uno::Reference< uno::XInterface > init() = 0; + virtual uno::Reference< lang::XComponent > loadFromDesktop(const OUString&) = 0; + virtual void createFileURL(const OUString&, OUString&) = 0; + +protected: + uno::Reference< sheet::XSpreadsheetDocument> xDocument; + +private: + uno::Reference< sheet::XSpreadsheetDocument> getDoc(const OUString&, uno::Reference< lang::XComponent >&); + uno::Reference< sheet::XNamedRanges> getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument >); + void importSheetToCopy(); + bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent ); + + uno::Reference< sheet::XSpreadsheetDocument> xDestDoc; + uno::Reference< sheet::XSpreadsheet > xDestSheet; + uno::Reference< sheet::XSpreadsheet > xSrcSheet; + OUString aSrcSheetName; + OUString aSrcFileName; + OUString aDestFileBase; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/testdllapi.hxx b/include/test/testdllapi.hxx new file mode 100644 index 000000000000..83f49645bb84 --- /dev/null +++ b/include/test/testdllapi.hxx @@ -0,0 +1,33 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX +#define INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX + +#include "sal/config.h" +#include "sal/types.h" + +#if defined OOO_DLLIMPLEMENTATION_TEST +#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_EXPORT +#else +#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_IMPORT +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/text/xtext.hxx b/include/test/text/xtext.hxx new file mode 100644 index 000000000000..2afee6cdcaec --- /dev/null +++ b/include/test/text/xtext.hxx @@ -0,0 +1,39 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + */ + +#ifndef __TEST_TEXT_XTEXT_HXX__ +#define __TEST_TEXT_XTEXT_HXX__ + +#include "test/testdllapi.hxx" + +#include <com/sun/star/text/XText.hpp> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XText +{ +public: + virtual ~XText(); + + virtual uno::Reference<uno::XInterface> init() = 0; + virtual uno::Reference<text::XTextContent> getTextContent() = 0; + + void testInsertRemoveTextContent(); +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/text/xtextcontent.hxx b/include/test/text/xtextcontent.hxx new file mode 100644 index 000000000000..80549b09655c --- /dev/null +++ b/include/test/text/xtextcontent.hxx @@ -0,0 +1,38 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/text/XTextRange.hpp> +#include <com/sun/star/text/XTextContent.hpp> + +#include "test/testdllapi.hxx" + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XTextContent +{ +public: + virtual ~XTextContent() {} + + virtual uno::Reference< uno::XInterface > init() = 0; + virtual uno::Reference< text::XTextRange > getTextRange() = 0; + virtual uno::Reference< text::XTextContent > getTextContent() = 0; + virtual bool isAttachSupported() = 0; + + void testGetAnchor(); + void testAttach(); + + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/text/xtextfield.hxx b/include/test/text/xtextfield.hxx new file mode 100644 index 000000000000..508a622724cf --- /dev/null +++ b/include/test/text/xtextfield.hxx @@ -0,0 +1,31 @@ +/* -*- 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 <com/sun/star/uno/Reference.hxx> + +#include "test/testdllapi.hxx" + +using namespace com::sun::star; + +namespace apitest +{ + +class OOO_DLLPUBLIC_TEST XTextField +{ +public: + virtual ~XTextField() {} + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testGetPresentation(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx new file mode 100644 index 000000000000..171e47aa785d --- /dev/null +++ b/include/test/unoapi_test.hxx @@ -0,0 +1,41 @@ +/* -*- 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 <test/bootstrapfixture.hxx> +#include <unotest/macros_test.hxx> +#include <com/sun/star/lang/XComponent.hpp> +#include <rtl/ustrbuf.hxx> +#include <osl/file.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; + +// basic uno api test class + +class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unotest::MacrosTest +{ +public: + UnoApiTest(const OUString& path); + + void createFileURL(const OUString& aFileBase, OUString& rFilePath); + + virtual void setUp(); + virtual void tearDown(); + +protected: + void closeDocument( uno::Reference< lang::XComponent > xDocument ); + + +private: + uno::Reference<uno::XInterface> m_xCalcComponent; + OUString m_aBaseString; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/util/xreplaceable.hxx b/include/test/util/xreplaceable.hxx new file mode 100644 index 000000000000..34b56b24514c --- /dev/null +++ b/include/test/util/xreplaceable.hxx @@ -0,0 +1,38 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XReplaceable +{ +public: + XReplaceable( const OUString& rSearchString, const OUString& rReplaceString): + maSearchString(rSearchString), maReplaceString(rReplaceString) {} + virtual uno::Reference< uno::XInterface > init() = 0; + + void testCreateReplaceDescriptor(); + void testReplaceAll(); + +protected: + ~XReplaceable() {} + +private: + OUString maSearchString; + OUString maReplaceString; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/util/xsearchable.hxx b/include/test/util/xsearchable.hxx new file mode 100644 index 000000000000..975ebb2a4a79 --- /dev/null +++ b/include/test/util/xsearchable.hxx @@ -0,0 +1,37 @@ +/* -*- 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 <rtl/ustring.hxx> +#include <test/testdllapi.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSearchable +{ +public: + XSearchable(const OUString& rString, sal_Int32 nCount) : maSearchString(rString), mnCount(nCount) {} + XSearchable() : maSearchString(RTL_CONSTASCII_USTRINGPARAM("SearchString")), mnCount(1) {} + virtual ~XSearchable(); + + void testFindFirst(); + void testFindNext(); + void testFindAll(); + + virtual uno::Reference< uno::XInterface > init() = 0; + +private: + OUString maSearchString; + sal_Int32 mnCount; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/test/xmldiff.hxx b/include/test/xmldiff.hxx new file mode 100644 index 000000000000..93d09f2e85f4 --- /dev/null +++ b/include/test/xmldiff.hxx @@ -0,0 +1,16 @@ +/* -*- 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 <test/testdllapi.hxx> + +bool OOO_DLLPUBLIC_TEST +doXMLDiff(const char* pFileName, const char* pContent, int size, + const char* pToleranceFileName); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |