[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/sdi sw/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Sun Aug 1 13:19:24 UTC 2021
sw/sdi/_drwbase.sdi | 6 ++++++
sw/source/uibase/shells/drwbassh.cxx | 14 ++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
New commits:
commit a823c7d5423272c262c9787e9f4a5ece135f5ed1
Author: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Tue Jul 27 14:10:27 2021 +0200
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Sun Aug 1 15:18:50 2021 +0200
tdf#123626 Add "Open hyperlink" context menu to hyperlinked shapes
Was missing in a23b44fd9f0119f7ea3523e32875f55c1a07c1cd
Change-Id: Ifcee4af79a00c77206be4c2d5ff621f56f2d0018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119551
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
(cherry picked from commit 3c6b0322e2dc897bdd986afe0fe876a5d429528a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119587
Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/sw/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi
index e90d50cb92fb..6c700380ed10 100644
--- a/sw/sdi/_drwbase.sdi
+++ b/sw/sdi/_drwbase.sdi
@@ -117,6 +117,12 @@ interface BaseTextDrawBase
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ SID_OPEN_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
SID_EDIT_HYPERLINK
[
ExecMethod = Execute ;
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index c1ebca01d1c0..e5b4bb177ae0 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -611,6 +611,15 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
break;
}
+ case SID_OPEN_HYPERLINK:
+ {
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ LoadURL(GetShell(), pObj->getHyperlink(), LoadUrlFlags::NewView,
+ /*rTargetFrameName=*/OUString());
+ break;
+ }
+
case SID_EDIT_HYPERLINK:
case SID_HYPERLINK_DIALOG:
{
@@ -782,6 +791,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
}
break;
+ case SID_OPEN_HYPERLINK:
case SID_EDIT_HYPERLINK:
case SID_HYPERLINK_DIALOG:
case SID_REMOVE_HYPERLINK:
@@ -789,8 +799,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
{
if (pSdrView->GetMarkedObjectCount() != 1)
rSet.DisableItem(nWhich);
- else if (nWhich == SID_REMOVE_HYPERLINK || nWhich == SID_EDIT_HYPERLINK
- || nWhich == SID_COPY_HYPERLINK_LOCATION)
+ else if (nWhich == SID_OPEN_HYPERLINK || nWhich == SID_REMOVE_HYPERLINK
+ || nWhich == SID_EDIT_HYPERLINK || nWhich == SID_COPY_HYPERLINK_LOCATION)
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
More information about the Libreoffice-commits
mailing list