diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-01-30 00:20:54 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-01-30 00:23:07 +0100 |
commit | 8cab24997ac0cca4d3bde972397ad6550bf07859 (patch) | |
tree | 8df0fc62b99b68b0de5f8998885c4b4ee6782740 /sc/qa | |
parent | f621ba670e4936c04be57d356524ee72abab99c6 (diff) |
add test case for XReplaceable
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/extras/sccellrangeobj.cxx | 20 | ||||
-rw-r--r-- | sc/qa/extras/sctablesheetobj.cxx | 8 | ||||
-rw-r--r-- | sc/qa/extras/testdocuments/ScTableSheetObj.ods | bin | 7691 -> 8021 bytes |
3 files changed, 24 insertions, 4 deletions
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 20a191c1f5a7..050724d2942d 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -29,6 +29,8 @@ #include <test/unoapi_test.hxx> #include <test/sheet/xcellrangesquery.hxx> #include <test/sheet/cellproperties.hxx> +#include <test/util/xreplaceable.hxx> +#include <test/util/xsearchable.hxx> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> @@ -36,11 +38,14 @@ namespace sc_apitest { -#define NUMBER_OF_TESTS 8 +#define NUMBER_OF_TESTS 12 -class ScCellRangeObj : public UnoApiTest, apitest::XCellRangesQuery, apitest::CellProperties +class ScCellRangeObj : public UnoApiTest, apitest::XCellRangesQuery, apitest::CellProperties, + apitest::XSearchable, apitest::XReplaceable { public: + ScCellRangeObj(); + virtual void setUp(); virtual void tearDown(); virtual uno::Reference< uno::XInterface > init(); @@ -55,6 +60,10 @@ public: CPPUNIT_TEST(testQueryVisibleCells); CPPUNIT_TEST(testVertJustify); CPPUNIT_TEST(testRotateReference); + CPPUNIT_TEST(testFindAll); + CPPUNIT_TEST(testFindFirst); + CPPUNIT_TEST(testReplaceAll); + CPPUNIT_TEST(testCreateReplaceDescriptor); CPPUNIT_TEST_SUITE_END(); private: @@ -65,6 +74,13 @@ private: sal_Int32 ScCellRangeObj::nTest = 0; uno::Reference< lang::XComponent > ScCellRangeObj::mxComponent; +ScCellRangeObj::ScCellRangeObj(): + apitest::XSearchable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("15")), 1), + apitest::XReplaceable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("15")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("35"))) +{ + +} + uno::Reference< uno::XInterface > ScCellRangeObj::init() { rtl::OUString aFileURL; diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index 6fae46f1375a..0f1d79a4dd26 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -27,6 +27,7 @@ */ #include <test/unoapi_test.hxx> +#include <test/util/xreplaceable.hxx> #include <test/util/xsearchable.hxx> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> @@ -35,7 +36,7 @@ namespace sc_apitest { -class ScTableSheetObj : public UnoApiTest, apitest::XSearchable +class ScTableSheetObj : public UnoApiTest, apitest::XSearchable, apitest::XReplaceable { public: ScTableSheetObj(); @@ -46,6 +47,8 @@ public: CPPUNIT_TEST(testFindAll); CPPUNIT_TEST(testFindNext); CPPUNIT_TEST(testFindFirst); + CPPUNIT_TEST(testReplaceAll); + CPPUNIT_TEST(testCreateReplaceDescriptor); CPPUNIT_TEST_SUITE_END(); private: @@ -57,7 +60,8 @@ sal_Int32 ScTableSheetObj::nTest = 0; uno::Reference< lang::XComponent > ScTableSheetObj::mxComponent; ScTableSheetObj::ScTableSheetObj(): - apitest::XSearchable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test")), 4) + apitest::XSearchable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test")), 4), + apitest::XReplaceable(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("searchReplaceString")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("replaceReplaceString"))) { } diff --git a/sc/qa/extras/testdocuments/ScTableSheetObj.ods b/sc/qa/extras/testdocuments/ScTableSheetObj.ods Binary files differindex 49863c0a7434..86d027c437f8 100644 --- a/sc/qa/extras/testdocuments/ScTableSheetObj.ods +++ b/sc/qa/extras/testdocuments/ScTableSheetObj.ods |