diff options
234 files changed, 129 insertions, 542 deletions
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 999354efaedf..f762981af06b 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -297,7 +297,6 @@ void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNew for(sal_Int32 i=0;i<nChildCount;i++) { css::uno::Reference< css::accessibility::XAccessible > xAccessible = getAccessibleChild(i); - css::uno::Reference< css::accessibility::XAccessibleContext > xAccessibleChild = xAccessible->getAccessibleContext(); if(css::uno::Reference< css::accessibility::XAccessible >(m_xImpl->m_xTable.get()) == xAccessible) { std::vector< AccessibleGridControlTableCell* >& rCells = diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 9d958926609e..18a4a344495d 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -321,7 +321,6 @@ namespace accessibility if ( nSelectedChildIndex < 0 || nSelectedChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); - Reference< XAccessible > xChild; sal_Int32 nSelCount = 0; VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index f5bc0d5659d4..b5a4a168ed48 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -63,8 +63,7 @@ VCLXAccessibleBox::~VCLXAccessibleBox() void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) { - uno::Any aOldValue, aNewValue; - uno::Reference<XAccessible> xAcc; + uno::Any aOldValue, aNewValue; switch ( rVclWindowEvent.GetId() ) { diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index c0efa32baa99..43573250de0c 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2285,8 +2285,6 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) , bNeedIntrospection( true ) , bNativeCOMObject( false ) { - static Reference< XIntrospection > xIntrospection; - // beat out again the default properties of Sbx Remove( "Name", SbxClassType::DontCare ); Remove( "Parent", SbxClassType::DontCare ); @@ -3362,7 +3360,6 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType ) { // Is it a field(?) Reference< XIdlField > xField = m_xClass->getField( rName ); - Reference< XIdlClass > xClass; if( xField.is() ) { try diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index f0166383c14e..3fd6e025a7c9 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3927,7 +3927,6 @@ OUString getObjectTypeName( SbxVariable* pVar ) if ( xServInfo.is() ) { // is this a VBA object ? - uno::Reference< ooo::vba::XHelperInterface > xVBA( aObj, uno::UNO_QUERY ); Sequence< OUString > sServices = xServInfo->getSupportedServiceNames(); if ( sServices.getLength() ) { diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 3e5af6eed373..4aab96ec6d95 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1058,8 +1058,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, } if( mxSFI->isFolder( aPrevFolder ) ) { - SfxLibraryContainer* pPrevCont = createInstanceImpl(); - Reference< XInterface > xRef = static_cast< XInterface* >( static_cast< OWeakObject* >(pPrevCont) ); + rtl::Reference<SfxLibraryContainer> pPrevCont = createInstanceImpl(); // Rename previous basic folder to make storage URLs correct during initialisation OUString aFolderUserBasic = aUserBasicInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); @@ -1266,7 +1265,7 @@ void SfxLibraryContainer::implScanExtensions() // Create link const bool bReadOnly = false; - Reference< XNameAccess > xLib = createLibraryLink( aLibName, aIndexFileURL, bReadOnly ); + createLibraryLink( aLibName, aIndexFileURL, bReadOnly ); } #else (void) this; @@ -3261,7 +3260,6 @@ ScriptSubPackageIterator::ScriptSubPackageIterator( Reference< deployment::XPack , m_nSubPkgCount( 0 ) , m_iNextSubPkg( 0 ) { - Reference< deployment::XPackage > xScriptPackage; if( !m_xMainPackage.is() ) { return; diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index abc07cf85942..3d4f789169d7 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -687,7 +687,6 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getLegend() if( ! m_xLegend.is()) { m_xLegend = new LegendWrapper( m_spChart2ModelContact ); - Reference< lang::XComponent > xComp( m_xLegend, uno::UNO_QUERY ); } return m_xLegend; @@ -698,7 +697,6 @@ Reference< beans::XPropertySet > SAL_CALL ChartDocumentWrapper::getArea() if( ! m_xArea.is()) { m_xArea.set( new AreaWrapper( m_spChart2ModelContact ) ); - Reference< lang::XComponent > xComp( m_xArea, uno::UNO_QUERY ); } return m_xArea; diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index b62f1705acd4..c1614607ef00 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -687,8 +687,6 @@ Reference< throw lang::IndexOutOfBoundsException("DataSeries index invalid", static_cast< ::cppu::OWeakObject * >( this )); - Reference< chart2::XDataSeries > xSeries; - sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() ); if( nNewAPIIndex < 0 ) throw lang::IndexOutOfBoundsException("DataSeries index invalid", @@ -706,8 +704,6 @@ Reference< throw lang::IndexOutOfBoundsException("DataSeries index invalid", static_cast< ::cppu::OWeakObject * >( this )); - Reference< chart2::XDataSeries > xSeries; - sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() ); if( nNewAPIIndex < 0 ) throw lang::IndexOutOfBoundsException("DataSeries index invalid", diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index 646a27a35cb1..fdff4e769147 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -45,18 +45,14 @@ void ChartController::executeDispatch_EditData() Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { - Reference< css::chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider()); - - { - SolarMutexGuard aSolarGuard; - UndoLiveUpdateGuardWithData aUndoGuard( - SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), - m_xUndoManager ); - ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC ); - if (aDataEditorDialog->Execute() == RET_OK) - aDataEditorDialog->ApplyChangesToModel(); - aUndoGuard.commit(); - } + SolarMutexGuard aSolarGuard; + UndoLiveUpdateGuardWithData aUndoGuard( + SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), + m_xUndoManager ); + ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC ); + if (aDataEditorDialog->Execute() == RET_OK) + aDataEditorDialog->ApplyChangesToModel(); + aUndoGuard.commit(); } } diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index b5577ff40f57..795b3b38b08c 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -174,7 +174,6 @@ wrapper::ItemConverter* createItemConverter( pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize())); uno::Reference<XDataSeries> xSeries = ObjectIdentifier::getDataSeriesForCID(aObjectCID, xChartModel); - uno::Reference<XChartType> xChartType = ChartModelHelper::getChartTypeOfSeries(xChartModel, xSeries); uno::Reference<XDiagram> xDiagram = ChartModelHelper::findDiagram(xChartModel); diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 53b7594e412a..50f0a12b474a 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -859,7 +859,6 @@ void ChartController::executeDispatch_ToggleLegend() void ChartController::executeDispatch_ToggleGridHorizontal() { - Reference< frame::XModel > xModel( getModel() ); UndoGuard aUndoGuard( SCH_RESSTR( STR_ACTION_TOGGLE_GRID_HORZ ), m_xUndoManager ); Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() )); @@ -893,7 +892,6 @@ void ChartController::executeDispatch_ToggleGridHorizontal() void ChartController::executeDispatch_ToggleGridVertical() { - Reference< frame::XModel > xModel( getModel() ); UndoGuard aUndoGuard( SCH_RESSTR( STR_ACTION_TOGGLE_GRID_VERTICAL ), m_xUndoManager ); Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() )); diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index ca18efbabe77..6eb04776332b 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -162,9 +162,7 @@ void setTrendlineVisible(const css::uno::Reference<css::frame::XModel>& if (bVisible) { - /* code */ - uno::Reference< chart2::XRegressionCurve > xCurve = - RegressionCurveHelper::addRegressionCurve( + RegressionCurveHelper::addRegressionCurve( SvxChartRegress::Linear, xRegressionCurveContainer, comphelper::getProcessComponentContext()); diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 1b3e233b5218..48d38e832850 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1173,7 +1173,6 @@ tServiceNameMap & lcl_getStaticServiceNameMap() // ____ XMultiServiceFactory ____ Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString& rServiceSpecifier ) { - uno::Reference< uno::XInterface > xResult; tServiceNameMap & rMap = lcl_getStaticServiceNameMap(); tServiceNameMap::const_iterator aIt( rMap.find( rServiceSpecifier )); diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index 473d1eed8015..26ea1979e991 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -981,7 +981,6 @@ void AxisHelper::getAxisOrGridExcistence( Sequence< sal_Bool >& rExistenceList if(bAxis) { sal_Int32 nN; - Reference< XAxis > xAxis; for(nN=0;nN<3;nN++) rExistenceList[nN] = AxisHelper::isAxisShown( nN, true, xDiagram ); for(nN=3;nN<6;nN++) diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 3bc8e462a839..d0d29a1c324e 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -769,7 +769,6 @@ std::vector< Reference< XAxis > > lcl_getAxisHoldingCategoriesFromDiagram( { std::vector< Reference< XAxis > > aRet; - Reference< XAxis > xResult; // return first x-axis as fall-back Reference< XAxis > xFallBack; try diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index 925c5e56f72a..9f5998297ff0 100644 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -173,7 +173,6 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( uno::Sequence< OUStr if(!nCount) return; rOutTexts.realloc(nCount); - Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() ); sal_Int32 nAxisNumberFormat = 0; Reference< XCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) ); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 64ada6d2af09..3ff5cd913cfb 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1840,7 +1840,7 @@ void VCartesianAxis::createShapes() {std::initializer_list<awt::Point>{ {static_cast<sal_Int32>(aStart.getX()), static_cast<sal_Int32>(aStart.getY())}, {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}}; - Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( + m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties ); } } diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 0ccc53df3dcb..326da900cf8b 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -181,8 +181,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( getPropNamesAndValues( xLegendEntryProperties, aPropNames, aPropValues, ePropertyType, awt::Size(0,0) );// PropertyType::FilledSeries - Reference< drawing::XShape > xShape = - pShapeFactory->createRectangle( xResultGroup, + pShapeFactory->createRectangle( xResultGroup, rEntryKeyAspectRatio, awt::Point( 0, 0 ), aPropNames, aPropValues ); } diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index d822f51f7de4..4aec70aebb83 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -64,8 +64,6 @@ uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetStorageFactory( uno::Reference< lang::XSingleServiceFactory > OStorageHelper::GetFileSystemStorageFactory( const uno::Reference< uno::XComponentContext >& rxContext ) { - uno::Reference< uno::XComponentContext> xContext = rxContext.is() ? rxContext : ::comphelper::getProcessComponentContext(); - return embed::FileSystemStorageFactory::create(rxContext); } diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 209332ebeb38..435a0cc21d19 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -444,7 +444,6 @@ OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xC if (!nKey) { Reference<XNumberFormats> xFormats( _xFormatter->getNumberFormatsSupplier()->getNumberFormats() ); - Reference<XNumberFormatTypes> xTypeList(_xFormatter->getNumberFormatsSupplier()->getNumberFormats(), UNO_QUERY); nKey = ::dbtools::getDefaultNumberFormat(_xColumn, Reference< XNumberFormatTypes > (xFormats, UNO_QUERY), diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index a63e1cd6ffe7..1b17eb112d49 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -436,8 +436,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R { if ( _bAttachAutoDisposer ) { - OAutoConnectionDisposer* pAutoDispose = new OAutoConnectionDisposer( _rxRowSet, xConnection ); - Reference< XPropertyChangeListener > xEnsureDelete(pAutoDispose); + rtl::Reference<OAutoConnectionDisposer> pAutoDispose = new OAutoConnectionDisposer( _rxRowSet, xConnection ); } else xRowSetProps->setPropertyValue( diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 43c0b424200e..000cd740f513 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -536,7 +536,6 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable return xProp; ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); Any aCatalog; aCatalog = _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)); OUString sCatalog; diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 758f5a9d097a..1ab8289ffe59 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -313,7 +313,6 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( const OUString* pColBegin = aColNames.getConstArray(); const OUString* pColEnd = pColBegin + aColNames.getLength(); - Reference< XPropertySet> xColumn; for(sal_Int32 j=1;pColBegin != pColEnd;++pColBegin,++j) { aRow[8] = new ORowSetValueDecorator(j); diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 283700649dea..f3ec08b0ee44 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -593,7 +593,6 @@ bool ODbaseIndex::CreateImpl() Reference< XUnoTunnel> xTunnel(xSet, UNO_QUERY_THROW); ODbaseResultSet* pDbaseRes = reinterpret_cast< ODbaseResultSet* >( xTunnel->getSomething(ODbaseResultSet::getUnoTunnelImplementationId()) ); assert(pDbaseRes); //"No dbase resultset found? What's going on here! - Reference<XRowLocate> xRowLocate(xSet,UNO_QUERY); nRowsLeft = xSet->getRow(); xSet->beforeFirst(); diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 896405c9a745..6fccaeb6d6ad 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -278,9 +278,8 @@ sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& sql ) construct(sql); - OResultSet* pResult = createResultSet(); - Reference< XResultSet > xRS = pResult; - initializeResultSet(pResult); + rtl::Reference<OResultSet> pResult = createResultSet(); + initializeResultSet(pResult.get()); pResult->OpenImpl(); return pResult->getRowCountResult(); diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index 9fe66357e010..e3bdc3540cf0 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -175,8 +175,6 @@ Sequence< OUString > SAL_CALL FirebirdDriver::getSupportedServiceNames() Reference< XConnection > SAL_CALL FirebirdDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) { - Reference< XConnection > xConnection; - SAL_INFO("connectivity.firebird", "connect(), URL: " << url ); MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/drivers/firebird/Keys.cxx b/connectivity/source/drivers/firebird/Keys.cxx index e67723009dec..f75ced0938c2 100644 --- a/connectivity/source/drivers/firebird/Keys.cxx +++ b/connectivity/source/drivers/firebird/Keys.cxx @@ -34,8 +34,6 @@ Keys::Keys(Table* pTable, Mutex& rMutex, const TStringVector& rNames): //----- XDrop ---------------------------------------------------------------- void Keys::dropObject(sal_Int32 nPosition, const OUString& sName) { - Reference< XConnection> xConnection = m_pTable->getConnection(); - if (!m_pTable->isNew()) { uno::Reference<XPropertySet> xKey(getObject(nPosition), UNO_QUERY); diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index 122efca9e511..7894ba65d7d2 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -384,7 +384,6 @@ void Container::removeContainerListener( void Container::fire( const EventBroadcastHelper &helper ) { - Reference< css::util::XRefreshListener > l; cppu::OInterfaceContainerHelper *container = rBHelper.getContainer( helper.getType() ); if( container ) { diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 3c521ab02b41..6b81ac0da090 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -740,7 +740,6 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory() { Reference<XInterface > x = xSMgr->createInstance( aActivatorName ); Reference<XImplementationLoader > xLoader( x, UNO_QUERY ); - Reference<XInterface > xMF; if (xLoader.is()) { xFactory = xLoader->activate( aImplementationName, aActivatorUrl, aLocation, xImplementationKey ); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 92c3422731ce..3228f627e6ab 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4166,9 +4166,6 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar ) uno::Reference< container::XIndexAccess > xSettings( GetConfigManager()->createSettings(), uno::UNO_QUERY ); - uno::Reference< container::XIndexContainer > - xIndexContainer ( xSettings, uno::UNO_QUERY ); - uno::Reference< beans::XPropertySet > xPropertySet( xSettings, uno::UNO_QUERY ); @@ -5321,8 +5318,6 @@ void SvxIconSelectorDialog::ImportGraphics( OUString aIconName; uno::Sequence< beans::PropertyValue > aMediaProps( 1 ); aMediaProps[0].Name = "URL"; - uno::Reference< css::ui::XUIConfigurationPersistence > - xConfigPer( m_xImportedImageManager, uno::UNO_QUERY ); if ( rPaths.getLength() == 1 ) { diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 5fa6aeee1760..237da1ab0079 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1097,7 +1097,6 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) ++i; } - uno::Reference< lang::XServiceInfo > xInfo( aStart->xGrammarChecker, uno::UNO_QUERY ); SpellErrorDescription aDesc( true, aStart->sText, LanguageTag::convertToLocale( aStart->eLanguage ), diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index e4106a558944..ca8bd5d5c392 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -524,7 +524,6 @@ short SvxScriptOrgDialog::Execute() ( pDoc->GetModel(), UNO_QUERY ); if ( xSPS.is() ) { - Reference< provider::XScriptProvider > ScriptProvider = xSPS->getScriptProvider(); } diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 148cbc025b50..37edc4c67692 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1574,7 +1574,6 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void ) xDic = aDics.getConstArray()[ nDicPos ]; if (xDic.is()) { - uno::Reference< XSpellChecker1 > xSpellChecker1; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 5cb57a8a3de8..b731fc6f35f8 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -2387,8 +2387,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const sal_Int32 nSelCnt = m_pLBEntries->GetSelectEntryCount(); if (m_pAutoCompleteList && nSelCnt) { - TransferDataContainer* pCntnr = new TransferDataContainer; - css::uno::Reference< css::datatransfer::XTransferable > xRef( pCntnr ); + rtl::Reference<TransferDataContainer> pCntnr = new TransferDataContainer; OStringBuffer sData; diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index a17546833bc0..abc79e6b8aab 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -205,9 +205,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow if(xIndexSup.is()) xIndexes.set(xIndexSup->getIndexes(),UNO_QUERY); - // Reference<XColumnsSupplier> Reference<XPropertySet> xIndexColsSup; - Reference<XNameAccess> xIndexColumns; std::vector< Reference<XNameAccess> > aAllIndexColumns; if(xIndexes.is()) { @@ -334,7 +332,6 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti // Reference<XColumnsSupplier> Reference<XPropertySet> xIndexColsSup; - Reference<XNameAccess> xIndexColumns; std::vector< Reference<XNameAccess> > aAllIndexColumns; if(xIndexes.is()) { diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 1e47c56cbdc6..9e6a7b5569f5 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1843,7 +1843,6 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi // get the numberformatTypes OSL_ENSURE(m_xActiveConnection.is(),"No ActiveConnection"); - Reference< XNumberFormatTypes> xNumberFormatTypes; Reference< XNumberFormatsSupplier> xNumberFormat = ::dbtools::getNumberFormats(m_xActiveConnection); if ( xNumberFormat.is() ) m_xNumberFormatTypes.set(xNumberFormat->getNumberFormats(),UNO_QUERY); diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index 0d3add13f1a6..246c0fd21cc9 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -267,7 +267,6 @@ void SAL_CALL OQueryContainer::elementRemoved( const css::container::ContainerEv void SAL_CALL OQueryContainer::elementReplaced( const css::container::ContainerEvent& _rEvent ) { - Reference< XPropertySet > xReplacedElement; Reference< XContent > xNewElement; OUString sAccessor; _rEvent.Accessor >>= sAccessor; diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 45b07ead62eb..87aa114e1189 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -107,7 +107,6 @@ Reference< XPropertySet > OViewContainer::createDescriptor() Reference< XPropertySet > xRet; // first we have to look if the master tables support this // and if so then create a table object as well with the master tables - Reference<XColumnsSupplier > xMasterColumnsSup; Reference<XDataDescriptorFactory> xDataFactory(m_xMasterContainer,UNO_QUERY); if(xDataFactory.is()) xRet = xDataFactory->createDataDescriptor(); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 82a8869b6ad8..c23e95853a7a 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -1316,7 +1316,6 @@ void ODocumentDefinition::saveAs() ::SolarMutexGuard aSolarGuard; // the request - Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY); DocumentSaveRequest aRequest; aRequest.Name = m_pImpl->m_aProps.aTitle; diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 97b5c5a6824f..eaa8afec3cd8 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -722,7 +722,6 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor uno::Reference< sdbc::XResultSet> xRes( m_xRowSet, uno::UNO_QUERY_THROW ); uno::Reference< sdbc::XRow> xRow( m_xRowSet,uno::UNO_QUERY_THROW ); uno::Reference< sdbc::XResultSetMetaDataSupplier > xSuppMeta( m_xRowSet,uno::UNO_QUERY_THROW ); - uno::Reference< sdbc::XResultSetMetaData > xResultSetMetaData( xSuppMeta->getMetaData(), uno::UNO_SET_THROW ); uno::Reference< sdbc::XColumnLocate > xColumnLocate( m_xRowSet, uno::UNO_QUERY_THROW ); for ( ColumnDescriptions::iterator col = aColumns.begin(); diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index a3949f974372..626ff623e74a 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -360,8 +360,6 @@ void SAL_CALL OApplicationController::disposing() m_xDataSource->removePropertyChangeListener(PROPERTY_TABLEFILTER, this); m_xDataSource->removePropertyChangeListener(PROPERTY_TABLETYPEFILTER, this); m_xDataSource->removePropertyChangeListener(PROPERTY_USER, this); - // otherwise we may delete our datasource twice - Reference<XPropertySet> xProp = m_xDataSource; m_xDataSource = nullptr; } @@ -989,9 +987,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa break; case ID_BROWSER_COPY: { - TransferableHelper* pTransfer = copyObject( ); - Reference< XTransferable> aEnsureDelete = pTransfer; - + rtl::Reference<TransferableHelper> pTransfer = copyObject(); if ( pTransfer ) pTransfer->CopyToClipboard(getView()); } @@ -1584,7 +1580,6 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE try { _rEvent.Accessor >>= sName; - Reference<XConnection> xConnection; Reference<XPropertySet> xProp(_rEvent.Element,UNO_QUERY); OUString sNewName; @@ -2305,13 +2300,12 @@ bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry* bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ ) { - TransferableHelper* pTransfer = nullptr; + rtl::Reference<TransferableHelper> pTransfer; if ( getContainer() && getContainer()->getSelectionCount() ) { try { pTransfer = copyObject( ); - Reference< XTransferable> xEnsureDelete = pTransfer; if ( pTransfer && getContainer()->getDetailView() ) { @@ -2325,7 +2319,7 @@ bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /* } } - return nullptr != pTransfer; + return pTransfer.is(); } sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 361575afdf50..f72f1355f116 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1825,8 +1825,6 @@ void SbaXDataBrowserController::ExecuteSearch() xModelSet->setPropertyValue("AlwaysShowCursor", css::uno::Any(true)); xModelSet->setPropertyValue("CursorColor", makeAny(sal_Int32(COL_LIGHTRED))); - Reference< css::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), true, getORB())); - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); VclPtr<AbstractFmSearchDialog> pDialog; if ( pFact ) diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index a09b4a000744..bcdb8cb216e8 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -186,13 +186,12 @@ namespace dbaui if (!isObject(eEntryType)) return false; - TransferableHelper* pTransfer = implCopyObject( pHitEntry, ( etTableOrView == eEntryType ) ? CommandType::TABLE : CommandType::QUERY); - Reference< XTransferable> xEnsureDelete = pTransfer; + rtl::Reference<TransferableHelper> pTransfer = implCopyObject( pHitEntry, ( etTableOrView == eEntryType ) ? CommandType::TABLE : CommandType::QUERY); if (pTransfer) pTransfer->StartDrag( &m_pTreeView->getListBox(), DND_ACTION_COPY ); - return nullptr != pTransfer; + return pTransfer.is(); } IMPL_LINK_NOARG(SbaTableQueryBrowser, OnCopyEntry, LinkParamNone*, void) { diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 6983e70fbe14..af4e291c878c 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -699,8 +699,7 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM std::vector< std::shared_ptr<OTableRow> > vClipboardList; // send it to the clipboard vClipboardList.push_back(std::make_shared<OTableRow>(xField)); - OTableRowExchange* pData = new OTableRowExchange(vClipboardList); - Reference< css::datatransfer::XTransferable> xRef = pData; + rtl::Reference<OTableRowExchange> pData = new OTableRowExchange(vClipboardList); pData->CopyToClipboard(GetParent()); } break; @@ -1143,8 +1142,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) if (sField.isEmpty()) return; - OColumnTransferable* pDataTransfer = new OColumnTransferable(xDataSource, sField, xAffectedField, xActiveConnection, ColumnTransferFormatFlags::FIELD_DESCRIPTOR | ColumnTransferFormatFlags::COLUMN_DESCRIPTOR); - Reference< XTransferable > xEnsureDelete = pDataTransfer; + rtl::Reference<OColumnTransferable> pDataTransfer = new OColumnTransferable(xDataSource, sField, xAffectedField, xActiveConnection, ColumnTransferFormatFlags::FIELD_DESCRIPTOR | ColumnTransferFormatFlags::COLUMN_DESCRIPTOR); pDataTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK); } @@ -1176,12 +1174,10 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC bSelectionBookmarks = true; } - Reference< XResultSet> xRowSetClone; try { - ODataClipboard* pTransfer = new ODataClipboard( xForm, aSelectedRows, bSelectionBookmarks, getContext() ); + rtl::Reference<ODataClipboard> pTransfer = new ODataClipboard( xForm, aSelectedRows, bSelectionBookmarks, getContext() ); - Reference< XTransferable > xEnsureDelete = pTransfer; if ( _bTrueIfClipboardFalseIfDrag ) pTransfer->CopyToClipboard( this ); else @@ -1403,7 +1399,6 @@ Reference< XPropertySet > SbaGridControl::getDataSource() const Reference< XPropertySet > xReturn; Reference< XChild > xColumns(GetPeer()->getColumns(), UNO_QUERY); - Reference< XPropertySet > xDataSource; if (xColumns.is()) xReturn.set(xColumns->getParent(), UNO_QUERY); @@ -1422,8 +1417,7 @@ IMPL_LINK_NOARG(SbaGridControl, AsynchDropEvent, void*, void) if ( !bCountFinal ) setDataSource(nullptr); // detach from grid control Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY); - ODatabaseImportExport* pImExport = new ORowSetImportExport(this,xResultSetUpdate,m_aDataDescriptor, getContext()); - Reference<XEventListener> xHolder = pImExport; + rtl::Reference<ODatabaseImportExport> pImExport = new ORowSetImportExport(this,xResultSetUpdate,m_aDataDescriptor, getContext()); Hide(); try { diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 661f6813f4a3..fa21ecb34fb3 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -62,7 +62,6 @@ namespace dbaui if ( !_pCommandURL || !*_pCommandURL ) return aIcon; - Reference< XNameAccess > xUICommandLabels; OUString sCommandURL = OUString::createFromAscii( _pCommandURL ); try { diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index dfc2631f9c1e..7084019c5d5d 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -178,7 +178,6 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click, Button*, void) Reference<XNameContainer> xNameContainer(m_xContent,UNO_QUERY); if ( xNameContainer.is() ) { - Reference< XContent> xContent; if ( xNameContainer->hasByName(sName) ) { ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ); diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 8509de26e359..9139bef7c531 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -273,7 +273,6 @@ namespace dbaui m_pTablesList->GetModel()->SetSortMode(SortAscending); m_pTablesList->GetModel()->SetCompareHdl(LINK(this, OTableSubscriptionPage, OnTreeEntryCompare)); - Reference< XDriver > xDriver; Reference<XPropertySet> xProp = m_pTablesDlg->getCurrentDataSource(); OSL_ENSURE(xProp.is(),"No data source set!"); if ( xProp.is() ) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index b3c390171ec3..f81c7fa651d0 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -271,7 +271,6 @@ void ODatabaseImportExport::initialize() } if(xNameAccess.is() && xNameAccess->hasByName(m_sName)) { - Reference<XPropertySet> xSourceObject; xNameAccess->getByName(m_sName) >>= m_xObject; } @@ -473,7 +472,6 @@ bool ORTFImportExport::Write() m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ).WriteChar( '}' ); m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ); - Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY); sal_Int32 k=1; sal_Int32 kk=0; if ( m_aSelection.getLength() ) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 85acecdb4700..bc8c16928413 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1354,7 +1354,6 @@ namespace if ( xConnection.is() ) { OUString aColumnName; - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); // the international doesn't matter I have a string pCondition->parseNodeToPredicateStr(aCondition, xConnection, @@ -1430,7 +1429,6 @@ namespace // Parse the function condition OUString sCondition = ParseCondition(rController,pCondition,sDecimal,aLocale,1); Reference< XConnection> xConnection = rController.getConnection(); - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); // the international doesn't matter I have a string OUString sName; pCondition->getChild(0)->parseNodeToPredicateStr(sName, @@ -1488,7 +1486,6 @@ namespace OUString aCondition; OUString aColumnName; OTableFieldDescRef aDragLeft = new OTableFieldDesc(); - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); pCondition->parseNodeToPredicateStr(aCondition, xConnection, rController.getNumberFormatter(), @@ -1656,7 +1653,6 @@ namespace Reference< XConnection> xConnection = rController.getConnection(); if(xConnection.is()) { - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); for (; i >= 0; i--) pCondition->getChild(i)->parseNodeToPredicateStr(aCondition, xConnection, diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 82aefa64fa4f..fae19f31f19f 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -206,8 +206,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi // create a description of the source OJoinExchangeData jxdSource(this); // put it into a exchange object - OJoinExchObj* pJoin = new OJoinExchObj(jxdSource,bFirstNotAllowed); - Reference< XTransferable > xEnsureDelete(pJoin); + rtl::Reference<OJoinExchObj> pJoin = new OJoinExchObj(jxdSource,bFirstNotAllowed); pJoin->StartDrag(this, DND_ACTION_LINK, this); } } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 7bca5f87db98..a066fa62b088 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -733,8 +733,7 @@ void OTableEditorCtrl::CopyRows() } if(!vClipboardList.empty()) { - OTableRowExchange* pData = new OTableRowExchange(vClipboardList); - Reference< css::datatransfer::XTransferable> xRef = pData; + rtl::Reference<OTableRowExchange> pData = new OTableRowExchange(vClipboardList); pData->CopyToClipboard(GetParent()); } } diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 714299e9061b..4a86547a56d9 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2021,7 +2021,6 @@ void Desktop::OpenClients() // check if a document has been recovered - if there is one of if a document was loaded by cmdline, no default document // should be created - Reference < XComponent > xFirst; bool bRecovery = false; const CommandLineArgs& rArgs = GetCommandLineArgs(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 9769a8b3b452..9f9760607725 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -335,7 +335,6 @@ void UpdateDialog::Thread::execute() dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension( bSharedReadOnly, sVersionShared, sVersionBundled, sOnlineVersion); - uno::Reference<deployment::XPackage> updateSource; if (sourceUser != dp_misc::UPDATE_SOURCE_NONE) { if (sourceUser == dp_misc::UPDATE_SOURCE_SHARED) diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index e5d31af7c1a3..a53f7e3e5baa 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -762,8 +762,7 @@ Reference<css::deployment::XPackage> ExtensionManager::addExtension( { if (xExtensionBackup.is()) { - Reference<css::deployment::XPackage> xRestored = - xPackageManager->importExtension( + xPackageManager->importExtension( xExtensionBackup, Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>()); } diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 7a1b917ab363..be141b68210c 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -398,7 +398,6 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName) uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName(aMigrationSteps), uno::UNO_QUERY_THROW); uno::Sequence< OUString > seqMigrations = theNameAccess->getElementNames(); uno::Reference< XNameAccess > tmpAccess; - uno::Reference< XNameAccess > tmpAccess2; uno::Sequence< OUString > tmpSeq; migrations_vr vrMigrations(new migrations_v); for (sal_Int32 i = 0; i < seqMigrations.getLength(); i++) { diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 58551484c162..f39ea1b46d84 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -1809,7 +1809,6 @@ void dumpXShape(const uno::Reference< drawing::XShape >& xShape, xmlTextWriterPt { xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) ); uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY_THROW); - uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo(); OUString aName; m_bNameDumped = false; diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 5e227a6bfd06..197cfcdf13b5 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -277,7 +277,6 @@ void SvxSpellWrapper::SpellDocument( ) if ( FindSpellError() ) { - Reference< XSpellAlternatives > xAlt( GetLast(), UNO_QUERY ); Reference< XHyphenatedWord > xHyphWord( GetLast(), UNO_QUERY ); vcl::Window *pOld = pWin; @@ -437,8 +436,6 @@ bool SvxSpellWrapper::FindSpellError() { ShowLanguageErrors(); - Reference< XInterface > xRef; - WAIT_ON(); bool bSpell = true; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 06227f00a834..492e02b4a7b4 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -69,8 +69,6 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const OUString& sEntName, const uno::Sequence< beans::PropertyValue >& lObjArgs ) { - uno::Reference< uno::XInterface > xResult; - if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", static_cast< ::cppu::OWeakObject* >(this), @@ -277,8 +275,6 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& aArgs, const uno::Sequence< beans::PropertyValue >& aObjectArgs ) { - uno::Reference< uno::XInterface > xResult; - if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", static_cast< ::cppu::OWeakObject* >(this), diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index aaaf92980e76..a6c5deba6924 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -110,7 +110,6 @@ Reference< XConnection > getConnection(const OUString& _rURL) if (xDataSource.is()) { // need user/pwd for this - Reference< XPropertySet > xDataSourceProps(xDataSource, UNO_QUERY); Reference< XCompletedConnection > xComplConn(xDataSource, UNO_QUERY); try { @@ -1294,7 +1293,6 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( { aElement = xFields->getByName(rName); aElement >>= xField; - Reference< XPropertySetInfo > xInfo = xField.is() ? xField->getPropertySetInfo() : Reference< XPropertySetInfo > (); const OUString sType("Type"); sal_Int32 nFormatKey = 0; diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 61bbcb7794eb..51d661e37731 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -720,13 +720,10 @@ void BibFrameController_Impl::addStatusListener( } } } - uno::Reference< datatransfer::XTransferable > xContents = xClip->getContents( ); } } else if(aURL.Path == "Bib/DeleteRecord") { - Reference< css::sdbc::XResultSet > xCursor(m_xDatMan->getForm(), UNO_QUERY); - Reference< XResultSetUpdate > xUpdateCursor(xCursor, UNO_QUERY); Reference< beans::XPropertySet > xSet(m_xDatMan->getForm(), UNO_QUERY); bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); if(!bIsNew) diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index eb42d78be697..68bc88dae26a 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -438,8 +438,7 @@ namespace dbp { // for this, use a AutoDisposer (so the conn is cleaned up when the form dies or get's another connection) Reference< XRowSet > xFormRowSet( m_aContext.xForm, UNO_QUERY ); - OAutoConnectionDisposer* pAutoDispose = new OAutoConnectionDisposer( xFormRowSet, _rxConn ); - Reference< XPropertyChangeListener > xEnsureDelete( pAutoDispose ); + rtl::Reference<OAutoConnectionDisposer> pAutoDispose = new OAutoConnectionDisposer( xFormRowSet, _rxConn ); } else { diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 1918dcd0f8ed..71fb21a05f43 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2057,7 +2057,6 @@ namespace pcr } else if ( eDialogControl == m_eComponentClass ) { - Reference< XControlModel > xControlModel( m_xComponent, UNO_QUERY ); Reference< XServiceInfo > xServiceInfo( m_xComponent, UNO_QUERY ); if ( xServiceInfo.is() ) { @@ -2313,8 +2312,6 @@ namespace pcr { WaitCursor aWaitCursor( impl_getDefaultDialogParent_nothrow() ); - Reference< XPreparedStatement > xStatement; - // get the form of the control we're inspecting Reference< XPropertySet > xFormSet( impl_getRowSet_throw(), UNO_QUERY ); if ( !xFormSet.is() ) diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index ec73aaaf1a35..ebf046128039 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -368,7 +368,6 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::createSubSetEnumerationByProperties(const css::uno::Sequence< css::beans::NamedValue >& lProperties) { - css::uno::Reference< css::container::XEnumeration > xEnum; OUStringList lKeys; impl_loadOnDemand(); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 28751feac55e..3d836d9fdb2b 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -610,7 +610,6 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN const OUStringList& lItems) { css::uno::Reference< css::container::XNameContainer > xAddRemoveSet(xSet, css::uno::UNO_QUERY); - css::uno::Reference< css::container::XNameReplace > xReplaceeSet(xSet, css::uno::UNO_QUERY); css::uno::Reference< css::lang::XSingleServiceFactory > xFactory(xSet, css::uno::UNO_QUERY); for (OUStringList::const_iterator pIt = lItems.begin(); diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 0eb3dfce6551..a2d844fb3723 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -420,7 +420,7 @@ void CGMImpressOutAct::EndGroup() aXShapes->add( aXShape ); } } - uno::Reference< drawing::XShapeGroup > aXShapeGroup = aXShapeGrouper->group( aXShapes ); + aXShapeGrouper->group( aXShapes ); } } } diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 0546eea3132e..dad573e20adb 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -337,7 +337,6 @@ struct AnnotatingVisitor maElementVector[aFound->second]->cloneNode(true), uno::UNO_QUERY); xRefElem->removeAttribute("id"); - uno::Reference<xml::dom::XNode> xAttrNode; const sal_Int32 nNumAttrs( xAttributes->getLength() ); OUString sAttributeValue; diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 99cccf45f3dc..1c9ef265b501 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -77,8 +77,6 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property xStatusIndicator->start( "Loading :",nProgressRange); } - Reference < XParser > xSaxParser = Parser::create( mxContext ); - Sequence< Any > aAnys(1); OUString aBaseURI; if (aMediaMap.find(OUString( "URL" ))->second >>= aBaseURI) diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index da4357b32fe3..d44d00ac3d5c 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -259,8 +259,6 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect if( xIfc.is() ) { - Reference< XSingleServiceFactory > xFactory( xIfc, UNO_QUERY ); - // get root zip folder Reference< XInterface > xRootFolder; OUString szRootFolder("/"); diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index dd419a171ff4..cc64d8bba73a 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -504,7 +504,6 @@ void OComboBoxModel::loadData( bool _bForce ) // in that case we use the first field of the table Reference<XNameAccess> xFieldsByName = getTableFields(xConnection, m_aListSource); - Reference<XIndexAccess> xFieldsByIndex(xFieldsByName, UNO_QUERY); OUString aFieldName; if ( xFieldsByName.is() && xFieldsByName->hasByName( getControlSource() ) ) diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 0ce27865f7ce..0261fe1b1404 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -651,7 +651,6 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc Sequence<Reference<XControl> > aControlSeq = xControlContainer->getControls(); Reference<XControl> xControl; - Reference<XFormComponent> xControlComponent; // Find the right control sal_Int32 i; diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 2f4c42cbd272..2a9ed5a896b4 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -416,7 +416,6 @@ void OFormattedModel::_propertyChanged( const css::beans::PropertyChangeEvent& e OSL_ENSURE( evt.Source == m_xAggregateSet, "OFormattedModel::_propertyChanged: where did this come from?" ); if ( evt.Source == m_xAggregateSet ) { - Reference< XPropertySet > xSourceSet( evt.Source, UNO_QUERY ); if ( evt.PropertyName == PROPERTY_FORMATKEY ) { if ( evt.NewValue.getValueType().getTypeClass() == TypeClass_LONG ) diff --git a/forms/source/component/entrylisthelper.cxx b/forms/source/component/entrylisthelper.cxx index 4e9202be73da..508ccfd833e9 100644 --- a/forms/source/component/entrylisthelper.cxx +++ b/forms/source/component/entrylisthelper.cxx @@ -170,7 +170,6 @@ namespace frm OSL_ENSURE( _rEvent.Source == m_xListSource, "OEntryListHelper::allEntriesChanged: where did this come from?" ); - Reference< XListEntrySource > xSource( _rEvent.Source, UNO_QUERY ); if ( _rEvent.Source == m_xListSource ) { impl_lock_refreshList( aLock ); diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index a3dddb11c9fb..0e96edfb643c 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -161,7 +161,6 @@ void CSerializationURLEncoded::serialize() { // output stream to the pipe buffer - Reference< XOutputStream > out(m_aPipe, UNO_QUERY); css::uno::Reference< css::xml::dom::XNode > cur = m_aFragment->getFirstChild(); while (cur.is()) diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index ea78e08be205..6655f232f5ec 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1812,8 +1812,6 @@ short SvtFileDialog::PrepareExecute() = aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY ); if ( xResultSet.is() ) { - Reference< XRow > xRow( xResultSet, UNO_QUERY ); - bool bEmpty = true; if ( !xResultSet->next() ) { diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx index c20043eb871b..7f86dbd6de18 100644 --- a/framework/source/dispatch/popupmenudispatcher.cxx +++ b/framework/source/dispatch/popupmenudispatcher.cxx @@ -170,7 +170,6 @@ SAL_CALL PopupMenuDispatcher::queryDispatch( m_xUriRefFactory = css::uri::UriReferenceFactory::create( m_xContext ); css::uno::Reference< css::container::XNameAccess > xPopupCtrlQuery( m_xPopupCtrlQuery ); - css::uno::Reference< css::uri::XUriReferenceFactory > xUriRefFactory( m_xUriRefFactory ); aGuard.clear(); // --- SAFE --- diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index f2ce6c9fded0..ea6473771d77 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -731,8 +731,7 @@ OWriteMenuDocumentHandler::~OWriteMenuDocumentHandler() void OWriteMenuDocumentHandler::WriteMenuDocument() { - ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; - Reference< XAttributeList > rList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); + rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; m_xWriteDocumentHandler->startDocument(); @@ -758,7 +757,7 @@ void OWriteMenuDocumentHandler::WriteMenuDocument() aRootElement = ELEMENT_NS_MENUBAR; else aRootElement = ELEMENT_NS_MENUPOPUP; - m_xWriteDocumentHandler->startElement( aRootElement, pList ); + m_xWriteDocumentHandler->startElement( aRootElement, pList.get() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); WriteMenu( m_xMenuBarContainer ); diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 9bc38a5d82ec..033103d25a80 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -503,8 +503,7 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } - ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; - Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); + rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; pList->AddAttribute( ATTRIBUTE_XMLNS_STATUSBAR, m_aAttributeType, @@ -514,7 +513,7 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() m_aAttributeType, XMLNS_XLINK ); - m_xWriteDocumentHandler->startElement( ELEMENT_NS_STATUSBAR, pList ); + m_xWriteDocumentHandler->startElement( ELEMENT_NS_STATUSBAR, pList.get() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); sal_Int32 nItemCount = m_aStatusBarItems->getCount(); diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 52926ca2b917..d73445dd847f 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -630,8 +630,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() } } - ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; - Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); + rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; pList->AddAttribute( ATTRIBUTE_XMLNS_TOOLBAR, m_aAttributeType, @@ -646,7 +645,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() m_aAttributeType, aUIName ); - m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList ); + m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList.get() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); sal_Int32 nItemCount = m_rItemAccess->getCount(); diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index bb385f0b70ed..577cabf82ac3 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -430,7 +430,6 @@ void StatusIndicatorFactory::impl_showProgress() osl::ClearableMutexGuard aReadLock(m_mutex); css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY); - css::uno::Reference< css::awt::XWindow > xWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY); aReadLock.clear(); // <- SAFE ---------------------------------- @@ -471,7 +470,6 @@ void StatusIndicatorFactory::impl_hideProgress() osl::ClearableMutexGuard aReadLock(m_mutex); css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY); - css::uno::Reference< css::awt::XWindow > xWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY); aReadLock.clear(); // <- SAFE ---------------------------------- diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index bb67e08af31a..85bf876140a3 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -328,13 +328,7 @@ void JobDispatch::impl_dispatchEvent( /*IN*/ const OUString& aCfg.setEnvironment(JobData::E_DISPATCH); const bool bIsEnabled=aCfg.hasCorrectContext(m_sModuleIdentifier); - /*Attention! - Jobs implements interfaces and dies by ref count! - And freeing of such uno object is done by uno itself. - So we have to use dynamic memory everytimes. - */ - Job* pJob = new Job(m_xContext, m_xFrame); - css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY); + rtl::Reference<Job> pJob = new Job(m_xContext, m_xFrame); pJob->setJobData(aCfg); aReadLock.clear(); @@ -395,8 +389,7 @@ void JobDispatch::impl_dispatchService( /*IN*/ const OUString& And freeing of such uno object is done by uno itself. So we have to use dynamic memory everytimes. */ - Job* pJob = new Job(m_xContext, m_xFrame); - css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY); + rtl::Reference<Job> pJob = new Job(m_xContext, m_xFrame); pJob->setJobData(aCfg); aReadLock.clear(); @@ -440,13 +433,7 @@ void JobDispatch::impl_dispatchAlias( /*IN*/ const OUString& aCfg.setAlias(sAlias); aCfg.setEnvironment(JobData::E_DISPATCH); - /*Attention! - Jobs implements interfaces and dies by ref count! - And freeing of such uno object is done by uno itself. - So we have to use dynamic memory everytimes. - */ - Job* pJob = new Job(m_xContext, m_xFrame); - css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY); + rtl::Reference<Job> pJob = new Job(m_xContext, m_xFrame); pJob->setJobData(aCfg); aReadLock.clear(); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 01f3a1cb9841..f55ac969e568 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1303,8 +1303,6 @@ void SAL_CALL LayoutManager::setDockingAreaAcceptor( const Reference< ui::XDocki if( pContainerWindow ) m_bParentWindowVisible = pContainerWindow->IsVisible(); } - - uno::Reference< awt::XWindowPeer > xParent( m_xContainerWindow, UNO_QUERY ); } aWriteLock.clear(); @@ -1411,7 +1409,6 @@ void SAL_CALL LayoutManager::createElement( const OUString& aName ) SolarMutexClearableGuard aReadLock; Reference< XFrame > xFrame = m_xFrame; - Reference< XURLTransformer > xURLTransformer = m_xURLTransformer; bool bInPlaceMenu = m_bInplaceMenuSet; aReadLock.clear(); @@ -1550,7 +1547,6 @@ void SAL_CALL LayoutManager::destroyElement( const OUString& aName ) OUString aElementType; OUString aElementName; - Reference< XComponent > xComponent; parseResourceURL( aName, aElementType, aElementName ); if ( aElementType.equalsIgnoreAsciiCase("menubar") && diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index e8df5f8282ba..f50db759964c 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1194,7 +1194,6 @@ void ToolbarLayoutManager::implts_createCustomToolBars() if ( !m_bComponentAttached ) return; - uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); uno::Reference< ui::XUIConfigurationManager > xModuleCfgMgr( m_xModuleCfgMgr, uno::UNO_QUERY ); uno::Reference< ui::XUIConfigurationManager > xDocCfgMgr( m_xDocCfgMgr, uno::UNO_QUERY ); @@ -1226,7 +1225,6 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() if ( !m_xPersistentWindowState.is() || !m_xFrame.is() || !m_bComponentAttached ) return; - uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); aReadLock.clear(); @@ -1245,7 +1243,6 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() OUString aElementName; OUString aName; - uno::Reference< ui::XUIElement > xUIElement; aMakeVisibleToolbars.reserve(aToolbarNames.getLength()); SolarMutexGuard g; diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index ea0d610361ae..ab5bb5b42c8c 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1192,7 +1192,6 @@ void SAL_CALL Desktop::dispatchFinished( const css::frame::DispatchResultEvent& m_eLoadState = E_FAILED; if( aEvent.State == css::frame::DispatchResultState::SUCCESS ) { - css::uno::Reference < css::frame::XFrame > xFrame; if ( aEvent.Result >>= m_xLastFrame ) m_eLoadState = E_SUCCESSFUL; } diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 954eb9c38c29..a4e21ae052b8 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1224,7 +1224,6 @@ void SAL_CALL Frame::activate() css::uno::Reference< css::frame::XFrame > xActiveChild = m_aChildFrameContainer.getActive(); css::uno::Reference< css::frame::XFramesSupplier > xParent ( m_xParent, css::uno::UNO_QUERY ); css::uno::Reference< css::frame::XFrame > xThis ( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); - css::uno::Reference< css::awt::XWindow > xComponentWindow( m_xComponentWindow, css::uno::UNO_QUERY ); EActiveState eState = m_eActiveState; aWriteLock.clear(); diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 6d8c08516efc..a26eca969db6 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -702,8 +702,6 @@ void ModuleUIConfigurationManager::impl_reloadElementTypeData( { UIElementDataHashMap& rHashMap = rUserElementType.aElementsHashMap; UIElementDataHashMap::iterator pIter = rHashMap.begin(); - Reference< XStorage > xUserStorage( rUserElementType.xStorage ); - Reference< XStorage > xDefaultStorage( rDefaultElementType.xStorage ); Reference< XNameAccess > xUserNameAccess( rUserElementType.xStorage, UNO_QUERY ); Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY ); diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index c121d1ab3e57..d00238d6c9b5 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -262,8 +262,6 @@ Sequence< OUString > ConfigurationAccess_UICategory::getAllIds() if ( m_xConfigAccess.is() ) { - Reference< XNameAccess > xNameAccess; - try { Sequence< OUString > aNameSeq = m_xConfigAccess->getElementNames(); diff --git a/framework/source/uielement/notebookbarmenucontroller.cxx b/framework/source/uielement/notebookbarmenucontroller.cxx index af87f3132f4e..f5f9401d6227 100644 --- a/framework/source/uielement/notebookbarmenucontroller.cxx +++ b/framework/source/uielement/notebookbarmenucontroller.cxx @@ -199,7 +199,6 @@ void SAL_CALL NotebookbarMenuController::itemSelected( const css::awt::MenuEvent Reference< css::awt::XPopupMenu > xPopupMenu; Reference< XURLTransformer > xURLTransformer; Reference< XFrame > xFrame; - Reference< XNameAccess > xPersistentWindowState; osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx index c5b08f190c80..71e498666f36 100644 --- a/framework/source/uielement/subtoolbarcontroller.cxx +++ b/framework/source/uielement/subtoolbarcontroller.cxx @@ -224,7 +224,6 @@ css::uno::Reference< css::awt::XWindow > SubToolBarController::createPopupWindow if ( xUIElement.is() ) { - css::uno::Reference< css::awt::XWindow > xParent = xFrame->getContainerWindow(); css::uno::Reference< css::awt::XWindow > xSubToolBar( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); if ( xSubToolBar.is() ) { @@ -354,7 +353,6 @@ void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e ) xUIElement = xLayoutManager->getElement( aSubToolBarResName ); if ( xUIElement.is() ) { - css::uno::Reference< css::awt::XWindow > xParent = getFrameInterface()->getContainerWindow(); css::uno::Reference< css::awt::XWindow > xSubToolBar( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); css::uno::Reference< css::beans::XPropertySet > xProp( xUIElement, css::uno::UNO_QUERY ); if ( xSubToolBar.is() && xProp.is() ) diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 018253bdfb94..f08f69a2a1bb 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -211,7 +211,6 @@ void SAL_CALL ToolbarModeMenuController::itemSelected( const css::awt::MenuEvent Reference< css::awt::XPopupMenu > xPopupMenu; Reference< XURLTransformer > xURLTransformer; Reference< XFrame > xFrame; - Reference< XNameAccess > xPersistentWindowState; osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index b900f2c40176..eed5f5c7230e 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -467,8 +467,6 @@ Sequence< OUString > ConfigurationAccess_UICommand::getAllCommands() if ( m_xConfigAccess.is() ) { - Reference< XNameAccess > xNameAccess; - try { Sequence< OUString > aNameSeq = m_xConfigAccess->getElementNames(); diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index 6542f9dcfa74..0cedaf95dba3 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -292,7 +292,6 @@ void ConfigurationAccess_FactoryManager::readConfigurationData() OUString aModule; OUString aService; OUString aHashKey; - Reference< XPropertySet > xPropertySet; for ( sal_Int32 i = 0; i < aUIElementFactories.getLength(); i++ ) { if ( impl_getElementProps( m_xConfigAccess->getByName( aUIElementFactories[i] ), aType, aName, aModule, aService )) diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 658242e9249f..45315b773952 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -609,8 +609,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } - ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; - Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); + rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; pList->AddAttribute( ATTRIBUTE_XMLNS_IMAGE, m_aAttributeType, @@ -620,7 +619,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() m_aAttributeType, XMLNS_XLINK ); - m_xWriteDocumentHandler->startElement( ELEMENT_NS_IMAGESCONTAINER, pList ); + m_xWriteDocumentHandler->startElement( ELEMENT_NS_IMAGESCONTAINER, pList.get() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); if ( m_aImageListsItems.pImageList ) diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 6ce6d04ce0c4..e92ed0275f8d 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -142,10 +142,7 @@ bool IsConvDic( const OUString &rFileURL, LanguageType &nLang, sal_Int16 &nConvT // first argument being 0 should stop the file from being parsed // up to the end (reading all entries) when the required // data (language, conversion type) is found. - ConvDicXMLImport *pImport = new ConvDicXMLImport( nullptr ); - - //!! keep a first reference to ensure the lifetime of the object !! - uno::Reference< XInterface > xRef( static_cast<document::XFilter *>(pImport), UNO_QUERY ); + rtl::Reference<ConvDicXMLImport> pImport = new ConvDicXMLImport( nullptr ); ReadThroughDic( rFileURL, *pImport ); // will implicitly add the entries bRes = !LinguIsUnspecified( pImport->GetLanguage()) && @@ -220,9 +217,7 @@ void ConvDic::Load() //!! prevent function from being called recursively via HasEntry, AddEntry bNeedEntries = false; - ConvDicXMLImport *pImport = new ConvDicXMLImport( this ); - //!! keep a first reference to ensure the lifetime of the object !! - uno::Reference< XInterface > xRef( static_cast<document::XFilter *>(pImport), UNO_QUERY ); + rtl::Reference<ConvDicXMLImport> pImport = new ConvDicXMLImport( this ); ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries bIsModified = false; } @@ -263,10 +258,7 @@ void ConvDic::Save() // prepare arguments (prepend doc handler to given arguments) uno::Reference< xml::sax::XDocumentHandler > xDocHandler( xSaxWriter, UNO_QUERY ); - ConvDicXMLExport *pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler ); - //!! keep a first(!) reference until everything is done to - //!! ensure the proper lifetime of the object - uno::Reference< document::XFilter > aRef( static_cast<document::XFilter *>(pExport) ); + rtl::Reference<ConvDicXMLExport> pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler ); bool bRet = pExport->Export(); // write entries to file DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" ); if (bRet) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 8401dd7ce59d..04e58ab6f0af 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -242,7 +242,6 @@ void XmlFilterBase::checkDocumentProperties(const Reference<XDocumentProperties> void XmlFilterBase::importDocumentProperties() { - Reference< XMultiServiceFactory > xFactory( getComponentContext()->getServiceManager(), UNO_QUERY ); MediaDescriptor aMediaDesc( getMediaDescriptor() ); Reference< XInputStream > xInputStream; Reference< XComponentContext > xContext = getComponentContext(); diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index ebc2ed731d5b..847633537b86 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -236,7 +236,6 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons applyTableCellProperties( rxCell, *this ); TextCharacterProperties aTextStyleProps; xAt->gotoStart( true ); - Reference< text::XTextRange > xStart( xAt, UNO_QUERY ); xAt->gotoEnd( true ); Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW ); diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 9eb690191e28..d8071652da73 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -163,7 +163,6 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) { - Reference< XFastContextHandler > xRet; switch( aElementToken ) { case A_TOKEN( lnSpc ): // CT_TextSpacing diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 5d0ccdcca268..500a80143878 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2211,7 +2211,6 @@ void ChartExport::exportCandleStickSeries( Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( xSource->getDataSequences()); - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); const char* sSeries[] = {"values-first","values-max","values-min","values-last",nullptr}; for( sal_Int32 idx = 0; sSeries[idx] != nullptr ; idx++ ) @@ -2260,7 +2259,6 @@ void ChartExport::exportCandleStickSeries( void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence > & xValueSeq ) { FSHelperPtr pFS = GetFS(); - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); pFS->startElement( FSNS( XML_c, XML_tx ), FSEND ); @@ -2296,7 +2294,6 @@ void ChartExport::exportSeriesText( const Reference< chart2::data::XDataSequence void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequence > & xValueSeq ) { FSHelperPtr pFS = GetFS(); - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); pFS->startElement( FSNS( XML_c, XML_cat ), FSEND ); @@ -2339,7 +2336,6 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequence > & xValueSeq, sal_Int32 nValueType ) { FSHelperPtr pFS = GetFS(); - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); pFS->startElement( FSNS( XML_c, nValueType ), FSEND ); @@ -2449,7 +2445,6 @@ void ChartExport::InitPlotArea( ) xDiagramProperties->getPropertyValue("Dim3D") >>= mbIs3DChart; - Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); if( mbHasCategoryLabels && mxNewDiagram.is()) { Reference< chart2::data::XLabeledDataSequence > xCategories( lcl_getCategories( mxNewDiagram ) ); diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index 2837d9d2c777..96a079e5ccd5 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -170,8 +170,6 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList OUString aNextName = *(aListPath.begin()); aListPath.erase( aListPath.begin() ); - uno::Reference< embed::XExtendedStorageStream > xResult; - uno::Reference< embed::XStorage > xOwnStor; xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx index 664f455e5cbb..017d3a4cb635 100644 --- a/package/source/xstor/switchpersistencestream.cxx +++ b/package/source/xstor/switchpersistencestream.cxx @@ -120,7 +120,6 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io: void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io::XInputStream >& xInputStream ) { - uno::Reference< io::XStream > xNewStream; uno::Reference< io::XTruncate > xNewTruncate; uno::Reference< io::XSeekable > xNewSeekable( xInputStream, uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xNewOutStream; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 1de098f426a0..db5ddcd8ba5a 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1102,7 +1102,6 @@ void OStorage_Impl::Commit() { // this is the case when xNewPackageFolder refers to m_xPackageFolder // in case the name was changed and it is not a changed storage - rename the element - uno::Reference< container::XNamed > xNamed; uno::Any aPackageElement = xNewPackageFolder->getByName( (*pElementIter)->m_aOriginalName ); xNewPackageFolder->removeByName( (*pElementIter)->m_aOriginalName ); xNewPackageFolder->insertByName( (*pElementIter)->m_aName, aPackageElement ); @@ -1130,7 +1129,6 @@ void OStorage_Impl::Commit() if ( (*pElementIter)->m_bIsInserted ) { (*pElementIter)->m_aOriginalName = (*pElementIter)->m_aName; - uno::Reference< lang::XUnoTunnel > xNewElement; if ( (*pElementIter)->m_bIsStorage ) { @@ -2644,7 +2642,6 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( if (!pElement->m_xStorage) m_pImpl->OpenSubStorage( pElement, nStorageMode ); - uno::Reference< embed::XStorage > xResult; if (pElement->m_xStorage) { // the existence of m_pAntiImpl of the child is not interesting, diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 17d5adf52d81..90272bbee62b 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -550,7 +550,6 @@ void ZipPackage::getZipFileContents() void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) { - uno::Reference< XProgressHandler > xProgressHandler; beans::NamedValue aNamedValue; if ( aArguments.getLength() ) diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 7610ee6f7a70..1a47db8999bd 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -507,7 +507,6 @@ PyRef Runtime::any2PyObject (const Any &a ) const else { Reference< XTypeConverter > tc = getImpl()->cargo->xTypeConverter; - Reference< XSingleServiceFactory > ssf = getImpl()->cargo->xInvocation; tc->convertTo (a, cppu::UnoType<decltype(s)>::get()) >>= s; PyRef tuple( PyTuple_New (s.getLength()), SAL_NO_ACQUIRE, NOT_NULL); int i=0; diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx index 34ed8c793740..37d20bd89c15 100644 --- a/reportdesign/source/core/api/ReportEngineJFree.cxx +++ b/reportdesign/source/core/api/ReportEngineJFree.cxx @@ -307,7 +307,6 @@ uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive aArgs[nLen++].Value <<= true; } - uno::Reference< lang::XMultiServiceFactory > xFac(m_xContext->getServiceManager(),uno::UNO_QUERY); xModel.set( xFrameLoad->loadComponentFromURL( sOutputName, OUString(), // empty frame name diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 3042c04c55a2..5f31cf8105ed 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -486,7 +486,6 @@ void OXUndoEnvironment::AddSection(const Reference< report::XSection > & _xSecti try { uno::Reference<container::XChild> xChild = _xSection.get(); - uno::Reference<report::XGroup> xGroup(xChild->getParent(),uno::UNO_QUERY); m_pImpl->m_aSections.push_back(xChild); Reference< XInterface > xInt(_xSection); AddElement(xInt); diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 08a80288d186..7aa1e7dc8974 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -849,7 +849,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) // start <text:p> SvXMLElementExport aParagraphContent(*this,XML_NAMESPACE_TEXT, XML_P, true, false); Reference<XServiceInfo> xElement(aColIter->xElement,uno::UNO_QUERY); - Reference<XReportComponent> xReportComponent = aColIter->xElement; if ( !bShapeHandled ) { diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index 628e9a32f188..2adedeb10de6 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -136,7 +136,6 @@ SvXMLImportContext* OXMLFixedContent::CreateChildContext_( static const char s_sStringConcat[] = " & "; const SvXMLTokenMap& rTokenMap = m_rImport.GetCellElemTokenMap(); - Reference<XComponentContext> xContext = m_rImport.GetComponentContext(); m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); const sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName ); diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 09e3726eed90..1693963389b5 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -139,8 +139,7 @@ void OAddFieldWindowListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_r // no drag without a field return; - OMultiColumnTransferable* pDataContainer = new OMultiColumnTransferable(getSelectedFieldDescriptors()); - Reference< XTransferable> xEnsureDelete = pDataContainer; + rtl::Reference<OMultiColumnTransferable> pDataContainer = new OMultiColumnTransferable(getSelectedFieldDescriptors()); EndSelection(); pDataContainer->StartDrag( this, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index ade452fefb21..d4e69f676686 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -267,8 +267,7 @@ void OFieldExpressionControl::StartDrag( sal_Int8 /*_nAction*/ , const Point& /* if( aClipboardList.getLength() ) { - OGroupExchange* pData = new OGroupExchange(aClipboardList); - uno::Reference< css::datatransfer::XTransferable> xRef = pData; + rtl::Reference<OGroupExchange> pData = new OGroupExchange(aClipboardList); pData->StartDrag(this, DND_ACTION_MOVE ); } } diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 0e2f21884dbd..a50e3e01a40b 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -2074,8 +2074,6 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< OUString >& _rF VclPtr<vcl::Window> pInspectorWindow = VCLUnoHelper::GetWindow( xInspectorWindow ); WaitObject aWaitCursor( pInspectorWindow ); - uno::Reference< sdbc::XPreparedStatement > xStatement; - // get the form of the control we're inspecting uno::Reference< beans::XPropertySet > xFormSet( m_xRowSet, uno::UNO_QUERY ); if ( !xFormSet.is() ) diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index fe7f59b7930f..502609531ec0 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -128,7 +128,6 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) const uno::Reference< report::XSection > xSection(_rEvent.Source,uno::UNO_QUERY); if ( xSection.is() ) { - const uno::Reference< report::XSection> xCurrentSection = m_aReportSection->getSection(); if ( _rEvent.PropertyName == PROPERTY_HEIGHT ) { m_pParent->getView()->SetUpdateMode(false); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 1ea4502a5e44..67be39d52790 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -387,8 +387,7 @@ void OViewsWindow::Copy() sectionPtr->getReportSection().Copy(aAllreadyCopiedObjects); }); - OReportExchange* pCopy = new OReportExchange(aAllreadyCopiedObjects); - uno::Reference< datatransfer::XTransferable> aEnsureDelete = pCopy; + rtl::Reference<OReportExchange> pCopy = new OReportExchange(aAllreadyCopiedObjects); pCopy->CopyToClipboard(this); } diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx index 9a558ae458c0..5b60bf912094 100644 --- a/sc/source/core/data/globalx.cxx +++ b/sc/source/core/data/globalx.cxx @@ -86,9 +86,7 @@ void ScGlobal::InitAddIns() if ( xResultSet.is() ) { - Reference< sdbc::XRow > xRow( xResultSet, UNO_QUERY ); - Reference< XContentAccess > - xContentAccess( xResultSet, UNO_QUERY ); + Reference< XContentAccess > xContentAccess( xResultSet, UNO_QUERY ); try { if ( xResultSet->first() ) diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 92c83e06aaa3..72d2985e536f 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -310,8 +310,6 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect { rWorkbookHandler.getDocImport().initForSheets(); - Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); - // test sequential read in this mode comphelper::ThreadPool &rSharedPool = comphelper::ThreadPool::getSharedOptimalPool(); std::shared_ptr<comphelper::ThreadTaskTag> pTag = comphelper::ThreadPool::createThreadTaskTag(); diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index ed181469bd70..9fcbf4aaec8a 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -285,8 +285,7 @@ void ScSelectionTransferObj::CreateCellData() aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); // SetDragHandlePos is not used - there is no mouse position //? pTransferObj->SetVisibleTab( nTab ); @@ -338,8 +337,7 @@ void ScSelectionTransferObj::CreateDrawData() aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScDrawTransferObj ctor - ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); SfxObjectShellRef aPersistRef( aDragShellRef.get() ); pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 69ffd28bc62e..b261e56b60c1 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -73,7 +73,6 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram return; uno::Reference<frame::XFrame> xFrame = pFrame->GetFrame().GetFrameInterface(); - uno::Reference<frame::XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( "_beamer", diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 8fd837c3c5b5..ec66b99e073b 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1267,13 +1267,12 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const OUString& rName, ScCo aObjDesc.maDisplayName = pSrcShell->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScDrawTransferObj ctor - ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pDragModel, pSrcShell, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pDragModel, pSrcShell, aObjDesc ); pTransferObj->SetDragSourceObj( pObject, nTab ); pTransferObj->SetDragSourceFlags(ScDragSrc::Navigator); - SC_MOD()->SetDragObject( nullptr, pTransferObj ); + SC_MOD()->SetDragObject( nullptr, pTransferObj.get() ); pWin->ReleaseMouse(); pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } @@ -1301,13 +1300,12 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, ScDra aObjDesc.maDisplayName = pSrcShell->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); pTransferObj->SetDragSource( pSrcShell, aMark ); pTransferObj->SetDragSourceFlags( nFlags ); - SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D + SC_MOD()->SetDragObject( pTransferObj.get(), nullptr ); // for internal D&D pWin->ReleaseMouse(); pTransferObj->StartDrag( pWin, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } @@ -1446,8 +1444,7 @@ void ScContentTree::DoDrag() if (bDoLinkTrans) { - ScLinkTransferObj* pTransferObj = new ScLinkTransferObj; - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScLinkTransferObj> pTransferObj = new ScLinkTransferObj; if ( !aLinkURL.isEmpty() ) pTransferObj->SetLinkURL( aLinkURL, aLinkText ); diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 1141e75655b7..291151d11a6d 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1080,11 +1080,10 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget) if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr) { ScTabViewShell* pViewSh = static_cast<ScTabViewTarget&>(rTarget).GetViewShell(); - ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pViewSh->GetActiveWin() ); + // keep a reference in case the clipboard is changed during PasteFromClip + rtl::Reference<ScTransferObj> pOwnClip = ScTransferObj::GetOwnClipboard( pViewSh->GetActiveWin() ); if (pOwnClip) { - // keep a reference in case the clipboard is changed during PasteFromClip - css::uno::Reference<css::datatransfer::XTransferable> aOwnClipRef( pOwnClip ); pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(), aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose, aPasteOptions.bAsLink, aPasteOptions.eMoveMode, InsertDeleteFlags::NONE, diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index f02b1361109f..ce7844e6ee7c 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -331,7 +331,6 @@ void PivotTableDataProvider::collectPivotTableData() { uno::Reference<uno::XInterface> xDim = ScUnoHelpFunctions::AnyToInterface(xDims->getByIndex(nDim)); uno::Reference<beans::XPropertySet> xDimProp(xDim, uno::UNO_QUERY); - uno::Reference<container::XNamed> xDimName(xDim, uno::UNO_QUERY); uno::Reference<sheet::XHierarchiesSupplier> xDimSupp(xDim, uno::UNO_QUERY); if (!xDimProp.is() || !xDimSupp.is()) diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 36a33957c118..ba0de26e515c 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -777,7 +777,6 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName ) uno::Reference<drawing::XShape> xShape( mxShapeAgg, uno::UNO_QUERY ); if (xShape.is()) { - uno::Reference< uno::XInterface > xAnchor; if (ScDrawLayer::GetAnchorType(*pObj) == SCA_CELL) { awt::Size aUnoSize; diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 5c500d62f137..a1471475d540 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -553,7 +553,6 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheetView > xSpreadsheet( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XSpreadsheet > xDoc = xSpreadsheet->getActiveSheet(); ScTabViewShell* pShell = excel::getCurrentBestViewShell( mxContext ); ScGridWindow* gridWindow = static_cast<ScGridWindow*>(pShell->GetWindow()); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 8f715d6b8d54..4e3352b79edd 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4239,8 +4239,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC return uno::Reference<excel::XRange>(); } - ScVbaRange* pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange ); - uno::Reference< excel::XRange > xVbSheetRange( pRange ); + rtl::Reference<ScVbaRange> pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange ); return pRange->Range( Cell1, Cell2, true ); } @@ -4385,7 +4384,6 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const if ( xDataBaseRange.is() ) bHasAuto = true; - uno::Reference< table::XCellRange > xFilterRange; if ( !bHasAuto ) { if ( m_Areas->getCount() > 1 ) @@ -5221,7 +5219,6 @@ ScVbaRange::Merge( const uno::Any& Across ) } return; } - uno::Reference< table::XCellRange > oCellRange; bool bAcross = false; Across >>= bAcross; if ( !bAcross ) @@ -5451,7 +5448,6 @@ ScVbaRange::SpecialCellsImpl( sal_Int32 nType, const uno::Any& _oValue) try { uno::Reference< sheet::XCellRangesQuery > xQuery( mxRange, uno::UNO_QUERY_THROW ); - uno::Reference< excel::XRange > oLocRangeImpl; uno::Reference< sheet::XSheetCellRanges > xLocSheetCellRanges; switch(nType) { diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index ce3fe707a663..c4a580f9be4c 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1335,15 +1335,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) vcl::Window* pWin = GetViewData()->GetActiveWin(); ScDocument* pDoc = GetViewData()->GetDocument(); bool bOtherDoc = !pDoc->IsClipboardSource(); - ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); + // keep a reference in case the clipboard is changed during dialog or PasteFromClip + rtl::Reference<ScTransferObj> pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( pOwnClip ) { bool bSkipEmpty = false; bool bTranspose = false; bool bAsLink = false; - // keep a reference in case the clipboard is changed during dialog or PasteFromClip - uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() ) { const SfxPoolItem* pItem; diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 18a82ae2ed00..5a5ac3de2b23 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -123,13 +123,12 @@ void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScDrawTransferObj ctor - ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); pTransferObj->SetDrawPersist( aDragShellRef.get() ); // keep persist for ole objects alive pTransferObj->SetDragSource( this ); // copies selection - SC_MOD()->SetDragObject( nullptr, pTransferObj ); // for internal D&D + SC_MOD()->SetDragObject( nullptr, pTransferObj.get() ); // for internal D&D pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } } @@ -379,8 +378,7 @@ void ScDrawView::DoCopy() aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScDrawTransferObj ctor - ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScDrawTransferObj> pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc ); if ( ScGlobal::xDrawClipDocShellRef.is() ) { @@ -388,7 +386,7 @@ void ScDrawView::DoCopy() } pTransferObj->CopyToClipboard( pViewData->GetActiveWin() ); // system clipboard - SC_MOD()->SetClipObject( nullptr, pTransferObj ); // internal clipboard + SC_MOD()->SetClipObject( nullptr, pTransferObj.get() ); // internal clipboard } uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable() diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 9255837a9e3f..95ffc0e67ba5 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4333,21 +4333,18 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel ) { // within Calc - ScTransferObj* pCellTransfer = pOwnSelection->GetCellData(); + // keep a reference to the data in case the selection is changed during paste + rtl::Reference<ScTransferObj> pCellTransfer = pOwnSelection->GetCellData(); if ( pCellTransfer ) { - // keep a reference to the data in case the selection is changed during paste - uno::Reference<datatransfer::XTransferable> xRef( pCellTransfer ); - DropTransferObj( pCellTransfer, nPosX, nPosY, aLogicPos, DND_ACTION_COPY ); + DropTransferObj( pCellTransfer.get(), nPosX, nPosY, aLogicPos, DND_ACTION_COPY ); } else { - ScDrawTransferObj* pDrawTransfer = pOwnSelection->GetDrawData(); + // keep a reference to the data in case the selection is changed during paste + rtl::Reference<ScDrawTransferObj> pDrawTransfer = pOwnSelection->GetDrawData(); if ( pDrawTransfer ) { - // keep a reference to the data in case the selection is changed during paste - uno::Reference<datatransfer::XTransferable> xRef( pDrawTransfer ); - // bSameDocClipboard argument for PasteDraw is needed // because only DragData is checked directly inside PasteDraw pViewData->GetView()->PasteDraw( diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 8fd89540a1ff..1579bcc82e6d 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -184,8 +184,7 @@ void ScViewFunctionSet::BeginDrag() aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); // set position of dragged cell within range ScRange aMarkRange = pTransferObj->GetRange(); @@ -203,7 +202,7 @@ void ScViewFunctionSet::BeginDrag() if ( pWindow->IsTracking() ) pWindow->EndTracking( TrackingEventFlags::Cancel ); // abort selecting - SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D + SC_MOD()->SetDragObject( pTransferObj.get(), nullptr ); // for internal D&D pTransferObj->StartDrag( pWindow, nDragActions ); return; // dragging started diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 8534373ba48b..88143e9ac594 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -488,8 +488,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ ) aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); - css::uno::Reference<css::datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); pTransferObj->SetDragSourceFlags(ScDragSrc::Table); @@ -498,7 +497,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ ) pTransferObj->SetSourceCursorPos( pViewData->GetCurX(), pViewData->GetCurY() ); vcl::Window* pWindow = pViewData->GetActiveWin(); - SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D + SC_MOD()->SetDragObject( pTransferObj.get(), nullptr ); // for internal D&D pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 6a1087c6b135..f789a34021e5 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -418,7 +418,7 @@ void ScTabView::CheckSelectionTransfer() { ScModule* pScMod = SC_MOD(); ScSelectionTransferObj* pOld = pScMod->GetSelectionTransfer(); - ScSelectionTransferObj* pNew = ScSelectionTransferObj::CreateFromView( this ); + rtl::Reference<ScSelectionTransferObj> pNew = ScSelectionTransferObj::CreateFromView( this ); if ( pNew ) { // create new selection @@ -426,8 +426,7 @@ void ScTabView::CheckSelectionTransfer() if (pOld) pOld->ForgetView(); - uno::Reference<datatransfer::XTransferable> xRef( pNew ); - pScMod->SetSelectionTransfer( pNew ); + pScMod->SetSelectionTransfer( pNew.get() ); pNew->CopyToSelection( GetActiveWin() ); // may delete pOld } else if ( pOld && pOld->GetView() == this ) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 67bef8e7db04..e5a630d7a708 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -269,8 +269,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pClipDoc, aObjDesc ); if ( ScGlobal::xDrawClipDocShellRef.is() ) { SfxObjectShellRef aPersistRef( ScGlobal::xDrawClipDocShellRef.get() ); @@ -278,7 +277,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b } pTransferObj->CopyToClipboard( GetActiveWin() ); - SC_MOD()->SetClipObject( pTransferObj, nullptr ); + SC_MOD()->SetClipObject( pTransferObj.get(), nullptr ); } bDone = true; @@ -377,8 +376,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass(); // maSize is set in ScTransferObj ctor - ScTransferObj* pTransferObj = new ScTransferObj( pDocClip.release(), aObjDesc ); - uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); + rtl::Reference<ScTransferObj> pTransferObj = new ScTransferObj( pDocClip.release(), aObjDesc ); if ( ScGlobal::xDrawClipDocShellRef.is() ) { @@ -387,7 +385,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b } pTransferObj->CopyToClipboard( GetActiveWin() ); // system clipboard - SC_MOD()->SetClipObject( pTransferObj, nullptr ); // internal clipboard + SC_MOD()->SetClipObject( pTransferObj.get(), nullptr ); // internal clipboard } bSuccess = true; @@ -463,12 +461,10 @@ void ScViewFunc::PasteFromSystem() vcl::Window* pWin = GetActiveWin(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); - ScDrawTransferObj* pDrawClip = ScDrawTransferObj::GetOwnClipboard(); - + // keep a reference in case the clipboard is changed during PasteFromClip + rtl::Reference<ScDrawTransferObj> pDrawClip = ScDrawTransferObj::GetOwnClipboard(); if (pOwnClip) { - // keep a reference in case the clipboard is changed during PasteFromClip - uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(), ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE, true ); // allow warning dialog @@ -706,11 +702,10 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi ) bool bRet = true; vcl::Window* pWin = GetActiveWin(); - ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); + // keep a reference in case the clipboard is changed during PasteFromClip + rtl::Reference<ScTransferObj> pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( nFormatId == SotClipboardFormatId::NONE && pOwnClip ) { - // keep a reference in case the clipboard is changed during PasteFromClip - uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(), ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE, !bApi ); // allow warning dialog diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index 33f950c51c00..f5bd7aa229f8 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -260,7 +260,7 @@ namespace dlgprov // if we had no success, try to attach to the control if ( !bSuccess ) { - Reference< XEventListener > xListener_ = m_xEventAttacher->attachSingleEventListener( + m_xEventAttacher->attachSingleEventListener( xControl, xAllListener, Helper, aDesc.ListenerType, aDesc.AddListenerParam, aDesc.EventMethod ); } diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index ff9aee30b2b1..41ae7cfd8b24 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -301,9 +301,6 @@ void CustomAnimationPresets::importEffects() Reference< XMultiServiceFactory > xServiceFactory( xContext->getServiceManager(), UNO_QUERY_THROW ); - uno::Reference< util::XMacroExpander > xMacroExpander = - util::theMacroExpander::get(xContext); - Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext ); diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 5bc606d6785e..938cfaa41c43 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -201,9 +201,6 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) Reference< XMultiServiceFactory > xServiceFactory( xContext->getServiceManager(), UNO_QUERY_THROW ); - uno::Reference< util::XMacroExpander > xMacroExpander = - util::theMacroExpander::get(xContext); - // import ui strings Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext ); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 63964b6283f3..c4df696242b2 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -499,8 +499,6 @@ bool SdXMLFilter::Import( ErrCode& nError ) } } - Reference< io::XActiveDataSource > xSource; - Reference< XInterface > xPipe; Reference< document::XGraphicObjectResolver > xGraphicResolver; SvXMLGraphicHelper *pGraphicHelper = nullptr; Reference< document::XEmbeddedObjectResolver > xObjectResolver; @@ -543,7 +541,6 @@ bool SdXMLFilter::Import( ErrCode& nError ) // get the input stream (storage or stream) tools::SvRef<SotStorageStream> xDocStream; - Reference<io::XInputStream> xInputStream; uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage(); OUString sSourceStorage( "SourceStorage"); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 4ce9ad62bc66..9de47d3750b4 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -355,7 +355,6 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con Reference< XChangesNotifier > xNotifier( mpEffect->getNode(), UNO_QUERY ); if( xNotifier.is() ) { - Reference< XChangesListener > xListener( this ); xNotifier->addChangesListener( this ); } } @@ -984,7 +983,6 @@ void MotionPathTag::disposing() Reference< XChangesNotifier > xNotifier( mpEffect->getNode(), UNO_QUERY ); if( xNotifier.is() ) { - Reference< XChangesListener > xListener( this ); xNotifier->removeChangesListener( this ); } diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index a537cb6a5574..a03bff816801 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -239,7 +239,6 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) { if (aArguments.getLength() > 0) { - Reference<XConfigurationController> xCC; try { // Get the XController from the first argument. diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 72a4025470e7..8b02b73abe77 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2350,7 +2350,6 @@ Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getMasterPage( ) if(GetPage()) { - Reference< drawing::XDrawPages > xPages( GetModel()->getMasterPages() ); Reference< drawing::XDrawPage > xPage; if(SvxFmDrawPage::mpPage->TRG_HasMasterPage()) diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx index c5f59d6b4fec..f9024b460aa5 100644 --- a/sdext/source/minimizer/graphiccollector.cxx +++ b/sdext/source/minimizer/graphiccollector.cxx @@ -356,7 +356,6 @@ void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const } // now check for a fillstyle - Reference< XPropertySet > xEmptyPagePropSet; Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW ); FillStyle eFillStyle; if ( xShapePropertySet->getPropertyValue( "FillStyle" ) >>= eFillStyle ) diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index cdbcd2ddb6eb..337dac042c5c 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -822,7 +822,6 @@ void Parser::parseLine( const OString& rLine ) OSL_PRECOND( m_xContext.is(), "Invalid service factory" ); m_nNextToken = 0; m_nCharIndex = 0; m_aLine = rLine; - uno::Reference<rendering::XPolyPolygon2D> xPoly; const OString& rCmd = readNextToken(); const hash_entry* pEntry = PdfKeywordHash::in_word_set( rCmd.getStr(), rCmd.getLength() ); diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 1d0705eeb094..5be87954b681 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -1193,11 +1193,10 @@ void PresenterController::UpdatePendingSlideNumber (const sal_Int32 nPendingSlid const OUString sText (OUString::number(mnPendingSlideNumber)); rendering::StringContext aContext (sText, 0, sText.getLength()); - Reference<rendering::XTextLayout> xLayout ( - pFont->mxFont->createTextLayout( + pFont->mxFont->createTextLayout( aContext, rendering::TextDirection::WEAK_LEFT_TO_RIGHT, - 0)); + 0); } void PresenterController::SwitchMonitors() diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx index 749e8a58d08a..4052ec9f98a9 100644 --- a/sdext/source/presenter/PresenterWindowManager.cxx +++ b/sdext/source/presenter/PresenterWindowManager.cxx @@ -276,12 +276,7 @@ void SAL_CALL PresenterWindowManager::windowPaint (const awt::PaintEvent& rEvent if (mbIsLayoutPending) Layout(); PaintBackground(rEvent.UpdateRect); - if ( ! PaintChildren(rEvent)) - { - Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxParentCanvas, UNO_QUERY); - // if (xSpriteCanvas.is()) - // xSpriteCanvas->updateScreen(sal_False); - } + PaintChildren(rEvent); } catch (RuntimeException&) { @@ -338,10 +333,6 @@ void SAL_CALL PresenterWindowManager::disposing (const lang::EventObject& rEvent { if (rEvent.Source == mxParentWindow) mxParentWindow = nullptr; - else - { - Reference<awt::XWindow> xWindow (rEvent.Source, UNO_QUERY); - } } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 4a67b06ef6ff..c3acd7f126b6 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2004,7 +2004,6 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox() sCurrentFactory = SfxHelp::GetCurrentModuleIdentifier(); Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - Reference< XInterface > xConfig; OUString sPath( PATH_OFFICE_FACTORIES ); sPath += sCurrentFactory; OUString sKey( KEY_HELP_ON_OPEN ); @@ -2394,8 +2393,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) Reference < XDispatch > xDisp = xFrame->queryDispatch( aURL, OUString(), 0 ); if(xDisp.is()) { - HelpStatusListener_Impl* pStateListener; - Reference<XStatusListener>xStateListener = pStateListener = + rtl::Reference<HelpStatusListener_Impl> pStateListener = new HelpStatusListener_Impl(xDisp, aURL ); FeatureStateEvent rEvent = pStateListener->GetStateEvent(); bool bCheck = false; diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index f6a537ec72bb..c7cc437748fc 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -365,7 +365,6 @@ IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused*/, vo { css::uno::Reference < XFilePickerControlAccess > xPickerControls ( xPicker, UNO_QUERY ); - css::uno::Reference < XFilterManager > xFilterManager ( xPicker, UNO_QUERY ); Sequence< OUString > sFiles = xPicker->getSelectedFiles(); int nFiles = sFiles.getLength(); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index dff88933905e..ecb950a30aba 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1137,8 +1137,6 @@ void SfxBindings::UpdateSlotServer_Impl() { if ( !nRegLevel ) { - css::uno::Reference < css::frame::XFrame > xFrame - ( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); pImpl->bContextChanged = false; } else @@ -1728,7 +1726,6 @@ bool SfxBindings::IsInUpdate() const void SfxBindings::SetVisibleState( sal_uInt16 nId, bool bShow ) { - css::uno::Reference< css::frame::XDispatch > xDisp; SfxStateCache *pCache = GetStateCache( nId ); if ( pCache ) pCache->SetVisibleState( bShow ); diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index fb4a3f93dd65..606b4001c2bb 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1033,7 +1033,6 @@ void SAL_CALL SfxDocumentMetaData::updateUserDefinedAndAttributes() css::uno::Reference<css::xml::dom::XDocument> SAL_CALL SfxDocumentMetaData::createDOM() const // throw (css::uno::RuntimeException) { - css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( m_xContext->getServiceManager()); css::uno::Reference<css::xml::dom::XDocumentBuilder> xBuilder( css::xml::dom::DocumentBuilder::create(m_xContext) ); css::uno::Reference<css::xml::dom::XDocument> xDoc = xBuilder->newDocument(); if (!xDoc.is()) diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 979429bb9829..01108b65f849 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1632,7 +1632,6 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, { bool bResult = false; Reference< css::ucb::XCommandEnvironment > xDummyEnv; - Reference< XOutputStream > aDestStream; ::ucbhelper::Content aOriginalContent; try diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index b743ba2ecc76..3689525987c2 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1527,7 +1527,6 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle, if ( xResultSet.is() ) { - uno::Reference< XContentAccess > xContentAccess( xResultSet, UNO_QUERY ); uno::Reference< XRow > xRow( xResultSet, UNO_QUERY ); try diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 148e265ae524..32ece99f3782 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -385,7 +385,6 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) return; // only for own storage formats - uno::Reference< embed::XStorage > xDocStor = pFile->GetStorage(); if ( !pFile->GetFilter() || !pFile->GetFilter()->IsOwnFormat() ) return; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 28dedc648552..183ee4ae1aea 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3631,7 +3631,6 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& { SfxModelGuard aGuard( *this ); - Reference< embed::XStorage > xResult; if ( !m_pData->m_pObjectShell.is() ) throw io::IOException(); // TODO: @@ -3689,7 +3688,6 @@ void SAL_CALL SfxBaseModel::switchToStorage( const Reference< embed::XStorage >& { SfxModelGuard aGuard( *this ); - Reference< embed::XStorage > xResult; if ( !m_pData->m_pObjectShell.is() ) throw io::IOException(); // TODO: @@ -3718,7 +3716,6 @@ Reference< embed::XStorage > SAL_CALL SfxBaseModel::getDocumentStorage() { SfxModelGuard aGuard( *this ); - Reference< embed::XStorage > xResult; if ( !m_pData->m_pObjectShell.is() ) throw io::IOException(); // TODO diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx index d8925f3c1222..644c3b823498 100644 --- a/slideshow/source/engine/opengl/TransitionerImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx @@ -370,9 +370,6 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >& void OGLTransitionerImpl::impl_prepareSlides() { - Reference< XFastPropertySet > xLeavingSet( mxLeavingBitmap , UNO_QUERY ); - Reference< XFastPropertySet > xEnteringSet( mxEnteringBitmap , UNO_QUERY ); - geometry::IntegerRectangle2D aSlideRect; aSlideRect.X1 = 0; aSlideRect.X2 = maSlideSize.Width; diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index a7de41a9bb00..b7cd310e8ea2 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1737,7 +1737,6 @@ void UCBStorage_Impl::ReadContent() return; Reference< XResultSet > xResultSet = m_pContent->createCursor( aProps, eInclude ); - Reference< XContentAccess > xContentAccess( xResultSet, UNO_QUERY ); Reference< XRow > xRow( xResultSet, UNO_QUERY ); if ( xResultSet.is() ) { diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index d8a420bfa6bb..33529f182b9d 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1483,7 +1483,6 @@ void SmViewShell::Execute(SfxRequest& rReq) { uno::Reference < embed::XStorage > xStorage = ::comphelper::OStorageHelper::GetStorageFromInputStream( xStrm, ::comphelper::getProcessComponentContext() ); - uno::Reference < beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY ); SfxMedium aMedium( xStorage, OUString() ); Insert( aMedium ); GetDoc()->UpdateText(); diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index ca69846a617a..db3e7666c1ba 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -1223,8 +1223,6 @@ void SAL_CALL NestedRegistryImpl::destroy( ) Reference< XRegistryKey > SAL_CALL NestedRegistryImpl::getRootKey( ) { - Reference<XRegistryKey> tmpKey; - Guard< Mutex > aGuard( m_mutex ); if ( m_localReg.is() && m_localReg->isValid() ) { diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 7d39b8c256ad..9ca3cd228ffe 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -194,7 +194,6 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const try { uno::Reference< sdbc::XResultSet > xResultSet = pContent->createCursor( aProps, eInclude ); - uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY ); uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY ); if ( xResultSet.is() ) { @@ -923,7 +922,6 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() sal_Int32 nSize = 0; uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude ); - uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY ); uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY ); if ( xResultSet.is() ) { diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 287b727ff53c..17da61af2333 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1170,8 +1170,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) return; } - TransferDataContainer* pContainer = new TransferDataContainer; - css::uno::Reference< css::datatransfer::XTransferable > xRef( pContainer ); + rtl::Reference<TransferDataContainer> pContainer = new TransferDataContainer; nDragDropMode = NotifyStartDrag( *pContainer, pEntry ); if( nDragDropMode == DragDropMode::NONE || 0 == GetSelectionCount() ) { diff --git a/svtools/source/misc/stringtransfer.cxx b/svtools/source/misc/stringtransfer.cxx index c412281b4ef4..215157020af6 100644 --- a/svtools/source/misc/stringtransfer.cxx +++ b/svtools/source/misc/stringtransfer.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <rtl/ref.hxx> #include <sot/exchange.hxx> #include <svtools/stringtransfer.hxx> @@ -62,8 +63,7 @@ namespace svt void OStringTransfer::CopyString( const OUString& _rContent, vcl::Window* _pWindow ) { - OStringTransferable* pTransferable = new OStringTransferable( _rContent ); - Reference< XTransferable > xTransfer = pTransferable; + rtl::Reference<OStringTransferable> pTransferable = new OStringTransferable( _rContent ); pTransferable->CopyToClipboard( _pWindow ); } @@ -94,8 +94,7 @@ namespace svt void OStringTransfer::StartStringDrag( const OUString& _rContent, vcl::Window* _pWindow, sal_Int8 _nDragSourceActions ) { - OStringTransferable* pTransferable = new OStringTransferable( _rContent ); - Reference< XTransferable > xTransfer = pTransferable; + rtl::Reference<OStringTransferable> pTransferable = new OStringTransferable( _rContent ); pTransferable->StartDrag(_pWindow, _nDragSourceActions); } diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 31f509a11852..d27f18abe8b1 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -82,7 +82,6 @@ uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleChild( sal_Int ::osl::MutexGuard aGuard( m_aMutex ); if ( i < 0 || i >= getAccessibleChildCount()) throw lang::IndexOutOfBoundsException(); - uno::Reference <XAccessible> xAcc; return CreateChild(i, mrPixelCtl.IndexToPoint(i)); } @@ -213,7 +212,6 @@ uno::Reference<XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleAtPoin ::osl::MutexGuard aGuard( m_aMutex ); if( !IsAlive() ) throw lang::DisposedException(); - uno::Reference <XAccessible> xAcc; Point childPoint; childPoint.X() = aPoint.X; diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 6f510bc8c9e4..343ad110a2a5 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1376,7 +1376,6 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) return; // Database event - Reference< XRowSet > xCursor(evt.Source, UNO_QUERY); if (evt.PropertyName == FM_PROP_VALUE || m_xCursor == evt.Source) pGrid->propertyChange(evt); else if (pGrid && m_xColumns.is() && m_xColumns->hasElements()) diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 5837920e2a3d..4b22fe6d4c3d 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2790,8 +2790,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) size_t Location = GetModelColumnPos( nColId ); DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : nullptr; - OStringTransferable* pTransferable = new OStringTransferable(GetCurrentRowCellText(pColumn,m_xPaintRow)); - Reference< XTransferable > xEnsureDelete(pTransferable); + rtl::Reference<OStringTransferable> pTransferable = new OStringTransferable(GetCurrentRowCellText(pColumn,m_xPaintRow)); pTransferable->StartDrag(this, DND_ACTION_COPY); } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index c90354bbc7b8..0cc5b768e009 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -218,8 +218,7 @@ namespace svxform desc.szServiceName = FM_COMPONENT_COMMANDBUTTON; desc.xPropSet = pItemNode->m_xPropSet; } - OXFormsTransferable *pTransferable = new OXFormsTransferable(desc); - Reference< XTransferable > xEnsureDelete = pTransferable; + rtl::Reference<OXFormsTransferable> pTransferable = new OXFormsTransferable(desc); EndSelection(); pTransferable->StartDrag( this, DND_ACTION_COPY ); } @@ -1639,8 +1638,7 @@ namespace svxform bool bLinkOnce = aDlg->IsLinkInstance(); try { - Reference< css::xml::dom::XDocument > xNewInst = - xUIHelper->newInstance( sName, sURL, !bLinkOnce ); + xUIHelper->newInstance( sName, sURL, !bLinkOnce ); } catch ( Exception& ) { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 6e04a6a9e9b7..7898637535d1 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1124,7 +1124,6 @@ bool FmXFormShell::executeControlConversionSlot(const Reference< XFormComponent return false; Reference< XControlModel> xOldModel( pFormObject->GetUnoControlModel() ); - Reference< lang::XServiceInfo> xModelInfo(xOldModel, UNO_QUERY); // transfer properties Reference< XPropertySet> xOldSet(xOldModel, UNO_QUERY); diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 4064c14b6573..0a05efbb72ad 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1395,8 +1395,6 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ if ( !m_pView->IsDesignMode() ) return nullptr; - Reference< XComponent > xKeepFieldsAlive; - // go try { diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index c4fe9e40a723..b91499a789b3 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -781,14 +781,10 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons Reference<XConnection> xConnection(getConnection(Reference< XRowSet>(m_xModelAsIndex, UNO_QUERY))); if (xConnection.is()) { - Reference< XDatabaseMetaData> xMetaData(xConnection->getMetaData()); Reference< XNumberFormatsSupplier> xFormatSupplier( getNumberFormats( xConnection, true ) ); Reference< XNumberFormatter> xFormatter = NumberFormatter::create(m_xComponentContext); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); - Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY); - Reference< XNameAccess> xFields(xSupplyCols->getColumns(), UNO_QUERY); - // now add the filter rows try { @@ -1770,7 +1766,6 @@ void FormController::focusLost(const FocusEvent& e) m_aControlBorderManager.focusLost( e.Source ); - Reference< XControl > xControl(e.Source, UNO_QUERY); Reference< XWindowPeer > xNext(e.NextFocus, UNO_QUERY); Reference< XControl > xNextControl = isInList(xNext); if (!xNextControl.is()) @@ -3233,7 +3228,6 @@ void FormController::startFiltering() sal_Int32 nControlCount = aControlsCopy.getLength(); // the control we have to activate after replacement - Reference< XDatabaseMetaData > xMetaData(xConnection->getMetaData()); Reference< XNumberFormatsSupplier > xFormatSupplier = getNumberFormats(xConnection, true); Reference< XNumberFormatter > xFormatter = NumberFormatter::create(m_xComponentContext); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 2af1e9f1ce8e..9abf30f39812 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -534,8 +534,6 @@ namespace svxform Reference< XIndexContainer > xComponents( GetFormComponents(pFormData)); if( !xComponents.is() ) return; - Reference< XInterface > xInterface; - Reference< XPropertySet > xSet; FmControlData* pNewControlData; FmFormData* pSubFormData; diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index d44ec744b416..e789e4ca1b72 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -159,10 +159,9 @@ void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData()); aDescriptor[ DataAccessDescriptorProperty::ColumnName ] <<= pInfo->sColumnName; - TransferableHelper* pTransferColumn = new OColumnTransferable( + rtl::Reference<OColumnTransferable> pTransferColumn = new OColumnTransferable( aDescriptor, ColumnTransferFormatFlags::FIELD_DESCRIPTOR | ColumnTransferFormatFlags::CONTROL_EXCHANGE | ColumnTransferFormatFlags::COLUMN_DESCRIPTOR ); - Reference< XTransferable> xEnsureDelete = pTransferColumn; EndSelection(); pTransferColumn->StartDrag( this, DND_ACTION_COPY ); } @@ -306,7 +305,6 @@ void FmFieldWin::UpdateContent(const css::uno::Reference< css::form::XForm > & x if (!xForm.is()) return; - Reference< XPreparedStatement > xStatement; Reference< XPropertySet > xSet(xForm, UNO_QUERY); m_aObjectName = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_COMMAND)); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index caa16f3c76cd..2935d8e4b902 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1497,8 +1497,6 @@ SdrOle2Obj& SdrOle2Obj::assignFrom(const SdrOle2Obj& rObj) // ImpAssign( rObj ); const SdrOle2Obj& rOle2Obj = static_cast< const SdrOle2Obj& >( rObj ); - uno::Reference<util::XCloseable> xClose(mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY); - if( pModel && mpImpl->mbConnected ) Disconnect(); diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 3c08c79e085a..e0d8c52ee5ed 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -820,7 +820,6 @@ void TableLayouter::LayoutTable( tools::Rectangle& rRectangle, bool bFitWidth, b if( static_cast< sal_Int32 >( maRows.size() ) != nRowCount ) maRows.resize( nRowCount ); - Reference< XTableRows > xRows( mxTable->getRows() ); for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ ) maRows[nRow].clear(); diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 3d19215697a1..ce631e0e99d0 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -220,11 +220,10 @@ RecoveryUI::EJob RecoveryUI::impl_classifyJob(const css::util::URL& aURL) bool RecoveryUI::impl_doEmergencySave() { // create core service, which implements the real "emergency save" algorithm. - svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xContext, true); - css::uno::Reference< css::frame::XStatusListener > xCore(pCore); + rtl::Reference<svxdr::RecoveryCore> pCore = new svxdr::RecoveryCore(m_xContext, true); // create dialog for this operation and bind it to the used core service - ScopedVclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore); + ScopedVclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore.get()); // start the dialog short nRet = xDialog->Execute(); @@ -234,12 +233,11 @@ bool RecoveryUI::impl_doEmergencySave() bool RecoveryUI::impl_doRecovery() { // create core service, which implements the real "emergency save" algorithm. - svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xContext, false); - css::uno::Reference< css::frame::XStatusListener > xCore(pCore); + rtl::Reference<svxdr::RecoveryCore> pCore = new svxdr::RecoveryCore(m_xContext, false); // create all needed dialogs for this operation // and bind it to the used core service - ScopedVclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore); + ScopedVclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore.get()); // start the dialog short nRet = xDialog->Execute(); diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 0c988ba85492..3a7cf745ccb9 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -312,8 +312,6 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL ThrowIfDisposed(); - uno::Reference< XAccessibleHyperlink > xRet; - SwFormatURL aURL( static_cast<const SwLayoutFrame*>(GetFrame())->GetFormat()->GetURL() ); if( nLinkIndex > 0 ) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 46967a4eb069..6bebf435306c 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -307,7 +307,6 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) if ( !pCursor->HasMark() ) pCursor->SetMark(); - uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() ); *pMySh->GetCursor()->GetPoint() = *GetCurr(); *pMySh->GetCursor()->GetMark() = *GetEnd(); pMySh->GetDoc()->Spell(*pMySh->GetCursor(), diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index 6a303b1717ae..c2a548179238 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -105,7 +105,6 @@ bool SwFEShell::FinishOLEObj() // Server is terminated bool bRet = pIPClient->IsObjectInPlaceActive(); if( bRet ) { - uno::Reference < embed::XEmbeddedObject > xObj = pIPClient->GetObject(); if( CNT_OLE == GetCntType() ) ClearAutomaticContour(); diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 157608397612..ba3cb734ce3b 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -221,12 +221,6 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, // connect parser and filter xParser->setDocumentHandler( xFilter ); - // connect model and filter - uno::Reference<document::XImporter> xImporter( xFilter, UNO_QUERY ); - - // we don't need a model - // xImporter->setTargetDocument( xModelComponent ); - // parse the stream try { diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index ad4f5d36e799..d6a3bdc40681 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -339,8 +339,7 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // Create hyperlink event descriptor. Then copy events // from argument into descriptor. Then copy events from // the descriptor into the format. - SwHyperlinkEventDescriptor* pEvents = new SwHyperlinkEventDescriptor(); - uno::Reference< lang::XServiceInfo> xHold = pEvents; + rtl::Reference<SwHyperlinkEventDescriptor> pEvents = new SwHyperlinkEventDescriptor(); pEvents->copyMacrosFromNameReplace(xReplace); pEvents->copyMacrosIntoINetFormat(*this); } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 576d0d08ff93..a5589b23885e 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -54,8 +54,6 @@ void SwChartHelper::DoUpdateAllCharts( SwDoc* pDoc ) if (!pDoc) return; - uno::Reference< frame::XModel > xRes; - SwOLENode *pONd; SwStartNode *pStNd; SwNodeIndex aIdx( *pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 ); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 6ef892f8f5c4..6f4c5d2de9d2 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -588,8 +588,6 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) } GetSvxPage()->add(xShape); - uno::Reference< uno::XAggregation > xAgg = pShape->GetAggregationInterface(); - OSL_ENSURE(pSvxShape, "Why is here no SvxShape?"); // this position is definitely in 1/100 mm awt::Point aMM100Pos(pSvxShape->getPosition()); @@ -2156,7 +2154,6 @@ void SwXShape::dispose() void SwXShape::addEventListener( const uno::Reference< lang::XEventListener > & aListener) { - uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShapeAgg, uno::UNO_QUERY); SvxShape* pSvxShape = GetSvxShape(); if(pSvxShape) pSvxShape->addEventListener(aListener); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index f874b2f32469..35641d6762cd 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -3048,7 +3048,6 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange) attachToRange(xTextRange); else if(nullptr != (pFormat = GetFrameFormat())) { - uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY); SwDoc* pDoc = pFormat->GetDoc(); SwUnoInternalPaM aIntPam(*pDoc); if (::sw::XTextRangeToSwPaM(aIntPam, xTextRange)) diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 91a84c2e30f0..53800f99400a 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1191,7 +1191,6 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) case SwFootnoteStartNode: { const size_t nFootnoteCnt = rDoc.GetFootnoteIdxs().size(); - uno::Reference< text::XFootnote > xRef; for (size_t n = 0; n < nFootnoteCnt; ++n ) { const SwTextFootnote* pTextFootnote = rDoc.GetFootnoteIdxs()[ n ]; diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index eb153b67b5cc..80d1adb4d405 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -505,7 +505,6 @@ void SwXRedline::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) uno::Reference< container::XEnumeration > SwXRedline::createEnumeration() { SolarMutexGuard aGuard; - uno::Reference< container::XEnumeration > xRet; if(!pDoc) throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 37d5c1e6da2b..1a67dcca1dd3 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2108,7 +2108,6 @@ uno::Reference<text::XTextTableCursor> SwXTextTable::createCursorByCellName(cons { SolarMutexGuard aGuard; SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)); - uno::Reference<text::XTextTableCursor> xRet; SwTable* pTable = SwTable::FindTable(pFormat); SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTableBox(sCellName)); if(!pBox || pBox->getRowSpan() == 0) @@ -2298,7 +2297,6 @@ uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByPosition(sal_Int3 uno::Reference<table::XCellRange> SwXTextTable::getCellRangeByName(const OUString& sRange) { SolarMutexGuard aGuard; - uno::Reference< table::XCellRange > aRef; SwFrameFormat* pFormat = lcl_EnsureCoreConnected(GetFrameFormat(), static_cast<cppu::OWeakObject*>(this)); SwTable* pTable = lcl_EnsureTableNotComplex(SwTable::FindTable(pFormat), static_cast<cppu::OWeakObject*>(this)); sal_Int32 nPos = 0; diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 1fd184b1db6d..d166bba9ad6c 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2773,7 +2773,6 @@ SwXHeadFootText::createEnumeration() SwFrameFormat & rHeadFootFormat( m_pImpl->GetHeadFootFormatOrThrow() ); - uno::Reference< container::XEnumeration > aRef; const SwFormatContent& rFlyContent = rHeadFootFormat.GetContent(); const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode(); SwPosition aPos(rNode); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 08319ee5a1bc..ee8f0274221b 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -575,7 +575,6 @@ void SwHTMLImageWatcher::disposing(const lang::EventObject& evt) uno::Reference< awt::XImageConsumer > xTmp; // Wenn das Shape verschwindet soll muessen wir es loslassen - uno::Reference< drawing::XShape > xTmpShape; if( evt.Source == xShape ) { clear(); @@ -1849,9 +1848,8 @@ void SwHTMLParser::InsertInput() if( bSetGrfWidth || bSetGrfHeight ) { - SwHTMLImageWatcher* pWatcher = + rtl::Reference<SwHTMLImageWatcher> pWatcher = new SwHTMLImageWatcher( xShape, bSetGrfWidth, bSetGrfHeight ); - uno::Reference< awt::XImageConsumer > xCons = pWatcher; pWatcher->start(); } } diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 6eef5c94decb..a7a69e1e1f5a 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1032,14 +1032,12 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat) } -void DocxSdrExport::writeDiagramRels(const uno::Reference<xml::dom::XDocument>& xDom, - const uno::Sequence< uno::Sequence< uno::Any > >& xRelSeq, +void DocxSdrExport::writeDiagramRels(const uno::Sequence< uno::Sequence< uno::Any > >& xRelSeq, const uno::Reference<io::XOutputStream>& xOutStream, const OUString& sGrabBagProperyName, int nAnchorId) { // add image relationships of OOXData, OOXDiagram OUString sType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"); - uno::Reference< xml::sax::XSAXSerializable > xSerializer(xDom, uno::UNO_QUERY); uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(comphelper::getProcessComponentContext()); xWriter->setOutputStream(xOutStream); @@ -1251,7 +1249,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat uno::Sequence< beans::StringPair >()); // write the associated Images and rels for data file - writeDiagramRels(dataDom, xDataRelSeq, xDataOutputStream, "OOXDiagramDataRels", nAnchorId); + writeDiagramRels(xDataRelSeq, xDataOutputStream, "OOXDiagramDataRels", nAnchorId); // write layout file serializer.set(layoutDom, uno::UNO_QUERY); @@ -1288,7 +1286,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat // write the associated Images and rels for drawing file uno::Sequence< uno::Sequence< uno::Any > > xDrawingRelSeq; diagramDrawing[1] >>= xDrawingRelSeq; - writeDiagramRels(drawingDom, xDrawingRelSeq, xDrawingOutputStream, "OOXDiagramDrawingRels", nAnchorId); + writeDiagramRels(xDrawingRelSeq, xDrawingOutputStream, "OOXDiagramDrawingRels", nAnchorId); } } diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx index e4f4a80eddad..a745dc68bbd6 100644 --- a/sw/source/filter/ww8/docxsdrexport.hxx +++ b/sw/source/filter/ww8/docxsdrexport.hxx @@ -97,8 +97,7 @@ public: void writeDMLEffectLst(const SwFrameFormat& rFrameFormat); /// Writes a diagram (smartart). void writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nAnchorId); - void writeDiagramRels(const css::uno::Reference<css::xml::dom::XDocument>& xDom, - const css::uno::Sequence< css::uno::Sequence<css::uno::Any> >& xRelSeq, + void writeDiagramRels(const css::uno::Sequence< css::uno::Sequence<css::uno::Any> >& xRelSeq, const css::uno::Reference<css::io::XOutputStream>& xOutStream, const OUString& sGrabBagProperyName, int nAnchorId); /// Writes text frame in DML format. diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 0b4059161d82..cd26c4debb67 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -463,13 +463,12 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection( aFind->second->pContentIndex = new SwNodeIndex(aIndex); // create XText for document - SwXText* pXText = new SwXRedlineText(pDoc, aIndex); - Reference<XText> xText = pXText; // keep Reference until end of method + rtl::Reference<SwXRedlineText> pXText = new SwXRedlineText(pDoc, aIndex); // create (UNO-) cursor SwPosition aPos(*pRedlineNode); SwXTextCursor *const pXCursor = - new SwXTextCursor(*pDoc, pXText, CursorType::Redline, aPos); + new SwXTextCursor(*pDoc, pXText.get(), CursorType::Redline, aPos); pXCursor->GetCursor().Move(fnMoveForward, GoInNode); // cast to avoid ambiguity xReturn = static_cast<text::XWordCursor*>(pXCursor); diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 154cb7382064..1c507b99a57f 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -500,15 +500,12 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); - uno::Reference< io::XActiveDataSource > xSource; - uno::Reference< XInterface > xPipe; uno::Reference< document::XGraphicObjectResolver > xGraphicResolver; SvXMLGraphicHelper *pGraphicHelper = nullptr; uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver; SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr; // get the input stream (storage or stream) - uno::Reference<io::XInputStream> xInputStream; uno::Reference<embed::XStorage> xStorage; if( pMedium ) xStorage = pMedium->GetStorage(); diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index fcaeea8fcf09..ee70db8fc751 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -77,7 +77,6 @@ sal_uInt32 SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& comphelper::getProcessComponentContext(); // Get data sink ... - uno::Reference< io::XOutputStream > xOut; tools::SvRef<SotStorageStream> xDocStream; uno::Reference< document::XGraphicObjectResolver > xGraphicResolver; SvXMLGraphicHelper *pGraphicHelper = nullptr; diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index ef108972ad20..7ee76a429f9f 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -202,8 +202,6 @@ void SwXMLExport::ExportAutoStyles_() if( getExportFlags() & SvXMLExportFlags::CONTENT ) { GetTextParagraphExport()->exportTrackedChanges( true ); - Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); - Reference < XText > xText = xTextDoc->getText(); // collect form autostyle // (do this before collectTextAutoStyles, 'cause the shapes need the results of the work diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 16c6a6c9069a..96ab523f636b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1281,9 +1281,7 @@ void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) { ReleaseMouse(); - TransferDataContainer* pContainer = new TransferDataContainer; - uno::Reference< - datatransfer::XTransferable > xRef( pContainer ); + rtl::Reference<TransferDataContainer> pContainer = new TransferDataContainer; sal_Int32 nUserData = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData()); //special entries can only be once in the address / greeting diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 0c9ca99dd842..72b2bb61fbee 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -107,9 +107,6 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void if( pDoc ) pDoc->GetDocShell()->LoadStyles_( *m_rWrtShell.GetView().GetDocShell(), true ); - uno::Reference< lang::XMultiServiceFactory > xFact( - xModel, uno::UNO_QUERY); - uno::Reference< text::XTextSectionsSupplier > xSectionSupplier( xModel, uno::UNO_QUERY); uno::Reference< container::XNameAccess > xSections = diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 0ca98f9bd478..2a73235d129e 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -280,7 +280,6 @@ SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) else osl::FileBase::getFileURLFromSystemPath( sTemplate, aURL ); - uno::Reference< word::XTemplate > xTemplate; uno::Reference<css::document::XDocumentPropertiesSupplier> const xDocPropSupp( getModel(), uno::UNO_QUERY_THROW ); uno::Reference< css::document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 12356405b8b3..41dd001ed534 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -808,8 +808,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } else { - TransferDataContainer* pClipCntnr = new TransferDataContainer; - css::uno::Reference< css::datatransfer::XTransferable > xRef( pClipCntnr ); + rtl::Reference<TransferDataContainer> pClipCntnr = new TransferDataContainer; pClipCntnr->CopyAnyData( SotClipboardFormatId::RTF, static_cast<sal_Char const *>( pStrm->GetData()), pStrm->GetEndOfData() ); diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 78300a9e7ac7..28437f6e7d5e 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -372,7 +372,6 @@ SwChapterNumRules* SwModule::GetChapterNumRules() void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData) { Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); - Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame("_beamer", FrameSearchFlag::CHILDREN); if (xBeamerFrame.is()) diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index ca8baa5ba6f5..0a129288517f 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -414,9 +414,6 @@ void ExportStoredChapterNumberingRules(SwChapterNumRules & rRules, uno::Reference<io::XActiveDataSource> const xADS(xWriter, uno::UNO_QUERY); xADS->setOutputStream(xOutStream); - uno::Reference<xml::sax::XDocumentHandler> const xHandler( - xWriter, uno::UNO_QUERY); - rtl::Reference<StoredChapterNumberingExport> exp(new StoredChapterNumberingExport(xContext, rFileName, xWriter)); // if style name contains a space then name != display-name diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 02edbcaeb0a5..05f541ecc730 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2332,11 +2332,9 @@ bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rT aData.nCommandType = -1; SwDSParam* pFound = FindDSData(aData, true); - uno::Reference< sdbc::XDataSource> xSource; if(pFound->xResultSet.is()) return true; SwDSParam* pParam = FindDSConnection(rDataSource, false); - uno::Reference< sdbc::XConnection> xConnection; if(pParam && pParam->xConnection.is()) pFound->xConnection = pParam->xConnection; if(pFound->xConnection.is()) diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index cc8435b37dbb..c7ac900b50db 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -447,8 +447,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) OUString sDBName( GetDBName( sTableName, sColumnName )); if (!sDBName.isEmpty()) { - TransferDataContainer* pContainer = new TransferDataContainer; - css::uno::Reference< css::datatransfer::XTransferable > xRef( pContainer ); + rtl::Reference<TransferDataContainer> pContainer = new TransferDataContainer; if( !sColumnName.isEmpty() ) { // drag database field @@ -457,7 +456,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) sTableName, sColumnName, (ColumnTransferFormatFlags::FIELD_DESCRIPTOR|ColumnTransferFormatFlags::COLUMN_DESCRIPTOR) ) ); - xColTransfer->addDataToContainer( pContainer ); + xColTransfer->addDataToContainer( pContainer.get() ); } sDBName += "." + sTableName; diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 75c0c9eea027..8add26e4fb38 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -689,9 +689,7 @@ bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const OUString& rShortName) SwTextBlocks *pGlossary = pCurGrp ? pCurGrp.get() : rStatGlossaries.GetGroupDoc(aCurGrp); - SwTransferable* pTransfer = new SwTransferable( rSh ); -/*??*/uno::Reference< - datatransfer::XTransferable > xRef( pTransfer ); + rtl::Reference<SwTransferable> pTransfer = new SwTransferable( rSh ); int nRet = pTransfer->CopyGlossary( *pGlossary, rShortName ); if( !pCurGrp ) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 28ae025eeb47..4787dc9a7a4d 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -3569,12 +3569,11 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh, const SwFrameShell * _pCreatorView ) { SwModule *pMod = SW_MOD(); - SwTransferable* pNew = new SwTransferable( rSh ); + rtl::Reference<SwTransferable> pNew = new SwTransferable( rSh ); pNew->m_pCreatorView = _pCreatorView; - uno::Reference< XTransferable > xRef( pNew ); - pMod->m_pXSelection = pNew; + pMod->m_pXSelection = pNew.get(); pNew->CopyToSelection( rSh.GetWin() ); } diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 59badc65b7ca..a355cefa2ca5 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -134,9 +134,7 @@ void SwEditWin::StartExecuteDrag() m_bIsInDrag = true; - SwTransferable* pTransfer = new SwTransferable( m_rView.GetWrtShell() ); - uno::Reference< - datatransfer::XTransferable > xRef( pTransfer ); + rtl::Reference<SwTransferable> pTransfer = new SwTransferable( m_rView.GetWrtShell() ); pTransfer->StartDrag( this, m_aMovePos ); } diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 301c083220d4..a06abe1b5a1f 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -282,7 +282,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId ) return; } - TransferDataContainer* pClipCntnr = nullptr; + rtl::Reference<TransferDataContainer> pClipCntnr; sal_uInt16 nExecId = USHRT_MAX; bool bFilterSet = false; @@ -351,10 +351,8 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId ) if( bFilterSet ) ::LoadURL(rSh, sURL, nFilter, sTargetFrameName); - if( pClipCntnr ) + if( pClipCntnr && pClipCntnr->HasAnyData() ) { - css::uno::Reference< css::datatransfer::XTransferable > xRef( pClipCntnr ); - if( pClipCntnr->HasAnyData() ) pClipCntnr->CopyToClipboard( pWin ); } } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 5367b0cac7fe..a5aeb348f25c 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -259,8 +259,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) rView.GetEditWin().FlushInBuffer(); if ( rSh.HasSelection() ) { - SwTransferable* pTransfer = new SwTransferable( rSh ); -/*??*/ uno::Reference< datatransfer::XTransferable > xRef( pTransfer ); + rtl::Reference<SwTransferable> pTransfer = new SwTransferable( rSh ); if ( nId == SID_CUT && FlyProtectFlags::NONE == rSh.IsSelObjProtected(FlyProtectFlags::Content|FlyProtectFlags::Parent) ) pTransfer->Cut(); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 229ca46cd00a..4627172c4728 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -730,10 +730,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case FN_CALCULATE: { - SwTransferable* pTransfer = new SwTransferable( rWrtSh ); -/*??*/ uno::Reference< - datatransfer::XTransferable > xRef( - pTransfer ); + rtl::Reference<SwTransferable> pTransfer = new SwTransferable( rWrtSh ); pTransfer->CalculateAndCopy(); rReq.Done(); } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 316054ad2d1e..719db274fac0 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -976,7 +976,6 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > const Reference< util::XSearchDescriptor > & xDesc) { SolarMutexGuard aGuard; - Reference< XInterface > xTmp; sal_Int32 nResult = 0; Reference< XTextCursor > xCursor; if(!xStartAt.is()) diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 17b53047a784..94c19a4872b2 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -385,10 +385,6 @@ uno::Any SwXTextView::getSelection() case ShellMode::DrawText : case ShellMode::Bezier : { - uno::Reference< drawing::XDrawPageSupplier > xPageSupp; - uno::Reference< frame::XModel > xModel = m_pView->GetDocShell()->GetBaseModel(); - uno::Reference< lang::XUnoTunnel > xModelTunnel(xModel, uno::UNO_QUERY); - uno::Reference< drawing::XShapes > xShCol = drawing::ShapeCollection::create( comphelper::getProcessComponentContext()); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index ee788fd86840..796bfb10ebf7 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1008,9 +1008,7 @@ void SwContentTree::StartDrag( sal_Int8 nAction, const Point& rPosPixel ) { ReleaseMouse(); - TransferDataContainer* pContainer = new TransferDataContainer; - uno::Reference< - datatransfer::XTransferable > xRef( pContainer ); + rtl::Reference<TransferDataContainer> pContainer = new TransferDataContainer; sal_Int8 nDragMode = DND_ACTION_COPYMOVE | DND_ACTION_LINK; if( FillTransferData( *pContainer, nDragMode )) diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx index fb32ea3173c2..7d0e24527685 100644 --- a/test/source/sheet/xspreadsheets2.cxx +++ b/test/source/sheet/xspreadsheets2.cxx @@ -247,7 +247,7 @@ void XSpreadsheets2::testImportCellStyle() importSheetToCopy(); uno::Reference< table::XCell > xSrcCell = xSrcSheet->getCellByPosition(3,0); - uno::Reference< table::XCell > xDestCell = xDestSheet->getCellByPosition(3,0); + xDestSheet->getCellByPosition(3,0); //new style created in dest uno::Reference< beans::XPropertySet > xSrcCellPropSet (xSrcCell, UNO_QUERY_THROW); diff --git a/test/source/text/xtextcontent.cxx b/test/source/text/xtextcontent.cxx index 6f6b00ff87c1..528241a8dd8b 100644 --- a/test/source/text/xtextcontent.cxx +++ b/test/source/text/xtextcontent.cxx @@ -28,7 +28,6 @@ void XTextContent::testGetAnchor() void XTextContent::testAttach() { uno::Reference< text::XTextContent > xTextContent(init(), UNO_QUERY_THROW); - uno::Reference< text::XTextRange > xAnchor = xTextContent->getAnchor(); uno::Reference< text::XTextContent > xContent(getTextContent(), UNO_QUERY_THROW); uno::Reference< text::XTextRange > xRange(getTextRange(), UNO_QUERY_THROW); diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 2e2982551693..e1b0a5a13eb6 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -743,9 +743,6 @@ void UnoControlContainer::createPeer( const uno::Reference< awt::XToolkit >& rxT if( bVis ) UnoControl::setVisible( false ); - uno::Reference< beans::XPropertySet > xTmpPropSet - ( getModel(), uno::UNO_QUERY ); - // Create a new peer UnoControl::createPeer( rxToolkit, rParent ); diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index f131851475aa..e92437b395dd 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -535,7 +535,6 @@ Reference< XOutputStream > OFileAccess::openFileWrite( const OUString& FileURL ) Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) { Reference< XActiveDataStreamer > xSink = static_cast<XActiveDataStreamer*>(new OActiveDataStreamer); - Reference< XInterface > xSinkIface( xSink, UNO_QUERY ); OpenCommandArgument2 aArg; aArg.Mode = OpenMode::DOCUMENT; diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index ab6beb731525..1dd52774ab9f 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -384,8 +384,6 @@ namespace ucb { namespace ucp { namespace ext const sal_Int32 nCount = i_rProperties.getLength(); if ( nCount ) { - Reference< XPropertySet > xAdditionalPropSet; - const Property* pProps = i_rProperties.getConstArray(); for ( sal_Int32 n = 0; n < nCount; ++n ) { diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index e78bb9ed46eb..efad9a8ed735 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -673,7 +673,6 @@ void SAL_CALL TaskManager::page( sal_Int32 CommandId, const OUString& aUnqPath, const uno::Reference< io::XOutputStream >& xOutputStream ) { - uno::Reference< XContentProvider > xProvider( m_pProvider ); osl::File aFile( aUnqPath ); osl::FileBase::RC err = aFile.open( osl_File_OpenFlag_Read ); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 585f01b402cf..afc8a4c49557 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -2154,7 +2154,6 @@ uno::Reference< container::XHierarchicalNameAccess > Content::getPackage( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - uno::Reference< container::XHierarchicalNameAccess > xPackage; if ( rURI.getPackage() == m_aUri.getPackage() ) { if ( !m_xPackage.is() ) diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx index 5603f49798af..7252f77c0925 100644 --- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx @@ -495,7 +495,6 @@ void DAVResourceAccess::GET0( { initialize(); - uno::Reference< io::XInputStream > xStream; int errorCount = 0; bool bRetry; do diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx index 034eaf287d33..2dc622643ee7 100644 --- a/unotools/source/ucbhelper/ucbstreamhelper.cxx +++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx @@ -47,9 +47,6 @@ static SvStream* lcl_CreateStream( const OUString& rFileName, StreamMode eOpenMo bool bEnsureFileExists ) { SvStream* pStream = nullptr; - Reference< XUniversalContentBroker > ucb( - UniversalContentBroker::create( - comphelper::getProcessComponentContext() ) ); UcbLockBytesRef xLockBytes; if ( eOpenMode & StreamMode::WRITE ) { diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index 2f7e8d60635e..8bcf4d69bc90 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -197,8 +197,6 @@ namespace vcl // volatile bitmaps are a bit more complicated to read // from.. - uno::Reference<rendering::XVolatileBitmap> xVolatileBitmap( - xInputBitmap, uno::UNO_QUERY); // loop a few times, until successfully read (for XVolatileBitmap) for( int i=0; i<10; ++i ) diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 6dd9460b8d78..10a3820ae7bc 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -655,7 +655,7 @@ Reference< css::datatransfer::dnd::XDropTarget > Window::GetDropTarget() if( ! mpWindowImpl->mpFrameData->mxDropTarget.is() ) { // initialization is done in GetDragSource - Reference< css::datatransfer::dnd::XDragSource > xDragSource = GetDragSource(); + GetDragSource(); } if( mpWindowImpl->mpFrameData->mxDropTarget.is() ) diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 7458d1be8b87..ea58932bb194 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -888,10 +888,6 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() awt::Toolkit::create(m_xContext), UNO_QUERY_THROW ); - uno::Reference< frame::XDesktop > xDesktop( - frame::Desktop::create(m_xContext), - UNO_QUERY_THROW ); - GtkWindow *pParent = RunDialog::GetTransientFor(); if (pParent) gtk_window_set_transient_for(GTK_WINDOW(m_pDialog), pParent); diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index 756b8e3fddcf..249194fc9eec 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -138,8 +138,6 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() awt::Toolkit::create(m_xContext), uno::UNO_QUERY); - uno::Reference< frame::XDesktop > xDesktop( frame::Desktop::create(m_xContext), uno::UNO_QUERY); - GtkWindow *pParent = RunDialog::GetTransientFor(); if (pParent) gtk_window_set_transient_for(GTK_WINDOW(m_pDialog), pParent); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 2427209c3326..af1991b67e44 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3260,7 +3260,6 @@ void DomainMapper_Impl::handleAuthor }; uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(m_xTextDocument, uno::UNO_QUERY); uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties(); - const uno::Reference< beans::XPropertyContainer > xUserProps = xDocumentProperties->getUserDefinedProperties(); uno::Reference<beans::XPropertySet> xUserDefinedProps(xDocumentProperties->getUserDefinedProperties(), uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xUserDefinedProps->getPropertySetInfo(); //search for a field mapping diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index bf72067b9afb..c49ae29af150 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2716,7 +2716,6 @@ RTFError RTFDocumentImpl::popState() { // Find out what is the key, value type and value we want to set. uno::Reference<beans::XPropertyContainer> xPropertyContainer = m_xDocumentProperties->getUserDefinedProperties(); - uno::Reference<beans::XPropertySet> xPropertySet(xPropertyContainer, uno::UNO_QUERY); const OUString& rKey = m_aStates.top().aPropName; OUString aStaticVal = m_aStates.top().pDestinationText->makeStringAndClear(); uno::Any aAny; diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 74e4e40e1f85..5e0ff8832ebf 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -88,8 +88,6 @@ TVFactory::createInstanceWithArguments( m_xHDS.set( p ); } - Reference< XInterface > ret = m_xHDS; - OUString hierview; for( int i = 0; i < Arguments.getLength(); ++i ) { diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 7a291d1e98eb..ddd913aabcd8 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -861,7 +861,6 @@ void SchXMLCategoriesContext::StartElement( const Reference< xml::sax::XAttribut if( nPrefix == XML_NAMESPACE_TABLE && IsXMLToken( aLocalName, XML_CELL_RANGE_ADDRESS ) ) { - Reference< chart2::XChartDocument > xNewDoc( GetImport().GetModel(), uno::UNO_QUERY ); mrAddress = xAttrList->getValueByIndex( i ); } } diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 80512e58b0a3..e5db0423c011 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -1163,7 +1163,6 @@ void SchXMLChartContext::InitChart( { uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument(); SAL_WARN_IF( !xDoc.is(), "xmloff.chart", "No valid document!" ); - uno::Reference< frame::XModel > xModel (xDoc, uno::UNO_QUERY ); // Remove Title and Diagram ("De-InitNew") uno::Reference< chart2::XChartDocument > xNewDoc( mrImportHelper.GetChartDocument(), uno::UNO_QUERY ); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 085f949eac80..4332c02b6b81 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2432,7 +2432,6 @@ void SchXMLExportHelper_Impl::exportAxes( // secondary x axis - Reference< chart::XSecondAxisTitleSupplier > xSecondTitleSupp( xDiagram, uno::UNO_QUERY ); xNewAxis = lcl_getAxis( xCooSys, XML_X, false ); if( xNewAxis.is() ) { @@ -3057,8 +3056,6 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe { if( bExportContent && nErrorBarStyle == chart::ErrorBarStyle::FROM_DATA ) { - uno::Reference< chart2::XChartDocument > xNewDoc(mrExport.GetModel(), uno::UNO_QUERY); - // register data ranges for error bars for export in local table ::std::vector< Reference< chart2::data::XDataSequence > > aErrorBarSequences( lcl_getErrorBarSequences( xErrorBarProp )); diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 82e3a7c67da7..2f35804bedb6 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -100,7 +100,6 @@ void SchXMLDomain2Context::StartElement( const uno::Reference< xml::sax::XAttrib if( nPrefix == XML_NAMESPACE_TABLE && IsXMLToken( aLocalName, XML_CELL_RANGE_ADDRESS ) ) { - Reference< chart2::XChartDocument > xNewDoc( GetImport().GetModel(), uno::UNO_QUERY ); mrAddresses.push_back( xAttrList->getValueByIndex( i )); } } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 2df69a1c1a93..bfb18b8e0853 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1480,8 +1480,7 @@ void SvXMLExport::ExportMeta_() if (!xDocProps.is()) throw; // update generator here xDocProps->setGenerator(generator); - SvXMLMetaExport * pMeta = new SvXMLMetaExport(*this, xDocProps); - uno::Reference<xml::sax::XDocumentHandler> xMeta(pMeta); + rtl::Reference<SvXMLMetaExport> pMeta = new SvXMLMetaExport(*this, xDocProps); pMeta->Export(); } else { // office:meta diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index bbbc28214932..07a7520bc319 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -308,7 +308,6 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp Reference< XPropertySet > xProps( xShape, UNO_QUERY ); if( xProps.is() ) { - Reference< XPropertySetInfo > xInfo( xProps->getPropertySetInfo() ); AnimationEffect eEffect; XMLEffectHint aEffect; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index cf378dc65991..13e8ef9decde 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1846,8 +1846,6 @@ void XMLShapeExport::ImpExportTextBoxShape( const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) { - uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - // presentation attribute (if presentation) bool bIsPresShape(false); bool bIsEmptyPresObj(false); @@ -2255,7 +2253,6 @@ void XMLShapeExport::ImpExportGraphicObjectShape( if(xPropSet.is()) { bool bIsEmptyPresObj = false; - uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index 41401fdb046c..657c8dadeed5 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -180,7 +180,6 @@ namespace xmloff Sequence< ScriptEventDescriptor > aElementEvents; Reference< XPropertySetInfo > xPropsInfo; - Reference< XIndexAccess > xCurrentContainer; for (sal_Int32 i=0; i<nElements; ++i) { try diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index e9d07e1bc726..4e57083a972a 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -165,8 +165,7 @@ void XMLMetaExportComponent::ExportMeta_() OUString generator( ::utl::DocInfoHelper::GetGeneratorString() ); // update generator here mxDocProps->setGenerator(generator); - SvXMLMetaExport * pMeta = new SvXMLMetaExport(*this, mxDocProps); - uno::Reference<xml::sax::XDocumentHandler> xMeta(pMeta); + rtl::Reference<SvXMLMetaExport> pMeta = new SvXMLMetaExport(*this, mxDocProps); pMeta->Export(); } else { SvXMLExport::ExportMeta_(); diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index b0f145aa9707..8cb43a1decef 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -340,9 +340,6 @@ bool XMLStyleExport::exportDefaultStyle( const OUString& rXMLFamily, const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper ) { - Reference< XPropertySetInfo > xPropSetInfo = - xPropSet->getPropertySetInfo(); - // <style:default-style ...> GetExport().CheckAttrList(); diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 9aa54202ffd0..8bd2c30354a2 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -367,8 +367,6 @@ void SvXMLImportPropertyMapper::CheckSpecialContext( OSL_ENSURE( rPropSet.is(), "need an XPropertySet" ); sal_Int32 nCount = aProperties.size(); - Reference< XPropertySetInfo > xInfo(rPropSet->getPropertySetInfo()); - for( sal_Int32 i=0; i < nCount; i++ ) { const XMLPropertyState& rProp = aProperties[i]; diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 756424a96c5e..5a5afd351b71 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -462,7 +462,6 @@ Reference< xml::sax::XAttributeList > Style::createElement() void ElementDescriptor::addNumberFormatAttr( Reference< beans::XPropertySet > const & xFormatProperties ) { - Reference< beans::XPropertyState > xState( xFormatProperties, UNO_QUERY ); OUString sFormat; lang::Locale locale; OSL_VERIFY( xFormatProperties->getPropertyValue( "FormatString" ) >>= sFormat ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index 13f1576f8095..70d0a492b415 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -1778,7 +1778,6 @@ Reference< xml::input::XElement > StyleElement::startChildElement( void StyleElement::endElement() { - Reference< xml::input::XAttributes > xStyle; OUString aStyleId( _xAttributes->getValueByUidName( m_xImport->XMLNS_DIALOGS_UID, "style-id" ) ); if (!aStyleId.isEmpty()) { diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx index 5f553ddba2b4..bb92579f4f5f 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <rtl/ref.hxx> #include <xmlscript/xmllib_imexp.hxx> #include <xmlscript/xml_helper.hxx> @@ -99,8 +100,7 @@ SAL_CALL exportLibrary( " \"library.dtd\">" ); xOut->ignorableWhitespace( OUString() ); - XMLElement* pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); - Reference< xml::sax::XAttributeList > xAttributes( pLibElement ); + rtl::Reference<XMLElement> pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); pLibElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI ); diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index c7dc4d192a34..df8af13653b2 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -146,7 +146,6 @@ uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithH /* * get SAX writer component */ - uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(mxCtx); /* diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index 41d628fcb5a1..138a0026928a 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -60,7 +60,6 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar /* * create a SignatureVerifier */ - cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() ); xReferenceResolvedListener = new SignatureVerifierImpl; cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY); |