#i10000# changes from OOO330 m14

This commit is contained in:
Vladimir Glazunov 2010-11-09 14:49:47 +01:00
commit 890f3d963e
3 changed files with 40 additions and 26 deletions

View file

@ -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;

View file

@ -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();
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;
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 );
// 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;
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);

View file

@ -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 m_oldDescription;
}
//______________________________________________________________________________