Bug 149775 - New Find objects created for each call to Selection.Find
Summary: New Find objects created for each call to Selection.Find
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Hannah Meeks
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2022-06-29 17:16 UTC by Hannah Meeks
Modified: 2024-03-27 10:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hannah Meeks 2022-06-29 17:16:39 UTC
Description:
Find state needs to be persisted so as to be compatible with: https://docs.microsoft.com/en-us/office/vba/api/word.find
Seems to be application level so use static

Steps to Reproduce:
/

Actual Results:
/

Expected Results:
/


Reproducible: Always


User Profile Reset: No



Additional Info:
/
Comment 1 Hannah Meeks 2022-06-29 17:20:38 UTC
With Selection.Find 
 .ClearFormatting 
 .Text = "hi" 
 .Execute Forward:=True 
End With

- This would make a new object for every line which ends up not executing anything useful! :-)
Comment 2 Julien Nabet 2022-06-29 19:02:51 UTC
Let's put this one as ASSIGNED since you assigned yourself :-)
Comment 3 Commit Notification 2022-07-12 05:38:51 UTC
Hannah Meeks committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f6be2bf969bac1f5c6ac452b313374ba09ffaa58

tdf#149775 - VBA: Find should stay around.

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Buovjaga 2022-11-01 07:02:25 UTC
Looks like this can be changed to fixed status. Thanks.
Comment 5 Xisco Faulí 2023-03-07 11:56:02 UTC
Hi Hannah Meeks,
would it be possible to have a unittest for this issue ?