diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 15 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 23 |
3 files changed, 42 insertions, 0 deletions
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 962eac3a716e..85191e6666fb 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -151,6 +151,10 @@ interface Application [ ExecMethod = MiscExec_Impl ; ] + SID_Q_AND_A + [ + ExecMethod = MiscExec_Impl ; + ] SID_SHOW_LICENSE [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 3edca8d4162a..023c84af7dd0 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -5064,6 +5064,21 @@ SfxVoidItem SendFeedback SID_SEND_FEEDBACK ToolBoxConfig = TRUE, GroupId = GID_APPLICATION; ] +SfxVoidItem QuestionAnswers SID_Q_AND_A +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + GroupId = GID_APPLICATION; +] SfxVoidItem ShowLicense SID_SHOW_LICENSE diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 1f2c3dda91ef..7a0d18a3f7ee 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -451,6 +451,29 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } + case SID_Q_AND_A: + { + // Askbot has URL's normalized to languages, not locales + // Get language from locale: ll or lll or ll-CC or lll-CC + sal_Int32 ix = utl::ConfigManager::getLocale().indexOf("-",0); + OUString aLang; + if (ix == -1) + aLang = utl::ConfigManager::getLocale(); + else + aLang = utl::ConfigManager::getLocale().copy(0,ix); + + OUString sURL("http://hub.libreoffice.org/forum/?&LOlang=" + aLang); + try + { + uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute( + css::system::SystemShellExecute::create(::comphelper::getProcessComponentContext()) ); + xSystemShellExecute->execute( sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY ); + } + catch ( uno::Exception& ) + { + } + break; + } case SID_SHOW_LICENSE: { ScopedVclPtrInstance< LicenseDialog > aDialog; |