sc/source/ui/view/editsh.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit efbe82fd2515c58a5504c18176def3e7caaefdd1 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Fri Jan 5 14:44:21 2024 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Jan 5 18:42:07 2024 +0100 LOK: disallow entering multiple hyperlinks in spreadsheet cells This is for UX consistency. Previously it was allowed to enter multiple hyperlinks in spreadsheet cells when the spreadsheet was in OpenDocument format. Only in case of XLS/XLSX it was not possible. But we got a feedback that it is desirable to have a similar user experience for all spreadsheet file formats in Online. In LibreOffice nothing changes, it works according to the setting in Options - LibreOffice Calc - Compatibility - Hyperlinks. Change-Id: I7eece4307289711e9c925c05085497afaafe600e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161667 Reviewed-by: Attila Szűcs <attila.sz...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 42e78e153669..2850164ee085 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -18,6 +18,7 @@ */ #include <comphelper/string.hxx> +#include <comphelper/lok.hxx> #include <scitems.hxx> #include <editeng/eeitem.hxx> #include <i18nutil/unicode.hxx> @@ -572,8 +573,9 @@ void ScEditShell::Execute( SfxRequest& rReq ) SvxLinkInsertMode eMode = pHyper->GetInsertMode(); bool bCellLinksOnly - = SC_MOD()->GetAppOptions().GetLinksInsertedLikeMSExcel() - && rViewData.GetSfxDocShell()->GetMedium()->GetFilter()->IsMSOFormat(); + = (SC_MOD()->GetAppOptions().GetLinksInsertedLikeMSExcel() + && rViewData.GetSfxDocShell()->GetMedium()->GetFilter()->IsMSOFormat()) + || comphelper::LibreOfficeKit::isActive(); bool bDone = false; if ( (eMode == HLINK_DEFAULT || eMode == HLINK_FIELD) && !bCellLinksOnly ) @@ -784,8 +786,9 @@ void ScEditShell::GetState( SfxItemSet& rSet ) { SvxHyperlinkItem aHLinkItem; bool bCellLinksOnly - = SC_MOD()->GetAppOptions().GetLinksInsertedLikeMSExcel() - && rViewData.GetSfxDocShell()->GetMedium()->GetFilter()->IsMSOFormat(); + = (SC_MOD()->GetAppOptions().GetLinksInsertedLikeMSExcel() + && rViewData.GetSfxDocShell()->GetMedium()->GetFilter()->IsMSOFormat()) + || comphelper::LibreOfficeKit::isActive(); const SvxURLField* pURLField = GetURLField(); if (!bCellLinksOnly) {