summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorpv2k <vidhey96@gmail.com>2016-11-28 21:48:43 +0530
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-01-11 11:21:55 +0000
commit6a41cef3f9972a88de378a1117697199dbf1d436 (patch)
tree9b648b964380119d5ed29a04024333a0fe3d2f56 /sfx2/source/appl
parent618785dfd28a6cf8f075371afd451b6440718e07 (diff)
tdf#103391: ask user whether to open online help
opens a dialog box from which user can choose to take online help or cancel it Change-Id: I8c1278aab88d55901a65c38b15fcc8519360dc59 Reviewed-on: https://gerrit.libreoffice.org/31385 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6586e79a8f31..80117d0a8916 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -611,12 +611,25 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
if ( !impl_hasHelpInstalled() )
{
- if ( impl_showOnlineHelp( aHelpURL ) )
- return true;
+ ScopedVclPtrInstance< MessageDialog > aQueryBox(const_cast< vcl::Window* >( pWindow ),"onlinehelpmanual","sfx/ui/helpmanual.ui");
+ short OnlineHelpBox = aQueryBox->Execute();
+
+ if(OnlineHelpBox == RET_OK)
+ {
+ if ( impl_showOnlineHelp( aHelpURL ) )
+ return true;
+ else
+ {
+ ScopedVclPtrInstance< NoHelpErrorBox > aErrBox(const_cast< vcl::Window* >( pWindow ));
+ aErrBox->Execute();
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
- ScopedVclPtrInstance< NoHelpErrorBox > aErrBox(const_cast< vcl::Window* >( pWindow ));
- aErrBox->Execute();
- return false;
}
Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );