diff options
author | Mathias Bauer <mba@openoffice.org> | 2011-01-12 11:56:09 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2011-01-12 11:56:09 +0100 |
commit | 9b73b029b91f96922c055206ee820ea6b42647d6 (patch) | |
tree | afc2a8b6665fc2ca1a545c18c128983ceb370de2 /sfx2/source/appl/appserv.cxx | |
parent | f27dec459621543c9dcd94c72ab6af8147b8b4d6 (diff) |
CWS gnumake3: #i86790#: clean up mess with ooo+iso resource files
Diffstat (limited to 'sfx2/source/appl/appserv.cxx')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 91 |
1 files changed, 9 insertions, 82 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index c1858c5b33fb..d44839a0140f 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -87,7 +87,6 @@ #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include "about.hxx" #include "frmload.hxx" #include "referers.hxx" #include <sfx2/app.hxx> @@ -129,7 +128,7 @@ #include <sfx2/dialogs.hrc> #include "sorgitm.hxx" #include "sfx2/sfxhelp.hxx" -#include <tools/svlibrary.hxx>
+#include <tools/svlibrary.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -429,86 +428,14 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: { - const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) ); - rtl::OUString sDefault; - String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); - OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); - if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND ) - { - // no cws part in brand buildid -> try basis buildid - rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING( - "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) ); - rtl::Bootstrap::expandMacros( sBasisBuildId ); - sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema ); - if ( nIndex != -1 ) - sBuildId += String( sBasisBuildId.copy( nIndex ) ); - } - - String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); - OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource 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 ); - - // prepend the product source - sBuildId.Insert( sProductSource, 0 ); - } - - // --> PB 2008-10-30 #i94693# - /* if the build ids of the basis or ure layer are different from the build id - * of the brand layer then show them */ - rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING( - "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); - rtl::Bootstrap::expandMacros( aBasisProductBuildId ); - rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING( - "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); - rtl::Bootstrap::expandMacros( aUREProductBuildId ); - if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND - || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND ) - { - String sTemp( '-' ); - sTemp += String( aBasisProductBuildId ); - sTemp += '-'; - sTemp += String( aUREProductBuildId ); - sBuildId.Insert( sTemp, sBuildId.Search( ')' ) ); - } - // <-- - - // 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 ) ) ) - pResMgr = GetOffResManager_Impl(); - - aDialogResId.SetResMgr( pResMgr ); - if ( !pResMgr->IsAvailable( aDialogResId ) ) + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + if ( pFact ) { - DBG_ERRORFILE( "No RID_DEFAULTABOUT in label-resource-dll" ); + VclAbstractDialog* pDlg = pFact->CreateVclDialog( 0, RID_DEFAULTABOUT ); + pDlg->Execute(); + delete pDlg; + bDone = TRUE; } - - // then show the about box - AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, sBuildId ); - pDlg->Execute(); - delete pDlg; - bDone = TRUE; break; } @@ -746,7 +673,7 @@ extern "C" { static void SAL_CALL thisModule() {} } ::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() ) { // get basctl dllname - static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( @@ -766,7 +693,7 @@ extern "C" { static void SAL_CALL thisModule() {} } void MacroOrganizer( INT16 nTabId ) { // get basctl dllname - static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) ); // load module oslModule handleMod = osl_loadModuleRelative( |