office-gobmx/include/svtools
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
..
acceleratorexecute.hxx
accessibilityoptions.hxx
addresstemplate.hxx
apearcfg.hxx
asynclink.hxx
bindablecontrolhelper.hxx
borderhelper.hxx
borderline.hxx
brwbox.hxx [API CHANGE] Drop css::accessibility::XAccessibleStateSet 2022-07-08 10:10:11 +02:00
brwhead.hxx
cliplistener.hxx
collatorres.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
colorcfg.hxx
colrdlg.hxx
ctrlbox.hxx
ctrltool.hxx
dialogclosedlistener.hxx
DocumentToGraphicRenderer.hxx
editbrowsebox.hxx
ehdl.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
embedhlp.hxx
embedtransfer.hxx
extcolorcfg.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
filechangedchecker.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
fontsubstconfig.hxx
genericunodialog.hxx
helpids.h
htmlcfg.hxx
htmlkywd.hxx
htmlout.hxx loplugin:constantparam 2022-06-10 21:14:20 +02:00
htmltokn.h
HtmlWriter.hxx
imagemgr.hxx
imageresourceaccess.hxx
imgdef.hxx
indexentryres.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
inettbc.hxx
insdlg.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
javacontext.hxx
javainteractionhandler.hxx
langhelp.hxx
langtab.hxx
languagetoolcfg.hxx LanguageTool Grammar Checker implementation 2022-06-10 13:52:17 +02:00
miscopt.hxx
openfiledroptargetlistener.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
optionsdrawinglayer.hxx
parhtml.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
parrtf.hxx
place.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
PlaceEditDialog.hxx
popupmenucontrollerbase.hxx
popupwindowcontroller.hxx
printoptions.hxx
prnsetup.hxx
querydelete.hxx
recorditemwindow.hxx
restartdialog.hxx tdf#149401 show "Restart LibreOffice" dialog changing AutoRecovery 2022-06-23 17:07:00 +02:00
rtfkeywd.hxx
rtfout.hxx
rtftoken.h
ruler.hxx
sampletext.hxx
scriptedtext.hxx
sfxecode.hxx
slidesorterbaropt.hxx
soerr.hxx
statusbarcontroller.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
strings.hrc Related tdf#137145 tdf#137569 Capitalization + punctuation fixes 2022-07-05 18:18:46 +02:00
stringtransfer.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
svparser.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
svtdllapi.h
svtresid.hxx
tabbar.hxx tdf#147868 Disable add sheet when structure is protected 2022-07-24 15:53:39 +02:00
templatefoldercache.hxx
toolbarmenu.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
toolboxcontroller.hxx clang-tidy modernize-pass-by-value in svtools 2022-07-14 12:15:07 +02:00
unitconv.hxx
unoevent.hxx
unoimap.hxx
urlfilter.hxx
valueset.hxx move wintypes.hxx from tools to vcl 2022-07-20 12:20:59 +02:00