summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 10:13:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-13 08:15:27 +0200
commita361231b1363d072d737e9b1d411b71aa9550d84 (patch)
tree08641fe2af10c1f22c7fd58e62f99b6dbe301c62 /test/source/sheet
parentce76026231d9536d2025a1e69f435bcbf39fe4f8 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/shape.cxx6
-rw-r--r--test/source/sheet/sheetcell.cxx8
-rw-r--r--test/source/sheet/sheetcellrange.cxx8
-rw-r--r--test/source/sheet/sheetcellranges.cxx8
-rw-r--r--test/source/sheet/xactivationbroadcaster.cxx2
-rw-r--r--test/source/sheet/xcellformatrangessupplier.cxx2
-rw-r--r--test/source/sheet/xcellseries.cxx28
-rw-r--r--test/source/sheet/xconsolidatable.cxx4
-rw-r--r--test/source/sheet/xdatapilotdescriptor.cxx12
-rw-r--r--test/source/sheet/xdatapilotfield.cxx2
-rw-r--r--test/source/sheet/xdatapilottable2.cxx2
-rw-r--r--test/source/sheet/xdatapilottables.cxx2
-rw-r--r--test/source/sheet/xdatapilottablessupplier.cxx2
-rw-r--r--test/source/sheet/xdocumentauditing.cxx4
-rw-r--r--test/source/sheet/xheaderfootercontent.cxx6
-rw-r--r--test/source/sheet/xmultipleoperation.cxx2
-rw-r--r--test/source/sheet/xscenariossupplier.cxx2
-rw-r--r--test/source/sheet/xsheetannotationanchor.cxx2
-rw-r--r--test/source/sheet/xsheetannotations.cxx6
-rw-r--r--test/source/sheet/xsheetannotationssupplier.cxx2
-rw-r--r--test/source/sheet/xspreadsheet.cxx4
-rw-r--r--test/source/sheet/xspreadsheets2.cxx2
-rw-r--r--test/source/sheet/xusedareacursor.cxx4
23 files changed, 60 insertions, 60 deletions
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<sheet::XSpreadsheetDocument> xDoc(getXSheetDocument(), UNO_QUERY_THROW);
- uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_SET_THROW);
uno::Sequence<OUString> sheetNames = xSheets->getElementNames();
uno::Reference<sheet::XSpreadsheet> xSheet(xSheets->getByName(sheetNames[0]), UNO_QUERY_THROW);
- uno::Reference<table::XCell> xCell(xSheet->getCellByPosition(0, 0), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> xCell(xSheet->getCellByPosition(0, 0), UNO_SET_THROW);
// Shape should be anchored to sheet by default
uno::Reference<sheet::XSpreadsheet> 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<table::XCell> xCell2(xSheet->getCellByPosition(1, 2), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<sheet::XSheetConditionalEntries> 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<sheet::XSheetConditionalEntries> 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<beans::XPropertySet> aValidationNew(aValidationGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<beans::XPropertySet> aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<sheet::XSheetConditionalEntries> aConditionalFormatNew(aConditionalFormatGet,
- UNO_QUERY_THROW);
+ UNO_SET_THROW);
aConditionalFormatNew->addNew(aPropValue);
aNewValue <<= aConditionalFormatNew;
@@ -94,7 +94,7 @@ void SheetCellRange::testSheetCellRangeProperties()
>>= aConditionalFormatLocalGet);
uno::Reference<sheet::XSheetConditionalEntries> 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<beans::XPropertySet> aValidationNew(aValidationGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<beans::XPropertySet> aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<sheet::XSheetConditionalEntries> aConditionalFormatNew(aConditionalFormatGet,
- UNO_QUERY_THROW);
+ UNO_SET_THROW);
aConditionalFormatNew->addNew(aPropValue);
aNewValue <<= aConditionalFormatNew;
@@ -70,7 +70,7 @@ void SheetCellRanges::testSheetCellRangesProperties()
>>= aConditionalFormatLocalGet);
uno::Reference<sheet::XSheetConditionalEntries> 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<beans::XPropertySet> aValidationNew(aValidationGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<beans::XPropertySet> aValidationLocalNew(aValidationLocalGet, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> 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<sheet::XActivationEventListener>(xListener.get()));
uno::Reference<sheet::XSpreadsheetView> xView(xAB, UNO_QUERY_THROW);
- uno::Reference<sheet::XSpreadsheet> xSheet1(xView->getActiveSheet(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSpreadsheet> xSheet1(xView->getActiveSheet(), UNO_SET_THROW);
uno::Reference<sheet::XSpreadsheet> 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<sheet::XCellFormatRangesSupplier> xCFRS(init(), UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xIA(xCFRS->getCellFormatRanges(), UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> 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<table::XCellRange> xCellRange(init(), UNO_QUERY_THROW);
sal_Int32 maValue = xCellRange->getCellByPosition(maStartX, maStartY)->getValue();
- uno::Reference<table::XCellRange> xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_SET_THROW);
uno::Reference<sheet::XCellSeries> 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<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCellRange> xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_SET_THROW);
uno::Reference<sheet::XCellSeries> 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<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW);
xCellResultH->setFormula("");
- uno::Reference<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_SET_THROW);
xCellResultV->setFormula("");
}
}
@@ -57,14 +57,14 @@ void XCellSeries::testFillSeries()
uno::Reference<table::XCellRange> xCellRange(init(), UNO_QUERY_THROW);
sal_Int32 maValue = xCellRange->getCellByPosition(maStartX, maStartY)->getValue();
- uno::Reference<table::XCellRange> xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xCellRangeH(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX + 2, maStartY), UNO_SET_THROW);
uno::Reference<sheet::XCellSeries> 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<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCellRange> xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xCellRangeV(xCellRange->getCellRangeByPosition(maStartX, maStartY, maStartX, maStartY + 2), UNO_SET_THROW);
uno::Reference<sheet::XCellSeries> 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<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> xCellResultH(xCellRange->getCellByPosition(maStartX + i, maStartY), UNO_SET_THROW);
xCellResultH->setFormula("");
- uno::Reference<table::XCell> xCellResultV(xCellRange->getCellByPosition(maStartX, maStartY + i), UNO_QUERY_THROW);
+ uno::Reference<table::XCell> 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<sheet::XConsolidatable> xConsolidatable(init(), UNO_QUERY_THROW);
uno::Reference<sheet::XConsolidationDescriptor> 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<sheet::XConsolidatable> xConsolidatable(init(), UNO_QUERY_THROW);
uno::Reference<sheet::XConsolidationDescriptor> 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<sheet::XDataPilotField> xDPF(init(), UNO_QUERY_THROW);
- uno::Reference<container::XIndexAccess> xIA(xDPF->getItems(), UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> 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<sheet::XSpreadsheet> xSheet(getXSpreadsheet(), UNO_QUERY_THROW);
uno::Reference<sheet::XDataPilotDescriptor> 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<sheet::XDataPilotTablesSupplier> xDPTS(init(), UNO_QUERY_THROW);
- uno::Reference<sheet::XDataPilotTables> xDPT(xDPTS->getDataPilotTables(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XDataPilotTables> 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<frame::XFrame>& xFrame,
{
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext),
- UNO_QUERY_THROW);
+ UNO_SET_THROW);
CPPUNIT_ASSERT(xDispatchHelper.is());
uno::Reference<frame::XDispatchProvider> xDispatchProvider(xFrame, UNO_QUERY_THROW);
@@ -81,7 +81,7 @@ void XDocumentAuditing::testRefreshArrows()
uno::Reference<sheet::XDocumentAuditing> xDocumentAuditing(init(), UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(xDocumentAuditing, UNO_QUERY_THROW);
- uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_SET_THROW);
uno::Reference<container::XIndexAccess> xIA(xSheets, UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(0), UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> 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<sheet::XHeaderFooterContent> xHFC(init(), UNO_QUERY_THROW);
- uno::Reference<text::XText> xText(xHFC->getCenterText(), UNO_QUERY_THROW);
+ uno::Reference<text::XText> 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<sheet::XHeaderFooterContent> xHFC(init(), UNO_QUERY_THROW);
- uno::Reference<text::XText> xText(xHFC->getLeftText(), UNO_QUERY_THROW);
+ uno::Reference<text::XText> xText(xHFC->getLeftText(), UNO_SET_THROW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get left text", OUString("LEFT"), xText->getString());
}
void XHeaderFooterContent::testGetRightText()
{
uno::Reference<sheet::XHeaderFooterContent> xHFC(init(), UNO_QUERY_THROW);
- uno::Reference<text::XText> xText(xHFC->getRightText(), UNO_QUERY_THROW);
+ uno::Reference<text::XText> 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<sheet::XSpreadsheet> xSheet(getXSpreadsheet(), UNO_QUERY_THROW);
uno::Reference<table::XCellRange> xCellRange(xSheet->getCellRangeByName("$A$20:$A$20"),
- UNO_QUERY_THROW);
+ UNO_SET_THROW);
uno::Reference<sheet::XCellRangeAddressable> xCellRangeAddr(xCellRange, UNO_QUERY_THROW);
uno::Reference<table::XCell> 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<sheet::XScenariosSupplier> xSupplier(init(), UNO_QUERY_THROW);
- uno::Reference<sheet::XScenarios> xScenarios(xSupplier->getScenarios(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XScenarios> 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<sheet::XSheetAnnotationAnchor> xAnchor(init(), UNO_QUERY_THROW);
- uno::Reference<sheet::XSheetAnnotation> xAnnotation(xAnchor->getAnnotation(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSheetAnnotation> 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<sheet::XSheetAnnotationsSupplier> xSupplier(init(), UNO_QUERY_THROW);
uno::Reference<sheet::XSheetAnnotations> 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);