summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-11 15:40:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-12 09:56:01 +0200
commit389da66dfc96d06c407bff156c4ea21e940c5e06 (patch)
tree2d1ebce6bdb2d952700ed5aaeb808289e9f72a7d /dbaccess
parenta651dbcfca9e198b5c2561076961504586bc6bea (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 'dbaccess')
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx3
-rw-r--r--dbaccess/source/core/api/RowSet.cxx1
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx1
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx1
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx1
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx1
-rw-r--r--dbaccess/source/ui/app/AppController.cxx12
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx5
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx14
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx1
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx1
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx1
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx3
17 files changed, 11 insertions, 45 deletions
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());
}
}