diff options
-rw-r--r-- | sc/inc/global.hxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 3 |
4 files changed, 12 insertions, 15 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 6b03dc4be746..f8555b4c0609 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -575,9 +575,9 @@ public: SC_DLLPUBLIC static ScUserList* GetUserList(); static void SetUserList( const ScUserList* pNewList ); SC_DLLPUBLIC static const OUString& GetRscString( sal_uInt16 nIndex ); - static void OpenURL( const OUString& rURL, const OUString& rTarget ); - // Check if tiled-rendering, and leave clients to handle the openURL action if that's the case, OpenURL otherwise. - static void OpenURL( const SdrModel* pDrawLayer, const OUString& rURL, const OUString& rTarget ); + /// Open the specified URL. + /// If pDrawLayer is specified, check if tiled-rendering, and leave clients to handle the openURL action if that's the case. + static void OpenURL(const OUString& rURL, const OUString& rTarget, const SdrModel* pDrawLayer = NULL); SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName, SfxObjectShell* pShell ); SC_DLLPUBLIC static OUString GetDocTabName( const OUString& rFileName, diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 81b28d53dbe4..d71154dbecd6 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -867,18 +867,14 @@ bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1, return false; } - -void ScGlobal::OpenURL( const SdrModel* pDrawLayer, const OUString& rURL, const OUString& rTarget ) { - if (pDrawLayer && pDrawLayer->isTiledRendering()) { - pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); - return; +void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, const SdrModel* pDrawLayer) +{ + if (pDrawLayer && pDrawLayer->isTiledRendering()) + { + pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); + return; } - // Proceed to openURL if not tiled rendering. - OpenURL(rURL, rTarget); -} -void ScGlobal::OpenURL( const OUString& rURL, const OUString& rTarget ) -{ // OpenURL is always called in the GridWindow by mouse clicks in some way or another. // That's why pScActiveViewShell and nScClickMouseModifier are correct. // SvtSecurityOptions to access Libreoffice global security parameters diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 3063bdf74f0c..da733b92eb60 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2295,7 +2295,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // ScGlobal::OpenURL() only understands Calc A1 style syntax. // Convert it to Calc A1 before calling OpenURL(). if (pDoc->GetAddressConvention() == formula::FormulaGrammar::CONV_OOO) - ScGlobal::OpenURL(pViewData->GetDocument()->GetDrawLayer(), aUrl, aTarget); + ScGlobal::OpenURL(aUrl, aTarget, pViewData->GetDocument()->GetDrawLayer()); else { ScAddress aTempAddr; diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 1ace237480d3..0cb164db2a53 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -269,7 +269,8 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) mpWindow->ReleaseMouse(); // If tiled rendering, let client handles URL execution and early returns. - if (mpDoc->isTiledRendering()) { + if (mpDoc->isTiledRendering()) + { mpDoc->libreOfficeKitCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); return true; |