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:
parent
a2176f8d86
commit
499a1613b2
1 changed files with 33 additions and 10 deletions
|
@ -7,7 +7,7 @@
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: appserv.cxx,v $
|
* $RCSfile: appserv.cxx,v $
|
||||||
* $Revision: 1.76 $
|
* $Revision: 1.77 $
|
||||||
*
|
*
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
|
@ -439,15 +439,38 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
case SID_ABOUT:
|
case SID_ABOUT:
|
||||||
{
|
{
|
||||||
::rtl::OUString aDefault;
|
::rtl::OUString sDefault;
|
||||||
String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
|
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( '[' );
|
// prepend the product source
|
||||||
( aVersion += aVerId ) += ']';
|
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 );
|
ResId aDialogResId( RID_DEFAULTABOUT, *pAppData_Impl->pLabelResMgr );
|
||||||
ResMgr* pResMgr = pAppData_Impl->pLabelResMgr;
|
ResMgr* pResMgr = pAppData_Impl->pLabelResMgr;
|
||||||
if( ! pResMgr->IsAvailable( aDialogResId.SetRT( RSC_MODALDIALOG ) ) )
|
if( ! pResMgr->IsAvailable( aDialogResId.SetRT( RSC_MODALDIALOG ) ) )
|
||||||
|
@ -456,11 +479,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
|
||||||
aDialogResId.SetResMgr( pResMgr );
|
aDialogResId.SetResMgr( pResMgr );
|
||||||
if ( !pResMgr->IsAvailable( aDialogResId ) )
|
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
|
// then show the about box
|
||||||
AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, aVersion );
|
AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, sBuildId );
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
delete pDlg;
|
||||||
bDone = TRUE;
|
bDone = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue