summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/dispatch/popupmenudispatcher.cxx1
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx5
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx5
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx5
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx2
-rw-r--r--framework/source/jobs/jobdispatch.cxx19
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx3
-rw-r--r--framework/source/services/desktop.cxx1
-rw-r--r--framework/source/services/frame.cxx1
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx2
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx2
-rw-r--r--framework/source/uielement/notebookbarmenucontroller.cxx1
-rw-r--r--framework/source/uielement/subtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx1
-rw-r--r--framework/source/uielement/uicommanddescription.cxx2
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx1
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx5
18 files changed, 11 insertions, 51 deletions
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 )