office-gobmx/sdext
Miklos Vajna b3f2ae52e3 framework: fix crash on Writer startup when using --enable-ext-wiki-publisher
As reported by Julien, once the mediawiki extension is installed, the
xHandler in framework::DispatchProvider::implts_searchProtocolHandler()
points to an UNO component implemented in Java, and we crash in
dynamic_cast<>(), at least on Linux with gcc 7.5 and libstdc++.

This dynamic_cast<>() call was added in commit
c0fa456436 (tdf#149261 sdext: fix crash on
starting the presenter console for the 2nd time, 2022-05-26), to allow
the presenter console to opt out from protocol handler caching. It was
expected that the proxy object created for a Java UNO component would
simply return nullptr when we try to dynamic_cast<>() it down to a C++
interface.

Fix the problem by moving the interface to an UNO one: this side-steps
the dynamic_cast<>() crash at the price of introducing an UNO interface,
which is not meant to be part of the public UNO API (but at least it's
not published).

It may still make sense to improve the bridges/ code at some stage to
not crash in dynamic_cast<>() on generated Java proxy objects.

Change-Id: Iaac44515339e0dc15dddc3be45ef7dee7331e47a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135114
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-05-30 12:08:03 +02:00
..
inc
source framework: fix crash on Writer startup when using --enable-ext-wiki-publisher 2022-05-30 12:08:03 +02:00
CppunitTest_sdext_pdfimport.mk
CustomTarget_pdfimport.mk
Executable_pdf2xml.mk
Executable_pdfunzip.mk
Executable_xpdfimport.mk
IwyuFilter_sdext.yaml
Library_pdfimport.mk
Library_PresentationMinimizer.mk
Library_PresenterScreen.mk
Makefile
Module_sdext.mk
Package_pdfimport_xpdfimport.mk
README.md

Extensions for the Impress and Draw Applications

source/pdfimport/ - PDF import

Uses an external poppler process to parse and handle PDF import as draw shapes.

source/minimizer/ - Presentation Minimizer

Shrinks presentations by down-scaling images, and removing extraneous eg. embedded OLE content.

source/presenter/ - Impress / Presenter Console.

This couples to sd/ in rather strange ways. Its design is heavily mangled by an attempt to use only UNO interfaces which are highly inadequate. This leads to somewhat ridiculous situations. Activating in response to configuration keys (for example), and the XPresenterHelper interface inside sd/ used to create and manage windows.

The main screen uses a hardware-accelerated canvas (e.g. cairo canvas), while the entire secondary screen uses a VCL-canvas that is created in sd::framework::FullScreenPane::CreateCanvas().

The secondary screen contains 3 Panes which each have 2 XWindows for the border area & the actual content, and each content Pane is backed by a sd::presenter::PresenterCanvas that wraps the FullScreenPane's canvas and does clipping.