[Libreoffice-commits] .: 7 commits - accessibility/source basctl/source cui/source forms/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jun 20 03:11:50 PDT 2011


 accessibility/source/helper/accresmgr.cxx |    4 +---
 basctl/source/basicide/iderdll.cxx        |    3 +--
 cui/source/customize/macropg.cxx          |   18 ++++++++++--------
 cui/source/dialogs/cuigaldlg.cxx          |    8 ++++----
 cui/source/dialogs/hldocntp.cxx           |    2 +-
 cui/source/dialogs/iconcdlg.cxx           |    2 +-
 cui/source/dialogs/srchxtra.cxx           |    8 +++++---
 cui/source/factory/cuiresmgr.cxx          |    7 +++----
 cui/source/options/fontsubs.cxx           |    1 -
 cui/source/options/fontsubs.hxx           |    1 -
 cui/source/options/optgdlg.cxx            |   22 +++++++++++++---------
 forms/source/resource/frm_resource.cxx    |    4 +---
 12 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit 538f670a79b6bb86b63bab8b7e758b717ab2f7b8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:32:38 2011 +0100

    totally pointless intermediate object

diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index c8d65eb..87d2f9c 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -59,9 +59,7 @@ namespace frm
         if (m_pImpl)
             return;
 
-        ByteString sFileName("frm");
-
-        m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), Application::GetSettings().GetUILocale());
+        m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale());
 
         if (m_pImpl)
         {
commit 6f889198695ef3aef966098fee7a68f3e4d68c6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:29:10 2011 +0100

    ByteString -> rtl::OStringBuffer

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 5dd9edc..f8a558b 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -1106,7 +1106,7 @@ void IconChoiceDialog::Start_Impl()
     if ( aTabDlgOpt.Exists() )
     {
         // ggf. Position aus Konfig
-        SetWindowState( ByteString( aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
+        SetWindowState(rtl::OUStringToOString(aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
 
         // initiale TabPage aus Programm/Hilfe/Konfig
         nActPage = (sal_uInt16)aTabDlgOpt.GetPageID();
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index db8028a..780233c 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -45,6 +45,7 @@
 #include "backgrnd.hxx"
 #include <svx/dialogs.hrc> // RID_SVXPAGE_...
 #include <tools/resary.hxx>
+#include <rtl/strbuf.hxx>
 
 // class SvxSearchFormatDialog -------------------------------------------
 
@@ -186,9 +187,10 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent,
                 pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) );
             else
             {
-                ByteString sError( "no resource for slot id\nslot = " );
-                sError += ByteString::CreateFromInt32( nSlot );
-                DBG_ERRORFILE( sError.GetBuffer() );
+                rtl::OStringBuffer sError(
+                    RTL_CONSTASCII_STRINGPARAM("no resource for slot id\nslot = "));
+                sError.append(nSlot);
+                DBG_ERRORFILE(sError.getStr());
             }
 
             if ( pEntry )
commit 7032e992fdc6ba3560c233a21e3bbb8d00a98894
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:27:58 2011 +0100

    sFontGroup unused

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 6a05a00..e8bb7af 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -77,7 +77,6 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
     sHeader3			(CUI_RES( STR_HEADER3		)),
     sHeader4			(CUI_RES( STR_HEADER4		)),
 
-    sFontGroup          ("FontSubstitution"),
     pCheckButtonData(0)
 {
     FreeResource();
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 2be4d3c..0c60f4a 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -99,7 +99,6 @@ class SvxFontSubstTabPage : public SfxTabPage
     String			sHeader4;
 
     Color			aTextColor;
-    ByteString		sFontGroup;
 
     SvLBoxButtonData*	pCheckButtonData;
 
commit ccaf8c8f08fd94581b87493569ec2f9e60e95593
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:20:17 2011 +0100

    totally pointless intermediate object

diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index c04206c..8e3bc31 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -33,15 +33,14 @@
 #include <svl/solar.hrc>
 #include <vcl/svapp.hxx>
 
-static ResMgr* pResMgr=0;
-
 // struct DialogsResMgr --------------------------------------------------
 ResMgr* CuiResMgr::GetResMgr()
 {
+    static ResMgr* pResMgr=0;
+
     if ( !pResMgr )
     {
-        ByteString aName( "cui" );
-        pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILocale() );
+        pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILocale());
     }
 
     return pResMgr;
commit 7185dab5af6ca5b9c32288d269d160520bf9ba2f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:15:51 2011 +0100

    totally pointless intermediate object

diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index b9d9a69..7e2bbd5 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -97,9 +97,8 @@ void BasicIDEDLL::Init()
     SfxObjectFactory* pFact = &BasicDocShell::Factory();
     (void)pFact;
 
-    ByteString aResMgrName( "basctl" );
     ResMgr* pMgr = ResMgr::CreateResMgr(
-        aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
+        "basctl", Application::GetSettings().GetUILocale() );
 
     BASIC_MOD() = new BasicIDEModule( pMgr, &BasicDocShell::Factory() );
 
commit 1c6664a66120a666f21ae9339a65d410e309178c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 20 00:13:33 2011 +0100

    totally pointless intermediate object

diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx
index a448c40..f812311 100644
--- a/accessibility/source/helper/accresmgr.cxx
+++ b/accessibility/source/helper/accresmgr.cxx
@@ -56,9 +56,7 @@ void TkResMgr::ensureImplExists()
 
     ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
 
-    ByteString sResMgrName( "acc" );
-
-    m_pImpl = SimpleResMgr::Create( sResMgrName.GetBuffer(), aLocale );
+    m_pImpl = SimpleResMgr::Create("acc", aLocale );
 
     if (m_pImpl)
     {
commit b7795f55ccf3971c0f7afb5f74153a0eec7c88fc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jun 18 00:05:06 2011 +0100

    catch by const reference

diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 90c6765..944d6d0 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -344,7 +344,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
                 {
                     m_xAppEvents->replaceByName( eventName, GetPropsByName( eventName, m_appEventsHash ) );
                 }
-                catch( const Exception& )
+                catch (const Exception&)
                 {
                     DBG_UNHANDLED_EXCEPTION();
                 }
@@ -361,7 +361,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
                 {
                     m_xDocEvents->replaceByName( eventName, GetPropsByName( eventName, m_docEventsHash ) );
                 }
-                catch( const Exception& )
+                catch (const Exception&)
                 {
                     DBG_UNHANDLED_EXCEPTION();
                 }
@@ -375,7 +375,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
             }
         }
     }
-    catch(Exception&)
+    catch (const Exception&)
     {
     }
     // what is the return value about??
@@ -420,7 +420,7 @@ void _SvxMacroTabPage::Reset()
                 }
             }
     }
