diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-11-24 10:58:25 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-11-24 10:58:25 +0000 |
commit | ed90a6682330b8745b35438dc4cb15a960a05198 (patch) | |
tree | c06e91df92752639f7fb289337e0000af6583b42 | |
parent | a2663ba50430a1ae7075b81179530baac347b840 (diff) |
CWS-TOOLING: integrate CWS dv16
2009-11-23 10:05:46 +0100 jsk r277590 : dv16: (no issue-id) - in some cases it takes longer than 10ms to open the hyphenation dialog. Allowed a max of 2 seconds for that
2009-11-23 07:13:17 +0100 dv r277589 : #i106978# Fixed dangerous debugging code
2009-11-19 12:54:29 +0100 dv r277559 : #i106978# the extension manager should set an interaction handler when looking for updates
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 8 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 10 | ||||
-rw-r--r-- | extensions/source/update/feed/updatefeed.cxx | 6 |
3 files changed, 19 insertions, 5 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index fd9e8cae9..ea8f76ce5 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -1528,6 +1528,8 @@ void UpdateCheck::showExtensionDialog() rtl::Reference<UpdateHandler> UpdateCheck::getUpdateHandler() { + osl::MutexGuard aGuard(m_aMutex); + if( ! m_aUpdateHandler.is() ) m_aUpdateHandler = new UpdateHandler(m_xContext, this); @@ -1540,12 +1542,12 @@ uno::Reference< task::XInteractionHandler > UpdateCheck::getInteractionHandler() const { osl::MutexGuard aGuard(m_aMutex); - + uno::Reference< task::XInteractionHandler > xHandler; - + if( m_aUpdateHandler.is() && m_aUpdateHandler->isVisible() ) xHandler = m_aUpdateHandler.get(); - + return xHandler; } diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index d75386bf7..fb34016c9 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -200,6 +200,10 @@ void UpdateHandler::setVisible( bool bVisible ) if ( !mxUpdDlg.is() ) createDialog(); + // this should never happen, but if it happens we better return here + if ( !mxUpdDlg.is() ) + return; + updateState( meCurState ); uno::Reference< awt::XWindow > xWindow( mxUpdDlg, uno::UNO_QUERY ); @@ -1032,6 +1036,12 @@ void UpdateHandler::showControls( short nControls ) //-------------------------------------------------------------------- void UpdateHandler::createDialog() { + if ( !mxContext.is() ) + { + OSL_ASSERT( false ); + return; + } + uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager() ); if( xServiceManager.is() ) diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index e0182745d..59b971d38 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -114,14 +114,16 @@ public: throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) { sal_Int32 n = m_xStream->readBytes(aData, nBytesToRead); - OSL_TRACE( aData.get()->elements ); + if ( n ) + OSL_TRACE( "Read [%d] bytes: %s\n", n, aData.get()->elements ); return n; }; virtual sal_Int32 SAL_CALL readSomeBytes(uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) { sal_Int32 n = m_xStream->readSomeBytes(aData, nMaxBytesToRead); - OSL_TRACE( aData.get()->elements ); + if ( n ) + OSL_TRACE( "Read [%d] bytes: %s\n", n, aData.get()->elements ); return n; }; virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) |