office-gobmx/svtools/source
Hossein e2b7f59c74 tdf#147868 Disable add sheet when structure is protected
Using "Tools > Protect Spreadsheet Structure...", it is possible to
protect the structure of a spreadsheet document. Without this patch in
place, the [+] (add new sheet) button is clickable but it does not work.
This is confusing for the user, so it was decided that the button should
be disabled when the structure is protected.

This patch disables the [+] button just after the structure is protected
using the above toggle menu option. The menu option becomes checked, and
the [+] button gets disabled immediately. After choosing the same toggle
menu option again, the check mark goes away, and the [+] button becomes
enabled immediately.

In this patch, GetDocument().IsDocEditable() is used to check if the
document structure is protected. The argument for this choice is that
the same function is used when renaming a sheet with
ScDocFunc::RenameTable().

Change-Id: If812d94841d3efd98d7ef898cc1f4b2f1387130b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137365
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-07-24 15:53:39 +02:00
..
brwbox clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
config
contnr
control tdf#147868 Disable add sheet when structure is protected 2022-07-24 15:53:39 +02:00
dialogs clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
filter clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
graphic loplugin:moveit 2022-07-14 11:18:21 +02:00
inc
java
misc clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
svhtml elide some makeStringAndClear() calls 2022-07-22 11:13:28 +02:00
svrtf elide some makeStringAndClear() calls 2022-07-22 11:13:28 +02:00
table [API CHANGE] Drop css::accessibility::XAccessibleStateSet 2022-07-08 10:10:11 +02:00
uitest
uno clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00