diff options
Diffstat (limited to 'test/inc')
-rw-r--r-- | test/inc/test/container/xnamecontainer.hxx | 55 | ||||
-rw-r--r-- | test/inc/test/sheet/cellproperties.hxx | 48 | ||||
-rw-r--r-- | test/inc/test/sheet/datapilotfield.hxx | 50 | ||||
-rw-r--r-- | test/inc/test/sheet/tableautoformatfield.hxx | 49 | ||||
-rw-r--r-- | test/inc/test/sheet/xcellrangesquery.hxx | 57 | ||||
-rw-r--r-- | test/inc/test/sheet/xdatabaserange.hxx | 50 | ||||
-rw-r--r-- | test/inc/test/sheet/xdatapilotdescriptor.hxx | 67 | ||||
-rw-r--r-- | test/inc/test/sheet/xdatapilotfieldgrouping.hxx | 48 | ||||
-rw-r--r-- | test/inc/test/sheet/xdatapilottable.hxx | 54 | ||||
-rw-r--r-- | test/inc/test/sheet/xnamedrange.hxx | 56 | ||||
-rw-r--r-- | test/inc/test/sheet/xnamedranges.hxx | 63 | ||||
-rw-r--r-- | test/inc/test/sheet/xspreadsheets2.hxx | 83 | ||||
-rw-r--r-- | test/inc/test/unoapi_test.hxx | 12 |
13 files changed, 684 insertions, 8 deletions
diff --git a/test/inc/test/container/xnamecontainer.hxx b/test/inc/test/container/xnamecontainer.hxx new file mode 100644 index 000000000000..6f296d7c5905 --- /dev/null +++ b/test/inc/test/container/xnamecontainer.hxx @@ -0,0 +1,55 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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 <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 rtl::OUString& rName); + + virtual uno::Reference< uno::XInterface > init() = 0; + + void testRemoveByName(); + +private: + rtl::OUString maNameToRemove; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/cellproperties.hxx b/test/inc/test/sheet/cellproperties.hxx new file mode 100644 index 000000000000..f2a3b7150060 --- /dev/null +++ b/test/inc/test/sheet/cellproperties.hxx @@ -0,0 +1,48 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/datapilotfield.hxx b/test/inc/test/sheet/datapilotfield.hxx new file mode 100644 index 000000000000..c87dfc07537b --- /dev/null +++ b/test/inc/test/sheet/datapilotfield.hxx @@ -0,0 +1,50 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/tableautoformatfield.hxx b/test/inc/test/sheet/tableautoformatfield.hxx new file mode 100644 index 000000000000..ae262f59d34a --- /dev/null +++ b/test/inc/test/sheet/tableautoformatfield.hxx @@ -0,0 +1,49 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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/test/inc/test/sheet/xcellrangesquery.hxx b/test/inc/test/sheet/xcellrangesquery.hxx new file mode 100644 index 000000000000..c315163f5b90 --- /dev/null +++ b/test/inc/test/sheet/xcellrangesquery.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) 2011 Markus Mohrhard <markus.mohrhard@googlemail.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/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(); + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xdatabaserange.hxx b/test/inc/test/sheet/xdatabaserange.hxx new file mode 100644 index 000000000000..6c5eac04d977 --- /dev/null +++ b/test/inc/test/sheet/xdatabaserange.hxx @@ -0,0 +1,50 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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 <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 rtl::OUString& rDBName) = 0; + + void testDataArea(); + void testGetSortDescriptor(); + void testGetSubtotalDescriptor(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xdatapilotdescriptor.hxx b/test/inc/test/sheet/xdatapilotdescriptor.hxx new file mode 100644 index 000000000000..9eca14ca4c51 --- /dev/null +++ b/test/inc/test/sheet/xdatapilotdescriptor.hxx @@ -0,0 +1,67 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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; +private: + + void testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > xDescr ); + + void checkName( uno::Reference< container::XIndexAccess > xIndex, sal_Int32 nIndex ); + static std::vector<rtl::OUString> maFieldNames; +}; + +std::vector< rtl::OUString > XDataPilotDescriptor::maFieldNames; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xdatapilotfieldgrouping.hxx b/test/inc/test/sheet/xdatapilotfieldgrouping.hxx new file mode 100644 index 000000000000..b1e086461693 --- /dev/null +++ b/test/inc/test/sheet/xdatapilotfieldgrouping.hxx @@ -0,0 +1,48 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xdatapilottable.hxx b/test/inc/test/sheet/xdatapilottable.hxx new file mode 100644 index 000000000000..7d67f97e7f7c --- /dev/null +++ b/test/inc/test/sheet/xdatapilottable.hxx @@ -0,0 +1,54 @@ +/* -*- 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 Markus Mohrhard <markus.mohrhard@googlemail.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/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; + + 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/test/inc/test/sheet/xnamedrange.hxx b/test/inc/test/sheet/xnamedrange.hxx new file mode 100644 index 000000000000..1859237a5c96 --- /dev/null +++ b/test/inc/test/sheet/xnamedrange.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) 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: + virtual uno::Reference< sheet::XNamedRange> getNamedRange(const rtl::OUString&) = 0; + +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xnamedranges.hxx b/test/inc/test/sheet/xnamedranges.hxx new file mode 100644 index 000000000000..508fec5f2180 --- /dev/null +++ b/test/inc/test/sheet/xnamedranges.hxx @@ -0,0 +1,63 @@ +/* -*- 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 rtl::OUString& rNameToRemove); + + 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: + rtl::OUString maNameToRemove; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/sheet/xspreadsheets2.hxx b/test/inc/test/sheet/xspreadsheets2.hxx new file mode 100644 index 000000000000..cb8f5c2181c2 --- /dev/null +++ b/test/inc/test/sheet/xspreadsheets2.hxx @@ -0,0 +1,83 @@ +/* -*- 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(); + + // 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 rtl::OUString&) = 0; + virtual void createFileURL(const rtl::OUString&, rtl::OUString&) = 0; + +protected: + uno::Reference< sheet::XSpreadsheetDocument> xDocument; + +private: + uno::Reference< sheet::XSpreadsheetDocument> getDoc(const rtl::OUString&, uno::Reference< lang::XComponent >&); + uno::Reference< sheet::XNamedRanges> getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument >); + void importSheetToCopy(); + bool isExternalReference(const rtl::OUString& aDestContent, const rtl::OUString& aSrcContent ); + + uno::Reference< sheet::XSpreadsheetDocument> xDestDoc; + uno::Reference< sheet::XSpreadsheet > xDestSheet; + uno::Reference< sheet::XSpreadsheet > xSrcSheet; + rtl::OUString aSrcSheetName; + rtl::OUString aSrcFileName; + rtl::OUString aDestFileBase; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/unoapi_test.hxx b/test/inc/test/unoapi_test.hxx index 54dcff854b41..b3e341a188d2 100644 --- a/test/inc/test/unoapi_test.hxx +++ b/test/inc/test/unoapi_test.hxx @@ -29,17 +29,10 @@ #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> -#define ODS_FORMAT_TYPE 50331943 -#define XLS_FORMAT_TYPE 318767171 -#define XLSX_FORMAT_TYPE 268959811 - -#define ODS 0 -#define XLS 1 -#define XLSX 2 - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -55,6 +48,9 @@ public: virtual void setUp(); virtual void tearDown(); +protected: + void closeDocument( uno::Reference< lang::XComponent > xDocument ); + private: uno::Reference<uno::XInterface> m_xCalcComponent; |