canvas/source/opengl/ogl_spritedevicehelper.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit ed52d1eb0aaceed3aae1c182091401f9c433acdd Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 24 15:25:09 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 24 17:19:14 2021 +0200 adapt oglcanvas::SpriteDeviceHelper::getDeviceHandle to match the other implementations that return the OutputDevice* I tried enabling SpriteCanvas.OGL in officecfg/registry/data/org/openoffice/Office/Canvas.xcu with <node oor:name="com.sun.star.rendering.SpriteCanvas" oor:op="replace"> <prop oor:name="PreferredImplementations" oor:type="oor:string-list"> <value oor:separator=",">com.sun.star.comp.rendering.SpriteCanvas.DX9, - com.sun.star.comp.rendering.SpriteCanvas.Cairo, + com.sun.star.comp.rendering.SpriteCanvas.OGL, com.sun.star.comp.rendering.SpriteCanvas.VCL but it crashes before it gets very far and before it gets to this method. I tried in 7.1 and 7.0 but the same result so I can't tell if this fix is needed, but they surely should be the same as the others. Change-Id: I4f3715568eb0ec3a3bc57f6e6bdf158ff530ca5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116061 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx index 7e838162e6c3..553798aa9fd9 100644 --- a/canvas/source/opengl/ogl_spritedevicehelper.cxx +++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx @@ -342,7 +342,8 @@ namespace oglcanvas uno::Any SpriteDeviceHelper::getDeviceHandle() const { const SystemChildWindow* pChildWindow = mxContext->getChildWindow(); - return uno::Any( reinterpret_cast< sal_Int64 >(pChildWindow) ); + const OutputDevice* pDevice = pChildWindow ? pChildWindow->GetOutDev() : nullptr; + return uno::Any(reinterpret_cast<sal_Int64>(pDevice)); } uno::Any SpriteDeviceHelper::getSurfaceHandle() const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits