https://bugs.documentfoundation.org/show_bug.cgi?id=100817
Bug ID: 100817
Summary: SearchRegularExpression not working in API (Java)
XSearchDescriptor for Impress document (XPage)
Product: LibreOffice
Version: 5.1.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
When attempting to set the search option 'SearchRegularExpression' on an XPage
(Impress) SearchDescriptor an exception is thrown (see Exception). It is
possible to set the 'Regular Expression' flag in the LibreOffice Impress
Advanced Search field so the feature is available in the runtime. When I get
the XPropertySet for the XSearchDescriptor it is missing the
'SearchRegularExpression' property.
Exception:
com.sun.star.beans.UnknownPropertyException:
Sample Code:
...
XDrawPagesSupplier pageSupplier =
UnoRuntime.queryInterface(XDrawPagesSupplier.class,
xComp);
XDrawPages pages = pageSupplier.getDrawPages();
XDrawPage page = UnoRuntime.queryInterface(XDrawPage.class,
pages.getByIndex(0));
XSearchable xSearchable =
UnoRuntime.queryInterface(XSearchable.class, page);
// You need a descriptor to set properies for Replace
XSearchDescriptor startTagSearch =
xSearchable.createSearchDescriptor();
XPropertySet propertySet =
UnoRuntime.queryInterface(XPropertySet.class, startTagSearch);
propertySet.setPropertyValue("SearchRegularExpression",Boolean.TRUE);
// Exception thrown here !!
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs