[Libreoffice-commits] .: 11 commits - avmedia/source formula/source fpicker/source framework/inc framework/source linguistic/inc sfx2/source ucb/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jun 20 03:12:14 PDT 2011
avmedia/source/framework/mediamisc.cxx | 4
formula/source/core/api/FormulaCompiler.cxx | 9 -
formula/source/core/resource/core_resource.cxx | 5
fpicker/source/office/iodlg.cxx | 2
fpicker/source/unx/gnome/SalGtkFilePicker.cxx | 4
framework/inc/macros/generic.hxx | 14 -
framework/source/fwe/classes/framelistanalyzer.cxx | 12 -
framework/source/fwe/helper/actiontriggerhelper.cxx | 16 +-
framework/source/helper/persistentwindowstate.cxx | 4
framework/source/inc/pattern/window.hxx | 6
framework/source/layoutmanager/layoutmanager.cxx | 109 +++++++++----
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 118 +++++++++++----
framework/source/loadenv/loadenv.cxx | 2
framework/source/lomenubar/FrameHelper.cxx | 2
framework/source/services/backingwindow.cxx | 12 -
framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 18 +-
linguistic/inc/linguistic/misc.hxx | 10 -
sfx2/source/doc/docfac.cxx | 11 -
sfx2/source/doc/objstor.cxx | 10 -
sfx2/source/doc/oleprops.cxx | 6
sfx2/source/doc/sfxbasemodel.cxx | 15 +
ucb/source/cacher/cachedcontentresultset.cxx | 14 -
ucb/source/core/ucbstore.cxx | 106 ++++++-------
ucb/source/sorter/sortdynres.cxx | 4
ucb/source/sorter/sortresult.cxx | 19 +-
ucb/source/ucp/file/bc.cxx | 10 -
ucb/source/ucp/file/filrow.cxx | 4
ucb/source/ucp/file/filstr.cxx | 6
ucb/source/ucp/file/shell.cxx | 14 -
29 files changed, 336 insertions(+), 230 deletions(-)
New commits:
commit 11558cb6252dd16ebfafc00224fcdf5a256d4da9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 10:46:53 2011 +0100
drop unused BS2OU/OU2BS
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 23e4d58..fe22c05 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -101,16 +101,6 @@ LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang );
rtl_TextEncoding GetTextEncoding( sal_Int16 nLanguage );
-inline ::rtl::OUString BS2OU(const ByteString &rText, rtl_TextEncoding nEnc)
-{
- return ::rtl::OUString( rText.GetBuffer(), rText.Len(), nEnc );
-}
-
-inline ByteString OU2BS(const ::rtl::OUString &rText, rtl_TextEncoding nEnc)
-{
- return ByteString( rText.getStr(), nEnc );
-}
-
rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar );
sal_Int32 LevDistance( const rtl::OUString &rTxt1, const rtl::OUString &rTxt2 );
commit ea35293dbaceb8089ca10a59a4cc1235e9cd7de1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 10:45:15 2011 +0100
survive missing configuration
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 1174c60..f8c168c 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -122,12 +122,18 @@ ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons
, m_aListenerContainer( m_aLock.getShareableOslMutex() )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier" );
- // Retrieve known modules and insert them into our boost::unordered_map to speed-up access time.
- Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY );
- const Sequence< ::rtl::OUString > aNameSeq = xNameAccess->getElementNames();
- const ::rtl::OUString* pNameSeq = aNameSeq.getConstArray();
- for ( sal_Int32 n = 0; n < aNameSeq.getLength(); n++ )
- m_aModuleToModuleUICfgMgrMap.insert( ModuleToModuleCfgMgr::value_type( pNameSeq[n], Reference< XUIConfigurationManager >() ));
+ try
+ {
+ // Retrieve known modules and insert them into our boost::unordered_map to speed-up access time.
+ Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY_THROW );
+ const Sequence< ::rtl::OUString > aNameSeq = xNameAccess->getElementNames();
+ const ::rtl::OUString* pNameSeq = aNameSeq.getConstArray();
+ for ( sal_Int32 n = 0; n < aNameSeq.getLength(); n++ )
+ m_aModuleToModuleUICfgMgrMap.insert( ModuleToModuleCfgMgr::value_type( pNameSeq[n], Reference< XUIConfigurationManager >() ));
+ }
+ catch(...)
+ {
+ }
}
ModuleUIConfigurationManagerSupplier::~ModuleUIConfigurationManagerSupplier()
commit 1b40c5664d0f646db866550ddce1ca9ea422beec
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 00:42:20 2011 +0100
ByteString -> rtl::OStringBuffer
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index f2de0b9..a0b3334 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2449,7 +2449,7 @@ void SvtFileDialog::InitSize()
if ( aDlgOpt.Exists() )
{
- SetWindowState( ByteString( String( aDlgOpt.GetWindowState() ), osl_getThreadTextEncoding() ) );
+ SetWindowState(rtl::OUStringToOString(aDlgOpt.GetWindowState(), osl_getThreadTextEncoding()));
Any aUserData = aDlgOpt.GetUserItem( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UserData" ) ));
::rtl::OUString sCfgStr;
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index 3eccc60..68b123f 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -283,8 +283,8 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact
gtk_container_add (GTK_CONTAINER (m_pFilterExpander), scrolled_window);
gtk_widget_show (scrolled_window);
- ByteString sExpand(getenv("SAL_EXPANDFPICKER"));
- sal_Int32 nExpand = sExpand.ToInt32();
+ rtl::OString sExpand(getenv("SAL_EXPANDFPICKER"));
+ sal_Int32 nExpand = sExpand.toInt32();
switch (nExpand)
{
default:
commit 09a54085bcc60368f4f70cde469fdd82da7e9742
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 00:39:19 2011 +0100
ByteString -> rtl::OStringBuffer
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 477894f..92de8cf 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
+#include <rtl/strbuf.hxx>
#include <stdio.h>
// =============================================================================
@@ -492,9 +493,11 @@ void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eO
DBG_ASSERT( (mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) ||
(eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) ||
(eOp == ocArrayRowSep),
- ByteString( "OpCodeMap::putOpCode: reusing OpCode ").
- Append( ByteString::CreateFromInt32( sal_Int32( eOp))).Append( " (").
- Append( ByteString( rStr, RTL_TEXTENCODING_ASCII_US)).Append( ')').GetBuffer());
+ rtl::OStringBuffer(
+ RTL_CONSTASCII_STRINGPARAM("OpCodeMap::putOpCode: reusing OpCode ")).
+ append(sal_Int32(eOp)).append(RTL_CONSTASCII_STRINGPARAM(" (")).
+ append(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_ASCII_US)).
+ append(')').getStr());
mpTable[eOp] = rStr;
mpHashMap->insert( OpCodeHashMap::value_type( rStr, eOp));
}
commit 6a5f9c89394963a5f5eed2926d39c9ebdbdadc72
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 00:36:36 2011 +0100
totally pointless intermediate object
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index f3f6d31..574b10e 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,9 +55,7 @@ namespace formula
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- ByteString sFileName("for");
-
- m_pImpl = ResMgr::CreateResMgr(sFileName.GetBuffer(), aLocale);
+ m_pImpl = ResMgr::CreateResMgr("for", aLocale);
}
//------------------------------------------------------------------
commit 69447f3efca1322a865a8df2332902cdec3c714c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 00:15:06 2011 +0100
totally pointless intermediate object
diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx
index 73f1d75..1863e8e 100644
--- a/avmedia/source/framework/mediamisc.cxx
+++ b/avmedia/source/framework/mediamisc.cxx
@@ -38,9 +38,7 @@ ResMgr* GetResMgr()
if( !pResMgr )
{
- ByteString aResMgrName( "avmedia" );
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
+ pResMgr = ResMgr::CreateResMgr("avmedia", Application::GetSettings().GetUILocale());
}
return pResMgr;
commit 28e07d1f2cc8f1f9c98836d3ada12b7173157704
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 20 00:06:24 2011 +0100
ByteString -> rtl::OStringBuffer
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 7afd79b..e61c30f 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -61,6 +61,8 @@
#include <osl/security.hxx>
#include "doc.hrc"
+#include <rtl/strbuf.hxx>
+
#include <assert.h>
namespace css = ::com::sun::star;
@@ -166,10 +168,11 @@ void SfxObjectFactory::RegisterViewFactory
{
if ( !pImpl->aViewFactoryArr[i]->GetAPIViewName().Equals( sViewName ) )
continue;
- ByteString sMessage( "SfxObjectFactory::RegisterViewFactory: duplicate view name '" );
- sMessage += ByteString( sViewName, RTL_TEXTENCODING_ASCII_US );
- sMessage += "'!";
- OSL_FAIL( sMessage.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "SfxObjectFactory::RegisterViewFactory: duplicate view name '"));
+ sMessage.append(rtl::OUStringToOString(sViewName, RTL_TEXTENCODING_ASCII_US));
+ sMessage.append(RTL_CONSTASCII_STRINGPARAM("'!"));
+ OSL_FAIL(sMessage.getStr());
break;
}
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 14bada2..e292c9d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1082,8 +1082,9 @@ sal_Bool SfxObjectShell::SaveTo_Impl
RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::SaveTo_Impl" );
if( RTL_LOGFILE_HASLOGFILE() )
{
- ByteString aString( rMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( aLog, "saving \"%s\"", aString.GetBuffer() );
+ rtl::OString aString(
+ rtl::OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "saving \"%s\"", aString.getStr());
}
AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Begin" ) ) );
@@ -2964,8 +2965,9 @@ sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::LoadOwnFormat" );
if( RTL_LOGFILE_HASLOGFILE() )
{
- ByteString aString( rMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( aLog, "loading \"%s\"", aString.GetBuffer() );
+ rtl::OString aString(
+ rtl::OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "loading \"%s\"", aString.getStr());
}
uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage();
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 7f4b8bc..9ee5f88 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -344,12 +344,12 @@ String SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
void SfxOleStringHelper::ImplSaveString8( SvStream& rStrm, const String& rValue ) const
{
// encode to byte string
- ByteString aEncoded( rValue, GetTextEncoding() );
+ rtl::OString aEncoded(rtl::OUStringToOString(rValue, GetTextEncoding()));
// write size field (including trailing NUL character)
- sal_Int32 nSize = static_cast< sal_Int32 >( aEncoded.Len() + 1 );
+ sal_Int32 nSize = aEncoded.getLength() + 1;
rStrm << nSize;
// write character array with trailing NUL character
- rStrm.Write( aEncoded.GetBuffer(), aEncoded.Len() );
+ rStrm.Write(aEncoded.getStr(), aEncoded.getLength());
rStrm << sal_uInt8( 0 );
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 76e6b12..9e73223 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -91,6 +91,7 @@
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <framework/configimporter.hxx>
#include <framework/interaction.hxx>
#include <framework/titlehelper.hxx>
@@ -2999,9 +3000,10 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
if ( pIC )
{
#ifdef DBG_UTIL
- ByteString aTmp( "SfxDocumentEvent: " );
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
+ "SfxDocumentEvent: "));
+ aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
+ OSL_TRACE(aTmp.getStr());
#endif
document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() );
@@ -3016,9 +3018,10 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
if ( pIC )
{
#ifdef DBG_UTIL
- ByteString aTmp( "SfxEvent: " );
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( "%s", aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
+ "SfxEvent: "));
+ aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
+ OSL_TRACE(aTmp.getStr());
#endif
document::EventObject aEvent( (frame::XModel*)this, aName );
commit 5b5cd50a9b5e3c20937e4d4c0d0ecdbf2e1bf9fc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 19 23:21:46 2011 +0100
ByteString -> rtl::OStringBuffer
diff --git a/framework/inc/macros/generic.hxx b/framework/inc/macros/generic.hxx
index 86a5048..d3f1af4 100644
--- a/framework/inc/macros/generic.hxx
+++ b/framework/inc/macros/generic.hxx
@@ -53,11 +53,9 @@ ________________________________________________________________________________
/*_________________________________________________________________________________________________________________
U2B( SUNICODEVALUE )
B2U( SASCIIVALUE )
- U2B_ENC( SUNICODEVALUE, AENCODING )
- B2U_ENC( SASCIIVALUE, AENCODING )
Use it to convert unicode strings to ascii values and reverse ...
- We use UTF8 as default textencoding. If you will change this use U2B_ENC and B2U_ENC!
+ We use UTF8 as default textencoding.
_________________________________________________________________________________________________________________*/
#define U2B( SUNICODEVALUE ) \
@@ -66,16 +64,6 @@ ________________________________________________________________________________
#define B2U( SASCIIVALUE ) \
::rtl::OStringToOUString( SASCIIVALUE, RTL_TEXTENCODING_UTF8 )
-#define U2B_ENC( SUNICODEVALUE, AENCODING ) \
- ::rtl::OUStringToOString( SUNICODEVALUE, AENCODING )
-
-#define B2U_ENC( SASCIIVALUE, AENCODING ) \
- ::rtl::OStringToOUString( SASCIIVALUE, AENCODING )
-
-//*****************************************************************************************************************
-// end of file
-//*****************************************************************************************************************
-
#endif // #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 1e09aad..e03c6a3 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -297,7 +297,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere
{
sal_uLong nMask = WINDOWSTATE_MASK_ALL;
nMask &= ~(WINDOWSTATE_MASK_MINIMIZED);
- sWindowState = B2U_ENC(
+ sWindowState = rtl::OStringToOUString(
((SystemWindow*)pWindow)->GetWindowState(nMask),
RTL_TEXTENCODING_UTF8);
}
@@ -341,7 +341,7 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
::rtl::OUString sOldWindowState = ::rtl::OStringToOUString( pSystemWindow->GetWindowState(), RTL_TEXTENCODING_ASCII_US );
if ( sOldWindowState != sWindowState )
- pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ pSystemWindow->SetWindowState(rtl::OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
// <- SOLAR SAFE ------------------------
}
diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx
index da45461..f500339 100644
--- a/framework/source/inc/pattern/window.hxx
+++ b/framework/source/inc/pattern/window.hxx
@@ -72,7 +72,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind
if (!xWindow.is())
return ::rtl::OUString();
- ByteString sWindowState;
+ rtl::OString sWindowState;
// SOLAR SAFE -> ----------------------------
{
SolarMutexGuard aSolarGuard;
@@ -88,7 +88,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind
}
// <- SOLAR SAFE ----------------------------
- return B2U_ENC(sWindowState,RTL_TEXTENCODING_UTF8);
+ return rtl::OStringToOUString(sWindowState,RTL_TEXTENCODING_UTF8);
}
//-----------------------------------------------
@@ -116,7 +116,7 @@ static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWind
)
)
{
- ((SystemWindow*)pWindow)->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ ((SystemWindow*)pWindow)->SetWindowState(OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
}
// <- SOLAR SAFE ----------------------------
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 52a8498..8d0eed4 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -93,6 +93,8 @@
#include <rtl/instance.hxx>
#include <unotools/cmdoptions.hxx>
+#include <rtl/strbuf.hxx>
+
#include <algorithm>
#include <boost/bind.hpp>
@@ -2313,11 +2315,11 @@ throw (RuntimeException)
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::lock lockCount=%d", nLockCount );
#ifdef DBG_UTIL
- ByteString aStr("LayoutManager::lock ");
- aStr += ByteString::CreateFromInt32((long)this);
- aStr += " - ";
- aStr += ByteString::CreateFromInt32(nLockCount);
- OSL_TRACE( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::lock "));
+ aStr.append(reinterpret_cast<sal_Int64>(this));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
+ aStr.append(nLockCount);
+ OSL_TRACE(aStr.getStr());
#endif
Any a( nLockCount );
@@ -2335,11 +2337,11 @@ throw (RuntimeException)
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::unlock lockCount=%d", nLockCount );
#ifdef DBG_UTIL
- ByteString aStr("LayoutManager::unlock ");
- aStr += ByteString::CreateFromInt32((long)this);
- aStr += " - ";
- aStr += ByteString::CreateFromInt32(nLockCount);
- OSL_TRACE( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::unlock "));
+ aStr.append(reinterpret_cast<sal_Int64>(this));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
+ aStr.append(nLockCount);
+ OSL_TRACE(aStr.getStr());
#endif
// conform to documentation: unlock with lock count == 0 means force a layout
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 49c28d6..b1854ac 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1794,7 +1794,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
return;
SystemWindow* pSystemWindow = (SystemWindow*)pWindowCheck;
- pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ pSystemWindow->SetWindowState(rtl::OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
// <- SOLAR SAFE
}
}
commit 157c4bd6fd142cf08f14330e6aaf57efbe55c48b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 19 22:48:52 2011 +0100
catch by const reference
diff --git a/framework/source/fwe/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx
index fc10061..32fb2ab 100644
--- a/framework/source/fwe/classes/framelistanalyzer.cxx
+++ b/framework/source/fwe/classes/framelistanalyzer.cxx
@@ -163,8 +163,9 @@ void FrameListAnalyzer::impl_analyze()
::rtl::OUString sModule = xModuleMgr->identify(m_xReferenceFrame);
m_bReferenceIsBacking = (sModule.equals(SERVICENAME_STARTMODULE));
}
- catch(const css::uno::Exception&)
- {}
+ catch (const css::uno::Exception&)
+ {
+ }
}
// check, if the reference frame includes the help module.
@@ -237,8 +238,9 @@ void FrameListAnalyzer::impl_analyze()
continue;
}
}
- catch(const css::uno::Exception&)
- {}
+ catch (const css::uno::Exception&)
+ {
+ }
}
// -------------------------------------------------
@@ -285,7 +287,7 @@ void FrameListAnalyzer::impl_analyze()
}
}
}
- catch(css::lang::IndexOutOfBoundsException)
+ catch (const css::lang::IndexOutOfBoundsException&)
{
// stop copying if index seams to be wrong.
// This interface can't realy guarantee its count for multithreaded
diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx
index 06f18ba..8255b07 100644
--- a/framework/source/fwe/helper/actiontriggerhelper.cxx
+++ b/framework/source/fwe/helper/actiontriggerhelper.cxx
@@ -67,7 +67,7 @@ sal_Bool IsSeparator( Reference< XPropertySet > xPropertySet )
{
return xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_ACTIONTRIGGERSEPARATOR )) );
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
@@ -95,7 +95,7 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet,
a = xActionTriggerPropertySet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "SubContainer" )) );
a >>= xSubContainer;
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
@@ -105,7 +105,7 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet,
a = xActionTriggerPropertySet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" )) );
a >>= aHelpURL;
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
}
@@ -234,15 +234,15 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
}
}
}
- catch ( IndexOutOfBoundsException )
+ catch (const IndexOutOfBoundsException&)
{
return;
}
- catch ( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
return;
}
- catch ( RuntimeException )
+ catch (const RuntimeException&)
{
return;
}
@@ -295,7 +295,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p
xPropSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Image" )), a );
}
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
}
@@ -369,7 +369,7 @@ void FillActionTriggerContainerWithMenu( const Menu* pMenu, Reference< XIndexCon
}
}
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
}
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 1ba2f98..52a8498 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -221,8 +221,12 @@ void LayoutManager::impl_clearUpMenuBar()
{
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
- catch ( beans::UnknownPropertyException ) {}
- catch ( lang::WrappedTargetException ) {}
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar );
@@ -310,7 +314,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
// Remove listener to old module ui configuration manager
xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
try
@@ -320,7 +326,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xModuleCfgMgr.is() )
xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
try
{
@@ -328,8 +336,12 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xPersistentWindowStateSupplier.is() )
xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= xPersistentWindowState;
}
- catch ( NoSuchElementException& ) {}
- catch ( WrappedTargetException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
+ catch (const WrappedTargetException&)
+ {
+ }
}
xModel = impl_getModelFromFrame( xFrame );
@@ -345,7 +357,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
// Remove listener to old ui configuration manager
xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
try
@@ -354,7 +368,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xDocCfgMgr.is() )
xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
}
}
@@ -368,7 +384,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
xModuleCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
if ( xDocCfgMgr.is() )
@@ -378,7 +396,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
xDocCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
// Release references to our configuration managers as we currently don't have
@@ -636,7 +656,9 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName,
return sal_True;
}
- catch ( NoSuchElementException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
}
return sal_False;
@@ -660,12 +682,14 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con
// Check persistent flag of the user interface element
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent;
}
- catch ( beans::UnknownPropertyException )
+ catch (const beans::UnknownPropertyException&)
{
// Non-configurable elements should at least store their dimension/position
bPersistent = sal_True;
}
- catch ( lang::WrappedTargetException ) {}
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
if ( bPersistent && xPersistentWindowState.is() )
@@ -714,7 +738,9 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con
xInsert->insertByName( aName, makeAny( aWindowState ));
}
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
// Reset flag
@@ -752,8 +778,12 @@ Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString
{
xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq );
}
- catch ( NoSuchElementException& ) {}
- catch ( IllegalArgumentException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
+ catch (const IllegalArgumentException&)
+ {
+ }
return xUIElement;
}
@@ -1412,8 +1442,13 @@ void LayoutManager::implts_reparentChildWindows()
{
xStatusBarWindow = Reference< awt::XWindow >( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY );
}
- catch ( RuntimeException& ) { throw; }
- catch ( Exception& ) {}
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception&)
+ {
+ }
}
if ( xStatusBarWindow.is() )
@@ -1519,8 +1554,12 @@ throw (RuntimeException)
{
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
- catch ( beans::UnknownPropertyException ) {}
- catch ( lang::WrappedTargetException ) {}
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
if ( xMenuBar.is() )
@@ -2917,7 +2956,9 @@ throw( RuntimeException )
xModuleCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
if ( m_xDocCfgMgr.is() )
@@ -2928,7 +2969,9 @@ throw( RuntimeException )
xDocCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
m_xDocCfgMgr.clear();
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index ec0babe..a4c2a09 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -506,7 +506,9 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL )
xWindow->removeWindowListener( uno::Reference< awt::XWindowListener >(
static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
}
- catch( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
try
{
@@ -514,7 +516,9 @@ bool ToolbarLayoutManager::destroyToolbar( const ::rtl::OUString& rResourceURL )
xDockWindow->removeDockableWindowListener( uno::Reference< awt::XDockableWindowListener >(
static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
else
{
@@ -768,7 +772,9 @@ bool ToolbarLayoutManager::dockToolbar( const ::rtl::OUString& rResourceURL, ui:
return true;
}
}
- catch ( lang::DisposedException& ) {}
+ catch (const lang::DisposedException&)
+ {
+ }
}
return false;
@@ -844,9 +850,17 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
const sal_uInt32 nCount = aListenerArray.size();
for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- try { aListenerArray[i]->functionExecute( aToolbarName, aCommand ); }
- catch ( uno::RuntimeException& ) { throw; }
- catch ( uno::Exception& ) {}
+ try
+ {
+ aListenerArray[i]->functionExecute( aToolbarName, aCommand );
+ }
+ catch (const uno::RuntimeException&)
+ {
+ throw;
+ }
+ catch (const uno::Exception&)
+ {
+ }
}
}
}
@@ -1012,7 +1026,9 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
if ( xWindow.is() )
xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 );
@@ -1060,8 +1076,12 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
}
}
}
- catch ( container::NoSuchElementException& ) {}
- catch ( lang::IllegalArgumentException& ) {}
+ catch (const container::NoSuchElementException&)
+ {
+ }
+ catch (const lang::IllegalArgumentException&)
+ {
+ }
}
}
@@ -1158,8 +1178,13 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars()
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
}
}
- catch ( uno::RuntimeException& ) { throw; }
- catch ( uno::Exception& ) {}
+ catch (const uno::RuntimeException&)
+ {
+ throw;
+ }
+ catch (const uno::Exception&)
+ {
+ }
if ( !aMakeVisibleToolbars.empty() )
::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),::boost::bind( &ToolbarLayoutManager::requestToolbar, this,_1 ));
@@ -1233,8 +1258,13 @@ void ToolbarLayoutManager::implts_reparentToolbars()
// possible that all elements have been disposed!
xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY );
}
- catch ( uno::RuntimeException& ) { throw; }
- catch ( uno::Exception& ) {}
+ catch (const uno::RuntimeException&)
+ {
+ throw;
+ }
+ catch (const uno::Exception&)
+ {
+ }
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow )
@@ -1306,7 +1336,9 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b
static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
xDockWindow->enableDocking( sal_True );
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -1378,8 +1410,12 @@ uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( con
if ( xUIElementFactory.is() )
xUIElement = xUIElementFactory->createUIElement( aName, aPropSeq );
}
- catch ( container::NoSuchElementException& ) {}
- catch ( lang::IllegalArgumentException& ) {}
+ catch (const container::NoSuchElementException&)
+ {
+ }
+ catch (const lang::IllegalArgumentException&)
+ {
+ }
implts_setToolbarCreation( false );
return xUIElement;
@@ -1674,7 +1710,9 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString&
return sal_True;
}
- catch ( container::NoSuchElementException& ) {}
+ catch (const container::NoSuchElementException&)
+ {
+ }
}
return sal_False;
@@ -1696,11 +1734,13 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen
// Check persistent flag of the user interface element
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent;
}
- catch ( beans::UnknownPropertyException )
+ catch (const beans::UnknownPropertyException&)
{
bPersistent = true; // Non-configurable elements should at least store their dimension/position
}
- catch ( lang::WrappedTargetException ) {}
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
if ( bPersistent && xPersistentWindowState.is() )
@@ -1749,7 +1789,9 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen
xInsert->insertByName( aName, uno::makeAny( aWindowState ));
}
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
// Reset flag
@@ -3342,11 +3384,15 @@ void ToolbarLayoutManager::implts_renumberRowColumnData(
xReplace->replaceByName( aWindowElements[i], makeAny( aPropValueSeq ));
}
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
}
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
}
@@ -3641,7 +3687,9 @@ throw (uno::RuntimeException)
m_aDockUIElement.m_aFloatingData = aUIDockingElement.m_aFloatingData;
aWriteLock.unlock();
}
- catch ( uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
return aDockingData;
@@ -4004,9 +4052,15 @@ throw (uno::RuntimeException)
if ( xPropSet.is() )
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName;
}
- catch ( container::NoSuchElementException& ) {}
- catch ( beans::UnknownPropertyException& ) {}
- catch ( lang::WrappedTargetException& ) {}
+ catch (const container::NoSuchElementException&)
+ {
+ }
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+ catch (const lang::WrappedTargetException&)
+ {
+ }
{
SolarMutexGuard aGuard;
@@ -4151,7 +4205,9 @@ bool ToolbarLayoutManager::floatToolbar( const ::rtl::OUString& rResourceURL )
return true;
}
}
- catch ( lang::DisposedException& ) {}
+ catch (const lang::DisposedException&)
+ {
+ }
}
return false;
@@ -4176,7 +4232,9 @@ bool ToolbarLayoutManager::lockToolbar( const ::rtl::OUString& rResourceURL )
return true;
}
}
- catch ( lang::DisposedException& ) {}
+ catch (const lang::DisposedException&)
+ {
+ }
}
return false;
@@ -4201,7 +4259,9 @@ bool ToolbarLayoutManager::unlockToolbar( const ::rtl::OUString& rResourceURL )
return true;
}
}
- catch ( lang::DisposedException& ) {}
+ catch (const lang::DisposedException&)
+ {
+ }
}
return false;
diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx
index 211358e..e86f3d1 100644
--- a/framework/source/lomenubar/FrameHelper.cxx
+++ b/framework/source/lomenubar/FrameHelper.cxx
@@ -647,7 +647,7 @@ FrameHelper::getLabelFromCommandURL (OUString commandURL)
{
m_xUICommands->getByName (commandURL) >>= commandProps;
}
- catch (com::sun::star::container::NoSuchElementException e)
+ catch (const com::sun::star::container::NoSuchElementException&)
{
return label;
}
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index bab072d..4317c99 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -185,7 +185,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
}
}
}
- catch (Exception& )
+ catch (const Exception&)
{
}
@@ -920,7 +920,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
xProductRegistration->trigger( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RegistrationRequired" ) ) );
}
}
- catch( const Exception& )
+ catch (const Exception&)
{
}
break;
@@ -967,7 +967,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
}
}
}
- catch (Exception& )
+ catch (const Exception&)
{
}
}
@@ -1060,7 +1060,7 @@ static long implDispatchDelayed( void*, void* pArg )
{
pDispatch->xDispatch->dispatch( pDispatch->aDispatchURL, pDispatch->aArgs );
}
- catch( Exception )
+ catch (const Exception&)
{
}
@@ -1108,11 +1108,11 @@ void BackingWindow::dispatchURL( const rtl::OUString& i_rURL,
delete pDisp; // event could not be posted for unknown reason, at least don't leak
}
}
- catch ( com::sun::star::uno::RuntimeException& )
+ catch (const com::sun::star::uno::RuntimeException&)
{
throw;
}
- catch ( com::sun::star::uno::Exception& )
+ catch (const com::sun::star::uno::Exception&)
{
}
}
commit bcc0b210ba9b1ce98c1e54ab79da3dcb0f6eb94a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 21:49:23 2011 +0100
catch by const reference
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 002dc79..62e88b6 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -112,10 +112,10 @@ if ( m_bLastCachedReadWasNull && rValue.hasValue() ) \
const Type * >( 0 ) ) ); \
m_bLastCachedReadWasNull = !( aConvAny >>= aRet ); \
} \
- catch ( IllegalArgumentException ) \
+ catch (const IllegalArgumentException&) \
{ \
} \
- catch ( CannotConvertException ) \
+ catch (const CannotConvertException&) \
{ \
} \
} \
@@ -327,7 +327,7 @@ const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache
return (* reinterpret_cast< const OUString * >
(getRowAny( nRow ).getValue() ));
}
- catch( SQLException )
+ catch(const SQLException&)
{
throw RuntimeException();
}
@@ -350,7 +350,7 @@ const Reference< XContentIdentifier >& SAL_CALL CachedContentResultSet::CCRS_Cac
return (* reinterpret_cast< const Reference< XContentIdentifier > * >
(getRowAny( nRow ).getValue() ));
}
- catch( SQLException )
+ catch(const SQLException&)
{
throw RuntimeException();
}
@@ -373,7 +373,7 @@ const Reference< XContent >& SAL_CALL CachedContentResultSet::CCRS_Cache
return (* reinterpret_cast< const Reference< XContent > * >
(getRowAny( nRow ).getValue() ));
}
- catch( SQLException )
+ catch (const SQLException&)
{
throw RuntimeException();
}
@@ -792,7 +792,7 @@ sal_Bool SAL_CALL CachedContentResultSet
return bValid;
}
}
- catch( SQLException& rEx )
+ catch (const SQLException& rEx)
{
if( !bAfterLastApplied && !bAfterLast && nRow > nLastAppliedPos && impl_isForwardOnly() )
{
@@ -1452,7 +1452,7 @@ sal_Bool SAL_CALL CachedContentResultSet
{
bValid = m_xResultSetOrigin->absolute( row );
}
- catch (ResultSetException &)
+ catch (const ResultSetException&)
{
throw;
}
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index b36c25e..47df517 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -344,8 +344,8 @@ SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
try {
aRet = pCurSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) );
}
- catch ( UnknownPropertyException ) {}
- catch ( WrappedTargetException ) {}
+ catch (const UnknownPropertyException&) {}
+ catch (const WrappedTargetException&) {}
long nOldCount = pCurSet->GetCount();
sal_Bool bWasFinal = false;
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 797355a..d7c6907 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1461,7 +1461,10 @@ void SortedResultSet::Initialize(
nIndex++;
}
}
- catch ( SQLException ) { OSL_FAIL( "SortedResultSet::Initialize() : Got unexpected SQLException" ); }
+ catch (const SQLException&)
+ {
+ OSL_FAIL( "SortedResultSet::Initialize() : Got unexpected SQLException" );
+ }
// when we have fetched all the elements, we can create the
// original to sorted mapping list from the s2o list
@@ -1516,8 +1519,8 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal )
}
}
}
- catch ( UnknownPropertyException ) {}
- catch ( WrappedTargetException ) {}
+ catch (const UnknownPropertyException&) {}
+ catch (const WrappedTargetException&) {}
}
//-------------------------------------------------------------------------
@@ -1816,7 +1819,10 @@ void SortedResultSet::ResortModified( EventList* pList )
}
}
}
- catch ( SQLException ) { OSL_FAIL( "SortedResultSet::ResortModified() : Got unexpected SQLException" ); }
+ catch (const SQLException&)
+ {
+ OSL_FAIL( "SortedResultSet::ResortModified() : Got unexpected SQLException" );
+ }
maModList.Clear();
}
@@ -1849,7 +1855,10 @@ void SortedResultSet::ResortNew( EventList* pList )
pList->AddEvent( ListActionType::INSERTED, nNewPos, 1 );
}
}
- catch ( SQLException ) { OSL_FAIL( "SortedResultSet::ResortNew() : Got unexpected SQLException" ); }
+ catch (const SQLException&)
+ {
+ OSL_FAIL( "SortedResultSet::ResortNew() : Got unexpected SQLException" );
+ }
}
//-------------------------------------------------------------------------
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 0120d46..ed019ab 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -549,7 +549,7 @@ BaseContent::getContentType()
OSL_FAIL( "BaseContent::getContentType - Property value was null!" );
}
}
- catch ( sdbc::SQLException const & )
+ catch (const sdbc::SQLException&)
{
OSL_FAIL( "BaseContent::getContentType - Caught SQLException!" );
}
@@ -681,7 +681,7 @@ BaseContent::createNewContent(
// return Reference< XContent >();
}
}
- catch ( sdbc::SQLException const & )
+ catch (const sdbc::SQLException&)
{
OSL_FAIL( "BaseContent::createNewContent - Caught SQLException!" );
return Reference< XContent >();
@@ -757,7 +757,7 @@ BaseContent::getParent(
Reference< XContent > content = m_pMyShell->m_pProvider->queryContent( Identifier );
return Reference<XInterface>(content,UNO_QUERY);
}
- catch( IllegalIdentifierException )
+ catch (const IllegalIdentifierException&)
{
return Reference< XInterface >();
}
@@ -979,7 +979,7 @@ BaseContent::setPropertyValues(
{
endTask( nMyCommandIdentifier );
}
- catch( const Exception& e )
+ catch(const Exception& e)
{
ret[i] <<= e;
}
@@ -1209,7 +1209,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
contentTypeSet = false;
}
- catch ( sdbc::SQLException const & )
+ catch (const sdbc::SQLException&)
{
OSL_FAIL( "BaseContent::insert - Caught SQLException!" );
contentTypeSet = false;
diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx
index deac6ef..b923188 100644
--- a/ucb/source/ucp/file/filrow.cxx
+++ b/ucb/source/ucp/file/filrow.cxx
@@ -68,11 +68,11 @@ sal_Bool convert( shell* pShell,
else
no_success = sal_True;
}
- catch ( lang::IllegalArgumentException )
+ catch (const lang::IllegalArgumentException&)
{
no_success = sal_True;
}
- catch ( script::CannotConvertException )
+ catch (const script::CannotConvertException&)
{
no_success = sal_True;
}
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index a8b77f5..4f989ca 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -134,11 +134,11 @@ XStream_impl::~XStream_impl()
{
closeStream();
}
- catch (io::IOException const &)
+ catch (const io::IOException&)
{
OSL_FAIL("unexpected situation");
}
- catch (uno::RuntimeException const &)
+ catch (const uno::RuntimeException&)
{
OSL_FAIL("unexpected situation");
}
@@ -216,7 +216,7 @@ XStream_impl::readBytes(
{
buffer = new sal_Int8[nBytesToRead];
}
- catch( std::bad_alloc )
+ catch (const std::bad_alloc&)
{
if( m_nIsOpen ) m_aFile.close();
throw io::BufferSizeExceededException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 426a939..7a639c3 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -619,19 +619,19 @@ void SAL_CALL shell::page( sal_Int32 CommandId,
{
xOutputStream->writeBytes( seq );
}
- catch( io::NotConnectedException )
+ catch (const io::NotConnectedException&)
{
installError( CommandId,
TASKHANDLING_NOTCONNECTED_FOR_PAGING );
break;
}
- catch( io::BufferSizeExceededException )
+ catch (const io::BufferSizeExceededException&)
{
installError( CommandId,
TASKHANDLING_BUFFERSIZEEXCEEDED_FOR_PAGING );
break;
}
- catch( io::IOException )
+ catch (const io::IOException&)
{
installError( CommandId,
TASKHANDLING_IOEXCEPTION_FOR_PAGING );
@@ -655,13 +655,13 @@ void SAL_CALL shell::page( sal_Int32 CommandId,
{
xOutputStream->closeOutput();
}
- catch( io::NotConnectedException )
+ catch (const io::NotConnectedException&)
{
}
- catch( io::BufferSizeExceededException )
+ catch (const io::BufferSizeExceededException&)
{
}
- catch( io::IOException )
+ catch (const io::IOException&)
{
}
}
@@ -888,7 +888,7 @@ shell::setv( const rtl::OUString& aUnqPath,
{
it->second.xS->setPropertyValue( values[i].Name,values[i].Value );
}
- catch( const uno::Exception& e )
+ catch (const uno::Exception&e)
{
--propChanged; // unsuccessful setting
ret[i] <<= e;
commit edfbd78053d1e291b7e559ce57853bfd7397843d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 21:43:38 2011 +0100
catch by const reference
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index fc44c9f..e9b341b 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -477,33 +477,33 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
m_xSMgr, *this, key ) );
}
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// insertByName
OSL_FAIL( "PropertySetRegistry::openPropertySet - "
"caught IllegalArgumentException!" );
}
- catch ( ElementExistException& )
+ catch (const ElementExistException&)
{
// insertByName
OSL_FAIL( "PropertySetRegistry::openPropertySet - "
"caught ElementExistException!" );
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// insertByName, commitChanges
OSL_FAIL( "PropertySetRegistry::openPropertySet - "
"caught WrappedTargetException!" );
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
OSL_FAIL( "PropertySetRegistry::openPropertySet - "
"caught RuntimeException!" );
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance
@@ -567,7 +567,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key )
// Success.
return;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// removeByName
@@ -575,7 +575,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key )
"caught NoSuchElementException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// commitChanges
@@ -640,11 +640,11 @@ Any SAL_CALL PropertySetRegistry::getByName( const OUString& aName )
{
return xNameAccess->getByName( aName );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByName
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// getByName
}
@@ -776,7 +776,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
xBatch->commitChanges();
}
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// insertByName
@@ -784,7 +784,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught IllegalArgumentException!" );
return;
}
- catch ( ElementExistException& )
+ catch (const ElementExistException&)
{
// insertByName
@@ -792,7 +792,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught ElementExistException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// insertByName, commitChanges
@@ -800,13 +800,13 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught WrappedTargetException!" );
return;
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
OSL_FAIL( "PropertySetRegistry::renamePropertySet - "
"caught RuntimeException!" );
return;
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance
@@ -952,7 +952,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
}
}
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// insertByName, replaceByName
@@ -960,7 +960,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught IllegalArgumentException!" );
return;
}
- catch ( ElementExistException& )
+ catch (const ElementExistException&)
{
// insertByName
@@ -968,7 +968,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught ElementExistException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// insertByName, replaceByName, commitChanges
@@ -976,7 +976,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught WrappedTargetException!" );
return;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName, replaceByName
@@ -984,13 +984,13 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught NoSuchElementException!" );
return;
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
OSL_FAIL( "PropertySetRegistry::renamePropertySet - "
"caught RuntimeException!" );
return;
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance
@@ -1013,7 +1013,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
// Success.
return;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// removeByName
@@ -1021,7 +1021,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
"caught NoSuchElementException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// commitChanges
@@ -1072,7 +1072,7 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
"No config provider!" );
}
- catch ( Exception& )
+ catch (const Exception&)
{
OSL_FAIL( "PropertySetRegistry::getConfigProvider - "
"caught exception!" );
@@ -1129,11 +1129,11 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess()
else
return m_pImpl->m_xRootReadAccess;
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
throw;
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance, createInstanceWithArguments
@@ -1216,11 +1216,11 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
return m_pImpl->m_xRootWriteAccess;
}
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
throw;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -1228,7 +1228,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
"caught NoSuchElementException!" );
return Reference< XInterface >();
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance, createInstanceWithArguments
@@ -1539,15 +1539,15 @@ void SAL_CALL PersistentPropertySet::setPropertyValue(
}
return;
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// replaceByName
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName, replaceByName
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// replaceByName, commitChanges
}
@@ -1583,7 +1583,7 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue(
{
return xNameAccess->getByHierarchicalName( aFullPropName );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
throw UnknownPropertyException();
}
@@ -1827,7 +1827,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
return;
}
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// insertByName
@@ -1835,7 +1835,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
"caught IllegalArgumentException!" );
return;
}
- catch ( ElementExistException& )
+ catch (const ElementExistException&)
{
// insertByName
@@ -1843,7 +1843,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
"caught ElementExistException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// replaceByName, insertByName, commitChanges
@@ -1851,11 +1851,11 @@ void SAL_CALL PersistentPropertySet::addProperty(
"caught WrappedTargetException!" );
return;
}
- catch ( RuntimeException& )
+ catch (const RuntimeException&)
{
throw;
}
- catch ( Exception& )
+ catch (const Exception&)
{
// createInstance
@@ -1916,7 +1916,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
return;
}
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -1962,7 +1962,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
nHandle = -1;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -1994,7 +1994,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
// Success.
return;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// removeByName
@@ -2002,7 +2002,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
"caught NoSuchElementException!" );
return;
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// commitChanges
@@ -2113,7 +2113,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
OSL_FAIL( "PersistentPropertySet::getPropertyValues - "
"Error getting property handle!" );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2134,7 +2134,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
// was called with a default value
// of type void.
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2158,7 +2158,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
else
rValue.State = PropertyState( nState );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2172,7 +2172,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
}
}
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
}
@@ -2271,15 +2271,15 @@ void SAL_CALL PersistentPropertySet::setPropertyValues(
aEvents.push_back( aEvt );
}
}
- catch ( IllegalArgumentException& )
+ catch (const IllegalArgumentException&)
{
// replaceByName
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName, replaceByName
}
- catch ( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
// replaceByName, commitChanges
}
@@ -2516,7 +2516,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
OSL_FAIL( "PropertySetInfo_Impl::getProperties - "
"Error getting property handle!" );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2539,7 +2539,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
rProp.Type = aKeyValue.getValueType();
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2564,7 +2564,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
OSL_FAIL( "PropertySetInfo_Impl::getProperties - "
"Error getting property attributes!" );
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
@@ -2580,7 +2580,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
return *m_pProps;
}
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
}
@@ -2663,7 +2663,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
// Success.
return aProp;
}
- catch ( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
// getByHierarchicalName
More information about the Libreoffice-commits
mailing list