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

            Bug ID: 106687
           Summary: (Typography Extension v1.1) Pressing "Oldstyle
                    figures" button in Typography Toolbar gives "Basic
                    Syntax error. Expected: )."
           Product: LibreOffice
           Version: 5.3.1.2 release
          Hardware: x86-64 (AMD64)
                OS: Mac OS X (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Extensions
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: from.documentfoundat...@jdlh.com

Description:
When I press the "Oldstyle figures" button on the Typography toolbar, LO
displays an error alert, "BASIC syntax error".

In the "My Macros & Dialogs.typo" dialogue, the BASIC subroutine "My Macros &
Dialogs.typo"… "typo"… "_General" macro is displayed. The orange breakpoint
arrow points to a line in "sub prg(pars)":

n = Mid(n, 1, pos - 1) & s & cstr(refine(id, i) & Mid(n, pos + len(s) +
len(current))

Note that this line ends in two right parenthesis characters. As I count the
parentheses, I think a third right parenthesis is needed at the end of this
line to balance the expresssion.  This third parenthesis closes the cstr()
expression.



Steps to Reproduce:
1. Install the Typography Toolbar extension
https://extensions.libreoffice.org/extensions/typography-toolbar into
LibreOffice 5.3.1.2, Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2,
on Mac OS X 10.11.6.
2. Start LibreOffice
3. Open a new Writer document
4. Type the phrase "test", and select it
5. Select menu item "View"… "Toolbars"… "Typography". The Typography toolbar
appears. Move it into a place in the window where it is usable.
6. Click the "Oldstyle figures" button (which has "123" in it).


Actual Results:  
LO opens the "My Macros & Dialogs.typo" dialogue, and in front of that displays
an error alert:

"LibreOffice 5.3.…
BASIC syntax error.
Expected: ).
[OK]"

When I click on the OK button, the same error alert appears again. When I click
OK on the second alert, it goes away.

There is no change to the formatting of the text.

Expected Results:
LO should have applied the "old style figures" feature to the text. This would
not, in this example, make a visible change. 
There should be no error alert.
The "My Macros & Dialogs.typo" dialogue should not appear.



Reproducible: Always

User Profile Reset: No

Additional Info:
When I try to edit this macro to add the parenthesis, I am unable to change it.
This may be a separate problem.

I get a similar BASIC error when I press other buttons in the toolbar, or even
the Help link.

I reproduced this with "Typography toolbar - 1.1". The extension file is named
"typo-0-5.oxt". The Extensions page
https://extensions.libreoffice.org/extensions/typography-toolbar says it was
released Mar 19, 2013, and tested with: LibreOffice 3.5, LibreOffice 4.0.  

I speculate that the BASIC line really is missing a closing parenthesis, that
it has been wrong all along, and that something changed between LO 4.0 and 5.3
in how LO's BASIC interpreter handles this kind of error. Maybe before it
silently assumed an extra closing parenthesis, but now it raises an error
alert.

Workaround: use the OpenType feature tag syntax
(https://ask.libreoffice.org/en/question/82052/opentype-features-now-enabled-documentation/?answer=90815#post-id-90815)
in the font name to invoke features. 



User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0)
Gecko/20100101 Firefox/52.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to