Bug 57113 - Macros: Unicode vs. password protected user libraries
Summary: Macros: Unicode vs. password protected user libraries
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version: 3.6.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: BSA
Keywords:
: 58426 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-14 10:07 UTC by Karel Behounek
Modified: 2014-08-21 12:26 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Test files (LO Calc) to demonstrate the issue. (19.10 KB, application/zip)
2012-11-15 06:59 UTC, Karel Behounek
Details
Illustration of behaviour (for comment 5) (300.93 KB, image/jpeg)
2014-05-22 08:13 UTC, Karel Behounek
Details
screenshot showing where the "password protect" is (24.90 KB, image/png)
2014-08-21 12:21 UTC, Kevin Suo
Details
An ODS file with password-protected macro library (15.69 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-08-21 12:23 UTC, Kevin Suo
Details

Description Karel Behounek 2012-11-14 10:07:09 UTC
Problem description: 

When the user library is password protected, there are issues with unicode? (cyrillic in my case) strings.

Steps to reproduce:

1. create user library

2. enter some sample code

Dim oDoc As Object
Dim oSheet As Object
Dim oCell As Object

oDoc = ThisComponent
oSheet = oDoc.Sheets(0)
oCellTest = oSheet.getCellRangeByName("A1")
oCellTest.String = "Ленинский проспект"

2. run the macro - works fine (displays Ленинский проспект string in the A1 cell)

3. password protect the module

4. run the macro again - does not work fine (displays ???????? ??????? string in the A1 cell)

Current behavior:

The cyrillic characters are replaced with question marks when the module is password protected.

Expected behavior:

The cyrillic characters display just fine, no matter whether the module is password protected or not.

Platform (if different from the browser): 
              
Browser: Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.10
Comment 1 Karel Behounek 2012-11-15 06:59:06 UTC
Created attachment 70101 [details]
Test files (LO Calc) to demonstrate the issue.

password-test-protected.ods: password protected user library demonstrating the described issue
password-test-unprotected.ods: unprotected user library, no issues (included for comparison)
Comment 2 Karel Behounek 2012-11-15 08:29:51 UTC
The problem seems to not be platform-specific, I've tested it in Windows XP 32-bit (Czech), Windows 7 64-bit (English) and OpenSUSE (Czech) and the behaviour is identical everywhere.

The problem is not caused by the presence of the password protection itself; once the password is entered ("becomes known to LO"), all works fine even in protected document. But if the end-user doesn't know the password protecting the BASIC library (this is intended), he/she is stuck.
Comment 3 Urmas 2012-12-17 18:45:51 UTC
*** Bug 58426 has been marked as a duplicate of this bug. ***
Comment 4 Joel Madero 2014-05-21 16:22:49 UTC
Ubuntu 14.04 x64
LibreOffice 4.2.4.2 release

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Just tested this on 4.2.4.2 release and it seems to work fine.


Marking as:
RESOLVED
WORKSFORME

If you still have this problem on 4.2.4.2 release please mark the bug as UNCONFIRMED and let us know your platform. Thanks!
Comment 5 Karel Behounek 2014-05-22 08:10:53 UTC
Thanks for the feedback, unfortunately it does not work for me.

Xubuntu 14.04 x86 (Ubuntu 14.04 LTS + Xfce 4.10), Czech localization in case it matters
LibreOffice 4.2.4.2 release

I tried both original test file included in attachment 70101 [details] (comment 2 in this thread) and a new file created from the scratch (in 4.2.4.2) and the behaviour is identical (broken) in both cases. On Windows platform it is the same.

Steps to reproduce:

- download the attachment 70101 [details] above
- open the file password-test-protected.ods from within it
- click on the "Run Test" button
- text string "This should display in cyrillic: ????????? ????????." appears in the A1 cell, i. e. question marks instead of cyrillic characters

When I do the same with the file password-test-unprotected.ods, the string is displayed correctly after pressing the "Run Test" button. See attached pair of screenshots.

It is important to NOT unlock the library (by entering the password) before pressing the "Run Test" button.
Comment 6 Karel Behounek 2014-05-22 08:13:04 UTC
Created attachment 99565 [details]
Illustration of behaviour (for comment 5)
Comment 7 Joel Madero 2014-05-22 14:22:58 UTC
Please don't change the version - it reflects the oldest confirmed version not the latest tested on. Thanks!
Comment 8 Kevin Suo 2014-08-21 12:21:32 UTC
Created attachment 105034 [details]
screenshot showing where the "password protect" is

Reproduced with version 4.3.1.1, Win7.

Set to NEW.

Password protect = protect the "libary", not the document, see screenshot.
Comment 9 Kevin Suo 2014-08-21 12:23:10 UTC
Created attachment 105035 [details]
An ODS file with password-protected macro library


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.