summaryrefslogtreecommitdiffstats
path: root/canvas/source/directx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/directx')
-rw-r--r--canvas/source/directx/dx_9rm.cxx49
-rw-r--r--canvas/source/directx/dx_bitmap.cxx11
-rw-r--r--canvas/source/directx/dx_bitmapcanvashelper.cxx29
-rw-r--r--canvas/source/directx/dx_canvas.cxx34
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx15
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.cxx14
-rw-r--r--canvas/source/directx/dx_canvasfont.cxx15
-rw-r--r--canvas/source/directx/dx_canvashelper.cxx34
-rw-r--r--canvas/source/directx/dx_canvashelper_texturefill.cxx30
-rw-r--r--canvas/source/directx/dx_config.cxx7
-rw-r--r--canvas/source/directx/dx_devicehelper.cxx26
-rw-r--r--canvas/source/directx/dx_gdiplususer.cxx3
-rw-r--r--canvas/source/directx/dx_impltools.cxx33
-rw-r--r--canvas/source/directx/dx_linepolypolygon.cxx2
-rw-r--r--canvas/source/directx/dx_spritecanvas.cxx28
-rw-r--r--canvas/source/directx/dx_spritecanvashelper.cxx14
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.cxx17
-rw-r--r--canvas/source/directx/dx_spritehelper.cxx21
-rw-r--r--canvas/source/directx/dx_surfacebitmap.cxx15
-rw-r--r--canvas/source/directx/dx_surfacegraphics.cxx3
-rw-r--r--canvas/source/directx/dx_textlayout.cxx6
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx31
-rw-r--r--canvas/source/directx/dx_vcltools.cxx13
-rw-r--r--canvas/source/directx/dx_winstuff.hxx35
24 files changed, 239 insertions, 246 deletions
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index d18d34ad44c7..197f0a93e740 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -17,47 +17,46 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#define MAX_TEXTURE_SIZE (2048)
-#define MIN_TEXTURE_SIZE (32)
-//#define FAKE_MAX_NUMBER_TEXTURES (2)
-//#define FAKE_MAX_TEXTURE_SIZE (4096)
-
-#define VERTEX_BUFFER_SIZE (341*3) // 1023, the size of the internal
- // vertex buffer (must be divisable
- // by 3, as each triangle primitive
- // has 3 vertices)
#include <string.h>
+#include <boost/scoped_ptr.hpp>
+
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/range/b2irectangle.hxx>
+#include <basegfx/vector/b2dsize.hxx>
+#include <basegfx/vector/b2isize.hxx>
+#include <com/sun/star/lang/NoSupportException.hpp>
#include <osl/thread.h>
#include <osl/time.h>
-
+#include <tools/diagnose_ex.h>
#include <vcl/syschild.hxx>
+#include <vcl/sysdata.hxx>
#include <vcl/window.hxx>
-#include <tools/diagnose_ex.h>
-
#include <canvas/elapsedtime.hxx>
#include <canvas/canvastools.hxx>
#include <canvas/rendering/icolorbuffer.hxx>
-#include <canvas/rendering/isurface.hxx>
#include <canvas/rendering/irendermodule.hxx>
-#include <basegfx/numeric/ftools.hxx>
-#include <basegfx/vector/b2dsize.hxx>
-#include <basegfx/vector/b2isize.hxx>
-#include <basegfx/point/b2ipoint.hxx>
-#include <basegfx/range/b2irectangle.hxx>
-#include <boost/scoped_ptr.hpp>
-#include <com/sun/star/lang/NoSupportException.hpp>
+#include <canvas/rendering/isurface.hxx>
-#include "dx_rendermodule.hxx"
#include "dx_config.hxx"
+#include "dx_impltools.hxx"
+#include "dx_rendermodule.hxx"
-#undef WB_LEFT
-#undef WB_RIGHT
-#include "dx_impltools.hxx"
-#include <vcl/sysdata.hxx>
+#define MAX_TEXTURE_SIZE (2048)
+#define MIN_TEXTURE_SIZE (32)
+//#define FAKE_MAX_NUMBER_TEXTURES (2)
+//#define FAKE_MAX_TEXTURE_SIZE (4096)
+
+#define VERTEX_BUFFER_SIZE (341*3) // 1023, the size of the internal
+ // vertex buffer (must be divisable
+ // by 3, as each triangle primitive
+ // has 3 vertices)
+
#if defined(DX_DEBUG_IMAGES)
# if OSL_DEBUG_LEVEL > 0
diff --git a/canvas/source/directx/dx_bitmap.cxx b/canvas/source/directx/dx_bitmap.cxx
index 145848eea05a..3f5672101965 100644
--- a/canvas/source/directx/dx_bitmap.cxx
+++ b/canvas/source/directx/dx_bitmap.cxx
@@ -17,17 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/range/b2irange.hxx>
+#include <tools/diagnose_ex.h>
#include "dx_bitmap.hxx"
#include "dx_graphicsprovider.hxx"
#include "dx_impltools.hxx"
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/range/b2irange.hxx>
-
#if defined(DX_DEBUG_IMAGES)
# if OSL_DEBUG_LEVEL > 0
# include <imdebug.h>
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index 0221cecde14d..09f4f5170a64 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -17,32 +17,29 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <rtl/math.hxx>
-
-#include <com/sun/star/rendering/TexturingMode.hpp>
-#include <com/sun/star/rendering/CompositeOperation.hpp>
-#include <com/sun/star/rendering/RepaintResult.hpp>
-#include <com/sun/star/rendering/PathCapType.hpp>
-#include <com/sun/star/rendering/PathJoinType.hpp>
+#include <algorithm>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/tools/canvastools.hxx>
-
+#include <com/sun/star/rendering/CompositeOperation.hpp>
+#include <com/sun/star/rendering/PathCapType.hpp>
+#include <com/sun/star/rendering/PathJoinType.hpp>
+#include <com/sun/star/rendering/RepaintResult.hpp>
+#include <com/sun/star/rendering/TexturingMode.hpp>
#include <comphelper/sequence.hxx>
+#include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
+
#include <canvas/canvastools.hxx>
-#include "dx_spritecanvas.hxx"
-#include "dx_impltools.hxx"
+#include "dx_bitmapcanvashelper.hxx"
#include "dx_canvasfont.hxx"
+#include "dx_impltools.hxx"
+#include "dx_spritecanvas.hxx"
#include "dx_textlayout.hxx"
-#include "dx_bitmapcanvashelper.hxx"
-
-#include <algorithm>
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index ebf370e90073..f8578317d762 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -17,35 +17,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <ctype.h>
-#include <canvas/canvastools.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <osl/mutex.hxx>
+#include <cctype>
-#include <com/sun/star/awt/XWindow.hpp>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/tools/canvastools.hxx>
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/NoSupportException.hpp>
-
-#include <toolkit/helper/vclunohelper.hxx>
+#include <comphelper/servicedecl.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
-#include <comphelper/servicedecl.hxx>
+#include <osl/mutex.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/sysdata.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include <basegfx/numeric/ftools.hxx>
+#include <canvas/canvastools.hxx>
+#include "dx_canvas.hxx"
#include "dx_graphicsprovider.hxx"
#include "dx_winstuff.hxx"
-#include "dx_canvas.hxx"
-
-#include <vcl/sysdata.hxx>
#define CANVAS_TECH "GDI+"
#define CANVAS_SERVICE_NAME "com.sun.star.rendering.Canvas." CANVAS_TECH
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index 60968a19d42f..c30c74f94659 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -17,18 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cctype>
+#include <memory>
+
+#include <boost/preprocessor/repetition.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
-#include <ctype.h>
-#include <canvas/debug.hxx>
-#include <canvas/canvastools.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
-
#include <vcl/bitmapex.hxx>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <memory>
+#include <canvas/canvastools.hxx>
#include "dx_canvasbitmap.hxx"
#include "dx_impltools.hxx"
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index 7dbe80a0d99a..b6295424e005 100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -17,21 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <ctype.h>
-#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
+#include <cctype>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-
#include "dx_canvascustomsprite.hxx"
-#include "dx_spritecanvas.hxx"
#include "dx_impltools.hxx"
+#include "dx_spritecanvas.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_canvasfont.cxx b/canvas/source/directx/dx_canvasfont.cxx
index 2ad724d966ca..92528376b9d4 100644
--- a/canvas/source/directx/dx_canvasfont.cxx
+++ b/canvas/source/directx/dx_canvasfont.cxx
@@ -17,18 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <ctype.h>
-#include "dx_winstuff.hxx"
-#include "dx_spritecanvas.hxx"
-#include "dx_canvasfont.hxx"
-#include "dx_textlayout.hxx"
+#include <cctype>
-#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <com/sun/star/rendering/PanoseWeight.hpp>
-
+#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include "dx_canvasfont.hxx"
+#include "dx_spritecanvas.hxx"
+#include "dx_textlayout.hxx"
+#include "dx_winstuff.hxx"
+
using namespace ::com::sun::star;
namespace dxcanvas
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index a02455268467..be53b374f291 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -17,35 +17,31 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <rtl/math.hxx>
-
-#include <com/sun/star/rendering/TexturingMode.hpp>
-#include <com/sun/star/rendering/CompositeOperation.hpp>
-#include <com/sun/star/rendering/RepaintResult.hpp>
-#include <com/sun/star/rendering/PathCapType.hpp>
-#include <com/sun/star/rendering/PathJoinType.hpp>
+#include <algorithm>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/tools/canvastools.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
+#include <com/sun/star/rendering/CompositeOperation.hpp>
+#include <com/sun/star/rendering/PathCapType.hpp>
+#include <com/sun/star/rendering/PathJoinType.hpp>
+#include <com/sun/star/rendering/RepaintResult.hpp>
+#include <com/sun/star/rendering/TexturingMode.hpp>
#include <comphelper/sequence.hxx>
+#include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
+
#include <canvas/canvastools.hxx>
-#include "dx_spritecanvas.hxx"
-#include "dx_impltools.hxx"
-#include "dx_vcltools.hxx"
#include "dx_canvasfont.hxx"
-#include "dx_textlayout.hxx"
#include "dx_canvashelper.hxx"
-
-#include <algorithm>
-
+#include "dx_impltools.hxx"
+#include "dx_spritecanvas.hxx"
+#include "dx_textlayout.hxx"
+#include "dx_vcltools.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 5bde878c75d5..f776ec73c9db 100644
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -17,33 +17,31 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <rtl/math.hxx>
-
-#include <com/sun/star/rendering/TexturingMode.hpp>
+#include <boost/bind.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/tuple/tuple.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/tools/tools.hxx>
-#include <basegfx/tools/lerp.hxx>
-#include <basegfx/tools/keystoplerp.hxx>
+#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/tools/canvastools.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/tools/keystoplerp.hxx>
+#include <basegfx/tools/lerp.hxx>
+#include <basegfx/tools/tools.hxx>
+#include <com/sun/star/rendering/TexturingMode.hpp>
+#include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
#include <canvas/parametricpolypolygon.hxx>
-#include "dx_spritecanvas.hxx"
#include "dx_canvashelper.hxx"
#include "dx_impltools.hxx"
-
-#include <boost/scoped_ptr.hpp>
-#include <boost/bind.hpp>
-#include <boost/tuple/tuple.hpp>
+#include "dx_spritecanvas.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index 76a68176af3e..e4abde4dda51 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -17,16 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include "dx_config.hxx"
-
+#include <basegfx/vector/b2ivector.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/anytostring.hxx>
-#include <basegfx/vector/b2ivector.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
+#include "dx_config.hxx"
+
using namespace com::sun::star;
namespace dxcanvas
diff --git a/canvas/source/directx/dx_devicehelper.cxx b/canvas/source/directx/dx_devicehelper.cxx
index 384d635dfb6d..f6a04057e420 100644
--- a/canvas/source/directx/dx_devicehelper.cxx
+++ b/canvas/source/directx/dx_devicehelper.cxx
@@ -17,26 +17,28 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <ctype.h>
-#include <vcl/window.hxx>
-#include <vcl/canvastools.hxx>
-#include <canvas/canvastools.hxx>
-#include <tools/diagnose_ex.h>
+#include <cctype>
-#include <osl/mutex.hxx>
+#include <basegfx/tools/canvastools.hxx>
#include <com/sun/star/lang/NoSupportException.hpp>
+#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include "dx_linepolypolygon.hxx"
-#include "dx_spritecanvas.hxx"
+#include <tools/diagnose_ex.h>
+#include <vcl/canvastools.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/sysdata.hxx>
+#include <vcl/window.hxx>
+
+#include <canvas/canvastools.hxx>
+
#include "dx_canvasbitmap.hxx"
#include "dx_devicehelper.hxx"
+#include "dx_linepolypolygon.hxx"
+#include "dx_spritecanvas.hxx"
#include "dx_winstuff.hxx"
-#include <vcl/sysdata.hxx>
-#include <vcl/outdev.hxx>
-
using namespace ::com::sun::star;
namespace dxcanvas
diff --git a/canvas/source/directx/dx_gdiplususer.cxx b/canvas/source/directx/dx_gdiplususer.cxx
index 9c6e33f0ccca..b1517e65f52a 100644
--- a/canvas/source/directx/dx_gdiplususer.cxx
+++ b/canvas/source/directx/dx_gdiplususer.cxx
@@ -17,11 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
#include <osl/mutex.hxx>
-#include "dx_winstuff.hxx"
#include "dx_gdiplususer.hxx"
+#include "dx_winstuff.hxx"
namespace dxcanvas
diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx
index 98a9e49f01f9..f2d0e7745ba7 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -17,37 +17,36 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <ctype.h>
-#include <basegfx/numeric/ftools.hxx>
+#include <algorithm>
+#include <cctype>
+#include <vector>
-#include <tools/diagnose_ex.h>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/geometry/RealPoint2D.hpp>
-#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/range/b2irectangle.hxx>
-#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/numeric/ftools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/range/b2irectangle.hxx>
#include <basegfx/tools/canvastools.hxx>
+#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
+#include <com/sun/star/geometry/RealPoint2D.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
#include <canvas/verifyinput.hxx>
-#include "dx_impltools.hxx"
-#include "dx_vcltools.hxx"
-#include "dx_linepolypolygon.hxx"
+#include "dx_canvas.hxx"
#include "dx_canvasbitmap.hxx"
#include "dx_canvasfont.hxx"
-#include "dx_canvas.hxx"
+#include "dx_impltools.hxx"
+#include "dx_linepolypolygon.hxx"
#include "dx_spritecanvas.hxx"
-
-#include <vector>
-#include <algorithm>
+#include "dx_vcltools.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_linepolypolygon.cxx b/canvas/source/directx/dx_linepolypolygon.cxx
index 112aee25a2ff..801905c6ce7d 100644
--- a/canvas/source/directx/dx_linepolypolygon.cxx
+++ b/canvas/source/directx/dx_linepolypolygon.cxx
@@ -17,8 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
#include <basegfx/tools/canvastools.hxx>
+
#include "dx_linepolypolygon.hxx"
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index d6a0e78d655c..bece2437e03c 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -17,31 +17,29 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
#include <ctype.h>
-#include <tools/diagnose_ex.h>
-
-#include <canvas/canvastools.hxx>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/NoSupportException.hpp>
-
-#include <toolkit/helper/vclunohelper.hxx>
+#include <comphelper/servicedecl.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
-#include <comphelper/servicedecl.hxx>
+#include <osl/mutex.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include <basegfx/numeric/ftools.hxx>
+#include <canvas/canvastools.hxx>
-#include "dx_winstuff.hxx"
#include "dx_spritecanvas.hxx"
+#include "dx_winstuff.hxx"
#define CANVAS_TECH "DX9"
diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx
index e596805b2316..ff485e73c8e7 100644
--- a/canvas/source/directx/dx_spritecanvashelper.cxx
+++ b/canvas/source/directx/dx_spritecanvashelper.cxx
@@ -17,20 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include <canvas/canvastools.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <comphelper/scopeguard.hxx>
+#include <boost/bind.hpp>
+#include <boost/cast.hpp>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/tools/canvastools.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <tools/diagnose_ex.h>
-#include <boost/bind.hpp>
-#include <boost/cast.hpp>
+#include <canvas/canvastools.hxx>
-#include "dx_spritecanvashelper.hxx"
#include "dx_canvascustomsprite.hxx"
+#include "dx_spritecanvashelper.hxx"
#if defined(DX_DEBUG_IMAGES)
# if OSL_DEBUG_LEVEL > 0
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index 6664f23c6796..bb1a5470881c 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -17,22 +17,25 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
#include <ctype.h>
-#include <vcl/window.hxx>
-#include <canvas/canvastools.hxx>
-#include <tools/diagnose_ex.h>
-#include <osl/mutex.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <canvas/canvastools.hxx>
#include <com/sun/star/lang/NoSupportException.hpp>
+#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <basegfx/tools/canvastools.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/sysdata.hxx>
+#include <vcl/window.hxx>
+
+#include "dx_canvasbitmap.hxx"
#include "dx_linepolypolygon.hxx"
#include "dx_spritecanvas.hxx"
-#include "dx_canvasbitmap.hxx"
#include "dx_spritedevicehelper.hxx"
#include "dx_winstuff.hxx"
-#include <vcl/sysdata.hxx>
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx
index 67dd44fe0d10..17c0292f6605 100644
--- a/canvas/source/directx/dx_spritehelper.cxx
+++ b/canvas/source/directx/dx_spritehelper.cxx
@@ -17,25 +17,24 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include <tools/diagnose_ex.h>
-
-#include <rtl/math.hxx>
-
-#include <canvas/canvastools.hxx>
+#include <sal/config.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/tools/canvastools.hxx>
#include <basegfx/numeric/ftools.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygontriangulator.hxx>
-#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <canvas/canvastools.hxx>
#include "dx_canvascustomsprite.hxx"
-#include "dx_spritehelper.hxx"
#include "dx_impltools.hxx"
+#include "dx_spritehelper.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx
index abff2019a3ea..e5d827f439ac 100644
--- a/canvas/source/directx/dx_surfacebitmap.cxx
+++ b/canvas/source/directx/dx_surfacebitmap.cxx
@@ -17,18 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
#include <string.h>
-#include "dx_surfacebitmap.hxx"
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/range/b2irange.hxx>
+#include <tools/diagnose_ex.h>
+
+#include "dx_graphicsprovider.hxx"
#include "dx_impltools.hxx"
+#include "dx_surfacebitmap.hxx"
#include "dx_surfacegraphics.hxx"
-#include "dx_graphicsprovider.hxx"
-
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/range/b2irange.hxx>
#if defined(DX_DEBUG_IMAGES)
# if OSL_DEBUG_LEVEL > 0
diff --git a/canvas/source/directx/dx_surfacegraphics.cxx b/canvas/source/directx/dx_surfacegraphics.cxx
index 06182b5ffe64..c4f03e9db6ec 100644
--- a/canvas/source/directx/dx_surfacegraphics.cxx
+++ b/canvas/source/directx/dx_surfacegraphics.cxx
@@ -17,9 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-#include "dx_surfacegraphics.hxx"
#include "dx_impltools.hxx"
+#include "dx_surfacegraphics.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 3ff3e43d6a44..fea9d9600a57 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -17,15 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
#include <ctype.h>
-#include <cppuhelper/supportsservice.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
#include "dx_bitmap.hxx"
-#include "dx_textlayout.hxx"
#include "dx_spritecanvas.hxx"
+#include "dx_textlayout.hxx"
#include "dx_textlayout_drawhelper.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 2838e570bf0d..55c267d3e208 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -17,32 +17,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include <tools/poly.hxx>
-
-#include <vcl/metric.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/canvastools.hxx>
-#include <tools/diagnose_ex.h>
+#include <sal/config.h>
#include <memory>
#include <boost/bind.hpp>
+
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/tools/canvastools.hxx>
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
-#include <comphelper/sequence.hxx>
#include <comphelper/scopeguard.hxx>
+#include <comphelper/sequence.hxx>
+#include <i18nlangtag/languagetag.hxx>
#include <tools/color.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include <canvas/canvastools.hxx>
-#include <canvas/debug.hxx>
-#include "dx_impltools.hxx"
+#include <tools/diagnose_ex.h>
+#include <tools/poly.hxx>
+#include <vcl/canvastools.hxx>
+#include <vcl/metric.hxx>
#include <vcl/sysdata.hxx>
-#include <i18nlangtag/languagetag.hxx>
-#include "dx_textlayout_drawhelper.hxx"
+#include <vcl/virdev.hxx>
+
+#include <canvas/canvastools.hxx>
+
#include "dx_bitmap.hxx"
#include "dx_canvasfont.hxx"
+#include "dx_impltools.hxx"
+#include "dx_textlayout_drawhelper.hxx"
class css::rendering::XCanvasFont;
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index ace75a27948b..336dc0bd205c 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -17,21 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <basegfx/numeric/ftools.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <tools/diagnose_ex.h>
-
-#include <vcl/canvastools.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/canvastools.hxx>
#include "dx_impltools.hxx"
-
-#include <basegfx/numeric/ftools.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/rendering/XIntegerBitmap.hpp>
-
#include "dx_vcltools.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 7cf2ba870d51..67cf1461f215 100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -26,8 +26,14 @@
#include <basegfx/numeric/ftools.hxx>
-#ifdef _WINDOWS_
-#error someone else included <windows.h>
+#if defined _MSC_VER
+#pragma warning(push,1)
+#endif
+
+#ifndef _WINDOWS_
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
#endif
// Enabling Direct3D Debug Information Further more, with registry key
@@ -38,20 +44,12 @@
# define D3D_DEBUG_INFO
#endif
-#if defined _MSC_VER
-#pragma warning(push,1)
-#endif
-
-#define ULONG win32ULONG
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
#undef WB_LEFT
#undef WB_RIGHT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#include <d3d9.h>
typedef IDirect3DSurface9 surface_type;
@@ -59,19 +57,18 @@ typedef IDirect3DSurface9 surface_type;
#undef DrawText
-#ifdef __MINGW32__
-using ::std::max;
-using ::std::min;
+#ifndef max
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#include <gdiplus.h>
-#ifdef min
-# undef min
-#endif
-#ifdef max
-# undef max
-#endif
+#undef max
+#undef min
+
namespace dxcanvas
{