summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/bastype2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 09:49:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 12:22:43 +0200
commitee2bb231036b1d9d954dec369855948e6ea1f53a (patch)
treeeb7d4e569683d981e7cb9c76863f78739eefa870 /basctl/source/basicide/bastype2.cxx
parent1f6c4328bfa00da5cf351dd050a80b75e0f1acde (diff)
loplugin:referencecasting in avmedia..basic
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide/bastype2.cxx')
-rw-r--r--basctl/source/basicide/bastype2.cxx40
1 files changed, 16 insertions, 24 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 2141278861b2..b63a2f889daf 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -696,20 +696,16 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
try
{
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
- Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
- if ( xModuleConfig.is() )
+ Sequence< beans::PropertyValue > aModuleDescr;
+ xModuleManager->getByName( sModule ) >>= aModuleDescr;
+ sal_Int32 nCount = aModuleDescr.getLength();
+ const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
- Sequence< beans::PropertyValue > aModuleDescr;
- xModuleConfig->getByName( sModule ) >>= aModuleDescr;
- sal_Int32 nCount = aModuleDescr.getLength();
- const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
- for ( sal_Int32 i = 0; i < nCount; ++i )
+ if ( pModuleDescr[ i ].Name == "ooSetupFactoryEmptyDocumentURL" )
{
- if ( pModuleDescr[ i ].Name == "ooSetupFactoryEmptyDocumentURL" )
- {
- pModuleDescr[ i ].Value >>= sFactoryURL;
- break;
- }
+ pModuleDescr[ i ].Value >>= sFactoryURL;
+ break;
}
}
}
@@ -1392,20 +1388,16 @@ OUString SbTreeListBox::GetRootEntryBitmaps(const ScriptDocument& rDocument)
try
{
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
- Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
- if ( xModuleConfig.is() )
+ Sequence< beans::PropertyValue > aModuleDescr;
+ xModuleManager->getByName( sModule ) >>= aModuleDescr;
+ sal_Int32 nCount = aModuleDescr.getLength();
+ const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
- Sequence< beans::PropertyValue > aModuleDescr;
- xModuleConfig->getByName( sModule ) >>= aModuleDescr;
- sal_Int32 nCount = aModuleDescr.getLength();
- const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
- for ( sal_Int32 i = 0; i < nCount; ++i )
+ if ( pModuleDescr[ i ].Name == "ooSetupFactoryEmptyDocumentURL" )
{
- if ( pModuleDescr[ i ].Name == "ooSetupFactoryEmptyDocumentURL" )
- {
- pModuleDescr[ i ].Value >>= sFactoryURL;
- break;
- }
+ pModuleDescr[ i ].Value >>= sFactoryURL;
+ break;
}
}
}