diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 15:25:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 17:19:14 +0200 |
commit | ed52d1eb0aaceed3aae1c182091401f9c433acdd (patch) | |
tree | 275f723e831058aa35845dba3a60fa34b4615eff /canvas/source | |
parent | a0f6319ca5bb0fb19e7de59cafe7e7a7d47a1006 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'canvas/source')
-rw-r--r-- | canvas/source/opengl/ogl_spritedevicehelper.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |