summaryrefslogtreecommitdiff
path: root/sc/qa/extras/sccellrangeobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/extras/sccellrangeobj.cxx')
-rw-r--r--sc/qa/extras/sccellrangeobj.cxx43
1 files changed, 7 insertions, 36 deletions
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index 02cdf20e4948..8c9b9423696b 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -46,8 +46,6 @@ using namespace css::uno;
namespace sc_apitest {
-#define NUMBER_OF_TESTS 29
-
class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
public apitest::XCellFormatRangesSupplier,
public apitest::XCellRangeAddressable,
@@ -140,13 +138,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference< lang::XComponent > mxComponent;
+ uno::Reference< lang::XComponent > mxComponent;
};
-sal_Int32 ScCellRangeObj::nTest = 0;
-uno::Reference< lang::XComponent > ScCellRangeObj::mxComponent;
-
ScCellRangeObj::ScCellRangeObj():
CalcUnoApiTest("/sc/qa/extras/testdocuments"),
apitest::XCellSeries(2, 1),
@@ -157,13 +151,6 @@ ScCellRangeObj::ScCellRangeObj():
uno::Reference< uno::XInterface > ScCellRangeObj::init()
{
- OUString aFileURL;
- const OUString aFileBase("xcellrangesquery.ods");
- createFileURL(aFileBase, aFileURL);
- std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
- if (!mxComponent.is())
- mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
-
uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
@@ -180,13 +167,6 @@ uno::Reference< uno::XInterface > ScCellRangeObj::init()
uno::Reference< uno::XInterface > ScCellRangeObj::getXSpreadsheet()
{
- OUString aFileURL;
- const OUString aFileBase("xcellrangesquery.ods");
- createFileURL(aFileBase, aFileURL);
- std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
- if (!mxComponent.is())
- mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
-
uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
@@ -198,13 +178,6 @@ uno::Reference< uno::XInterface > ScCellRangeObj::getXSpreadsheet()
uno::Reference< uno::XInterface > ScCellRangeObj::getXCellRangeData()
{
- OUString aFileURL;
- const OUString aFileBase("xcellrangesquery.ods");
- createFileURL(aFileBase, aFileURL);
- std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
- if (!mxComponent.is())
- mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
-
uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
@@ -238,19 +211,17 @@ void ScCellRangeObj::testSortOOB()
void ScCellRangeObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+
+ OUString aFileURL;
+ const OUString aFileBase("xcellrangesquery.ods");
+ createFileURL(aFileBase, aFileURL);
+ mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
void ScCellRangeObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}