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

Eike Rathke <er...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|BASIC                       |Calc
     Ever confirmed|0                           |1

--- Comment #1 from Eike Rathke <er...@redhat.com> ---
This seems to be related to the new default being Wildcards instead of Regexp,
for Excel compatibility (see
https://wiki.documentfoundation.org/ReleaseNotes/5.3#Option_settings). The
scratch environment in which the function call is executed is initialized with
default options, not configuration options, to have the same default behaviour
through API calls.

You can easily force regular expressions by setting the corresponding
RegularExpressions property of the
com.sun.star.sheet.SpreadsheetDocumentSettings service exposed by the
com.sun.star.sheet.FunctionAccess service, i.e. in the attached document's case
a simple

fa.RegularExpressions = 1

does it, it overrides the Wildcards property, see also
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetDocumentSettings.html#a04e61cf6d299d96820ace9b67d2acedb

We maybe could merge this setting from the current document where the macro is
executed, but that would need detection first whether the property was already
set via the service to not override that one..

Explicitly setting the property nevertheless is the cleaner approach if you
know the function should handle regexp as in this case.

-- 
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