diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-08-05 09:53:56 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-08-05 10:52:03 +0200 |
commit | fe0c93b7526ba6bab98d3f12f16c0b863a82fa9c (patch) | |
tree | 153521a1690e5d8b5d6ef48944cb8bac03d1b940 | |
parent | 0dab89d88f6b42065033f64b69a6e04a31d477d6 (diff) |
No need for extra uno commands for shape hyperlinks
Change-Id: Ibf5987f543d4e1a767a7a5ae6a855f7eb883bfae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120056
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
26 files changed, 78 insertions, 165 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index dfbee77167b8..927f24fa26ca 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1296,7 +1296,7 @@ void DesktopLOKTest::testContextMenuCalc() // Remove hyperlink is disabled { - boost::optional<boost::property_tree::ptree> aMenuItem = getContextMenuItem(aMenu.get(), ".uno:DeleteShapeHyperlink"); + boost::optional<boost::property_tree::ptree> aMenuItem = getContextMenuItem(aMenu.get(), ".uno:RemoveHyperlink"); CPPUNIT_ASSERT(aMenuItem); boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled"); diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt index f737e3e55cc4..be27fcf7f1ca 100644 --- a/icon-themes/breeze/links.txt +++ b/icon-themes/breeze/links.txt @@ -2846,22 +2846,16 @@ cmd/sc_namegroup.png cmd/sc_label.png # =============================================== cmd/32/convertmenu.png cmd/32/bezierconvert.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/mirrormenu.png cmd/32/rotateleft.png cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png cmd/32/rotateflipmenu.png cmd/32/rotateleft.png cmd/lc_convertmenu.png cmd/lc_bezierconvert.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_mirrormenu.png cmd/lc_rotateleft.png cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png cmd/sc_convertmenu.png cmd/sc_bezierconvert.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_mirrormenu.png cmd/sc_rotateleft.png cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png diff --git a/icon-themes/breeze_dark/links.txt b/icon-themes/breeze_dark/links.txt index f737e3e55cc4..be27fcf7f1ca 100644 --- a/icon-themes/breeze_dark/links.txt +++ b/icon-themes/breeze_dark/links.txt @@ -2846,22 +2846,16 @@ cmd/sc_namegroup.png cmd/sc_label.png # =============================================== cmd/32/convertmenu.png cmd/32/bezierconvert.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/mirrormenu.png cmd/32/rotateleft.png cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png cmd/32/rotateflipmenu.png cmd/32/rotateleft.png cmd/lc_convertmenu.png cmd/lc_bezierconvert.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_mirrormenu.png cmd/lc_rotateleft.png cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png cmd/sc_convertmenu.png cmd/sc_bezierconvert.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_mirrormenu.png cmd/sc_rotateleft.png cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png diff --git a/icon-themes/colibre/links.txt b/icon-themes/colibre/links.txt index d4c76ae39eba..8814a92445a7 100644 --- a/icon-themes/colibre/links.txt +++ b/icon-themes/colibre/links.txt @@ -2657,22 +2657,16 @@ cmd/sc_namegroup.png cmd/sc_definename.png # calc toolbar draw # =============================================== cmd/32/convertmenu.png cmd/32/bezierconvert.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/mirrormenu.png cmd/32/rotateleft.png cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png cmd/32/rotateflipmenu.png cmd/32/rotateleft.png cmd/lc_convertmenu.png cmd/lc_bezierconvert.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_mirrormenu.png cmd/lc_rotateleft.png cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png cmd/sc_convertmenu.png cmd/sc_bezierconvert.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_mirrormenu.png cmd/sc_rotateleft.png cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png diff --git a/icon-themes/elementary/links.txt b/icon-themes/elementary/links.txt index 1a38fd6a30d7..ed1b9ec0cc92 100644 --- a/icon-themes/elementary/links.txt +++ b/icon-themes/elementary/links.txt @@ -1311,17 +1311,6 @@ cmd/32/exportasgraphic.png cmd/32/graphic.png cmd/lc_exportasgraphic.png cmd/lc_graphic.png cmd/sc_exportasgraphic.png cmd/sc_graphic.png -# calc toolbar draw -# =============================================== -cmd/32/editshapehyperlink.png cmd/32/edithyperlink.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png - -cmd/lc_editshapehyperlink.png cmd/lc_edithyperlink.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png - -cmd/sc_editshapehyperlink.png cmd/sc_edithyperlink.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png - # Calc menu entries cmd/32/cellcontentsmenu.png cmd/32/calculate.png cmd/32/datapilotmenu.png cmd/32/datadatapilotrun.png diff --git a/icon-themes/karasa_jaga/links.txt b/icon-themes/karasa_jaga/links.txt index 88c588544541..d6cc71686693 100644 --- a/icon-themes/karasa_jaga/links.txt +++ b/icon-themes/karasa_jaga/links.txt @@ -96,7 +96,6 @@ cmd/32/defaultparastyle.png cmd/32/controlcodes.png cmd/32/deleteallnotes.png cmd/32/deleteallannotation.png cmd/32/deletecell.png cmd/32/delete.png cmd/32/deletenote.png cmd/32/deleteannotation.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png cmd/32/diagramaxisall.png cmd/32/diagramaxisxyz.png cmd/32/diagramaxismenu.png cmd/32/diagramaxis.png cmd/32/diagramdata.png cmd/32/changedatabasefield.png @@ -115,7 +114,6 @@ cmd/32/editlinksmenu.png cmd/32/insertreferencefield.png cmd/32/editpastespecialmenu.png cmd/32/pastespecial.png cmd/32/editregion.png cmd/32/insertsection.png cmd/32/editselectmenu.png cmd/32/selecttables.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/ellipse.png cmd/32/basicshapes.ellipse.png cmd/32/ellipsetoolbox.png cmd/32/basicshapes.ellipse.png cmd/32/es/italic.png cmd/32/de/italic.png @@ -812,7 +810,6 @@ cmd/lc_defaultparastyle.png cmd/lc_controlcodes.png cmd/lc_deleteallnotes.png cmd/lc_deleteallannotation.png cmd/lc_deletecell.png cmd/lc_delete.png cmd/lc_deletenote.png cmd/lc_deleteannotation.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png cmd/lc_diagramaxisall.png cmd/lc_diagramaxisxyz.png cmd/lc_diagramaxismenu.png cmd/lc_diagramaxis.png cmd/lc_diagramdata.png cmd/lc_changedatabasefield.png @@ -831,7 +828,6 @@ cmd/lc_editlinksmenu.png cmd/lc_insertreferencefield.png cmd/lc_editpastespecialmenu.png cmd/lc_pastespecial.png cmd/lc_editregion.png cmd/lc_insertsection.png cmd/lc_editselectmenu.png cmd/lc_selecttables.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_ellipse.png cmd/lc_basicshapes.ellipse.png cmd/lc_ellipsetoolbox.png cmd/lc_basicshapes.ellipse.png cmd/lc_exitsearch.png cmd/lc_closepreview.png @@ -1216,7 +1212,6 @@ cmd/sc_defaultparastyle.png cmd/sc_controlcodes.png cmd/sc_deleteallnotes.png cmd/sc_deleteallannotation.png cmd/sc_deletecell.png cmd/sc_delete.png cmd/sc_deletenote.png cmd/sc_deleteannotation.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png cmd/sc_diagramaxisall.png cmd/sc_diagramaxisxyz.png cmd/sc_diagramaxismenu.png cmd/sc_diagramaxis.png cmd/sc_diagramdata.png cmd/sc_changedatabasefield.png @@ -1235,7 +1230,6 @@ cmd/sc_editlinksmenu.png cmd/sc_insertreferencefield.png cmd/sc_editpastespecialmenu.png cmd/sc_pastespecial.png cmd/sc_editregion.png cmd/sc_insertsection.png cmd/sc_editselectmenu.png cmd/sc_selecttables.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_ellipse.png cmd/sc_basicshapes.ellipse.png cmd/sc_ellipsetoolbox.png cmd/sc_basicshapes.ellipse.png cmd/sc_exitsearch.png cmd/sc_closepreview.png diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt index 31f973b791ed..99f1aa54a906 100644 --- a/icon-themes/sifr/links.txt +++ b/icon-themes/sifr/links.txt @@ -2671,22 +2671,16 @@ cmd/sc_margins.png cmd/sc_pagemargin.png # calc toolbar draw # =============================================== cmd/32/convertmenu.png cmd/32/bezierconvert.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/mirrormenu.png cmd/32/rotateleft.png cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png cmd/32/rotateflipmenu.png cmd/32/rotateleft.png cmd/lc_convertmenu.png cmd/lc_bezierconvert.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_mirrormenu.png cmd/lc_rotateleft.png cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png cmd/sc_convertmenu.png cmd/sc_bezierconvert.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_mirrormenu.png cmd/sc_rotateleft.png cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png diff --git a/icon-themes/sifr_dark/links.txt b/icon-themes/sifr_dark/links.txt index 31f973b791ed..99f1aa54a906 100644 --- a/icon-themes/sifr_dark/links.txt +++ b/icon-themes/sifr_dark/links.txt @@ -2671,22 +2671,16 @@ cmd/sc_margins.png cmd/sc_pagemargin.png # calc toolbar draw # =============================================== cmd/32/convertmenu.png cmd/32/bezierconvert.png -cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png -cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png cmd/32/mirrormenu.png cmd/32/rotateleft.png cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png cmd/32/rotateflipmenu.png cmd/32/rotateleft.png cmd/lc_convertmenu.png cmd/lc_bezierconvert.png -cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png -cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png cmd/lc_mirrormenu.png cmd/lc_rotateleft.png cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png cmd/sc_convertmenu.png cmd/sc_bezierconvert.png -cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png -cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png cmd/sc_mirrormenu.png cmd/sc_rotateleft.png cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png diff --git a/icon-themes/sukapura/links.txt b/icon-themes/sukapura/links.txt index 721566c7201a..37548207c70d 100644 --- a/icon-themes/sukapura/links.txt +++ b/icon-themes/sukapura/links.txt @@ -2668,22 +2668,16 @@ cmd/sc_namegroup.png cmd/sc_renameobject.png # calc toolbar draw
# ===============================================
cmd/32/convertmenu.png cmd/32/bezierconvert.png
-cmd/32/deleteshapehyperlink.png cmd/32/removehyperlink.png
-cmd/32/editshapehyperlink.png cmd/32/inserthyperlink.png
cmd/32/mirrormenu.png cmd/32/rotateleft.png
cmd/32/openhyperlinkoncursor.png cmd/32/inserthyperlink.png
cmd/32/rotateflipmenu.png cmd/32/rotateleft.png
cmd/lc_convertmenu.png cmd/lc_bezierconvert.png
-cmd/lc_deleteshapehyperlink.png cmd/lc_removehyperlink.png
-cmd/lc_editshapehyperlink.png cmd/lc_inserthyperlink.png
cmd/lc_mirrormenu.png cmd/lc_rotateleft.png
cmd/lc_openhyperlinkoncursor.png cmd/lc_inserthyperlink.png
cmd/lc_rotateflipmenu.png cmd/lc_rotateleft.png
cmd/sc_convertmenu.png cmd/sc_bezierconvert.png
-cmd/sc_deleteshapehyperlink.png cmd/sc_removehyperlink.png
-cmd/sc_editshapehyperlink.png cmd/sc_inserthyperlink.png
cmd/sc_mirrormenu.png cmd/sc_rotateleft.png
cmd/sc_openhyperlinkoncursor.png cmd/sc_inserthyperlink.png
cmd/sc_rotateflipmenu.png cmd/sc_rotateleft.png
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 1d3cfc127993..10b6f370984a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -2556,22 +2556,6 @@ <value>1</value> </prop> </node> - <node oor:name=".uno:EditShapeHyperlink" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Edit Hyperlink</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DeleteShapeHyperlink" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Remove Hyperlink</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> <node oor:name=".uno:PasteOnly" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Paste Only</value> diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index d553c82e2cbe..e958d421c18e 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -159,10 +159,6 @@ // #i59082# assign macro to shape #define SID_ASSIGNMACRO (SC_VIEW_START + 95) -// #i66550# hyperlinks in shapes -#define SID_DRAW_HLINK_EDIT (SC_VIEW_START + 96) -#define SID_DRAW_HLINK_DELETE (SC_VIEW_START + 97) - // "Zoom / Synchronize sheets" in options dialog #define SID_SC_OPT_SYNCZOOM (SC_VIEW_START + 98) diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi index e097df04036a..2688d51101e9 100644 --- a/sc/sdi/drawsh.sdi +++ b/sc/sdi/drawsh.sdi @@ -221,9 +221,10 @@ interface TableDraw SID_FONTWORK_KERN_CHARACTER_PAIRS [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ] SID_FONTWORK_CHARACTER_SPACING_DIALOG [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ] - SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] - SID_DRAW_HLINK_DELETE [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] + SID_EDIT_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] + SID_REMOVE_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] + SID_COPY_HYPERLINK_LOCATION [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ] SID_ATTR_GLOW_COLOR [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ] SID_ATTR_GLOW_RADIUS [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ] diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index fbbbe1809873..fb52b40bac8c 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -5089,43 +5089,6 @@ SfxVoidItem SplitWindow SID_WINDOW_SPLIT GroupId = SfxGroupId::View; ] - -SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT -() -[ - AutoUpdate = FALSE, - FastCall = TRUE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = TRUE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Drawing; -] - - -SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE -() -[ - AutoUpdate = TRUE, - FastCall = TRUE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = TRUE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Drawing; -] - - SfxVoidItem StandardTextAttributes SID_TEXT_STANDARD () [ diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 93ece6954f56..1249cf839ef6 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -59,6 +59,9 @@ #include <svx/xflclit.hxx> #include <svx/xflgrit.hxx> #include <tools/UnitConversion.hxx> +#include <vcl/unohelp2.hxx> + +using namespace css; SFX_IMPL_INTERFACE(ScDrawShell, SfxShell) @@ -313,17 +316,18 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) ExecuteTextAttrDlg( rReq ); break; - case SID_DRAW_HLINK_EDIT: + case SID_EDIT_HYPERLINK: if ( pSingleSelectedObj ) rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG ); break; - case SID_DRAW_HLINK_DELETE: + case SID_REMOVE_HYPERLINK: if ( pSingleSelectedObj ) SetHlinkForObject( pSingleSelectedObj, OUString() ); break; case SID_OPEN_HYPERLINK: + case SID_COPY_HYPERLINK_LOCATION: if ( nMarkCount == 1 ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); @@ -336,8 +340,19 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) } ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); - if ( pInfo && !pInfo->GetHlink().isEmpty() ) - ScGlobal::OpenURL( pInfo->GetHlink(), OUString(), true ); + if (pInfo && !pInfo->GetHlink().isEmpty()) + { + if (nSlot == SID_OPEN_HYPERLINK) + { + ScGlobal::OpenURL(pInfo->GetHlink(), OUString(), true); + } + else if (nSlot == SID_COPY_HYPERLINK_LOCATION) + { + uno::Reference<datatransfer::clipboard::XClipboard> xClipboard + = GetViewShell()->GetWindow()->GetClipboard(); + vcl::unohelper::TextDataObject::CopyStringTo(pInfo->GetHlink(), xClipboard); + } + } } break; diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 889c7efd33b3..9ff7c536617c 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -218,10 +218,11 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions bool bCanRename = false; if ( nMarkCount > 1 ) { - // no hypelink options for a selected group - rSet.DisableItem( SID_DRAW_HLINK_EDIT ); - rSet.DisableItem( SID_DRAW_HLINK_DELETE ); + // no hyperlink options for a selected group + rSet.DisableItem( SID_EDIT_HYPERLINK ); + rSet.DisableItem( SID_REMOVE_HYPERLINK ); rSet.DisableItem( SID_OPEN_HYPERLINK ); + rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION ); // Fit to cell only works with a single graphic rSet.DisableItem( SID_FITCELLSIZE ); } @@ -231,8 +232,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); if ( !pInfo || pInfo->GetHlink().isEmpty() ) { - rSet.DisableItem( SID_DRAW_HLINK_DELETE ); + rSet.DisableItem( SID_EDIT_HYPERLINK ); rSet.DisableItem( SID_OPEN_HYPERLINK ); + rSet.DisableItem( SID_REMOVE_HYPERLINK ); + rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION ); } SdrLayerID nLayerID = pObj->GetLayer(); if ( nLayerID != SC_LAYER_INTERN ) diff --git a/sc/uiconfig/scalc/popupmenu/draw.xml b/sc/uiconfig/scalc/popupmenu/draw.xml index 0df2b8ed8a60..f8a19fe65309 100644 --- a/sc/uiconfig/scalc/popupmenu/draw.xml +++ b/sc/uiconfig/scalc/popupmenu/draw.xml @@ -57,8 +57,10 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> - <menu:menuitem menu:id=".uno:EditShapeHyperlink"/> - <menu:menuitem menu:id=".uno:DeleteShapeHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> + <menu:menuitem menu:id=".uno:EditHyperlink"/> + <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> + <menu:menuitem menu:id=".uno:RemoveHyperlink"/> + <menu:menuseparator/> <menu:menuitem menu:id=".uno:AssignMacro"/> </menu:menupopup> diff --git a/sc/uiconfig/scalc/popupmenu/graphic.xml b/sc/uiconfig/scalc/popupmenu/graphic.xml index 72477181eb05..cb14ac724f35 100644 --- a/sc/uiconfig/scalc/popupmenu/graphic.xml +++ b/sc/uiconfig/scalc/popupmenu/graphic.xml @@ -61,9 +61,10 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> - <menu:menuitem menu:id=".uno:EditShapeHyperlink"/> - <menu:menuitem menu:id=".uno:DeleteShapeHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> + <menu:menuitem menu:id=".uno:EditHyperlink"/> + <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> + <menu:menuitem menu:id=".uno:RemoveHyperlink"/> <menu:menuitem menu:id=".uno:AssignMacro"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:EditSignatureLine"/> diff --git a/sc/uiconfig/scalc/popupmenu/media.xml b/sc/uiconfig/scalc/popupmenu/media.xml index a05d6942b27d..d5453747eb68 100644 --- a/sc/uiconfig/scalc/popupmenu/media.xml +++ b/sc/uiconfig/scalc/popupmenu/media.xml @@ -42,9 +42,10 @@ <menu:menuitem menu:id=".uno:RenameObject"/> <menu:menuitem menu:id=".uno:ObjectTitleDescription"/> <menu:menuseparator/> - <menu:menuitem menu:id=".uno:EditShapeHyperlink"/> - <menu:menuitem menu:id=".uno:DeleteShapeHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> + <menu:menuitem menu:id=".uno:EditHyperlink"/> + <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/> + <menu:menuitem menu:id=".uno:RemoveHyperlink"/> <menu:menuitem menu:id=".uno:AssignMacro"/> </menu:menupopup> diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui index ef2886b0d28f..a02a5953a249 100644 --- a/sc/uiconfig/scalc/ui/notebookbar.ui +++ b/sc/uiconfig/scalc/ui/notebookbar.ui @@ -1103,17 +1103,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuImage-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuImage-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuImage-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuImage-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> @@ -1328,17 +1328,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_compact.ui index cd73177d0a91..97084586f8f8 100644 --- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui +++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui @@ -1304,17 +1304,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="EditShapeHyperlinkD"> + <object class="GtkMenuItem" id="EditHyperlinkD"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="DeleteShapeHyperlinkD"> + <object class="GtkMenuItem" id="RemoveHyperlinkD"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> @@ -1667,17 +1667,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui index 4ff33a943a9a..3468cb8f4404 100644 --- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui +++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui @@ -1311,17 +1311,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuGraphic-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuGraphic-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuGraphic-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuGraphic-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui index 8b559965acb4..6c40acc04c55 100644 --- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui +++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui @@ -1635,17 +1635,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuGraphic-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuGraphic-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuGraphic-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuGraphic-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui index 03e251b2732a..7cfa4a877461 100644 --- a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui +++ b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui @@ -1419,17 +1419,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sd/uiconfig/simpress/ui/notebookbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_compact.ui index 2018bbab98f5..0394e09918ec 100644 --- a/sd/uiconfig/simpress/ui/notebookbar_compact.ui +++ b/sd/uiconfig/simpress/ui/notebookbar_compact.ui @@ -1621,17 +1621,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/sw/uiconfig/swriter/ui/notebookbar_compact.ui b/sw/uiconfig/swriter/ui/notebookbar_compact.ui index b0ede61164b4..b647b3203d8f 100644 --- a/sw/uiconfig/swriter/ui/notebookbar_compact.ui +++ b/sw/uiconfig/swriter/ui/notebookbar_compact.ui @@ -1364,17 +1364,17 @@ </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-EditShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-EditHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:EditShapeHyperlink</property> + <property name="action_name">.uno:EditHyperlink</property> </object> </child> <child> - <object class="GtkMenuItem" id="MenuMedia-DeleteShapeHyperlink"> + <object class="GtkMenuItem" id="MenuMedia-RemoveHyperlink"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="action_name">.uno:DeleteShapeHyperlink</property> + <property name="action_name">.uno:RemoveHyperlink</property> </object> </child> <child> diff --git a/test/user-template/user/config/soffice.cfg/modules/scalc/popupmenu/draw.xml b/test/user-template/user/config/soffice.cfg/modules/scalc/popupmenu/draw.xml index daeb44d65036..e09f817a404e 100644 --- a/test/user-template/user/config/soffice.cfg/modules/scalc/popupmenu/draw.xml +++ b/test/user-template/user/config/soffice.cfg/modules/scalc/popupmenu/draw.xml @@ -63,7 +63,7 @@ </menu:menupopup> </menu:menu> <menu:menuseparator/> - <menu:menuitem menu:id=".uno:EditShapeHyperlink"/> - <menu:menuitem menu:id=".uno:DeleteShapeHyperlink"/> + <menu:menuitem menu:id=".uno:EditHyperlink"/> + <menu:menuitem menu:id=".uno:RemoveHyperlink"/> <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/> </menu:menupopup> |