<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - The protection icon does not show in front of sheeet name when lock a sheet from LibreOffice BASIC."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133257">bug 133257</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>UNCONFIRMED
</td>
<td>NEW
</td>
</tr>
<tr>
<td style="text-align:right;">Hardware</td>
<td>x86-64 (AMD64)
</td>
<td>All
</td>
</tr>
<tr>
<td style="text-align:right;">Ever confirmed</td>
<td>
</td>
<td>1
</td>
</tr>
<tr>
<td style="text-align:right;">OS</td>
<td>Linux (All)
</td>
<td>All
</td>
</tr>
<tr>
<td style="text-align:right;">Keywords</td>
<td>
</td>
<td>difficultyBeginner, easyHack, skillCpp
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - The protection icon does not show in front of sheeet name when lock a sheet from LibreOffice BASIC."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133257#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - The protection icon does not show in front of sheeet name when lock a sheet from LibreOffice BASIC."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133257">bug 133257</a>
from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>