[Libreoffice-commits] core.git: vcl/unx

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Oct 31 10:17:00 UTC 2020


 vcl/unx/generic/gdi/cairo_xlib_cairo.hxx |    4 ++--
 vcl/unx/generic/gdi/salgdi.cxx           |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 61e8c19f41f117bcf4b4b709aebb1245a05a206d
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Oct 30 22:28:41 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Oct 31 11:16:27 2020 +0100

    X11Pixmap::mhDrawable only ever holds a Pixmap
    
    ...(passed in in X11Surface::getSimilar at
    vcl/unx/generic/gdi/cairo_xlib_cairo.cxx:226), so use that for its type.  (Using
    an appropriate UNO type when passing it into an any in
    X11SalGraphics::GetNativeSurfaceHandle will be addressed in a later commit; lets
    stick to tools::Long there for now.)
    
    Change-Id: I047a5f078c4b3c45a8fdc0fb09d544c73a6a4e29
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105087
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
index 793f17f44342..d578d7b14852 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
@@ -48,9 +48,9 @@ namespace cairo {
     struct X11Pixmap
     {
         void* mpDisplay;  // the relevant display connection
-        tools::Long  mhDrawable; // a drawable
+        Pixmap  mhDrawable; // a drawable
 
-        X11Pixmap( tools::Long hDrawable, void* pDisplay ) :
+        X11Pixmap( Pixmap hDrawable, void* pDisplay ) :
             mpDisplay(pDisplay),
             mhDrawable(hDrawable)
         {}
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 045a97e14db0..06400197d490 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -573,7 +573,7 @@ css::uno::Any X11SalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rS
     cairo::X11Surface& rXlibSurface=dynamic_cast<cairo::X11Surface&>(*rSurface);
     css::uno::Sequence< css::uno::Any > args( 3 );
     args[0] <<= false;  // do not call XFreePixmap on it
-    args[1] <<= rXlibSurface.getPixmap()->mhDrawable;
+    args[1] <<= tools::Long(rXlibSurface.getPixmap()->mhDrawable);
     args[2] <<= sal_Int32( rXlibSurface.getDepth() );
     return css::uno::Any(args);
 }


More information about the Libreoffice-commits mailing list