[Libreoffice-bugs] [Bug 112404] SEARCH function of Calc called via the FunctionAccess service does not apply HOST-USE-REGULAR-EXPRESSIONS if true.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 15 13:06:34 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=112404
Eike Rathke <erack at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|BASIC |Calc
Ever confirmed|0 |1
--- Comment #1 from Eike Rathke <erack at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170915/2b1ff7fd/attachment.html>
More information about the Libreoffice-bugs
mailing list