-    catch(Exception&)
+    catch (const Exception&)
     {
     }
     DisplayAppEvents(bAppEvents);
@@ -763,8 +763,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA
         {
             m_appEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xAppEvents->getByName( eventNames[nEvent] ) );
         }
-        catch (Exception e)
-        {}
+        catch (const Exception&)
+        {
+        }
     }
     if(m_xDocEvents.is())
     {
@@ -776,8 +777,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA
             {
                 m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) );
             }
-            catch (Exception e)
-            {}
+            catch (const Exception&)
+            {
+            }
         }
     }
 }
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 07a11c4..c099128 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -205,13 +205,13 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
             }
         }
     }
-    catch( const ContentCreationException& )
+    catch (const ContentCreationException&)
     {
     }
-    catch( const ::com::sun::star::uno::RuntimeException& )
+    catch (const ::com::sun::star::uno::RuntimeException&)
     {
     }
-        catch( const ::com::sun::star::uno::Exception& )
+    catch (const ::com::sun::star::uno::Exception&)
     {
     }
 }
@@ -1091,7 +1091,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG )
                 }
             }
         }
-        catch(IllegalArgumentException)
+        catch (const IllegalArgumentException&)
         {
             OSL_FAIL( "Folder picker failed with illegal arguments" );
         }
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 7bd15f7..212416c 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -395,7 +395,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
                 }
             }
         }
-        catch( uno::Exception )
+        catch (const uno::Exception&)
         {
         }
 
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 7cab00a..018049c 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -180,9 +180,12 @@ namespace
                 if ( xEnum.is() && xEnum->hasMoreElements() )
                     bRet = sal_True;
             }
-
-            catch( IllegalArgumentException ) {}
-            catch( ElementExistException ) {}
+            catch (const IllegalArgumentException&)
+            {
+            }
+            catch (const ElementExistException&)
+            {
+            }
             return bRet;
         }
 }
@@ -639,7 +642,7 @@ CanvasSettings::CanvasSettings() :
             ++pCurr;
         }
     }
-    catch( Exception& )
+    catch (const Exception&)
     {
     }
 }
@@ -677,8 +680,9 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const
                             return mbHWAccelAvailable;
                         }
                 }
-                catch (Exception &)
-                {}
+                catch (const Exception&)
+                {
+                }
 
                 ++pCurrImpl;
             }
@@ -1339,7 +1343,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
         }
 
     }
-    catch (Exception &e)
+    catch (const Exception &e)
     {
         // we'll just leave the box in it's default setting and won't
         // even give it event handler...
@@ -1522,7 +1526,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
             }
         }
     }
-    catch (Exception& e)
+    catch (const Exception& e)
     {
         // we'll just leave the box in it's default setting and won't
         // even give it event handler...
@@ -1757,7 +1761,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
         aCTLLang >>= aLocale;
         eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale );
     }
-    catch(Exception&)
+    catch (const Exception&)
     {
     }
     //overwrite them by the values provided by the DocShell


More information about the Libreoffice-commits mailing list