[Libreoffice-commits] .: 2 commits - sc/source unotools/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Aug 8 05:54:45 PDT 2011


 sc/source/core/tool/viewopti.cxx      |    4 ++--
 unotools/source/config/configitem.cxx |   28 +++++++++++++++-------------
 2 files changed, 17 insertions(+), 15 deletions(-)

New commits:
commit cf3eac39e12f85043e5beb686b9abb9e94dda34d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 8 13:54:24 2011 +0100

    catch by const reference

diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 254b918..d0b2921 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -72,13 +72,13 @@ inline void lcl_CFG_DBG_EXCEPTION(const sal_Char* cText, const Exception& rEx)
     OSL_FAIL(sMsg.getStr());
 }
 #define CATCH_INFO(a) \
-catch(Exception& rEx)   \
+catch(const Exception& rEx)   \
 {                       \
     lcl_CFG_DBG_EXCEPTION(a, rEx);\
 }
 #else
     #define lcl_CFG_DBG_EXCEPTION( a, b)
-    #define CATCH_INFO(a) catch(Exception& ){}
+    #define CATCH_INFO(a) catch(const Exception&){}
 #endif
 
 /*
@@ -526,7 +526,9 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
             Property aProp = xInfo->getPropertyByName(sProperty);
             lStates[i] = ((aProp.Attributes & PropertyAttribute::READONLY) == PropertyAttribute::READONLY);
         }
-        catch(Exception&){}
+        catch (const Exception&)
+        {
+        }
     }
 
     return lStates;
@@ -554,7 +556,7 @@ Sequence< Any > ConfigItem::GetProperties(const Sequence< OUString >& rNames)
                 else
                     pRet[i] = xHierarchyAccess->getByHierarchicalName(pNames[i]);
             }
-            catch(Exception& rEx)
+            catch (const Exception& rEx)
             {
 #if OSL_DEBUG_LEVEL > 0
                 OString sMsg("XHierarchicalNameAccess: ");
@@ -701,7 +703,7 @@ sal_Bool    ConfigItem::EnableNotification(const Sequence< OUString >& rNames,
         xChangeLstnr = new ConfigChangeListener_Impl(*this, rNames);
         xChgNot->addChangesListener( xChangeLstnr );
     }
-    catch(RuntimeException& )
+    catch (const RuntimeException&)
     {
         bRet = sal_False;
     }
@@ -718,7 +720,7 @@ void ConfigItem::RemoveChangesListener()
             xChgNot->removeChangesListener( xChangeLstnr );
             xChangeLstnr = 0;
         }
-        catch(Exception & )
+        catch (const Exception&)
         {
         }
     }
@@ -1031,11 +1033,11 @@ sal_Bool ConfigItem::SetSetProperties(
             }
         }
 #ifdef DBG_UTIL
-        catch(Exception& rEx)
+        catch (const Exception& rEx)
         {
             lcl_CFG_DBG_EXCEPTION("Exception from SetSetProperties: ", rEx);
 #else
-        catch(Exception&)
+        catch (const Exception&)
         {
 #endif
             bRet = sal_False;
@@ -1095,7 +1097,7 @@ sal_Bool ConfigItem::ReplaceSetProperties(
                     {
                         xCont->removeByName(pContainerSubNodes[nContSub]);
                     }
-                    catch (Exception & )
+                    catch (const Exception&)
                     {
                         if (isSimpleValueSet)
                         try
@@ -1168,11 +1170,11 @@ sal_Bool ConfigItem::ReplaceSetProperties(
             }
         }
 #ifdef DBG_UTIL
-        catch(Exception& rEx)
+        catch (const Exception& rEx)
         {
             lcl_CFG_DBG_EXCEPTION("Exception from ReplaceSetProperties: ", rEx);
 #else
-        catch(Exception&)
+        catch (const Exception&)
         {
 #endif
             bRet = sal_False;
@@ -1270,11 +1272,11 @@ sal_Bool ConfigItem::AddNode(const rtl::OUString& rNode, const rtl::OUString& rN
             xBatch->commitChanges();
         }
 #ifdef DBG_UTIL
-        catch(Exception& rEx)
+        catch (const Exception& rEx)
         {
             lcl_CFG_DBG_EXCEPTION("Exception from AddNode(): ", rEx);
 #else
-        catch(Exception&)
+        catch (const Exception&)
         {
 #endif
             bRet = sal_False;
commit 5567bb0200b5d57bb5a79cd4bea7d960310ee14a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 8 13:39:23 2011 +0100

    missing ',' makes a completely different string than it appears.

diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 4108ffb..c2dbfa4 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -354,8 +354,8 @@ Sequence<OUString> ScViewCfg::GetLayoutPropertyNames()
         "Window/HorizontalScroll",  // SCLAYOUTOPT_HORISCROLL
         "Window/VerticalScroll",    // SCLAYOUTOPT_VERTSCROLL
         "Window/SheetTab",          // SCLAYOUTOPT_SHEETTAB
-        "Window/OutlineSymbol"      // SCLAYOUTOPT_OUTLINE
-        "Line/GridOnColoredCells",  // SCLAYOUTOPT_GRID_ONCOLOR
+        "Window/OutlineSymbol",     // SCLAYOUTOPT_OUTLINE
+        "Line/GridOnColoredCells"   // SCLAYOUTOPT_GRID_ONCOLOR
     };
     Sequence<OUString> aNames(SCLAYOUTOPT_COUNT);
     OUString* pNames = aNames.getArray();


More information about the Libreoffice-commits mailing list