[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 5 commits - desktop/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Thu Nov 11 09:27:36 PST 2010
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 54 ++++++++------
desktop/source/deployment/registry/package/dp_package.cxx | 18 ++--
2 files changed, 43 insertions(+), 29 deletions(-)
New commits:
commit 9724fefd3e4fbc392e6759e8907c1628b2b9e114
Merge: 9b3fedc... 2773f98...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Thu Nov 11 18:10:12 2010 +0100
Merge commit 'ooo/OOO330_m14' into libreoffice-3-3
diff --cc desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 7612606,f689783..0551113
mode 100644,100755..100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
diff --cc desktop/source/deployment/registry/package/dp_package.cxx
index 91873b4,6928e6b..603f524
mode 100644,100755..100755
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
commit 2773f980e6c90d23a9c73b13e8dcba3dc3327559
Merge: b6ca2bf... 8a8ad9d...
Author: Kurt Zenker <kz at openoffice.org>
Date: Sat Nov 6 16:46:04 2010 +0100
CWS-TOOLING: integrate CWS tl88
commit b6ca2bf057b394e06620ea4d1b54b2b154b5d2e5
Merge: 49dc64e... 33f4cc0...
Author: Kurt Zenker <kz at openoffice.org>
Date: Fri Nov 5 16:40:54 2010 +0100
CWS-TOOLING: integrate CWS jsc331
commit 8a8ad9dc540246fa1b8531e929668ef80184798c
Author: Dirk Voelzke <dv at openoffice.org>
Date: Thu Nov 4 11:01:57 2010 +0100
tl88:#i100744# Better exception handling while retrieving information from packages
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index e1e517a..f689783 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
old mode 100644
new mode 100755
index 6209aad..6928e6b
--- 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;
}
//______________________________________________________________________________
commit 33f4cc0f7d0807937a51b0475db5466216d65473
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Mon Nov 1 11:07:18 2010 +0100
jsc331: i115237: add missing not operator
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index 7551a58..8abfbea 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -91,7 +91,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
{
if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_TRUE ) ) )
nRes = SbxTRUE;
- else if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) )
+ else if( !p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) )
{
// Jetzt kann es noch in eine Zahl konvertierbar sein
BOOL bError = TRUE;
More information about the Libreoffice-commits
mailing list