summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-08 14:33:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-08 18:32:33 +0200
commit11bdb6b9d9df991bb4ee48d4682458facaa2bdd5 (patch)
tree29180dbac55048e038c404769d059780f39f21a3 /cui/source
parentc69e5e3cc08bfbb4a5f6c756c523e4016c8fd1dd (diff)
improve loplugin:referencecasting
to catch a few more cases Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/options/optdict.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index f1678a5458e9..58ccf42e3965 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -294,7 +294,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, const OU
}
Reference< XDictionary > xDic;
if (nPos != -1)
- xDic.set( aDics.getConstArray()[ nPos ], UNO_QUERY );
+ xDic = aDics[ nPos ];
if (xDic.is())
SetLanguage_Impl( LanguageTag( xDic->getLocale() ).getLanguageType() );
@@ -400,7 +400,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl, weld::ComboBox&, vo
// display dictionary
ShowWords_Impl( nPos );
// enable or disable new and delete button according to file attributes
- Reference< XDictionary > xDic( aDics.getConstArray()[ nPos ], UNO_QUERY );
+ Reference< XDictionary > const & xDic = aDics[ nPos ];
if (xDic.is())
SetLanguage_Impl( LanguageTag( xDic->getLocale() ).getLanguageType() );
@@ -414,7 +414,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl, weld::ComboBox&, vo
{
int nDicPos = m_xAllDictsLB->get_active();
LanguageType nLang = m_xLangLB->get_active_id();
- Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY );
+ Reference< XDictionary > const & xDic = aDics[ nDicPos ];
LanguageType nOldLang = LanguageTag( xDic->getLocale() ).getLanguageType();
if ( nLang == nOldLang )
@@ -606,7 +606,7 @@ bool SvxEditDictionaryDialog::NewDelHdl(const weld::Widget* pBtn)
if (nPos != -1 && !aNewWord.isEmpty())
{
DBG_ASSERT(nPos < aDics.getLength(), "invalid dictionary index");
- Reference< XDictionary > xDic( aDics.getConstArray()[ nPos ], UNO_QUERY );
+ Reference< XDictionary > const & xDic = aDics[ nPos ];
if (xDic.is())
{
// make changes in dic