diff options
-rw-r--r-- | dbaccess/qa/extras/rowsetclones.cxx | 3 | ||||
-rw-r--r-- | dbaccess/qa/unit/dbtest_base.cxx | 4 | ||||
-rw-r--r-- | sccomp/qa/unit/SwarmSolverTest.cxx | 10 |
3 files changed, 2 insertions, 15 deletions
diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx index 21a30636961b..d83d160ca132 100644 --- a/dbaccess/qa/extras/rowsetclones.cxx +++ b/dbaccess/qa/extras/rowsetclones.cxx @@ -51,8 +51,7 @@ void RowSetClones::test() const OUString sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb")); uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath)); - uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY); - CPPUNIT_ASSERT(xDocument.is()); + uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY_THROW); uno::Reference< XDataSource > xDataSource = xDocument->getDataSource(); CPPUNIT_ASSERT(xDataSource.is()); diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx index c7992288cdbd..b5a3bd31cf90 100644 --- a/dbaccess/qa/unit/dbtest_base.cxx +++ b/dbaccess/qa/unit/dbtest_base.cxx @@ -67,9 +67,7 @@ uno::Reference< XOfficeDatabaseDocument > uno::Reference<XOfficeDatabaseDocument> DBTestBase::getDocumentForUrl(OUString const & url) { uno::Reference< lang::XComponent > xComponent (loadFromDesktop(url)); - uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY); - CPPUNIT_ASSERT(xDocument.is()); - + uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY_THROW); return xDocument; } diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx index 030822b9cdb4..966f9c673fc5 100644 --- a/sccomp/qa/unit/SwarmSolverTest.cxx +++ b/sccomp/qa/unit/SwarmSolverTest.cxx @@ -60,8 +60,6 @@ void SwarmSolverTest::testUnconstrained() createFileURL(u"Simple.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); - CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); - uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); @@ -109,8 +107,6 @@ void SwarmSolverTest::testVariableBounded() createFileURL(u"Simple.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); - CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); - uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); @@ -160,8 +156,6 @@ void SwarmSolverTest::testVariableConstrained() createFileURL(u"Simple.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); - CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); - uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); @@ -214,8 +208,6 @@ void SwarmSolverTest::testTwoVariables() createFileURL(u"TwoVariables.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); - CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); - uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); @@ -272,8 +264,6 @@ void SwarmSolverTest::testMultipleVariables() createFileURL(u"MultiVariable.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); - CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is()); - uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); |