[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sc/inc sc/source sd/source
Jan Holesovsky
kendy at collabora.com
Wed Mar 11 03:59:50 PDT 2015
sc/inc/global.hxx | 6 +++---
sc/source/core/data/global.cxx | 16 ++++++----------
sc/source/ui/view/gridwin.cxx | 2 +-
sd/source/ui/func/fusel.cxx | 3 ++-
4 files changed, 12 insertions(+), 15 deletions(-)
New commits:
commit 99117a3e75670cb2d9961b943aadbd28e3a6d10a
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Mar 11 11:14:07 2015 +0100
Small cleanup - no need to have 2 OpenURL's.
Change-Id: Ib76729004f36e087aaf5a6089a60675c606e9070
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 6b03dc4b..f8555b4 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 81b28d5..d71154d 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 c90ac59..ccdc037 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2292,7 +2292,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 1ace237..0cb164d 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;
More information about the Libreoffice-commits
mailing list