Bug 127763 - [Macro] Password protected Basic macro could not show Chinese correctly
Summary: [Macro] Password protected Basic macro could not show Chinese correctly
Status: RESOLVED DUPLICATE of bug 57113
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-25 13:39 UTC by Franklin Weng
Modified: 2021-05-19 10:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODS file with macro protected by password (16.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-09-25 13:39 UTC, Franklin Weng
Details
Execute macro before unlocking (199.15 KB, image/png)
2019-09-25 13:42 UTC, Franklin Weng
Details
Execute macro after unlocking (197.74 KB, image/png)
2019-09-25 13:43 UTC, Franklin Weng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franklin Weng 2019-09-25 13:39:12 UTC
Created attachment 154490 [details]
ODS file with macro protected by password

Please open the attached file.

The macro was protected by password.  In this state when clicking the "TEST" button the dialog would show ??? for Chinese.

After unlocking by input password 1234 (from Tools -> Macros -> Organize Macros -> LibreOffice Basic and choose the file and the TEST library) the Chinese characters could show correctly.

I'll attach screenshots in the next comments.
Comment 1 Franklin Weng 2019-09-25 13:42:37 UTC
Created attachment 154491 [details]
Execute macro before unlocking

Before unlocking with password
Comment 2 Franklin Weng 2019-09-25 13:43:15 UTC
Created attachment 154492 [details]
Execute macro after unlocking

After unlocking
Comment 3 Franklin Weng 2019-09-25 13:45:02 UTC
Earliest affected version at my hand:  NDC ODF Application Tools (customized from LibreOffice 5.2.7)


版本:1.0.3 beta1801 (x86)
組建 ID:6092625fc868ec7d83d7ff61977fac47f2cc87a9
CPU 執行緒:4; OS 版本:Linux 5.2; UI 算繪:預設; VCL:gtk3; 介面配置引擎:新式; 
語言地區:zh-TW (zh_TW.UTF-8); Calc: group

LibreOffice 4.0 could not exec the macro.

Latest 6.3.2.2 can reproduce this problem.

版本:6.3.2.2
組建 ID:98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU 執行緒:4; OS:Linux 5.2; UI 算繪:預設; VCL: kde5; 
語言地區:zh-TW (zh_TW.UTF-8); UI語言:zh-TW
Calc: threaded
Comment 4 Xisco Faulí 2019-09-25 14:57:51 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: cc65651a0490383f1a833bb6215d8ec4272d8b5d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

and

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

in

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

the macro can't be executed
Comment 5 John 2021-03-22 06:52:55 UTC
This looks to me like it should be a duplicate of tdf#57113

However, I have the changeset for that bug and can still duplicate. Re-saving, then re-opening the file (see last comment on the older ticket) doesn't seem to work for me, either.
Comment 6 Mike Kaganski 2021-05-19 10:03:55 UTC
(In reply to John from comment #5)
> This looks to me like it should be a duplicate of tdf#57113

And it is.

> However, I have the changeset for that bug and can still duplicate.

Specifically how? Do you mean that you open the file, and press the TEST button without unlocking the library, and get the ??? in the dialog? That is expected. The bug was that *the Unicode data was *not* stored to the binary image* that is generated from the password-protected library; that image is the only thing accessible to the program unless the library is unlocked. There's no Unicode there, and it will not appear there after the fix.

> Re-saving, then re-opening the file (see last comment on the older ticket)
> doesn't seem to work for me, either.

Do you mean that you saved and reopened *without* unlocking the library? then it's a wrong test. The bug is fixed by making it possible to *generate* binary images including the Unicode information; the *generation* happens when there's the library source code available; and it's only available after unlocking.

*** This bug has been marked as a duplicate of bug 57113 ***