diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-24 11:37:59 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-24 18:05:04 +0200 |
commit | 331a013ee3dffd39c1999ab56f3a18160e76f50a (patch) | |
tree | 8cf5507cb86d90408092d992b9e47da6919e1caf /sc/qa/extras/sctablesheetsobj.cxx | |
parent | 60b9008d20641b4e454431c148fa8d77c98a75c8 (diff) |
UnoApiTest: factor out common code
Change-Id: Ia8874d65ea8d7eb26d10b18e37ba2bac1a7d756b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141730
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/extras/sctablesheetsobj.cxx')
-rw-r--r-- | sc/qa/extras/sctablesheetsobj.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx index 970ecff02d64..59146a3e4b36 100644 --- a/sc/qa/extras/sctablesheetsobj.cxx +++ b/sc/qa/extras/sctablesheetsobj.cxx @@ -104,9 +104,7 @@ public: CPPUNIT_TEST_SUITE_END(); - virtual uno::Reference<lang::XComponent> getComponent() override; - virtual void createFileURL(const OUString& rFileBase, OUString& rFileURL) override; - virtual uno::Reference<lang::XComponent> loadFromDesktop(const OUString& rString) override; + virtual uno::Reference<lang::XComponent> loadFromDesktop(const OUString& rFileBase) override; }; ScTableSheetsObj::ScTableSheetsObj() @@ -120,16 +118,10 @@ ScTableSheetsObj::ScTableSheetsObj() { } -uno::Reference<lang::XComponent> ScTableSheetsObj::getComponent() { return mxComponent; } - -void ScTableSheetsObj::createFileURL(const OUString& rFileBase, OUString& rFileURL) -{ - UnoApiTest::createFileURL(rFileBase, rFileURL); -} - -uno::Reference<lang::XComponent> ScTableSheetsObj::loadFromDesktop(const OUString& rString) +uno::Reference<lang::XComponent> ScTableSheetsObj::loadFromDesktop(const OUString& rFileBase) { - return UnoApiTest::loadFromDesktop(rString); + OUString aString = createFileURL(rFileBase); + return UnoApiTest::loadFromDesktop(aString); } uno::Reference<uno::XInterface> ScTableSheetsObj::init() @@ -149,9 +141,7 @@ void ScTableSheetsObj::setUp() { UnoApiTest::setUp(); // create a calc document - OUString aFileURL; - createFileURL("rangenamessrc.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"rangenamessrc.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScTableSheetsObj); |