summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/sfxbasemodel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 20:11:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 17:58:43 +0200
commit476a652361de507303c7298a40cc96fa4bda22a3 (patch)
tree573ec85eeb6e2604c5cb2f078ea02f848686d443 /sfx2/source/doc/sfxbasemodel.cxx
parent254dfda42e2e7bd8be77ccdc702ed7b09a226e57 (diff)
loplugin:referencecasting in sfx2
Change-Id: I97cd8821aa9a6f462f9b271940483738655ee9cf Reviewed-on: https://gerrit.libreoffice.org/75979 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/doc/sfxbasemodel.cxx')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 4d1833e31d11..db831f784dbb 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3179,8 +3179,7 @@ Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
// currently no frame for this document at all or View is under construction
return Reference < container::XIndexAccess >();
- m_pData->m_contViewData.set( document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ),
- UNO_QUERY );
+ m_pData->m_contViewData = document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() );
if ( !m_pData->m_contViewData.is() )
{
@@ -3331,10 +3330,9 @@ Sequence< OUString > SAL_CALL SfxBaseModel::getDocumentSubStoragesNames()
if ( m_pData->m_pObjectShell.is() )
{
Reference < embed::XStorage > xStorage = m_pData->m_pObjectShell->GetStorage();
- Reference < container::XNameAccess > xAccess( xStorage, UNO_QUERY );
- if ( xAccess.is() )
+ if ( xStorage.is() )
{
- Sequence< OUString > aTemp = xAccess->getElementNames();
+ Sequence< OUString > aTemp = xStorage->getElementNames();
sal_Int32 nResultSize = 0;
for ( sal_Int32 n = 0; n < aTemp.getLength(); n++ )
{
@@ -3538,8 +3536,7 @@ Reference< ui::XUIConfigurationManager2 > SfxBaseModel::getUIConfigurationManage
}
}
- Reference< container::XIndexAccess > xToolbarData( xToolbar, UNO_QUERY );
- xNewUIConfMan->insertSettings( aCustomTbxName, xToolbarData );
+ xNewUIConfMan->insertSettings( aCustomTbxName, xToolbar );
xNewUIConfMan->store();
}
}