[Libreoffice-commits] .: 2 commits - framework/source linguistic/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 9 07:12:54 PST 2010
framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx | 4 -
linguistic/source/lngsvcmgr.cxx | 30 +---------
linguistic/source/lngsvcmgr.hxx | 4 -
3 files changed, 4 insertions(+), 34 deletions(-)
New commits:
commit cfe9cb8439d6230375e52e23e4af5c1a01bb24ae
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 9 12:40:10 2010 +0000
cppcheck: unused variable
diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
index a636fcd..be669d2 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
@@ -881,8 +881,6 @@ void UIConfigurationManagerImpl::reset() throw (::com::sun::star::uno::RuntimeEx
if ( m_bDisposed )
throw DisposedException();
- bool bResetStorage( false );
-
if ( !isReadOnly() )
{
// Remove all elements from our user-defined storage!
@@ -914,8 +912,6 @@ void UIConfigurationManagerImpl::reset() throw (::com::sun::star::uno::RuntimeEx
}
}
- bResetStorage = true;
-
// remove settings from user defined layer and notify listener about removed settings data!
ConfigEventNotifyContainer aRemoveEventNotifyContainer;
ConfigEventNotifyContainer aReplaceEventNotifyContainer;
commit 132a593e29f5b20bf7d49bc5d4430faf08c30b9f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 9 12:21:32 2010 +0000
cppcheck: can remove this code and these variables
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 5a96bd5..4b32b4d 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -579,10 +579,6 @@ LngSvcMgr::LngSvcMgr() :
utl::ConfigItem( String::CreateFromAscii( "Office.Linguistic" ) ),
aEvtListeners ( GetLinguMutex() )
{
- bHasAvailSpellLocales =
- bHasAvailGrammarLocales =
- bHasAvailHyphLocales =
- bHasAvailThesLocales =
bDisposing = FALSE;
pSpellDsp = 0;
@@ -1470,39 +1466,21 @@ uno::Sequence< lang::Locale > SAL_CALL
uno::Sequence< lang::Locale > aRes;
uno::Sequence< lang::Locale > *pAvailLocales = NULL;
- BOOL *pHasAvailLocales = NULL;
if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
- {
pAvailLocales = &aAvailSpellLocales;
- pHasAvailLocales = &bHasAvailSpellLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
- {
pAvailLocales = &aAvailGrammarLocales;
- pHasAvailLocales = &bHasAvailGrammarLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
- {
pAvailLocales = &aAvailHyphLocales;
- pHasAvailLocales = &bHasAvailHyphLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
- {
pAvailLocales = &aAvailThesLocales;
- pHasAvailLocales = &bHasAvailThesLocales;
- }
- // about pHasAvailLocales: nowadays (with OOo lingu in SO) we want to know immediately about
+ // Nowadays (with OOo lingu in SO) we want to know immediately about
// new downloaded dictionaries and have them ready right away if the Tools/Options...
// is used to activate them. Thus we can not rely anymore on buffered data.
- if (pAvailLocales /*&& pHasAvailLocales */)
- {
-// if (!*pHasAvailLocales)
-// {
- *pAvailLocales = GetAvailLocales(
- getAvailableServices( rServiceName, lang::Locale() ) );
-// *pHasAvailLocales = TRUE;
-// }
+ if (pAvailLocales)
+ {
+ *pAvailLocales = GetAvailLocales(getAvailableServices(rServiceName, lang::Locale()));
aRes = *pAvailLocales;
}
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index c671d60..1675b39 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -112,10 +112,6 @@ class LngSvcMgr :
SvcInfoArray * pAvailThesSvcs;
BOOL bDisposing;
- BOOL bHasAvailSpellLocales;
- BOOL bHasAvailGrammarLocales;
- BOOL bHasAvailHyphLocales;
- BOOL bHasAvailThesLocales;
// disallow copy-constructor and assignment-operator for now
LngSvcMgr(const LngSvcMgr &);
More information about the Libreoffice-commits
mailing list