INTEGRATION: CWS fwk88 (1.75.20); FILE MERGED

2008/05/26 11:45:47 pb 1.75.20.2: fix: #i89054# about box: prepend the mws name to the build id
2008/05/22 09:07:44 pb 1.75.20.1: fix: #i76868# no squared brackets around the build id anymore (aboutbox)
This commit is contained in:
Rüdiger Timm 2008-06-20 06:11:31 +00:00
parent a2176f8d86
commit 499a1613b2

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: appserv.cxx,v $
* $Revision: 1.76 $
* $Revision: 1.77 $
*
* This file is part of OpenOffice.org.
*
@ -439,15 +439,38 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_ABOUT:
{
::rtl::OUString aDefault;
String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
::rtl::OUString sDefault;
String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
String sProductSource( utl::Bootstrap::getProductSource( sDefault ) );
OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" );
OSL_ENSURE( aVerId.Len() != 0, "No BUILDID in bootstrap file" );
// the product source is something like "DEV300", where the
// build id is something like "300m12(Build:12345)". For better readability,
// strip the duplicate UPD ("300").
if ( sProductSource.Len() )
{
bool bMatchingUPD =
( sProductSource.Len() >= 3 )
&& ( sBuildId.Len() >= 3 )
&& ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) );
OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" );
if ( bMatchingUPD )
sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 );
String aVersion( '[' );
( aVersion += aVerId ) += ']';
// prepend the product source
sBuildId.Insert( sProductSource, 0 );
}
// About-Dialog suchen
// the build id format is "milestone(build)[cwsname]". For readability, it would
// be nice to have some more spaces in there.
xub_StrLen nPos = 0;
if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND )
sBuildId.Insert( sal_Unicode( ' ' ), nPos );
if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND )
sBuildId.Insert( sal_Unicode( ' ' ), nPos );
// search for the resource of the about box
ResId aDialogResId( RID_DEFAULTABOUT, *pAppData_Impl->pLabelResMgr );
ResMgr* pResMgr = pAppData_Impl->pLabelResMgr;
if( ! pResMgr->IsAvailable( aDialogResId.SetRT( RSC_MODALDIALOG ) ) )
@ -456,11 +479,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
aDialogResId.SetResMgr( pResMgr );
if ( !pResMgr->IsAvailable( aDialogResId ) )
{
DBG_ERROR( "No RID_DEFAULTABOUT in label-resource-dll" );
DBG_ERRORFILE( "No RID_DEFAULTABOUT in label-resource-dll" );
}
// About-Dialog anzeigen
AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, aVersion );
// then show the about box
AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, sBuildId );
pDlg->Execute();
delete pDlg;
bDone = TRUE;