Created attachment 184955 [details] A document with an as-character OLE, to-paragraph image, and a macro to set objects' properties Open the attached document, and run SetDefaultStyle macro. Often (but not 100%), immediately after the macro, the image is located above the OLE object, and the latter is partly visible at the bottom of the first page (there's no second page). In this case, saving and reloading, or using Tools->Update->Update All, fixes the layout: the OLE object gets above the image, and the latter goes to the second page, as expected. The problem seems to only appear when the macro is run using Tools->Macros->Run Macro; and additionally, when the dialog overlaps the document window. It does not appear when the macro is run from IDE; also it does not happen when the Macro Selector dialog is moved elsewhere, so that the mouse is not inside the document window after clicking the [ Run ] button. It looks related to *some* processing of application events inside SbiRuntime::Step.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0b1d6220c6ece62653963ef782ee32efb639016e tdf#153235: Optimize Application::Reschedule calls in SbiRuntime::Step It will be available in 7.6.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.
Created attachment 184956 [details] A smaller sample
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/358f21e0c2de2067c14c54ce41954954508d3550 tdf#153235: Optimize Application::Reschedule calls in SbiRuntime::Step It will be available in 7.5.1. 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.