Commit8872f7121b(crashtesting: crash on exporting kde274105-6.docx to .rtf, 2024-03-27) added some safety code in EmbeddedObjectRef::GetReplacement. It mentioned, that there are likely some bugs in the management of the graphic. This tries to fix this management, avoiding the intermediate states, and only changing the graphic when all the data is ready. This also reverts the changes of the mentioned commit, obsoleted now; and of commit8780fa41dc(svtools: fix lost replacement grpahic when updating it via OLE fails, 2018-10-30); but keeps commit24231f2a33(svtools: fix lost replacement non-rendered graphic when updating it fails, 2022-02-17). This has revealed that the second part of unit test for tdf#143222 ("Check export of embedded worksheet in slide"), introduced in commit92a407b7f9(tdf143222 Handle alternate content of graphicData element., 2021-07-08), has never really worked: the "pGraphic != nullptr" check would never fail; in fact, that used to always return an empty graphic. The problem was filed as tdf#163064, and the test was modified accordingly. Commit5d997c029e(sw XHTML export: improve dummy OLE object handling, 2018-08-30) made ReqIF export handle missing replacement graphic. However, it had assumed that SwOLENode::GetGraphic always returns a valid pointer even for the missing data. That is fixed here in OutHTML_FrameFormatOLENodeGrf. Other places, where the pointer was dereferenced unconditionally, were fixed (keeping current behavior). Change-Id: Ica97a691ecc11b856bdb003f89467ea3392684bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173716 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tools on the Top of VCL
Common dialogs, file and print dialogs, wizards, vcl filters, lots of helper code.