diff options
author | Andras Timar <andras.timar@collabora.com> | 2024-01-05 14:44:21 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-01-07 16:36:40 +0100 |
commit | b7cba4953a072c88813ecd1886cd0fdaa5790de7 (patch) | |
tree | 3a6b6bb7ec8ec644c95cefaf085e664df6764585 | |
parent | 96131f0e80f23ceeafab39508cafb68f33b8e58d (diff) |
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.szucs@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161729
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 9ed398fb9876..c392f111e203 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 ) @@ -786,8 +788,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(); std::unique_ptr<const SvxFieldData> aSvxFieldDataPtr(GetURLField()); const SvxURLField* pURLField(static_cast<const SvxURLField*>(aSvxFieldDataPtr.get())); if (!bCellLinksOnly) |