summaryrefslogtreecommitdiff
path: root/linguistic/source/lngsvcmgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 16:05:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-25 17:19:48 +0200
commit93d42c1b23721120fd2b61ee0b8842a14fd9b6b8 (patch)
tree5a2c4108ad65f7171a6c9bbf87199c874693a703 /linguistic/source/lngsvcmgr.cxx
parenta006f60b6ae22db6acb57d06167a3c6fd8bc6f1b (diff)
loplugin:oncevar in l10ntools..mysqlc
Change-Id: Ifd4826f8ba4e10f2e012172fa693794d68bb6b4d Reviewed-on: https://gerrit.libreoffice.org/39188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic/source/lngsvcmgr.cxx')
-rw-r--r--linguistic/source/lngsvcmgr.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index dbaf1de9c0d6..e3f91af32ff2 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -308,7 +308,7 @@ void SAL_CALL
// "translate" DictionaryList event into linguistic2::LinguServiceEvent
sal_Int16 nLngSvcEvt = 0;
- sal_Int16 nSpellCorrectFlags =
+ sal_Int16 const nSpellCorrectFlags =
linguistic2::DictionaryListEventFlags::ADD_NEG_ENTRY |
linguistic2::DictionaryListEventFlags::DEL_POS_ENTRY |
linguistic2::DictionaryListEventFlags::ACTIVATE_NEG_DIC |
@@ -316,7 +316,7 @@ void SAL_CALL
if (0 != (nDlEvt & nSpellCorrectFlags))
nLngSvcEvt |= linguistic2::LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN;
- sal_Int16 nSpellWrongFlags =
+ sal_Int16 const nSpellWrongFlags =
linguistic2::DictionaryListEventFlags::ADD_POS_ENTRY |
linguistic2::DictionaryListEventFlags::DEL_NEG_ENTRY |
linguistic2::DictionaryListEventFlags::ACTIVATE_POS_DIC |
@@ -324,7 +324,7 @@ void SAL_CALL
if (0 != (nDlEvt & nSpellWrongFlags))
nLngSvcEvt |= linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN;
- sal_Int16 nHyphenateFlags =
+ sal_Int16 const nHyphenateFlags =
linguistic2::DictionaryListEventFlags::ADD_POS_ENTRY |
linguistic2::DictionaryListEventFlags::DEL_POS_ENTRY |
linguistic2::DictionaryListEventFlags::ACTIVATE_POS_DIC |
@@ -392,28 +392,26 @@ void LngSvcMgrListenerHelper::DisposeAndClear( const lang::EventObject &rEvtObj
bool LngSvcMgrListenerHelper::AddLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster )
{
- bool bRes = false;
if (rxBroadcaster.is())
{
aLngSvcEvtBroadcasters.addInterface( rxBroadcaster );
rxBroadcaster->addLinguServiceEventListener(
static_cast<linguistic2::XLinguServiceEventListener *>(this) );
}
- return bRes;
+ return false;
}
bool LngSvcMgrListenerHelper::RemoveLngSvcEvtBroadcaster(
const uno::Reference< linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster )
{
- bool bRes = false;
if (rxBroadcaster.is())
{
aLngSvcEvtBroadcasters.removeInterface( rxBroadcaster );
rxBroadcaster->removeLinguServiceEventListener(
static_cast<linguistic2::XLinguServiceEventListener *>(this) );
}
- return bRes;
+ return false;
}