From a361231b1363d072d737e9b1d411b71aa9550d84 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 May 2019 10:13:12 +0200 Subject: fix wrong SET/QUERY flags passed to uno::Reference By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin --- test/source/drawing/xdrawpages.cxx | 4 ++-- test/source/helper/form.cxx | 2 +- test/source/sheet/shape.cxx | 6 +++--- test/source/sheet/sheetcell.cxx | 8 +++---- test/source/sheet/sheetcellrange.cxx | 8 +++---- test/source/sheet/sheetcellranges.cxx | 8 +++---- test/source/sheet/xactivationbroadcaster.cxx | 2 +- test/source/sheet/xcellformatrangessupplier.cxx | 2 +- test/source/sheet/xcellseries.cxx | 28 ++++++++++++------------- test/source/sheet/xconsolidatable.cxx | 4 ++-- test/source/sheet/xdatapilotdescriptor.cxx | 12 +++++------ test/source/sheet/xdatapilotfield.cxx | 2 +- test/source/sheet/xdatapilottable2.cxx | 2 +- test/source/sheet/xdatapilottables.cxx | 2 +- test/source/sheet/xdatapilottablessupplier.cxx | 2 +- test/source/sheet/xdocumentauditing.cxx | 4 ++-- test/source/sheet/xheaderfootercontent.cxx | 6 +++--- test/source/sheet/xmultipleoperation.cxx | 2 +- test/source/sheet/xscenariossupplier.cxx | 2 +- test/source/sheet/xsheetannotationanchor.cxx | 2 +- test/source/sheet/xsheetannotations.cxx | 6 +++--- test/source/sheet/xsheetannotationssupplier.cxx | 2 +- test/source/sheet/xspreadsheet.cxx | 4 ++-- test/source/sheet/xspreadsheets2.cxx | 2 +- test/source/sheet/xusedareacursor.cxx | 4 ++-- test/source/style/xstyleloader.cxx | 8 +++---- test/source/table/xcellrange.cxx | 6 +++--- test/source/text/xsimpletext.cxx | 2 +- test/source/text/xtextcontent.cxx | 4 ++-- test/source/text/xtextrange.cxx | 6 +++--- test/source/view/xcontrolaccess.cxx | 4 ++-- 31 files changed, 78 insertions(+), 78 deletions(-) (limited to 'test/source') diff --git a/test/source/drawing/xdrawpages.cxx b/test/source/drawing/xdrawpages.cxx index 64fb004d5b98..29aec3fd3d32 100644 --- a/test/source/drawing/xdrawpages.cxx +++ b/test/source/drawing/xdrawpages.cxx @@ -29,7 +29,7 @@ void XDrawPages::testInsertNewByIndex() uno::Reference xDrawPages(init(), uno::UNO_QUERY_THROW); const sal_Int32 nCount = xDrawPages->getCount(); - uno::Reference xDP(xDrawPages->insertNewByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference xDP(xDrawPages->insertNewByIndex(0), uno::UNO_SET_THROW); CPPUNIT_ASSERT(xDP.is()); CPPUNIT_ASSERT_EQUAL(nCount + 1, xDrawPages->getCount()); } @@ -39,7 +39,7 @@ void XDrawPages::testRemove() uno::Reference xDrawPages(init(), uno::UNO_QUERY_THROW); const sal_Int32 nCount = xDrawPages->getCount(); - uno::Reference xDP(xDrawPages->insertNewByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference xDP(xDrawPages->insertNewByIndex(0), uno::UNO_SET_THROW); CPPUNIT_ASSERT(xDP.is()); xDrawPages->remove(xDP); diff --git a/test/source/helper/form.cxx b/test/source/helper/form.cxx index 018a33ca4532..3b78afa3871e 100644 --- a/test/source/helper/form.cxx +++ b/test/source/helper/form.cxx @@ -47,7 +47,7 @@ uno::Reference OOO_DLLPUBLIC_TEST createControlShape( xMSF->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY_THROW); uno::Reference aComponent( - xMSF->createInstance("com.sun.star.form.component." + r_aKind), uno::UNO_QUERY_THROW); + xMSF->createInstance("com.sun.star.form.component." + r_aKind), uno::UNO_SET_THROW); uno::Reference xPropertySet(aComponent, uno::UNO_QUERY_THROW); xPropertySet->setPropertyValue("DefaultControl", uno::makeAny("com.sun.star.form.control." + r_aKind)); diff --git a/test/source/sheet/shape.cxx b/test/source/sheet/shape.cxx index 4e1505bcf602..b147ad1ee28c 100644 --- a/test/source/sheet/shape.cxx +++ b/test/source/sheet/shape.cxx @@ -31,10 +31,10 @@ void Shape::testShapePropertiesAnchor() uno::Any aNewValue; uno::Reference xDoc(getXSheetDocument(), UNO_QUERY_THROW); - uno::Reference xSheets(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference xSheets(xDoc->getSheets(), UNO_SET_THROW); uno::Sequence sheetNames = xSheets->getElementNames(); uno::Reference xSheet(xSheets->getByName(sheetNames[0]), UNO_QUERY_THROW); - uno::Reference xCell(xSheet->getCellByPosition(0, 0), UNO_QUERY_THROW); + uno::Reference xCell(xSheet->getCellByPosition(0, 0), UNO_SET_THROW); // Shape should be anchored to sheet by default uno::Reference xSheetGet; @@ -58,7 +58,7 @@ void Shape::testShapePropertiesAnchor() CPPUNIT_ASSERT_MESSAGE("Shape should resize with the cell", bIsResizeWithCell); // Anchoring to a different cell should keep the "ResizeWithCell" attribute - uno::Reference xCell2(xSheet->getCellByPosition(1, 2), UNO_QUERY_THROW); + uno::Reference xCell2(xSheet->getCellByPosition(1, 2), UNO_SET_THROW); aNewValue <<= xCell2; xShape->setPropertyValue("Anchor", aNewValue); xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell; diff --git a/test/source/sheet/sheetcell.cxx b/test/source/sheet/sheetcell.cxx index 4d3347d64d72..a8123ea5084a 100644 --- a/test/source/sheet/sheetcell.cxx +++ b/test/source/sheet/sheetcell.cxx @@ -117,7 +117,7 @@ void SheetCell::testSheetCellProperties() xSheetCell->getPropertyValue(propName) >>= aConditionalFormatGet); uno::Reference aConditionalFormatNew(aConditionalFormatGet, - UNO_QUERY_THROW); + UNO_SET_THROW); aConditionalFormatNew->addNew(aPropValue); aNewValue <<= aConditionalFormatNew; @@ -143,7 +143,7 @@ void SheetCell::testSheetCellProperties() xSheetCell->getPropertyValue(propName) >>= aConditionalFormatLocalGet); uno::Reference aConditionalFormatLocalNew( - aConditionalFormatLocalGet, UNO_QUERY_THROW); + aConditionalFormatLocalGet, UNO_SET_THROW); aConditionalFormatLocalNew->addNew(aPropValue); aNewValue <<= aConditionalFormatLocalNew; @@ -168,7 +168,7 @@ void SheetCell::testSheetCellProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue Validation", xSheetCell->getPropertyValue(propName) >>= aValidationGet); - uno::Reference aValidationNew(aValidationGet, UNO_QUERY_THROW); + uno::Reference aValidationNew(aValidationGet, UNO_SET_THROW); uno::Any aValidationType; aValidationType <<= sheet::ValidationType_WHOLE; aValidationNew->setPropertyValue("Type", aValidationType); @@ -188,7 +188,7 @@ void SheetCell::testSheetCellProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ValidationLocal", xSheetCell->getPropertyValue(propName) >>= aValidationLocalGet); - uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW); + uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_SET_THROW); aValidationType <<= sheet::ValidationType_WHOLE; aValidationLocalNew->setPropertyValue("Type", aValidationType); diff --git a/test/source/sheet/sheetcellrange.cxx b/test/source/sheet/sheetcellrange.cxx index f9870d79145a..8c6ee09fc470 100644 --- a/test/source/sheet/sheetcellrange.cxx +++ b/test/source/sheet/sheetcellrange.cxx @@ -67,7 +67,7 @@ void SheetCellRange::testSheetCellRangeProperties() xSheetCellRange->getPropertyValue(propName) >>= aConditionalFormatGet); uno::Reference aConditionalFormatNew(aConditionalFormatGet, - UNO_QUERY_THROW); + UNO_SET_THROW); aConditionalFormatNew->addNew(aPropValue); aNewValue <<= aConditionalFormatNew; @@ -94,7 +94,7 @@ void SheetCellRange::testSheetCellRangeProperties() >>= aConditionalFormatLocalGet); uno::Reference aConditionalFormatLocalNew( - aConditionalFormatLocalGet, UNO_QUERY_THROW); + aConditionalFormatLocalGet, UNO_SET_THROW); aConditionalFormatLocalNew->addNew(aPropValue); aNewValue <<= aConditionalFormatLocalNew; @@ -119,7 +119,7 @@ void SheetCellRange::testSheetCellRangeProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue Validation", xSheetCellRange->getPropertyValue(propName) >>= aValidationGet); - uno::Reference aValidationNew(aValidationGet, UNO_QUERY_THROW); + uno::Reference aValidationNew(aValidationGet, UNO_SET_THROW); uno::Any aValidationType; aValidationType <<= sheet::ValidationType_WHOLE; aValidationNew->setPropertyValue("Type", aValidationType); @@ -139,7 +139,7 @@ void SheetCellRange::testSheetCellRangeProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ValidationLocal", xSheetCellRange->getPropertyValue(propName) >>= aValidationLocalGet); - uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW); + uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_SET_THROW); aValidationType <<= sheet::ValidationType_WHOLE; aValidationLocalNew->setPropertyValue("Type", aValidationType); diff --git a/test/source/sheet/sheetcellranges.cxx b/test/source/sheet/sheetcellranges.cxx index 013968f0ec5e..5b04acacd38b 100644 --- a/test/source/sheet/sheetcellranges.cxx +++ b/test/source/sheet/sheetcellranges.cxx @@ -43,7 +43,7 @@ void SheetCellRanges::testSheetCellRangesProperties() xSheetCellRanges->getPropertyValue(propName) >>= aConditionalFormatGet); uno::Reference aConditionalFormatNew(aConditionalFormatGet, - UNO_QUERY_THROW); + UNO_SET_THROW); aConditionalFormatNew->addNew(aPropValue); aNewValue <<= aConditionalFormatNew; @@ -70,7 +70,7 @@ void SheetCellRanges::testSheetCellRangesProperties() >>= aConditionalFormatLocalGet); uno::Reference aConditionalFormatLocalNew( - aConditionalFormatLocalGet, UNO_QUERY_THROW); + aConditionalFormatLocalGet, UNO_SET_THROW); aConditionalFormatLocalNew->addNew(aPropValue); aNewValue <<= aConditionalFormatLocalNew; @@ -95,7 +95,7 @@ void SheetCellRanges::testSheetCellRangesProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue Validation", xSheetCellRanges->getPropertyValue(propName) >>= aValidationGet); - uno::Reference aValidationNew(aValidationGet, UNO_QUERY_THROW); + uno::Reference aValidationNew(aValidationGet, UNO_SET_THROW); uno::Any aValidationType; aValidationType <<= sheet::ValidationType_WHOLE; aValidationNew->setPropertyValue("Type", aValidationType); @@ -115,7 +115,7 @@ void SheetCellRanges::testSheetCellRangesProperties() CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue ValidationLocal", xSheetCellRanges->getPropertyValue(propName) >>= aValidationLocalGet); - uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW); + uno::Reference aValidationLocalNew(aValidationLocalGet, UNO_SET_THROW); aValidationType <<= sheet::ValidationType_WHOLE; aValidationLocalNew->setPropertyValue("Type", aValidationType); diff --git a/test/source/sheet/xactivationbroadcaster.cxx b/test/source/sheet/xactivationbroadcaster.cxx index d62c3d0aa272..8e63e07741c8 100644 --- a/test/source/sheet/xactivationbroadcaster.cxx +++ b/test/source/sheet/xactivationbroadcaster.cxx @@ -52,7 +52,7 @@ void XActivationBroadcaster::testAddRemoveActivationEventListener() uno::Reference(xListener.get())); uno::Reference xView(xAB, UNO_QUERY_THROW); - uno::Reference xSheet1(xView->getActiveSheet(), UNO_QUERY_THROW); + uno::Reference xSheet1(xView->getActiveSheet(), UNO_SET_THROW); uno::Reference xSheet2(getXSpreadsheet(1), UNO_QUERY_THROW); xView->setActiveSheet(xSheet2); diff --git a/test/source/sheet/xcellformatrangessupplier.cxx b/test/source/sheet/xcellformatrangessupplier.cxx index c387156b7e05..109b13b036d2 100644 --- a/test/source/sheet/xcellformatrangessupplier.cxx +++ b/test/source/sheet/xcellformatrangessupplier.cxx @@ -24,7 +24,7 @@ void XCellFormatRangesSupplier::testGetCellFormatRanges() { uno::Reference xCFRS(init(), UNO_QUERY_THROW); - uno::Reference xIA(xCFRS->getCellFormatRanges(), UNO_QUERY_THROW); + uno::Reference xIA(xCFRS->getCellFormatRanges(), UNO_SET_THROW); const sal_Int32 nCount = xIA->getCount(); CPPUNIT_ASSERT_MESSAGE("No items found", sal_Int32(0) != nCount); diff --git a/test/source/sheet/xcellseries.cxx b/test/source/sheet/xcellseries.cxx index 8a02ab79a42e..8ef20fc6c950 100644 --- a/test/source/sheet/xcellseries.cxx +++ b/test/source/sheet/xcellseries.cxx @@ -24,30 +24,30 @@ void XCellSeries::testFillAuto() uno::Reference xCellRange(init(), UNO_QUERY_THROW); sal_Int32 maValue = xCellRange->getCellByPosition(maStartX, maStartY)->getValue(); - uno::Reference xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_QUERY_THROW); + uno::Reference xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_SET_THROW); uno::Reference xCellSeriesH(xCellRangeH, UNO_QUERY_THROW); xCellSeriesH->fillAuto(sheet::FillDirection_TO_RIGHT, 1); sal_Int32 sumH = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW); + uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW); sumH += xCellResultH->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillAuto with TO_RIGHT", maValue * 3 + 3, sumH); - uno::Reference xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_QUERY_THROW); + uno::Reference xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_SET_THROW); uno::Reference xCellSeriesV(xCellRangeV, UNO_QUERY_THROW); xCellSeriesV->fillAuto(sheet::FillDirection_TO_BOTTOM, 1); sal_Int32 sumV = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW); + uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW); sumV += xCellResultV->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillAuto with TO_BOTTOM", maValue * 3 + 3, sumV); for(sal_Int32 i = 1; i < 3; i++) { - uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW); + uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW); xCellResultH->setFormula(""); - uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW); + uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW); xCellResultV->setFormula(""); } } @@ -57,14 +57,14 @@ void XCellSeries::testFillSeries() uno::Reference xCellRange(init(), UNO_QUERY_THROW); sal_Int32 maValue = xCellRange->getCellByPosition(maStartX, maStartY)->getValue(); - uno::Reference xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_QUERY_THROW); + uno::Reference xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_SET_THROW); uno::Reference xCellSeriesH(xCellRangeH, UNO_QUERY_THROW); xCellSeriesH->fillSeries(sheet::FillDirection_TO_RIGHT, sheet::FillMode_LINEAR, sheet::FillDateMode_FILL_DATE_DAY, 2, 1000); sal_Int32 sumH = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW); + uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW); sumH += xCellResultH->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillSeries with TO_RIGHT and LINEAR", maValue * 3 + 6, sumH); @@ -74,19 +74,19 @@ void XCellSeries::testFillSeries() sheet::FillDateMode_FILL_DATE_DAY, 2, 1000); sumH = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW); + uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW); sumH += xCellResultH->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillSeries with TO_RIGHT and GROWTH", maValue + maValue * 2 + maValue * 4, sumH); - uno::Reference xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_QUERY_THROW); + uno::Reference xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_SET_THROW); uno::Reference xCellSeriesV(xCellRangeV, UNO_QUERY_THROW); xCellSeriesV->fillSeries(sheet::FillDirection_TO_BOTTOM, sheet::FillMode_LINEAR, sheet::FillDateMode_FILL_DATE_DAY, 2, 1000); sal_Int32 sumV = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW); + uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW); sumV += xCellResultV->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillSeries with TO_BOTTOM and LINEAR", maValue * 3 + 6, sumV); @@ -96,15 +96,15 @@ void XCellSeries::testFillSeries() sheet::FillDateMode_FILL_DATE_DAY, 2, 1000); sumV = 0; for(sal_Int32 i = 0; i < 3; i++) { - uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW); + uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW); sumV += xCellResultV->getValue(); } CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result for fillSeries with TO_BOTTOM and GROWTH", maValue + maValue * 2 + maValue * 4, sumV); for(sal_Int32 i = 1; i < 3; i++) { - uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW); + uno::Reference xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW); xCellResultH->setFormula(""); - uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW); + uno::Reference xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW); xCellResultV->setFormula(""); } } diff --git a/test/source/sheet/xconsolidatable.cxx b/test/source/sheet/xconsolidatable.cxx index 77f6943bc008..48db7dfe52df 100644 --- a/test/source/sheet/xconsolidatable.cxx +++ b/test/source/sheet/xconsolidatable.cxx @@ -26,7 +26,7 @@ void XConsolidatable::testCreateConsolidationDescriptor() uno::Reference xConsolidatable(init(), UNO_QUERY_THROW); uno::Reference xConsolidationDescriptor( - xConsolidatable->createConsolidationDescriptor(true), UNO_QUERY_THROW); + xConsolidatable->createConsolidationDescriptor(true), UNO_SET_THROW); } void XConsolidatable::testConsolidate() @@ -34,7 +34,7 @@ void XConsolidatable::testConsolidate() uno::Reference xConsolidatable(init(), UNO_QUERY_THROW); uno::Reference xConsolidationDescriptor( - xConsolidatable->createConsolidationDescriptor(true), UNO_QUERY_THROW); + xConsolidatable->createConsolidationDescriptor(true), UNO_SET_THROW); xConsolidatable->consolidate(xConsolidationDescriptor); CPPUNIT_ASSERT_MESSAGE("consolidate()", true); diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx index df1ccaaf2bee..8806735636e2 100644 --- a/test/source/sheet/xdatapilotdescriptor.cxx +++ b/test/source/sheet/xdatapilotdescriptor.cxx @@ -68,7 +68,7 @@ void XDataPilotDescriptor::testGetFilterDescriptor() void XDataPilotDescriptor::testGetDataPilotFields_Impl( uno::Reference< sheet::XDataPilotDescriptor > const & xDescr) { - uno::Reference< container::XIndexAccess > xIndex(xDescr->getDataPilotFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getDataPilotFields(), UNO_SET_THROW); sal_Int32 nCount = xIndex->getCount(); @@ -133,7 +133,7 @@ void XDataPilotDescriptor::testGetColumnFields() { uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(),UNO_QUERY_THROW); testGetDataPilotFields_Impl( xDescr ); - uno::Reference< container::XIndexAccess > xIndex(xDescr->getColumnFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getColumnFields(), UNO_SET_THROW); checkName( xIndex, 0 ); } @@ -142,7 +142,7 @@ void XDataPilotDescriptor::testGetRowFields() { uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(),UNO_QUERY_THROW); testGetDataPilotFields_Impl( xDescr ); - uno::Reference< container::XIndexAccess > xIndex(xDescr->getRowFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getRowFields(), UNO_SET_THROW); //checkName( xIndex, 1 ); } @@ -151,7 +151,7 @@ void XDataPilotDescriptor::testGetPageFields() { uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(), UNO_QUERY_THROW); testGetDataPilotFields_Impl( xDescr ); - uno::Reference< container::XIndexAccess > xIndex(xDescr->getPageFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getPageFields(), UNO_SET_THROW); checkName( xIndex, 4 ); } @@ -160,7 +160,7 @@ void XDataPilotDescriptor::testGetDataFields() { uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(),UNO_QUERY_THROW); testGetDataPilotFields_Impl( xDescr ); - uno::Reference< container::XIndexAccess > xIndex(xDescr->getDataFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getDataFields(), UNO_SET_THROW); checkName( xIndex, 2 ); } @@ -169,7 +169,7 @@ void XDataPilotDescriptor::testGetHiddenFields() { uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(),UNO_QUERY_THROW); testGetDataPilotFields_Impl( xDescr ); - uno::Reference< container::XIndexAccess > xIndex(xDescr->getHiddenFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDescr->getHiddenFields(), UNO_SET_THROW); checkName( xIndex, 3 ); } diff --git a/test/source/sheet/xdatapilotfield.cxx b/test/source/sheet/xdatapilotfield.cxx index a2fbbca0d3d6..1c79e28a8eee 100644 --- a/test/source/sheet/xdatapilotfield.cxx +++ b/test/source/sheet/xdatapilotfield.cxx @@ -24,7 +24,7 @@ void XDataPilotField::testGetItems() { uno::Reference xDPF(init(), UNO_QUERY_THROW); - uno::Reference xIA(xDPF->getItems(), UNO_QUERY_THROW); + uno::Reference xIA(xDPF->getItems(), UNO_SET_THROW); const sal_Int32 nCount = xIA->getCount(); CPPUNIT_ASSERT_MESSAGE("No items found", sal_Int32(0) != nCount); diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx index 221d722373b1..7e4714db2378 100644 --- a/test/source/sheet/xdatapilottable2.cxx +++ b/test/source/sheet/xdatapilottable2.cxx @@ -215,7 +215,7 @@ void XDataPilotTable2::getOutputRanges( uno::Reference< sheet::XDataPilotTable2 void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 > const & xDPTable ) { uno::Reference< sheet::XDataPilotDescriptor > xDesc(xDPTable, UNO_QUERY_THROW); - uno::Reference< container::XIndexAccess > xIndex(xDesc->getDataPilotFields(), UNO_QUERY_THROW); + uno::Reference< container::XIndexAccess > xIndex(xDesc->getDataPilotFields(), UNO_SET_THROW); sal_Int32 nFieldCount = xIndex->getCount(); for( sal_Int32 i = 0; i < nFieldCount; ++i) diff --git a/test/source/sheet/xdatapilottables.cxx b/test/source/sheet/xdatapilottables.cxx index 543bf48d6db4..16eac73ba8f7 100644 --- a/test/source/sheet/xdatapilottables.cxx +++ b/test/source/sheet/xdatapilottables.cxx @@ -29,7 +29,7 @@ void XDataPilotTables::testXDataPilotTables() uno::Reference xSheet(getXSpreadsheet(), UNO_QUERY_THROW); uno::Reference xDPD(xDPT->createDataPilotDescriptor(), - UNO_QUERY_THROW); + UNO_SET_THROW); xDPT->insertNewByName("XDataPilotTables", table::CellAddress(0, 9, 8), xDPD); CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to insert new DataPilotTable", OUString("Filter"), diff --git a/test/source/sheet/xdatapilottablessupplier.cxx b/test/source/sheet/xdatapilottablessupplier.cxx index b9ea30d3d173..36b7b8821587 100644 --- a/test/source/sheet/xdatapilottablessupplier.cxx +++ b/test/source/sheet/xdatapilottablessupplier.cxx @@ -24,7 +24,7 @@ void XDataPilotTablesSupplier::testGetDataPilotTables() { uno::Reference xDPTS(init(), UNO_QUERY_THROW); - uno::Reference xDPT(xDPTS->getDataPilotTables(), UNO_QUERY_THROW); + uno::Reference xDPT(xDPTS->getDataPilotTables(), UNO_SET_THROW); } } diff --git a/test/source/sheet/xdocumentauditing.cxx b/test/source/sheet/xdocumentauditing.cxx index 42846b7f302c..f1cb9539cd92 100644 --- a/test/source/sheet/xdocumentauditing.cxx +++ b/test/source/sheet/xdocumentauditing.cxx @@ -46,7 +46,7 @@ void XDocumentAuditing::dispatch(const uno::Reference& xFrame, { uno::Reference xContext = ::comphelper::getProcessComponentContext(); uno::Reference xDispatchHelper(frame::DispatchHelper::create(xContext), - UNO_QUERY_THROW); + UNO_SET_THROW); CPPUNIT_ASSERT(xDispatchHelper.is()); uno::Reference xDispatchProvider(xFrame, UNO_QUERY_THROW); @@ -81,7 +81,7 @@ void XDocumentAuditing::testRefreshArrows() uno::Reference xDocumentAuditing(init(), UNO_QUERY_THROW); uno::Reference xDoc(xDocumentAuditing, UNO_QUERY_THROW); - uno::Reference xSheets(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference xSheets(xDoc->getSheets(), UNO_SET_THROW); uno::Reference xIA(xSheets, UNO_QUERY_THROW); uno::Reference xSheet1(xIA->getByIndex(0), UNO_QUERY_THROW); uno::Reference xSheet2(xIA->getByIndex(1), UNO_QUERY_THROW); diff --git a/test/source/sheet/xheaderfootercontent.cxx b/test/source/sheet/xheaderfootercontent.cxx index 6e03dafe2328..572d23f03ee4 100644 --- a/test/source/sheet/xheaderfootercontent.cxx +++ b/test/source/sheet/xheaderfootercontent.cxx @@ -25,7 +25,7 @@ void XHeaderFooterContent::testGetCenterText() { uno::Reference xHFC(init(), UNO_QUERY_THROW); - uno::Reference xText(xHFC->getCenterText(), UNO_QUERY_THROW); + uno::Reference xText(xHFC->getCenterText(), UNO_SET_THROW); CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get center text", OUString("CENTER"), xText->getString()); } @@ -34,14 +34,14 @@ void XHeaderFooterContent::testGetLeftText() { uno::Reference xHFC(init(), UNO_QUERY_THROW); - uno::Reference xText(xHFC->getLeftText(), UNO_QUERY_THROW); + uno::Reference xText(xHFC->getLeftText(), UNO_SET_THROW); CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get left text", OUString("LEFT"), xText->getString()); } void XHeaderFooterContent::testGetRightText() { uno::Reference xHFC(init(), UNO_QUERY_THROW); - uno::Reference xText(xHFC->getRightText(), UNO_QUERY_THROW); + uno::Reference xText(xHFC->getRightText(), UNO_SET_THROW); CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get right text", OUString("RIGHT"), xText->getString()); } } diff --git a/test/source/sheet/xmultipleoperation.cxx b/test/source/sheet/xmultipleoperation.cxx index e68204861890..87c8e7c44996 100644 --- a/test/source/sheet/xmultipleoperation.cxx +++ b/test/source/sheet/xmultipleoperation.cxx @@ -32,7 +32,7 @@ void XMultipleOperation::testSetTableOperation() uno::Reference xSheet(getXSpreadsheet(), UNO_QUERY_THROW); uno::Reference xCellRange(xSheet->getCellRangeByName("$A$20:$A$20"), - UNO_QUERY_THROW); + UNO_SET_THROW); uno::Reference xCellRangeAddr(xCellRange, UNO_QUERY_THROW); uno::Reference xCell = xSheet->getCellByPosition(0, 19); diff --git a/test/source/sheet/xscenariossupplier.cxx b/test/source/sheet/xscenariossupplier.cxx index e54c923e3438..594d96c9d94b 100644 --- a/test/source/sheet/xscenariossupplier.cxx +++ b/test/source/sheet/xscenariossupplier.cxx @@ -23,7 +23,7 @@ namespace apitest void XScenariosSupplier::testGetScenarios() { uno::Reference xSupplier(init(), UNO_QUERY_THROW); - uno::Reference xScenarios(xSupplier->getScenarios(), UNO_QUERY_THROW); + uno::Reference xScenarios(xSupplier->getScenarios(), UNO_SET_THROW); } } diff --git a/test/source/sheet/xsheetannotationanchor.cxx b/test/source/sheet/xsheetannotationanchor.cxx index cf0894a7e83d..540d1fca4741 100644 --- a/test/source/sheet/xsheetannotationanchor.cxx +++ b/test/source/sheet/xsheetannotationanchor.cxx @@ -25,7 +25,7 @@ namespace apitest void XSheetAnnotationAnchor::testGetAnnotation() { uno::Reference xAnchor(init(), UNO_QUERY_THROW); - uno::Reference xAnnotation(xAnchor->getAnnotation(), UNO_QUERY_THROW); + uno::Reference xAnnotation(xAnchor->getAnnotation(), UNO_SET_THROW); CPPUNIT_ASSERT_MESSAGE("Unable to get XSheetAnnotation", xAnnotation.is()); CPPUNIT_ASSERT_MESSAGE("Unable to check: getAuthor()", xAnnotation->getAuthor().isEmpty()); diff --git a/test/source/sheet/xsheetannotations.cxx b/test/source/sheet/xsheetannotations.cxx index c892642e0bf1..07ea6d493ef9 100644 --- a/test/source/sheet/xsheetannotations.cxx +++ b/test/source/sheet/xsheetannotations.cxx @@ -31,7 +31,7 @@ void XSheetAnnotations::testCount() sal_Int32 nBefore = xAnnotationsIndex->getCount(); // get Sheet 2 annotations - uno::Reference< sheet::XSheetAnnotations > xSheet2Annotations( getAnnotations(1), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetAnnotations > xSheet2Annotations( getAnnotations(1), UNO_SET_THROW); // insert a note on sheet 2 table::CellAddress aTargetCellAddress (1,0,0); @@ -172,7 +172,7 @@ void XSheetAnnotations::testIndex() aSheet0Annotations->insertNew(aThirdCellAddress0, "an inserted annotation 3 on sheet 1"); // insert annotations in third sheet - uno::Reference< sheet::XSheetAnnotations > aSheet2Annotations (getAnnotations(2), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetAnnotations > aSheet2Annotations (getAnnotations(2), UNO_SET_THROW); table::CellAddress aTargetCellAddress2 (2,4,5); aSheet2Annotations->insertNew(aTargetCellAddress2, "an inserted annotation 1 on sheet 3"); table::CellAddress aSecondTargetCellAddress2 (2,5,6); @@ -181,7 +181,7 @@ void XSheetAnnotations::testIndex() aSheet2Annotations->insertNew(aThirdCellAddress2, "an inserted annotation 3 on sheet 3"); // get second annotation for second sheet - uno::Reference< sheet::XSheetAnnotations > aSheetAnnotations (getAnnotations(2), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetAnnotations > aSheetAnnotations (getAnnotations(2), UNO_SET_THROW); uno::Reference< container::XIndexAccess > xAnnotationsIndex (aSheetAnnotations, UNO_QUERY_THROW); uno::Reference< sheet::XSheetAnnotation > aAnnotation (xAnnotationsIndex->getByIndex(1), UNO_QUERY_THROW); diff --git a/test/source/sheet/xsheetannotationssupplier.cxx b/test/source/sheet/xsheetannotationssupplier.cxx index 622ea2bc202a..8fddc7d4300f 100644 --- a/test/source/sheet/xsheetannotationssupplier.cxx +++ b/test/source/sheet/xsheetannotationssupplier.cxx @@ -25,7 +25,7 @@ void XSheetAnnotationsSupplier::testGetAnnotations() uno::Reference xSupplier(init(), UNO_QUERY_THROW); uno::Reference xAnnotations(xSupplier->getAnnotations(), - UNO_QUERY_THROW); + UNO_SET_THROW); } } diff --git a/test/source/sheet/xspreadsheet.cxx b/test/source/sheet/xspreadsheet.cxx index d1df8a690ddc..6b56fb20499a 100644 --- a/test/source/sheet/xspreadsheet.cxx +++ b/test/source/sheet/xspreadsheet.cxx @@ -26,7 +26,7 @@ void XSpreadsheet::testCreateCursor() { uno::Reference< sheet::XSpreadsheet > xSheet(init(), UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursor(), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursor(), UNO_SET_THROW); } void XSpreadsheet::testCreateCursorByRange() @@ -34,7 +34,7 @@ void XSpreadsheet::testCreateCursorByRange() uno::Reference< sheet::XSpreadsheet > xSheet(init(), UNO_QUERY_THROW); uno::Reference< sheet::XSheetCellRange > xCellRange(xSheet->getCellRangeByPosition(1, 1, 2, 3), UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursorByRange(xCellRange), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursorByRange(xCellRange), UNO_SET_THROW); } } diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx index ab3ef3e75688..df6ae9a6c321 100644 --- a/test/source/sheet/xspreadsheets2.cxx +++ b/test/source/sheet/xspreadsheets2.cxx @@ -261,7 +261,7 @@ void XSpreadsheets2::testImportCellStyle() CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong imported Cell Style", aDestStyleName, aSrcStyleName); uno::Reference< style::XStyleFamiliesSupplier > xFamiliesSupplier (xDestDoc, UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xFamiliesNameAccess (xFamiliesSupplier->getStyleFamilies(), UNO_QUERY_THROW); + uno::Reference< container::XNameAccess > xFamiliesNameAccess (xFamiliesSupplier->getStyleFamilies(), UNO_SET_THROW); uno::Any aCellStylesFamily = xFamiliesNameAccess->getByName("CellStyles"); uno::Reference< container::XNameContainer > xCellStylesFamilyNameAccess (aCellStylesFamily, UNO_QUERY_THROW); diff --git a/test/source/sheet/xusedareacursor.cxx b/test/source/sheet/xusedareacursor.cxx index 8ee578ff24d3..4ef310e2f398 100644 --- a/test/source/sheet/xusedareacursor.cxx +++ b/test/source/sheet/xusedareacursor.cxx @@ -27,7 +27,7 @@ namespace apitest { void XUsedAreaCursor::testGotoStartOfUsedArea() { uno::Reference< sheet::XSpreadsheet > xSheet(getXSpreadsheet(), UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor(xSheet->createCursor(), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor(xSheet->createCursor(), UNO_SET_THROW); uno::Reference< sheet::XCellRangeAddressable> xCellRangeAddressable(xSheetCellCursor, UNO_QUERY_THROW); uno::Reference< sheet::XUsedAreaCursor > xUsedAreaCursor(xSheetCellCursor, UNO_QUERY_THROW); @@ -61,7 +61,7 @@ void XUsedAreaCursor::testGotoStartOfUsedArea() void XUsedAreaCursor::testGotoEndOfUsedArea() { uno::Reference< sheet::XSpreadsheet > xSheet(getXSpreadsheet(), UNO_QUERY_THROW); - uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor(xSheet->createCursor(), UNO_QUERY_THROW); + uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor(xSheet->createCursor(), UNO_SET_THROW); uno::Reference< sheet::XCellRangeAddressable> xCellRangeAddressable(xSheetCellCursor, UNO_QUERY_THROW); uno::Reference< sheet::XUsedAreaCursor > xUsedAreaCursor(xSheetCellCursor, UNO_QUERY_THROW); diff --git a/test/source/style/xstyleloader.cxx b/test/source/style/xstyleloader.cxx index 5b684eab16a8..725351b2bbe5 100644 --- a/test/source/style/xstyleloader.cxx +++ b/test/source/style/xstyleloader.cxx @@ -30,7 +30,7 @@ void XStyleLoader::testLoadStylesFromURL() { uno::Reference xStyleLoader(init(), uno::UNO_QUERY_THROW); - uno::Reference xDoc(getTargetDoc(), uno::UNO_QUERY_THROW); + uno::Reference xDoc(getTargetDoc(), uno::UNO_SET_THROW); const OUString aFileURL = getTestURL(); uno::Sequence aOptions = xStyleLoader->getStyleLoaderOptions(); @@ -44,8 +44,8 @@ void XStyleLoader::testLoadStylesFromDocument() { uno::Reference xStyleLoader(init(), uno::UNO_QUERY_THROW); - uno::Reference xDoc(getTargetDoc(), uno::UNO_QUERY_THROW); - uno::Reference xSrcComponent(getSourceComponent(), UNO_QUERY_THROW); + uno::Reference xDoc(getTargetDoc(), uno::UNO_SET_THROW); + uno::Reference xSrcComponent(getSourceComponent(), UNO_SET_THROW); uno::Sequence aOptions = xStyleLoader->getStyleLoaderOptions(); xStyleLoader->loadStylesFromDocument(xSrcComponent, aOptions); @@ -59,7 +59,7 @@ void XStyleLoader::checkStyleProperties( { // check if targetDocument has myStyle uno::Reference xFamilies(xFamilySupplier->getStyleFamilies(), - UNO_QUERY_THROW); + UNO_SET_THROW); uno::Reference xCellStyles(xFamilies->getByName("CellStyles"), UNO_QUERY_THROW); diff --git a/test/source/table/xcellrange.cxx b/test/source/table/xcellrange.cxx index c3b58f0a6463..5f5155aae46e 100644 --- a/test/source/table/xcellrange.cxx +++ b/test/source/table/xcellrange.cxx @@ -25,7 +25,7 @@ void XCellRange::testGetCellByPosition() { uno::Reference xCR(init(), uno::UNO_QUERY_THROW); - uno::Reference xCell(xCR->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + uno::Reference xCell(xCR->getCellByPosition(0, 0), uno::UNO_SET_THROW); CPPUNIT_ASSERT(xCell.is()); CPPUNIT_ASSERT_THROW(xCR->getCellByPosition(-1, 1), lang::IndexOutOfBoundsException); @@ -36,7 +36,7 @@ void XCellRange::testGetCellRangeByName() uno::Reference xCR(init(), uno::UNO_QUERY_THROW); uno::Reference xCellRange(xCR->getCellRangeByName(m_aRangeName), - uno::UNO_QUERY_THROW); + uno::UNO_SET_THROW); CPPUNIT_ASSERT(xCellRange.is()); } @@ -45,7 +45,7 @@ void XCellRange::testGetCellRangeByPosition() uno::Reference xCR(init(), uno::UNO_QUERY_THROW); uno::Reference xCellRange(xCR->getCellRangeByPosition(0, 0, 0, 0), - uno::UNO_QUERY_THROW); + uno::UNO_SET_THROW); CPPUNIT_ASSERT(xCellRange.is()); CPPUNIT_ASSERT_THROW(xCR->getCellRangeByPosition(-1, 0, -1, 1), diff --git a/test/source/text/xsimpletext.cxx b/test/source/text/xsimpletext.cxx index edb61faa80ee..a3c1bbc1bfd1 100644 --- a/test/source/text/xsimpletext.cxx +++ b/test/source/text/xsimpletext.cxx @@ -28,7 +28,7 @@ void XSimpleText::testCreateTextCursor() void XSimpleText::testCreateTextCursorByRange() { uno::Reference xSimpleText(init(), UNO_QUERY_THROW); - uno::Reference xCursor(xSimpleText->createTextCursor(), UNO_QUERY_THROW); + uno::Reference xCursor(xSimpleText->createTextCursor(), UNO_SET_THROW); xCursor->gotoStart(false); diff --git a/test/source/text/xtextcontent.cxx b/test/source/text/xtextcontent.cxx index a3a6c4718274..2f0686b094b3 100644 --- a/test/source/text/xtextcontent.cxx +++ b/test/source/text/xtextcontent.cxx @@ -29,8 +29,8 @@ void XTextContent::testAttach() { uno::Reference< text::XTextContent > xTextContent(init(), UNO_QUERY_THROW); - uno::Reference< text::XTextContent > xContent(getTextContent(), UNO_QUERY_THROW); - uno::Reference< text::XTextRange > xRange(getTextRange(), UNO_QUERY_THROW); + uno::Reference< text::XTextContent > xContent(getTextContent(), UNO_SET_THROW); + uno::Reference< text::XTextRange > xRange(getTextRange(), UNO_SET_THROW); try { diff --git a/test/source/text/xtextrange.cxx b/test/source/text/xtextrange.cxx index 1fac30674f91..6eaa4123c217 100644 --- a/test/source/text/xtextrange.cxx +++ b/test/source/text/xtextrange.cxx @@ -24,7 +24,7 @@ void XTextRange::testGetEnd() uno::Reference xTextRange(init(), uno::UNO_QUERY_THROW); xTextRange->setString("UnitTest"); - uno::Reference xTR_end(xTextRange->getEnd(), uno::UNO_QUERY_THROW); + uno::Reference xTR_end(xTextRange->getEnd(), uno::UNO_SET_THROW); xTR_end->setString("End"); CPPUNIT_ASSERT(xTextRange->getText()->getString().endsWith("End")); @@ -43,7 +43,7 @@ void XTextRange::testGetStart() uno::Reference xTextRange(init(), uno::UNO_QUERY_THROW); xTextRange->setString("UnitTest"); - uno::Reference xTR_start(xTextRange->getStart(), uno::UNO_QUERY_THROW); + uno::Reference xTR_start(xTextRange->getStart(), uno::UNO_SET_THROW); xTR_start->setString("Start"); CPPUNIT_ASSERT(xTextRange->getText()->getString().startsWith("Start")); @@ -54,7 +54,7 @@ void XTextRange::testGetText() uno::Reference xTextRange(init(), uno::UNO_QUERY_THROW); xTextRange->setString("UnitTest"); - uno::Reference xText(xTextRange->getText(), uno::UNO_QUERY_THROW); + uno::Reference xText(xTextRange->getText(), uno::UNO_SET_THROW); CPPUNIT_ASSERT_EQUAL(OUString("UnitTest"), xTextRange->getString()); } } // namespace apitest diff --git a/test/source/view/xcontrolaccess.cxx b/test/source/view/xcontrolaccess.cxx index 2c24d85328c8..8ebf781a9732 100644 --- a/test/source/view/xcontrolaccess.cxx +++ b/test/source/view/xcontrolaccess.cxx @@ -46,8 +46,8 @@ void XControlAccess::testGetControl() xShapes->add(xShape); uno::Reference xCS(xShape, uno::UNO_QUERY_THROW); - uno::Reference xCM(xCS->getControl(), uno::UNO_QUERY_THROW); - uno::Reference xControl(xCA->getControl(xCM), uno::UNO_QUERY_THROW); + uno::Reference xCM(xCS->getControl(), uno::UNO_SET_THROW); + uno::Reference xControl(xCA->getControl(xCM), uno::UNO_SET_THROW); CPPUNIT_ASSERT(xControl.is()); } -- cgit v1.2.3