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:30:55 +0100 |
commit | cdef8a2ad1ec3c85a09c7eb92121e039d4260ae0 (patch) | |
tree | 9e07ed030116f75048d27c8465c4a63e5dc32c66 /sfx2/source/appl/appserv.cxx | |
parent | 43f677c0f8e2824bb20f27f43b2b20bd95e552e8 (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.
Diffstat (limited to 'sfx2/source/appl/appserv.cxx')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
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 &) { |