[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - vcl/unx

Katarina Behrens Katarina.Behrens at cib.de
Fri Apr 27 08:08:41 UTC 2018


 vcl/unx/kde5/KDE5SalGraphics.cxx |   33 ---------------------------------
 1 file changed, 33 deletions(-)

New commits:
commit 56946751df8d7e7ad6e75326bb08b469d9b317fd
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Fri Apr 27 10:04:14 2018 +0200

    Remove IMAGE_BASED_PAINTING dead code
    
    Change-Id: I2d30c61c2a8cbf69e04dd24098c0fffb7dac442d

diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 1685a772a88b..59cdd1347fb9 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -157,39 +157,6 @@ namespace
     }
 }
 
-#if QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 )
-#define IMAGE_BASED_PAINTING
-#else
-#undef IMAGE_BASED_PAINTING
-#endif
-
-#ifdef IMAGE_BASED_PAINTING
-// There is a small catch with this function, although hopefully only philosophical.
-// Officially Xlib's vcl::Region is an opaque data type, with only functions for manipulating it.
-// However, whoever designed it apparently didn't give it that much thought, as it's impossible
-// to find out what exactly a region actually is (except for really weird ways like XClipBox()
-// and repeated XPointInRegion(), which would be awfully slow). Fortunately, the header file
-// describing the structure actually happens to be installed too, and there's at least one
-// widely used software using it (Compiz). So access the data directly too and assume that
-// everybody who compiles with Qt4 support has Xlib new enough and good enough to support this.
-// In case this doesn't work for somebody, try #include <X11/region.h> instead, or build
-// without IMAGE_BASED_PAINTING (in which case QApplication::setGraphicsSystem( "native" ) may
-// be needed too).
-#include <X11/Xregion.h>
-static QRegion XRegionToQRegion( Region xr )
-{
-    QRegion qr;
-    for( long i = 0;
-         i < xr->numRects;
-         ++i )
-    {
-        BOX& b = xr->rects[ i ];
-        qr |= QRect( b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1 ); // x2,y2 is outside, not the bottom-right corner
-    }
-    return qr;
-}
-#endif
-
 bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
                                         const tools::Rectangle& rControlRegion, ControlState nControlState,
                                         const ImplControlValue& value,


More information about the Libreoffice-commits mailing list