From 6a41cef3f9972a88de378a1117697199dbf1d436 Mon Sep 17 00:00:00 2001 From: pv2k Date: Mon, 28 Nov 2016 21:48:43 +0530 Subject: 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 Tested-by: Katarina Behrens --- sfx2/source/appl/sfxhelp.cxx | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'sfx2/source/appl/sfxhelp.cxx') 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() ); -- cgit v1.2.3