diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-11-06 16:46:04 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-11-06 16:46:04 +0100 |
commit | 2773f980e6c90d23a9c73b13e8dcba3dc3327559 (patch) | |
tree | f8abf114bf5c10cd4de5a126e9edc7b30ad72d16 | |
parent | b6ca2bf057b394e06620ea4d1b54b2b154b5d2e5 (diff) | |
parent | 8a8ad9dc540246fa1b8531e929668ef80184798c (diff) |
CWS-TOOLING: integrate CWS tl88ooo/OOO330_m14
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 54 | ||||
-rwxr-xr-x[-rw-r--r--] | desktop/source/deployment/registry/package/dp_package.cxx | 18 |
2 files changed, 43 insertions, 29 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index e1e517a55c..f689783d17 100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -71,29 +71,34 @@ Entry_Impl::Entry_Impl( const uno::Reference< deployment::XPackage > &xPackage, m_pPublisher( NULL ), m_xPackage( xPackage ) { - m_sTitle = xPackage->getDisplayName(); - m_sVersion = xPackage->getVersion(); - m_sDescription = xPackage->getDescription(); - - beans::StringPair aInfo( m_xPackage->getPublisherInfo() ); - m_sPublisher = aInfo.First; - m_sPublisherURL = aInfo.Second; - - // get the icons for the package if there are any - uno::Reference< graphic::XGraphic > xGraphic = xPackage->getIcon( false ); - if ( xGraphic.is() ) - m_aIcon = Image( xGraphic ); - - xGraphic = xPackage->getIcon( true ); - if ( xGraphic.is() ) - m_aIconHC = Image( xGraphic ); - else - m_aIconHC = m_aIcon; + try + { + m_sTitle = xPackage->getDisplayName(); + m_sVersion = xPackage->getVersion(); + m_sDescription = xPackage->getDescription(); + + beans::StringPair aInfo( m_xPackage->getPublisherInfo() ); + m_sPublisher = aInfo.First; + m_sPublisherURL = aInfo.Second; + + // get the icons for the package if there are any + uno::Reference< graphic::XGraphic > xGraphic = xPackage->getIcon( false ); + if ( xGraphic.is() ) + m_aIcon = Image( xGraphic ); + + xGraphic = xPackage->getIcon( true ); + if ( xGraphic.is() ) + m_aIconHC = Image( xGraphic ); + else + m_aIconHC = m_aIcon; - if ( eState == AMBIGUOUS ) - m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS ); - else if ( eState == NOT_REGISTERED ) - checkDependencies(); + if ( eState == AMBIGUOUS ) + m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS ); + else if ( eState == NOT_REGISTERED ) + checkDependencies(); + } + catch (deployment::ExtensionRemovedException &) {} + catch (uno::RuntimeException &) {} } //------------------------------------------------------------------------------ @@ -963,6 +968,11 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & bool bLocked = m_pManager->isReadOnly( xPackage ); TEntry_Impl pEntry( new Entry_Impl( xPackage, eState, bLocked ) ); + + // Don't add empty entries + if ( ! pEntry->m_sTitle.Len() ) + return 0; + xPackage->addEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) ); ::osl::ClearableMutexGuard guard(m_entriesMutex); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 6209aad0d0..6928e6bc1d 100644..100755 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -986,16 +986,20 @@ OUString BackendImpl::PackageImpl::getDescription() if (sRelativeURL.getLength()) { OUString sURL = m_url_expanded + OUSTR("/") + sRelativeURL; - sDescription = getTextFromURL( - css::uno::Reference< css::ucb::XCommandEnvironment >(), sURL); + try + { + sDescription = getTextFromURL( css::uno::Reference< css::ucb::XCommandEnvironment >(), sURL ); + } + catch ( css::deployment::DeploymentException& ) + { + OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() ); + } } + if (sDescription.getLength()) - return sDescription; - else if(m_oldDescription.getLength()) - return m_oldDescription; - else - return OUString(); + return sDescription; + return m_oldDescription; } //______________________________________________________________________________ |