connectivity/source/drivers/flat/ETable.cxx | 21 +++++++++++++++++---- sw/source/filter/ww8/wrtw8esh.cxx | 4 ++-- ucb/source/ucp/webdav-neon/NeonLockStore.cxx | 17 ++++++++++++----- 3 files changed, 31 insertions(+), 11 deletions(-)
New commits: commit 526fbddf6935b0a3983563af71c4ccea4561cebb Author: Michael Stahl <[email protected]> Date: Wed May 29 20:31:08 2013 +0200 connectivity: make MSVC happy with pairFirstLess MSVC 2008 with _DEBUG calls this with parameters in wrong order so needs more overloads. Change-Id: I334fd93bea278dc147b3b575d079cacf02de5e87 diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index a6b5a67..4a81462 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -755,10 +755,23 @@ void OFlatTable::refreshHeader() // ----------------------------------------------------------------------------- namespace { - template< typename Tp, typename Te> bool pairFirstLess(const Tp &p, const Te &e) + template< typename Tp, typename Te> struct PairFirstLess { - return p.first < e; - } + bool operator() (const Tp &p, const Te &e) + { + return p.first < e; + } +#ifdef DBG_UTIL + bool operator() (const Te &e, const Tp &p) + { + return e < p.first; + } + bool operator() (const Tp &p1, const Tp &p2) + { + return p1.first < p2.first; + } +#endif + }; } // ----------------------------------------------------------------------------- sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) @@ -896,7 +909,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int vector< TRowPositionInFile >::const_iterator aFind = lower_bound(m_aRowPosToFilePos.begin(), m_aRowPosToFilePos.end(), nOffset, - pairFirstLess< TRowPositionInFile, sal_Int32 >); + PairFirstLess< TRowPositionInFile, sal_Int32 >()); if(aFind == m_aRowPosToFilePos.end() || aFind->first != nOffset) //invalid bookmark commit 713cfaf98425e048963e8044be25cc0aa0840b28 Author: Michael Stahl <[email protected]> Date: Wed May 29 23:44:04 2013 +0200 WaE: C4146 unary operator applied to unsigned type Change-Id: Ic23667dc5fb455a7b11f49f4a13df2c49496f702 diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index be4f594..e334552 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1809,8 +1809,8 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, const sal_uInt32 nShadowType = 131074; // shadow type of ms word. need to set the default value. sal_uInt32 nColor = (sal_uInt32)(pSI->GetColor().GetColor()) ; - sal_uInt32 nOffX = pSI->GetWidth() * nCstScale; - sal_uInt32 nOffY = pSI->GetWidth() * nCstScale; + sal_Int32 nOffX = pSI->GetWidth() * nCstScale; + sal_Int32 nOffY = pSI->GetWidth() * nCstScale; sal_uInt32 nShadow = nShadowType; SvxShadowLocation eLocation = pSI->GetLocation(); commit 68ba2785c55eaa1ea70ce135bdad5322b0e04ed7 Author: Michael Stahl <[email protected]> Date: Wed May 29 21:18:29 2013 +0200 ucb: NeonLockStore::stopTicker(): avoid deadlock Tor reports that NeonLockStore::stopTicker() m_pTickerThread->join() can deadlock with TickerThread running NeonLockStore::refreshLocks(). This can be avoided by copying m_pTickerThread to the stack, and releasing the m_aMutex before calling join(). Change-Id: I387f83a530c5b893f79fa677b1092e0902c8af65 diff --git a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx index 04608a6..043ea7d 100644 --- a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx +++ b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx @@ -128,14 +128,21 @@ void NeonLockStore::startTicker() void NeonLockStore::stopTicker() { - osl::MutexGuard aGuard( m_aMutex ); - - if ( m_pTickerThread.is() ) + rtl::Reference<TickerThread> pTickerThread; { - m_pTickerThread->finish(); - m_pTickerThread->join(); + osl::MutexGuard aGuard( m_aMutex ); + + if (!m_pTickerThread.is()) + { + return; // nothing to do + } + m_pTickerThread->finish(); // needs mutex + // the TickerThread may run refreshLocks() at most once after this + pTickerThread = m_pTickerThread; m_pTickerThread.clear(); } + + pTickerThread->join(); // without m_aMutex locked (to prevent deadlock) } void NeonLockStore::registerSession( HttpSession * pHttpSession ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
