[Libreoffice-commits] .: 7 commits - comphelper/source regexp/source sot/source unotools/source vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Apr 13 04:24:28 PDT 2011
comphelper/source/container/containermultiplexer.cxx | 4 ++--
regexp/source/reclass.cxx | 4 ++--
sot/source/sdstor/ucbstorage.cxx | 8 --------
unotools/source/streaming/streamwrap.cxx | 8 --------
vcl/unx/gtk/a11y/atkutil.cxx | 13 ++++++++++---
vcl/unx/kde4/main.cxx | 7 ++++---
6 files changed, 18 insertions(+), 26 deletions(-)
New commits:
commit df71bb6970dc95a963ef2ea52f1f93f5f50325ed
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 12:23:40 2011 +0100
Related: lp#746375 ensure a deterministic shutdown order for globals
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 68bb949..97e44e7 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -66,7 +66,14 @@
using namespace ::com::sun::star;
-static uno::WeakReference< accessibility::XAccessible > xNextFocusObject;
+namespace
+{
+ struct theNextFocusObject :
+ public rtl::Static< uno::WeakReference< accessibility::XAccessible >, theNextFocusObject>
+ {
+ };
+}
+
static guint focus_notify_handler = 0;
/*****************************************************************************/
@@ -80,7 +87,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
focus_notify_handler = 0;
- uno::Reference< accessibility::XAccessible > xAccessible = xNextFocusObject;
+ uno::Reference< accessibility::XAccessible > xAccessible = theNextFocusObject::get();
if( xAccessible.get() == reinterpret_cast < accessibility::XAccessible * > (data) )
{
AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
@@ -135,7 +142,7 @@ atk_wrapper_focus_tracker_notify_when_idle( const uno::Reference< accessibility:
if( focus_notify_handler )
g_source_remove(focus_notify_handler);
- xNextFocusObject = xAccessible;
+ theNextFocusObject::get() = xAccessible;
focus_notify_handler = g_idle_add (atk_wrapper_focus_idle_handler, xAccessible.get());
}
commit ffdf747e544687d9bec8c8ebe61196cf8be3caea
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 10:51:35 2011 +0100
catch by const reference
diff --git a/regexp/source/reclass.cxx b/regexp/source/reclass.cxx
index fb73eee..65fdb85 100644
--- a/regexp/source/reclass.cxx
+++ b/regexp/source/reclass.cxx
@@ -1689,7 +1689,7 @@ Regexpr::regex_compile()
sal_Unicode tmp = translit->transliterateChar2Char(c);
BUF_PUSH(tmp);
(*pending_exact)++;
- } catch (::com::sun::star::i18n::MultipleCharsOutputException e) {
+ } catch (const ::com::sun::star::i18n::MultipleCharsOutputException& e) {
::rtl::OUString o2( translit->transliterateChar2String( c));
sal_Int32 len2 = o2.getLength();
const sal_Unicode * k2 = o2.getStr();
@@ -2934,7 +2934,7 @@ Regexpr::set_list_bit(sal_Unicode c, sal_Unicode *b)
try {
sal_Unicode tmp = translit->transliterateChar2Char(c);
b[tmp / BYTEWIDTH] |= 1 << (tmp % BYTEWIDTH);
- } catch (::com::sun::star::i18n::MultipleCharsOutputException e) {
+ } catch (const ::com::sun::star::i18n::MultipleCharsOutputException& e) {
::rtl::OUString o2( translit->transliterateChar2String( c));
sal_Int32 len2 = o2.getLength();
const sal_Unicode * k2 = o2.getStr();
commit 3ccb2b67b70c0c258323efb3c288ca4f05314c03
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 10:50:04 2011 +0100
catched->caught
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index ddd9b42..d7f5382 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -153,7 +153,7 @@ namespace comphelper
}
catch(const Exception&)
{
- OSL_FAIL("Exception catched!");
+ OSL_FAIL("Exception caught!");
}
m_xContainer = NULL;
m_pListener = NULL;
commit 5ee30c0d9aff4a912c2d6f8f8d1bb6a0725bc236
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 09:50:38 2011 +0100
catched->caught
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index c2ced9b..ddd9b42 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -118,7 +118,7 @@ namespace comphelper
}
catch(const Exception&)
{
- OSL_FAIL("Exceptiopn catched!");
+ OSL_FAIL("Exceptiopn caught!");
}
::comphelper::decrement(m_refCount);
}
commit f73496d2b2bf67c9be85da2e136f5f2fe1ca37e6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 09:13:41 2011 +0100
WaE: set but unused in dbgutil mode
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 3fcf8b0..8199a5e 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -201,16 +201,8 @@ void SAL_CALL FileStreamWrapper_Impl::skipBytes(sal_Int32 nBytesToSkip) throw( N
::osl::MutexGuard aGuard( m_aMutex );
checkError();
-#ifdef DBG_UTIL
- sal_uInt32 nCurrentPos = m_pSvStream->Tell();
-#endif
-
m_pSvStream->SeekRel(nBytesToSkip);
checkError();
-
-#ifdef DBG_UTIL
- nCurrentPos = m_pSvStream->Tell();
-#endif
}
//------------------------------------------------------------------------------
commit 102829332a768a16fd2a068d22f28698a1706f4f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 13 09:13:17 2011 +0100
WaE: set but unused in dbgutil mode
diff --git a/unotools/source/streaming/streamwrap.cxx b/unotools/source/streaming/streamwrap.cxx
index 5df4a60..8a14e8c 100644
--- a/unotools/source/streaming/streamwrap.cxx
+++ b/unotools/source/streaming/streamwrap.cxx
@@ -116,16 +116,8 @@ void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( star
::osl::MutexGuard aGuard( m_aMutex );
checkError();
-#ifdef DBG_UTIL
- sal_uInt32 nCurrentPos = m_pSvStream->Tell();
-#endif
-
m_pSvStream->SeekRel(nBytesToSkip);
checkError();
-
-#ifdef DBG_UTIL
- nCurrentPos = m_pSvStream->Tell();
-#endif
}
//------------------------------------------------------------------------------
commit 7921df56fc4c3b20daaa82ae4b869cbee2e73c73
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 12 21:21:10 2011 +0100
WaE: nMicro only used in DEBUG code path
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 32561d9..3dd5c7d 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -62,15 +62,16 @@ extern "C" {
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "qt version string is \"%s\"\n", aVersion.getStr() );
#endif
- sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0, nMicro = 0;
+ sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0;
nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32();
if( nIndex > 0 )
nMinor = aVersion.getToken( 0, '.', nIndex ).toInt32();
- if( nIndex > 0 )
- nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
if( nMajor != 4 || nMinor < 1 )
{
#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nMicro = 0;
+ if( nIndex > 0 )
+ nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
fprintf( stderr, "unsuitable qt version %d.%d.%d\n", nMajor, nMinor, nMicro );
#endif
return NULL;
More information about the Libreoffice-commits
mailing list