[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 13 13:24:53 PST 2013


 sw/source/ui/config/modcfg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2ab24c8f11d20892532da8601ff76f22e0a05a5b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jan 13 22:23:09 2013 +0100

    Fix 2 scopes can be reduced
    
    Change-Id: Ieb216aff08307ca684e11dbd7f59d1f7719ca274

diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 765e4e1..61f410d 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -74,9 +74,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
     }
     else
     {
-        bool bFound = false;
         if(eType == OLE_CAP && pOleId)
         {
+            bool bFound = false;
             for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
                 bFound = *pOleId == aInsertConfig.aGlobalNames[nId  ];
             if(!bFound)
@@ -96,9 +96,9 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt
     }
     else if (pOpt)
     {
-        bool bFound = false;
         if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
         {
+            bool bFound = false;
             for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
                 bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId  ];
             if(!bFound)


More information about the Libreoffice-commits mailing list