Kaydet (Commit) a361231b authored tarafından Noel Grandin's avatar Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ce760262
......@@ -424,7 +424,7 @@ bool EmbedMedia(uno::Reference<frame::XModel> const& xModel,
uno::Reference<document::XStorageBasedDocument> const xSBD(xModel,
uno::UNO_QUERY_THROW);
uno::Reference<embed::XStorage> const xStorage(
xSBD->getDocumentStorage(), uno::UNO_QUERY_THROW);
xSBD->getDocumentStorage(), uno::UNO_SET_THROW);
OUString const media("Media");
uno::Reference<embed::XStorage> const xSubStorage(
......
......@@ -196,7 +196,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
try
{
m_bError = false;
m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()) ), css::uno::UNO_QUERY_THROW );
m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()) ), css::uno::UNO_SET_THROW );
// OK- we can start async playing ...
// Count this request and initialize self-holder against dying by uno ref count ...
m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
......
......@@ -482,11 +482,11 @@ namespace basctl
Reference< XNameContainer > xLibrary;
try
{
Reference< XLibraryContainer > xLibContainer( getLibraryContainer( _eType ), UNO_QUERY_THROW );
Reference< XLibraryContainer > xLibContainer( getLibraryContainer( _eType ), UNO_SET_THROW );
if ( xLibContainer->hasByName( _rLibName ) )
xLibrary.set( xLibContainer->getByName( _rLibName ), UNO_QUERY_THROW );
else
xLibrary.set( xLibContainer->createLibrary( _rLibName ), UNO_QUERY_THROW );
xLibrary.set( xLibContainer->createLibrary( _rLibName ), UNO_SET_THROW );
if ( !xLibContainer->isLibraryLoaded( _rLibName ) )
xLibContainer->loadLibrary( _rLibName );
......@@ -569,7 +569,7 @@ namespace basctl
_out_rModuleOrDialog.clear();
try
{
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_QUERY_THROW );
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_SET_THROW );
if ( xLib->hasByName( _rObjectName ) )
{
_out_rModuleOrDialog = xLib->getByName( _rObjectName );
......@@ -593,7 +593,7 @@ namespace basctl
try
{
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_QUERY_THROW );
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_SET_THROW );
// get element
Any aElement( xLib->getByName( _rOldName ) );
......@@ -622,7 +622,7 @@ namespace basctl
Reference< XInputStreamProvider > xISP( aElement, UNO_QUERY_THROW );
if ( !_rxExistingDialogModel.is() )
{
Reference< XInputStream > xInput( xISP->createInputStream(), UNO_QUERY_THROW );
Reference< XInputStream > xInput( xISP->createInputStream(), UNO_SET_THROW );
::xmlscript::importDialogModel( xInput, xDialogModel, aContext, isDocument() ? getDocument() : Reference< XModel >() );
}
......@@ -696,7 +696,7 @@ namespace basctl
{
try
{
Reference< XNameContainer > xLib( getOrCreateLibrary( _eType, _rLibName ), UNO_QUERY_THROW );
Reference< XNameContainer > xLib( getOrCreateLibrary( _eType, _rLibName ), UNO_SET_THROW );
if ( xLib->hasByName( _rObjectName ) )
return false;
......@@ -715,7 +715,7 @@ namespace basctl
{
try
{
Reference< XNameContainer > xLib( getOrCreateLibrary( E_SCRIPTS, _rLibName ), UNO_QUERY_THROW );
Reference< XNameContainer > xLib( getOrCreateLibrary( E_SCRIPTS, _rLibName ), UNO_SET_THROW );
if ( !xLib->hasByName( _rModName ) )
return false;
xLib->replaceByName( _rModName, Any( _rModuleCode ) );
......@@ -733,7 +733,7 @@ namespace basctl
{
try
{
Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, true ), UNO_QUERY_THROW );
Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, true ), UNO_SET_THROW );
// create dialog
_out_rDialogProvider.clear();
......@@ -927,7 +927,7 @@ namespace basctl
Reference< XUriReferenceFactory > xUriFac = UriReferenceFactory::create(xContext);
OUString aLinkURL( xLibContainer->getLibraryLinkURL( _rLibName ) );
Reference< XUriReference > xUriRef( xUriFac->parse( aLinkURL ), UNO_QUERY_THROW );
Reference< XUriReference > xUriRef( xUriFac->parse( aLinkURL ), UNO_SET_THROW );
OUString aScheme = xUriRef->getScheme();
if ( aScheme.equalsIgnoreAsciiCase("file") )
......
......@@ -133,7 +133,7 @@ void PropBrw::ImplReCreateController()
::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) );
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW );
static const char s_sControllerServiceName[] = "com.sun.star.awt.PropertyBrowserController";
m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
if ( !m_xBrowserController.is() )
......
......@@ -42,7 +42,7 @@ namespace {
*/
uno::Reference< frame::XModuleManager2 > lclCreateModuleManager()
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext(), uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
return frame::ModuleManager::create(xContext);
}
......
......@@ -1823,7 +1823,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
}
}
xTargetLibrariesStor.set( i_rStorage->openStorageElement( sTargetLibrariesStoreName, embed::ElementModes::READWRITE ), UNO_QUERY_THROW );
xTargetLibrariesStor.set( i_rStorage->openStorageElement( sTargetLibrariesStoreName, embed::ElementModes::READWRITE ), UNO_SET_THROW );
}
catch( const uno::Exception& )
{
......@@ -2654,7 +2654,7 @@ void SfxLibraryContainer::initializeFromDocument( const Reference< XStorageBased
Reference< XServiceInfo > xSI( _rxDocument, UNO_QUERY_THROW );
if ( xSI->supportsService("com.sun.star.document.OfficeDocument"))
{
xDocStorage.set( _rxDocument->getDocumentStorage(), UNO_QUERY_THROW );
xDocStorage.set( _rxDocument->getDocumentStorage(), UNO_SET_THROW );
}
Reference< XModel > xDocument( _rxDocument, UNO_QUERY_THROW );
Reference< XComponent > xDocComponent( _rxDocument, UNO_QUERY_THROW );
......
......@@ -1100,7 +1100,7 @@ namespace canvas
try
{
uno::Reference< rendering::XGraphicDevice > xDevice( i_rxCanvas->getDevice(),
uno::UNO_QUERY_THROW );
uno::UNO_SET_THROW );
uno::Reference< lang::XServiceInfo > xServiceInfo( xDevice,
uno::UNO_QUERY_THROW );
......
......@@ -542,9 +542,9 @@ void TestWindow::Paint(vcl::RenderContext&, const tools::Rectangle&)
try
{
uno::Reference< rendering::XCanvas > xVDevCanvas( GetCanvas(),
uno::UNO_QUERY_THROW );
uno::UNO_SET_THROW );
uno::Reference< rendering::XGraphicDevice > xVDevDevice( xVDevCanvas->getDevice(),
uno::UNO_QUERY_THROW );
uno::UNO_SET_THROW );
DemoRenderer aVDevRenderer( xVDevDevice, xVDevCanvas, GetSizePixel());
xVDevCanvas->clear();
aVDevRenderer.drawGrid();
......@@ -559,7 +559,7 @@ void TestWindow::Paint(vcl::RenderContext&, const tools::Rectangle&)
uno::Reference< rendering::XCanvas > xCanvas( GetSpriteCanvas(),
uno::UNO_QUERY_THROW );
uno::Reference< rendering::XGraphicDevice > xDevice( xCanvas->getDevice(),
uno::UNO_QUERY_THROW );
uno::UNO_SET_THROW );
DemoRenderer aRenderer( xDevice, xCanvas, GetSizePixel() );
xCanvas->clear();
......
......@@ -63,7 +63,7 @@ void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xD
OUString const & sFieldName,
sheet::DataPilotFieldOrientation eOrientation)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
sal_Int32 nCount = xIndexAccess->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
......@@ -79,7 +79,7 @@ void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDesc
OUString const & sFieldName,
sheet::GeneralFunction eFunction)
{
uno::Reference<container::XIndexAccess> xPilotIndexAccess(xDescriptor->getDataPilotFields(), UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xPilotIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
sal_Int32 nCount = xPilotIndexAccess->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
......@@ -95,7 +95,7 @@ void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDe
OUString const & sFieldName,
sheet::DataPilotFieldLayoutInfo aLayoutInfo)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
sal_Int32 nCount = xIndexAccess->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
......@@ -115,7 +115,7 @@ void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDes
OUString const & sFieldName,
uno::Sequence<sheet::GeneralFunction> const & rSubtotalFunctions)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
sal_Int32 nCount = xIndexAccess->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
......@@ -193,7 +193,7 @@ uno::Sequence<uno::Reference<chart2::data::XLabeledDataSequence>>
uno::Sequence<beans::PropertyValue> aArguments( comphelper::InitPropertySequence(
{{"CellRangeRepresentation", uno::Any(OUString("PT@categories"))}} ));
uno::Reference<chart2::data::XDataProvider> xDataProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW);
uno::Reference<chart2::data::XDataProvider> xDataProvider(xChartDoc->getDataProvider(), uno::UNO_SET_THROW);
return xDataProvider->createDataSource(aArguments)->getDataSequences();
}
......
......@@ -406,7 +406,7 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false)
{
setTestFileName(aTestFile);
load(getTestFileDirName(), getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_QUERY_THROW);
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
......@@ -572,7 +572,7 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
{
setTestFileName(sTestFile);
load(getTestFileDirName(), getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_QUERY_THROW);
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
......@@ -643,7 +643,7 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
{
setTestFileName(sTestFile);
load(getTestFileDirName(), getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_QUERY_THROW);
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
......@@ -796,7 +796,7 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
{
setTestFileName(sTestFile);
load(getTestFileDirName(), getTestFileName());
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_QUERY_THROW);
uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
......
......@@ -1871,7 +1871,7 @@ void Chart2ExportTest::testCustomDataLabel()
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
// 1
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
......@@ -1887,7 +1887,7 @@ void Chart2ExportTest::testCustomDataLabel()
CPPUNIT_ASSERT_EQUAL(OUString("{0C576297-5A9F-4B4E-A675-B6BA406B7D87}"), aFields[1]->getGuid());
// 2
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), aFields.getLength());
......@@ -1929,7 +1929,7 @@ void Chart2ExportTest::testCustomDataLabel()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nCharUnderline);
// 3
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
......@@ -1938,7 +1938,7 @@ void Chart2ExportTest::testCustomDataLabel()
CPPUNIT_ASSERT_EQUAL(OUString("{C8F3EB90-8960-4F9A-A3AD-B4FAC4FE4566}"), aFields[0]->getGuid());
// 4
xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
......@@ -1966,7 +1966,7 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
// First series
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
......@@ -1987,7 +1987,7 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
......
......@@ -195,7 +195,7 @@ Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, uno::Refe
uno::Reference< document::XEmbeddedObjectSupplier > xEmbObjectSupplier(xChart, UNO_QUERY_THROW);
uno::Reference< lang::XComponent > xChartComp( xEmbObjectSupplier->getEmbeddedObject(), UNO_QUERY_THROW );
uno::Reference< lang::XComponent > xChartComp( xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW );
return xChartComp;
......@@ -230,7 +230,7 @@ Reference<lang::XComponent> getPivotChartCompFromSheet(sal_Int32 nSheet, uno::Re
uno::Reference<document::XEmbeddedObjectSupplier> xEmbObjectSupplier(xTablePivotChart, UNO_QUERY_THROW);
uno::Reference<lang::XComponent> xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_QUERY_THROW);
uno::Reference<lang::XComponent> xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW);
return xChartComp;
}
......@@ -248,7 +248,7 @@ Reference<chart2::XChartDocument> getPivotChartDocFromSheet(uno::Reference<table
uno::Reference<document::XEmbeddedObjectSupplier> xEmbObjectSupplier(xTablePivotChart, UNO_QUERY_THROW);
uno::Reference<lang::XComponent> xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_QUERY_THROW);
uno::Reference<lang::XComponent> xChartComp(xEmbObjectSupplier->getEmbeddedObject(), UNO_SET_THROW);
uno::Reference<chart2::XChartDocument> xChartDoc(xChartComp, UNO_QUERY_THROW);
return xChartDoc;
......
......@@ -561,7 +561,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
{
try
{
Reference< chart2::XRegressionCurveCalculator > xCalculator( xCurve->getCalculator(), uno::UNO_QUERY_THROW );
Reference< chart2::XRegressionCurveCalculator > xCalculator( xCurve->getCalculator(), uno::UNO_SET_THROW );
sal_Int32 aDegree = 2;
sal_Int32 aPeriod = 2;
bool bForceIntercept = false;
......@@ -664,7 +664,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
{
try
{
Reference< chart2::XRegressionCurveCalculator > xCalculator( xCurve->getCalculator(), uno::UNO_QUERY_THROW );
Reference< chart2::XRegressionCurveCalculator > xCalculator( xCurve->getCalculator(), uno::UNO_SET_THROW );
RegressionCurveHelper::initializeCurveCalculator( xCalculator, xSeries, xChartModel );
const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
......
......@@ -639,7 +639,7 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
}
uno::Reference< document::XUndoManagerSupplier > xSuppUndo( getModel(), uno::UNO_QUERY_THROW );
m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_QUERY_THROW );
m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_SET_THROW );
return true;
}
......@@ -1429,7 +1429,7 @@ void ChartController::NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> pUndoA
try
{
const Reference< document::XUndoManagerSupplier > xSuppUndo( getModel(), uno::UNO_QUERY_THROW );
const Reference< document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), uno::UNO_QUERY_THROW );
const Reference< document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), uno::UNO_SET_THROW );
const Reference< document::XUndoAction > xAction( new impl::ShapeUndoElement( std::move(pUndoAction) ) );
xUndoManager->addUndoAction( xAction );
}
......
......@@ -44,7 +44,7 @@ UndoCommandDispatch::UndoCommandDispatch(
m_xModel( xModel )
{
uno::Reference< document::XUndoManagerSupplier > xSuppUndo( m_xModel, uno::UNO_QUERY_THROW );
m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_QUERY_THROW );
m_xUndoManager.set( xSuppUndo->getUndoManager(), uno::UNO_SET_THROW );
}
UndoCommandDispatch::~UndoCommandDispatch()
......
......@@ -457,7 +457,7 @@ ErrCode XMLFilter::impl_ImportStream(
uno::UNO_QUERY_THROW );
Reference< document::XImporter > xImporter( xDocHandler, uno::UNO_QUERY_THROW );
xImporter->setTargetDocument( Reference< lang::XComponent >( m_xTargetDoc, uno::UNO_QUERY_THROW ));
xImporter->setTargetDocument( Reference< lang::XComponent >( m_xTargetDoc, uno::UNO_SET_THROW ));
if ( !m_sDocumentHandler.isEmpty() )
{
......
......@@ -182,7 +182,7 @@ OUString SAL_CALL RegressionCurveCalculator::getFormattedRepresentation(
// create and prepare a number formatter
if( !xNumFmtSupplier.is())
return getRepresentation();
Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext(), uno::UNO_QUERY_THROW );
Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
Reference< util::XNumberFormatter > xNumFormatter( util::NumberFormatter::create(xContext), uno::UNO_QUERY_THROW );
xNumFormatter->attachNumberFormatsSupplier( xNumFmtSupplier );
......
......@@ -475,7 +475,7 @@ Assembly ^ TypeEmitter::type_resolve(
if (nullptr == ret_type)
{
Reference< reflection::XConstantTypeDescription > xConstant(
xType, UNO_QUERY_THROW );
xType, UNO_SET_THROW );
::System::Object ^ constant =
to_cli_constant( xConstant->getConstantValue() );
Emit::TypeBuilder ^ type_builder =
......
......@@ -101,7 +101,7 @@ namespace comphelper {
if ( xDPS.is() )
{
Reference< XDocumentProperties > xDocProps (
xDPS->getDocumentProperties(), UNO_QUERY_THROW );
xDPS->getDocumentProperties(), css::uno::UNO_SET_THROW );
sTitle = xDocProps->getTitle();
if ( !sTitle.isEmpty() )
return sTitle;
......
......@@ -682,7 +682,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath(
sal_uInt32 nStorageMode = nOpenMode & ~embed::ElementModes::TRUNCATE;
uno::Reference< embed::XStorage > xStorage(
LookupStorageAtPath( xParentStorage, aElems, nStorageMode, rNastiness ),
uno::UNO_QUERY_THROW );
uno::UNO_SET_THROW );
return xStorage->openStreamElement( aName, nOpenMode );
}
......
......@@ -810,9 +810,9 @@ void collectColumnInformation(const Reference< XConnection>& _xConnection,
::utl::SharedUNOComponent< XStatement > xStmt( _xConnection->createStatement() );
Reference< XPropertySet > xStatementProps( xStmt, UNO_QUERY_THROW );
xStatementProps->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ), makeAny( false ) );
Reference< XResultSet > xResult( xStmt->executeQuery( sSelect ), UNO_QUERY_THROW );
Reference< XResultSet > xResult( xStmt->executeQuery( sSelect ), UNO_SET_THROW );
Reference< XResultSetMetaDataSupplier > xSuppMeta( xResult, UNO_QUERY_THROW );
Reference< XResultSetMetaData > xMeta( xSuppMeta->getMetaData(), UNO_QUERY_THROW );
Reference< XResultSetMetaData > xMeta( xSuppMeta->getMetaData(), UNO_SET_THROW );
sal_Int32 nCount = xMeta->getColumnCount();
OSL_ENSURE( nCount != 0, "::dbtools::collectColumnInformation: result set has empty (column-less) meta data!" );
......
......@@ -149,7 +149,7 @@ namespace dbtools
}
// get the format key of our bound field
Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_SET_THROW );
bool bHaveFieldFormat = false;
const OUString sFormatKeyProperty( "FormatKey" );
if ( xPSI->hasPropertyByName( sFormatKeyProperty ) )
......@@ -166,7 +166,7 @@ namespace dbtools
// some more formatter settings
_rData.m_nKeyType = ::comphelper::getNumberFormatType( xNumberFormatsSupp->getNumberFormats(), _rData.m_nFormatKey );
Reference< XPropertySet > xFormatSettings( xNumberFormatsSupp->getNumberFormatSettings(), UNO_QUERY_THROW );
Reference< XPropertySet > xFormatSettings( xNumberFormatsSupp->getNumberFormatSettings(), UNO_SET_THROW );
OSL_VERIFY( xFormatSettings->getPropertyValue("NullDate") >>= _rData.m_aNullDate );
// remember the formatter
......@@ -190,7 +190,7 @@ namespace dbtools
try
{
// get the number formats supplier of the connection of the form
Reference< XConnection > xConnection( getConnection( i_rRowSet ), UNO_QUERY_THROW );
Reference< XConnection > xConnection( getConnection( i_rRowSet ), UNO_SET_THROW );
Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection, true, i_rContext ), UNO_SET_THROW );
// create a number formatter for it
......
......@@ -266,7 +266,7 @@ namespace param
:ParameterWrapperContainer_Base( m_aMutex )
{
Reference< XParametersSupplier > xSuppParams( _rxComposer, UNO_QUERY_THROW );
Reference< XIndexAccess > xParameters( xSuppParams->getParameters(), UNO_QUERY_THROW );
Reference< XIndexAccess > xParameters( xSuppParams->getParameters(), css::uno::UNO_SET_THROW );
sal_Int32 nParamCount( xParameters->getCount() );
m_aParameters.reserve( nParamCount );
for ( sal_Int32 i=0; i<nParamCount; ++i )
......
......@@ -138,7 +138,7 @@ namespace dbtools
{
// ask the connection for the query
Reference< XQueriesSupplier > xSupplyQueries( _rData.xConnection, UNO_QUERY_THROW );
Reference< XNameAccess > xQueries( xSupplyQueries->getQueries(), UNO_QUERY_THROW );
Reference< XNameAccess > xQueries( xSupplyQueries->getQueries(), css::uno::UNO_SET_THROW );
if ( !xQueries->hasByName( _rData.sCommand ) )
break;
......
......@@ -143,7 +143,7 @@ namespace connectivity { namespace hsqldb
{
if ( !m_bReadOnly )
{
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
Reference< XStatement > xStmt( m_xConnection->createStatement(), css::uno::UNO_SET_THROW );
xStmt->execute( "CHECKPOINT DEFRAG" );
}
}
......@@ -223,8 +223,8 @@ namespace connectivity { namespace hsqldb
{
Reference< XConnection > xMe( *this, UNO_QUERY );
Reference< XDataDefinitionSupplier > xDefinitionsSupp( m_xDriver, UNO_QUERY_THROW );
Reference< XTablesSupplier > xTablesSupp( xDefinitionsSupp->getDataDefinitionByConnection( xMe ), UNO_QUERY_THROW );
xTables.set( xTablesSupp->getTables(), UNO_QUERY_THROW );
Reference< XTablesSupplier > xTablesSupp( xDefinitionsSupp->getDataDefinitionByConnection( xMe ), css::uno::UNO_SET_THROW );
xTables.set( xTablesSupp->getTables(), css::uno::UNO_SET_THROW );
}
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
......@@ -246,7 +246,7 @@ namespace connectivity { namespace hsqldb
bool bDoesExist = false;
try
{
Reference< XNameAccess > xTables( impl_getTableContainer_throw(), UNO_QUERY_THROW );
Reference< XNameAccess > xTables( impl_getTableContainer_throw(), css::uno::UNO_SET_THROW );
bDoesExist = xTables->hasByName( _rTableName );
}
catch( const Exception& )
......@@ -276,7 +276,7 @@ namespace connectivity { namespace hsqldb
Reference< XConnection > xMe( *this, UNO_QUERY_THROW );
// split the fully qualified name
Reference< XDatabaseMetaData > xMetaData( xMe->getMetaData(), UNO_QUERY_THROW );
Reference< XDatabaseMetaData > xMetaData( xMe->getMetaData(), css::uno::UNO_SET_THROW );
OUString sCatalog, sSchema, sName;
::dbtools::qualifiedNameComponents( xMetaData, _rTableName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::Complete );
......@@ -286,8 +286,8 @@ namespace connectivity { namespace hsqldb
HTools::appendTableFilterCrit( sSQL, sCatalog, sSchema, sName, true );
sSQL.append( " AND TABLE_TYPE = 'TABLE'" );
Reference< XStatement > xStatement( xMe->createStatement(), UNO_QUERY_THROW );
Reference< XResultSet > xTableHsqlType( xStatement->executeQuery( sSQL.makeStringAndClear() ), UNO_QUERY_THROW );