[Libreoffice-commits] core.git: sc/sdi sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 15 21:33:40 UTC 2018
sc/sdi/scalc.sdi | 6 +++---
sc/source/ui/view/cellsh.cxx | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 525ed5d1fcb89412f0b80be0b1e35410b048c337
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Oct 18 21:09:12 2018 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Thu Nov 15 22:33:14 2018 +0100
tdf#107240 tdf#120432 Disable time/date entries in read-only/protected mode
Change-Id: Ia3c757fa094f17be3b4aadaee65c4699bf0c1cb1
Reviewed-on: https://gerrit.libreoffice.org/61953
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 3519242625bb..87ef5950d333 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3073,7 +3073,7 @@ SfxVoidItem InsertObjectStarMath SID_INSERT_SMATH
[
AutoUpdate = FALSE,
FastCall = FALSE,
- ReadOnlyDoc = TRUE,
+ ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
@@ -6181,7 +6181,7 @@ SfxVoidItem InsertCurrentDate SID_INSERT_CURRENT_DATE
[
AutoUpdate = FALSE,
FastCall = FALSE,
- ReadOnlyDoc = TRUE,
+ ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
@@ -6199,7 +6199,7 @@ SfxVoidItem InsertCurrentTime SID_INSERT_CURRENT_TIME
[
AutoUpdate = FALSE,
FastCall = FALSE,
- ReadOnlyDoc = TRUE,
+ ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 63228e880b9f..1855a5b12892 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -889,6 +889,15 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
break;
+ case SID_INSERT_CURRENT_DATE:
+ case SID_INSERT_CURRENT_TIME:
+ {
+ if ( pDoc->IsTabProtected(nTab) &&
+ pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HasAttrFlags::Protected))
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
case SID_SELECT_SCENARIO:
{
std::vector<OUString> aList;
More information about the Libreoffice-commits
mailing list