<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Macro Calc Range autoformat("Default") throws IllegalArgumentException"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=107572">107572</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Macro Calc Range autoformat("Default") throws IllegalArgumentException
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>5.3.2.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>BASIC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>database.frameworks@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Description:
Wrote a function in BASIC that formats a Calc range using .autoformat function,
see documentation here:
<a href="http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XAutoFormattable.html">http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XAutoFormattable.html</a>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>