[Libreoffice-bugs] [Bug 133257] The protection icon does not show in front of sheeet name when lock a sheet from LibreOffice BASIC.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri May 22 05:42:04 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=133257
Mike Kaganski <mikekaganski at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Hardware|x86-64 (AMD64) |All
Ever confirmed|0 |1
OS|Linux (All) |All
Keywords| |difficultyBeginner,
| |easyHack, skillCpp
--- Comment #3 from Mike Kaganski <mikekaganski at hotmail.com> ---
Repro with Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win;
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL.
The problem is that setting the protection via API uses
ScTableSheetObj::protect/unprotect (sc/source/ui/unoobj/cellsuno.cxx), while UI
operation uses ScViewFunc::ProtectSheet/Unprotect
(sc/source/ui/view/viewfunc.cxx). The latter functions call
SetTabProtectionSymbol function (sc/source/ui/view/tabview3.cxx), that sets the
symbol. Interestingly, ScViewFunc::Protect doesn't do that.
Both pathways call ScDocFunc::ProtectSheet/Unprotect
(sc/source/ui/docshell/docfunc.cxx). The proposal is to move calling
ScTabView::SetTabProtectionSymbol there; and in the process, ScDocFunc::Protect
should be also changes to call ScDocFunc::ProtectSheet when doing sheet
protection to unify the code. SetTabProtectionSymbol must be called for *all*
visible document's view frames, not only the active one. To iterate over all
active view frames, use SfxViewFrame::GetFirst/GetNext; see implementation of
ScTabViewShell::GetActiveViewShell for additional details.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200522/906c0faf/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list