[Libreoffice-bugs] [Bug 107572] New: Macro Calc Range autoformat("Default") throws IllegalArgumentException

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue May 2 19:47:25 UTC 2017


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

            Bug ID: 107572
           Summary: Macro Calc Range autoformat("Default") throws
                    IllegalArgumentException
           Product: LibreOffice
           Version: 5.3.2.2 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: database.frameworks at gmail.com

Description:
Wrote a function in BASIC that formats a Calc range using .autoformat function,
see documentation here:
http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XAutoFormattable.html

In the API reference it says it throws the error
com::sun::star::lang::IllegalArgumentException if the specified AutoFormat does
not exist. However, calling .autoformat("Default") throws this error, even
though "Default" is an autoformat that exists.

Steps to Reproduce:
1. Open a calc document
2. In any BASIC macro routine, copy in the following line of code:

thisComponent.Sheets(0).getCellRangeByName("A1:F14").autoformat("Default")

3. Running this macro results in the IllegalArgumentException
4. Confirm that the syntax is correct by using a different autoformat like:

thisComponent.Sheets(0).getCellRangeByName("A1:F14").autoformat("Green")

Actual Results:  
IllegalArgumentException

Expected Results:
Calc Range Autoformatted using "Default" autoformatting


Reproducible: Always

User Profile Reset: Yes

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101
Firefox/53.0

-- 
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/20170502/cd74f244/attachment-0001.html>


More information about the Libreoffice-bugs mailing list