Found in 7.1.5, confirmed in 7.3.1.3 - probably all Calc versions having that button 1. Open any workbook 2. Go main menu Tools / Protect sheet structure and check it. (i am speaking of Russian i18n, so the your menu item names may be slightly different) 3. Go main menu Sheet / Insert new Sheet - you would see that the menu items are disabled, OK 4. look down to the sheets tabs, left of them there is [+] button to add new sheet. It is NOT disabled. But clicking on it gives no error - but just a do-nothing. Really confusing!!! Minimal fix - make the button disabled when "sheet structure protection" is on. Better fix - make button LOOK disabled, but when user hover or click it - show the actionable hint/message, why this button can not work now, and what to do to re-enable it. Same to be with items like main menu Sheet / Insert new Sheet - while looking disabled that should obtain an actionable hint or error message, so user would now how to re-enable them without googling.
confirm in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 51fb84829afbc1c0957fd1a489085613ad199f1a CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL Jumbo but I think it's an enhancement menu Tools / Protect Spreadsheet structure is a right name in EN UI Heiko, could it be easyhackable?
You protect a sheet not the whole document. And adding more sheets is possible, only deletion and manipulation of the protected sheet is disabled. => NAB/WF
(In reply to Heiko Tietze from comment #2) > You protect a sheet not the whole document. And adding more sheets is > possible, only deletion and manipulation of the protected sheet is disabled. > => NAB/WF You are wrong. He blocks not only one sheet, but all sheets, please try use Tools-Protect Spreadsheet Structure
In svtools/source/control/tabbar.cxx the button m_xAddButton could be set_sensitive() according IsDocEditable() in TabBar::ImplEnableControls() but svtools has no knowledge about ScDocument. The alternative is to come from the other side and send some message to the control in ScTabViewShell::GetStateTable() for FID_INS_TABLE. Maybe Hossein has an idea how to solve this.
But the tabs themselves certainly DO know about the document, otherwise they won't know the count of the sheets, their name, and if renaming a sheet is allowed. There already is some way for that window footer decoration to communicate with the document object, hopefully it can be found and reused
Created attachment 179160 [details] Main menu, in Russian > menu Tools / Protect Spreadsheet structure is a right name in EN UI > He blocks not only one sheet, but all sheets Hmm... but look at the menu screenshot. The first item talks about "document", but next two talk about "sheet" (in singular, not in plural) Does it look like mistranslation? Should there be another ticket on i18n then?
(In reply to Dmitry INEC from comment #6) > Created attachment 179160 [details] > Main menu, in Russian > Hmm... but look at the menu screenshot. > > The first item talks about "document", but next two talk about "sheet" (in > singular, not in plural) > > Does it look like mistranslation? Should there be another ticket on i18n > then? Yes, please file another ticket about translation
> Yes, please file another ticket about translation #148353
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e2b7f59c745a79542b15937bc824c7afe9969cde tdf#147868 Disable add sheet when structure is protected It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Hossein committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/fd948aed2230e50cce9c4aa7f1eb30e7cc8c4f8f tdf#147868 Disable add sheet when structure is protected It will be available in 7.4.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fix verified in: Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: ad085990b8073a122ac5222e5220f8f1d6826dcf CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded