summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-03-11 11:14:07 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-16 09:38:07 +0100
commitea607240291126b4c9eb73dadcb83ede560eb080 (patch)
treea9ee978ae88104b9a1159b73fc5da81c62e7b8e1 /sc
parentbd3771e1057ae90875d312faa4c30645627260e3 (diff)
Small cleanup - no need to have 2 OpenURL's.
Change-Id: Ib76729004f36e087aaf5a6089a60675c606e9070
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/global.hxx6
-rw-r--r--sc/source/core/data/global.cxx16
-rw-r--r--sc/source/ui/view/gridwin.cxx2
3 files changed, 10 insertions, 14 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;