From dcd8e4664d9a284c24ceb0360cab0606b22cf86d Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 7 Jan 2011 17:14:47 +0100 Subject: removetooltypes: #i112600# remove tooltypes --- sfx2/source/appl/appmisc.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sfx2/source/appl/appmisc.cxx') diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 94b921f8122e..6471c4eca140 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -174,7 +174,7 @@ void SfxApplication::InitializeDisplayName_Impl() // create version string /*!!! (pb) don't show a version number at the moment - USHORT nProductVersion = ProductVersion::GetVersion().ToInt32(); + sal_uInt16 nProductVersion = ProductVersion::GetVersion().ToInt32(); String aVersion( String::CreateFromInt32( nProductVersion / 10 ) ); aVersion += 0x002E ; // 2Eh ^= '.' aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) ); @@ -237,8 +237,8 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl() pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ ); } - BOOL bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled(); - BOOL bSlots = ( pStream && !pStream->GetError() ); + sal_Bool bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled(); + sal_Bool bSlots = ( pStream && !pStream->GetError() ); if( bSlots && bSlotsEnabled ) { // SlotDatei einlesen @@ -305,7 +305,7 @@ SfxModule* SfxApplication::GetModule_Impl() { SfxModule* pModule = SfxModule::GetActiveModule(); if ( !pModule ) - pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( FALSE ) ); + pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( sal_False ) ); if( pModule ) return pModule; else @@ -327,7 +327,7 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind } SfxResourceManager& SfxApplication::GetResourceManager() const { return *pAppData_Impl->pResMgr; } -BOOL SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; } +sal_Bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; } SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; } SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl->pSlotPool; } //SfxOptions& SfxApplication::GetOptions() { return *pAppData_Impl->pOptions; } -- cgit From 9b73b029b91f96922c055206ee820ea6b42647d6 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 12 Jan 2011 11:56:09 +0100 Subject: CWS gnumake3: #i86790#: clean up mess with ooo+iso resource files --- sfx2/source/appl/appmisc.cxx | 115 ++++++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 46 deletions(-) (limited to 'sfx2/source/appl/appmisc.cxx') diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 94b921f8122e..f7a8bc98391b 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -29,9 +29,7 @@ #include "precompiled_sfx2.hxx" #include #include -#ifndef _VOS_PROCESS_HXX //autogen #include -#endif #include #include #include @@ -41,9 +39,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_BEANS_PropertyValue_HPP_ #include -#endif #include #include #include @@ -51,11 +47,8 @@ #include #include #include -#ifndef GCC -#endif #include #include - #include #include #include @@ -63,6 +56,7 @@ #include #include #include +#include #include "sfx2/sfxresid.hxx" #include @@ -159,45 +153,6 @@ SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP)) SFX_CHILDWINDOW_REGISTRATION(SID_DOCKWIN_9); } -//-------------------------------------------------------------------- - -void SfxApplication::InitializeDisplayName_Impl() -{ - SfxAppData_Impl* pAppData = Get_Impl(); - if ( !pAppData->pLabelResMgr ) - return; - - String aTitle = Application::GetDisplayName(); - if ( !aTitle.Len() ) - { - OClearableGuard aGuard( OMutex::getGlobalMutex() ); - - // create version string -/*!!! (pb) don't show a version number at the moment - USHORT nProductVersion = ProductVersion::GetVersion().ToInt32(); - String aVersion( String::CreateFromInt32( nProductVersion / 10 ) ); - aVersion += 0x002E ; // 2Eh ^= '.' - aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) ); -*/ - // load application title - aTitle = String( ResId( RID_APPTITLE, *pAppData->pLabelResMgr ) ); - // merge version into title - aTitle.SearchAndReplaceAscii( "$(VER)", String() /*aVersion*/ ); - - aGuard.clear(); - -#ifdef DBG_UTIL - ::rtl::OUString aDefault; - aTitle += DEFINE_CONST_UNICODE(" ["); - - String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); - aTitle += aVerId; - aTitle += ']'; -#endif - Application::SetDisplayName( aTitle ); - } -} - //-------------------------------------------------------------------- SfxProgress* SfxApplication::GetProgress() const @@ -333,3 +288,71 @@ SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl //SfxOptions& SfxApplication::GetOptions() { return *pAppData_Impl->pOptions; } //const SfxOptions& SfxApplication::GetOptions() const { return *pAppData_Impl->pOptions; } +static bool impl_loadBitmap( + const rtl::OUString &rPath, const rtl::OUString &rBmpFileName, + Image &rLogo ) +{ + rtl::OUString uri( rPath ); + rtl::Bootstrap::expandMacros( uri ); + INetURLObject aObj( uri ); + aObj.insertName( rBmpFileName ); + SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ ); + if ( !aStrm.GetError() ) + { + // Use graphic class to also support more graphic formats (bmp,png,...) + Graphic aGraphic; + + GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); + pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW ); + + // Default case, we load the intro bitmap from a seperate file + // (e.g. staroffice_intro.bmp or starsuite_intro.bmp) + BitmapEx aBmp = aGraphic.GetBitmapEx(); + rLogo = Image( aBmp ); + return true; + } + return false; +} + +/** loads the application logo as used in the about dialog and impress slideshow pause screen */ +Image SfxApplication::GetApplicationLogo() +{ + Image aAppLogo; + + rtl::OUString aAbouts; + bool bLoaded = false; + sal_Int32 nIndex = 0; + do + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + aAbouts.getToken( 0, ',', nIndex ), aAppLogo ); + } + while ( !bLoaded && ( nIndex >= 0 ) ); + + // fallback to "about.bmp" + if ( !bLoaded ) + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), + rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); + if ( !bLoaded ) + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), + rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); + } + + if ( !bLoaded ) + { + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + rtl::OUString::createFromAscii( "about.png" ), aAppLogo ); + if ( !bLoaded ) + bLoaded = impl_loadBitmap( + rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), + rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); + } + + return aAppLogo; +} + -- cgit From 17685bd4d09032520847cff073c1a62139c16ab9 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 8 Feb 2011 14:31:08 +0100 Subject: CWS gnumake3: resolve conflicts after pulling in cws removetooltypes01 --- sfx2/source/appl/appmisc.cxx | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'sfx2/source/appl/appmisc.cxx') diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 1fdbe5f77107..eafe9d262189 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -154,48 +154,6 @@ SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP)) } //-------------------------------------------------------------------- -<<<<<<< local -======= - -void SfxApplication::InitializeDisplayName_Impl() -{ - SfxAppData_Impl* pAppData = Get_Impl(); - if ( !pAppData->pLabelResMgr ) - return; - - String aTitle = Application::GetDisplayName(); - if ( !aTitle.Len() ) - { - OClearableGuard aGuard( OMutex::getGlobalMutex() ); - - // create version string -/*!!! (pb) don't show a version number at the moment - sal_uInt16 nProductVersion = ProductVersion::GetVersion().ToInt32(); - String aVersion( String::CreateFromInt32( nProductVersion / 10 ) ); - aVersion += 0x002E ; // 2Eh ^= '.' - aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) ); -*/ - // load application title - aTitle = String( ResId( RID_APPTITLE, *pAppData->pLabelResMgr ) ); - // merge version into title - aTitle.SearchAndReplaceAscii( "$(VER)", String() /*aVersion*/ ); - - aGuard.clear(); - -#ifdef DBG_UTIL - ::rtl::OUString aDefault; - aTitle += DEFINE_CONST_UNICODE(" ["); - - String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); - aTitle += aVerId; - aTitle += ']'; -#endif - Application::SetDisplayName( aTitle ); - } -} - -//-------------------------------------------------------------------- ->>>>>>> other SfxProgress* SfxApplication::GetProgress() const /* [Beschreibung] -- cgit