[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/sdi sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 16 12:43:43 UTC 2018


 sc/sdi/scalc.sdi             |    6 +++---
 sc/source/ui/view/cellsh.cxx |    9 +++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit da6c0638507aec8c9e8be2b8f63140136f1bff1d
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Oct 18 21:09:12 2018 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Fri Nov 16 13:43:19 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>
    (cherry picked from commit 525ed5d1fcb89412f0b80be0b1e35410b048c337)
    Reviewed-on: https://gerrit.libreoffice.org/63452
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index e3a60c21951c..271bdd17fa08 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,
@@ -6200,7 +6200,7 @@ SfxVoidItem InsertCurrentDate SID_INSERT_CURRENT_DATE
 [
     AutoUpdate = FALSE,
     FastCall = FALSE,
-    ReadOnlyDoc = TRUE,
+    ReadOnlyDoc = FALSE,
     Toggle = FALSE,
     Container = FALSE,
     RecordAbsolute = FALSE,
@@ -6218,7 +6218,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 854794adfb9d..9b25aa711260 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -896,6 +896,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