diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-11 15:40:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-12 09:56:01 +0200 |
commit | 389da66dfc96d06c407bff156c4ea21e940c5e06 (patch) | |
tree | 2d1ebce6bdb2d952700ed5aaeb808289e9f72a7d /svx | |
parent | a651dbcfca9e198b5c2561076961504586bc6bea (diff) |
remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.
Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 1 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 1 | ||||
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/navigatortreemodel.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/tabwin.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 1 | ||||
-rw-r--r-- | svx/source/unodraw/recoveryui.cxx | 10 |
12 files changed, 8 insertions, 32 deletions
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(); |