[Libreoffice-commits] .: 2 commits - linguistic/source sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Mar 10 13:01:14 PST 2011


 linguistic/source/lngsvcmgr.cxx |   10 +++++-----
 linguistic/source/lngsvcmgr.hxx |    4 +++-
 sfx2/source/inc/templdgi.hxx    |    2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 67dee1c99ec3e3403eea092611a56a88e83f351b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 10 21:01:08 2011 +0000

    random character added by translation

diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 40706ea..95f5dd2 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -174,7 +174,7 @@ protected:
                                 bCanDel					:1,
                                 bCanNew					:1,
                                 bWaterDisabled			:1,
-                                bNewByExampleDisab§led   :1,
+                                bNewByExampleDisabled   :1,
                                 bUpdateByExampleDisabled:1,
                                 bTreeDrag				:1,
                                 bHierarchical			:1,
commit 11134b22d42d708e133042160b461fa1b631876f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 10 16:30:33 2011 +0000

    Fix leak, we own these pointers, so release them.

diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 2596ef6..121fd38 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -254,7 +254,7 @@ void LngSvcMgr::SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher,
                     size_t nAvailSvcs = rAvailSvcs.size();
                     for (size_t m = 0;  m < nAvailSvcs;  ++m)
                     {
-                        const SvcInfo &rSvcInfo = *rAvailSvcs[m];
+                        const SvcInfo &rSvcInfo = rAvailSvcs[m];
                         if (rSvcInfo.aSvcImplName == pImplNames[k]  &&
                             rSvcInfo.HasLanguage( nLang ))
                         {
@@ -1437,13 +1437,13 @@ uno::Sequence< OUString > SAL_CALL
 
         USHORT nCnt = 0;
         LanguageType nLanguage = LocaleToLanguage( rLocale );
-        for (size_t i = 0;  i < nMaxCnt;  ++i)
+        for (size_t i = 0;  i < nMaxCnt; ++i)
         {
-            const SvcInfo *pInfo = (*pInfoArray)[i];
+            const SvcInfo &rInfo = (*pInfoArray)[i];
             if (LANGUAGE_NONE == nLanguage
-                || (pInfo && pInfo->HasLanguage( nLanguage )))
+                || rInfo.HasLanguage( nLanguage ))
             {
-                pImplName[ nCnt++ ] = pInfo->aSvcImplName;
+                pImplName[ nCnt++ ] = rInfo.aSvcImplName;
             }
         }
 
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 1675b39..f8378d1 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -41,6 +41,8 @@
 #include <com/sun/star/linguistic2/XAvailableLocales.hpp>
 #include <unotools/configitem.hxx>
 
+#include <boost/ptr_container/ptr_vector.hpp>
+
 #include "misc.hxx"
 #include "defs.hxx"
 
@@ -105,7 +107,7 @@ class LngSvcMgr :
 
     LngSvcMgrListenerHelper *							pListenerHelper;
     
-    typedef std::vector< SvcInfo * >    SvcInfoArray;
+    typedef boost::ptr_vector< SvcInfo >    SvcInfoArray;
     SvcInfoArray *										pAvailSpellSvcs;
     SvcInfoArray *                                      pAvailGrammarSvcs;
     SvcInfoArray *										pAvailHyphSvcs;


More information about the Libreoffice-commits mailing list