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 /sccomp | |
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 'sccomp')
-rw-r--r-- | sccomp/qa/unit/SwarmSolverTest.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx index 2dfbda8f61d7..1f4b9ae2e177 100644 --- a/sccomp/qa/unit/SwarmSolverTest.cxx +++ b/sccomp/qa/unit/SwarmSolverTest.cxx @@ -45,9 +45,7 @@ public: void SwarmSolverTest::testUnconstrained() { - OUString aFileURL; - createFileURL(u"Simple.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -90,9 +88,7 @@ void SwarmSolverTest::testUnconstrained() void SwarmSolverTest::testVariableBounded() { - OUString aFileURL; - createFileURL(u"Simple.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -137,9 +133,7 @@ void SwarmSolverTest::testVariableBounded() void SwarmSolverTest::testVariableConstrained() { - OUString aFileURL; - createFileURL(u"Simple.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -187,9 +181,7 @@ void SwarmSolverTest::testVariableConstrained() void SwarmSolverTest::testTwoVariables() { - OUString aFileURL; - createFileURL(u"TwoVariables.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"TwoVariables.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -241,9 +233,7 @@ void SwarmSolverTest::testTwoVariables() void SwarmSolverTest::testMultipleVariables() { - OUString aFileURL; - createFileURL(u"MultiVariable.ods", aFileURL); - mxComponent = loadFromDesktop(aFileURL); + loadFromURL(u"MultiVariable.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); |