diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2018-10-18 21:09:12 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-11-15 22:33:14 +0100 |
commit | 525ed5d1fcb89412f0b80be0b1e35410b048c337 (patch) | |
tree | a027eca129daf0dbe78433aeada42ec4d2d466b2 /sc/source | |
parent | e22ab5e6f6b0ea49231ca454a567133996306116 (diff) |
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@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
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; |