diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2010-11-05 14:30:55 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2010-11-05 14:33:04 +0100 |
commit | 73fd3185793f9c2ec0c5c4b6967c89bd82ec070f (patch) | |
tree | bef773a21622a445d44073d4038644790de95b1c /sfx2 | |
parent | 270ea0f6c86bff40978c4faa27db6a957dde8860 (diff) |
Adds extra credits item to help menu
As agreed on yesterday, we want a dedicated credits document
displayed from the help menu. This is the UI/code change for that,
actual credits doc still missing.
(cherry picked from commit 00d6d03478bc8ddb3ebd07ff47f54c9668c242d9)
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/sfxsids.hrc | 1 | ||||
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rwxr-xr-x | sfx2/sdi/sfx.sdi | 25 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 25 |
4 files changed, 52 insertions, 3 deletions
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 9ceb40d0fbdf..a0b8282895a3 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -126,6 +126,7 @@ #define SID_HELP_HELPFILEBOX (SID_SFX_START + 419) #define SID_HELP_HELPFILEBOX_SELECTED (SID_SFX_START + 420) #define SID_SHOW_LICENSE (SID_SFX_START + 1683) +#define SID_SHOW_CREDITS (SID_SFX_START + 1684) #define SID_HELP_TUTORIALS (SID_SFX_START + 1695) // default-ids for document diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index e08b093f6948..3bd2bc8b1e02 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -171,6 +171,10 @@ interface Application [ ExecMethod = MiscExec_Impl ; ] + SID_SHOW_CREDITS + [ + ExecMethod = MiscExec_Impl ; + ] SID_RECENTFILELIST [ ] diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 050be70a5881..e49a178f3823 100755 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -7391,6 +7391,31 @@ SfxVoidItem ShowLicense SID_SHOW_LICENSE ] //-------------------------------------------------------------------------- +SfxVoidItem ShowCredits SID_SHOW_CREDITS +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_APPLICATION; +] + +//-------------------------------------------------------------------------- SfxVoidItem HelpTutorials SID_HELP_TUTORIALS () [ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 8c3716b56177..2d78f0ca0c8d 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -356,6 +356,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } + case SID_SHOW_CREDITS: case SID_SHOW_LICENSE: { try { @@ -367,9 +368,27 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) args[1].Value <<= sal_True; rtl::OUString aURL; - if ( checkURL ( "LICENSE.odt", aURL ) || - checkURL ( "LICENSE.html", aURL ) || - checkURL ( "LICENSE", aURL ) ) { + char const** pNames; + if( rReq.GetSlot() == SID_SHOW_LICENSE ) + { + static char const* pLicenseStrings[] = + { + "LICENSE.odt", "LICENSE.html", "LICENSE" + }; + pNames = pLicenseStrings; + } + else + { + static char const* pCreditsStrings[] = + { + "CREDITS.odt", "CREDITS.html", "CREDITS" + }; + pNames = pCreditsStrings; + } + + if ( checkURL ( pNames[0], aURL ) || + checkURL ( pNames[1], aURL ) || + checkURL ( pNames[2], aURL ) ) { xLoader->loadComponentFromURL( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, args ); } } catch (const ::com::sun::star::uno::Exception &) { |