summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-11 18:10:12 +0100
committerJan Holesovsky <kendy@suse.cz>2010-11-11 18:10:12 +0100
commit9724fefd3e4fbc392e6759e8907c1628b2b9e114 (patch)
treee6e1bd61fd6b7d6bce2551b6e24df0878560fae6
parent9b3fedce84fe20704c238e070ba64d60ad87b945 (diff)
parent2773f980e6c90d23a9c73b13e8dcba3dc3327559 (diff)
Merge commit 'ooo/OOO330_m14' into libreoffice-3-3
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx54
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/dp_package.cxx18
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 76126061f3..05511135e2 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -72,29 +72,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 &) {}
}
//------------------------------------------------------------------------------
@@ -964,6 +969,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 91873b471e..603f52414f 100644..100755
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -987,16 +987,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;
}
//______________________________________________________________________________