[Libreoffice-bugs] [Bug 137886] The logic of hiding CJK/CTL properties in style inspector seems reversed

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 2 10:33:46 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=137886

Shivam Kumar Singh <shivamhere247 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Shivam Kumar Singh <shivamhere247 at gmail.com> ---
(In reply to Ming Hua from comment #3)
> Fun...
> 
> When I enable both CJK and CTL text in Tools > Options, I see *neither* "...
> Asian" *or* "... Complex" properties.  And when I disable both CJK and CTL,
> I can see those properties in style inspectors.
> 
> The code that control whether to hide them seems to have the logic reversed,
> at least on Windows.

I confirm this bug
The issue is in

    // Hide Asian and Complex properties
if (SvtLanguageOptions().IsCJKFontEnabled() && rPropName.indexOf("Asian") !=
-1)
          return false;
if (SvtLanguageOptions().IsCTLFontEnabled() && rPropName.indexOf("Complex") !=
-1)
          return false;

defined in /sidebar/inspector/InspectorTextPanel.cxx?r=4fbd6386#65.

The code means "if CJKFont is enabled and rPropName is related to Asian return
false", this should rather be

    // Hide Asian and Complex properties
if (rPropName.indexOf("Asian") != -1 &&
!SvtLanguageOptions().IsCJKFontEnabled())
          return false;
if (rPropName.indexOf("Complex") != -1 &&
SvtLanguageOptions().IsCTLFontEnabled())
          return false;

"if CJKFont is *not* enabled and rPropName is related to Asian return false"

I cannot see how we missed this issue. @Heiko Should I work on this?


Version: 7.1.0.0.alpha0+
Build ID: d15aa807be1c595dad9abc1dea04bb922570015a
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded

-- 
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/20201102/fbfb0e71/attachment.htm>


More information about the Libreoffice-bugs mailing list