https://bugs.documentfoundation.org/show_bug.cgi?id=173585
Bug ID: 173585
Summary: findAll() with SearchAttributes crashed Writer
Product: LibreOffice
Version: 26.8.0.3 release
Hardware: Other
OS: macOS (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
Calling ThisComponent.findAll(searchObject) where searchObject includes
SearchAttributes causes Writer to crash. findAll without SearchAttributes and
findFirst with SearchAttributes both work fine.
NOTE: Likely duplicate of 173059.
Steps to Reproduce:
1. Open any document (including a new document, blank or not blank)
2. Add the macro below
3. Run the macro
Sub ReproduceFindAllCrash
Dim oDoc As Object, oSearch As Object, oFound As Object
Dim aAttribs(0) As New com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oSearch = oDoc.createSearchDescriptor()
' Crash happens regardless of these values
oSearch.SearchString = "Hello"
aAttribs(0).Name = "CharPosture"
aAttribs(0).Value = com.sun.star.awt.FontSlant.ITALIC
' Remove this line and findAll works fine
oSearch.SearchAttributes = aAttribs()
' Change findAll to findFirst and everything works
oFound = oDoc.findAll(oSearch)
End Sub
Actual Results:
Writer crashes.
Expected Results:
Find zero or more instances of the searched item/attributes.
Reproducible: Always
User Profile Reset: No
Additional Info:
This was tested both with my usual user profile and with a clean installation.
Hardware is MacBook Air with Apple Silicon M1.
--
You are receiving this mail because:
You are the assignee for the bug.