summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/outdev.hxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx28
-rw-r--r--vcl/source/outdev/curvedshapes.cxx10
-rw-r--r--vcl/source/outdev/gradient.cxx22
-rw-r--r--vcl/source/outdev/hatch.cxx8
-rw-r--r--vcl/source/outdev/line.cxx5
-rw-r--r--vcl/source/outdev/mask.cxx10
-rw-r--r--vcl/source/outdev/nativecontrols.cxx4
-rw-r--r--vcl/source/outdev/pixel.cxx11
-rw-r--r--vcl/source/outdev/polygon.cxx11
-rw-r--r--vcl/source/outdev/polyline.cxx11
-rw-r--r--vcl/source/outdev/rect.cxx11
-rw-r--r--vcl/source/outdev/text.cxx11
-rw-r--r--vcl/source/outdev/textline.cxx7
-rw-r--r--vcl/source/outdev/transparent.cxx13
-rw-r--r--vcl/source/outdev/wallpaper.cxx12
16 files changed, 104 insertions, 72 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index bbf0711dbb61..279cb1eeaa47 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -613,7 +613,7 @@ protected:
SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
- SAL_DLLPRIVATE void assert_if_double_buffered_window() const;
+ SAL_DLLPRIVATE bool is_double_buffered_window() const;
private:
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 2b77d3543afa..faf705d7b40a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bmpacc.hxx>
@@ -36,7 +38,7 @@
void OutputDevice::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
const Size aSizePix( rBitmap.GetSizePixel() );
DrawBitmap( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, MetaActionType::BMP );
@@ -44,7 +46,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
DrawBitmap( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, MetaActionType::BMPSCALE );
}
@@ -54,7 +56,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const MetaActionType nAction )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -236,7 +238,7 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
void OutputDevice::DrawBitmapEx( const Point& rDestPt,
const BitmapEx& rBitmapEx )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -255,7 +257,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt,
void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const BitmapEx& rBitmapEx )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -275,7 +277,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const BitmapEx& rBitmapEx, const MetaActionType nAction )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -492,7 +494,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
BitmapEx& rBitmapEx )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if (rBitmapEx.IsAlpha())
{
@@ -622,7 +624,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
Point aOutPt(LogicToPixel(rDestPt));
Size aOutSz(LogicToPixel(rDestSize));
@@ -918,7 +920,7 @@ private:
void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, Rectangle aDstRect, Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
VirtualDevice* pOldVDev = mpAlphaVDev;
@@ -1036,7 +1038,7 @@ bool OutputDevice::DrawTransformBitmapExDirect(
const basegfx::B2DHomMatrix& aFullTransform,
const BitmapEx& rBitmapEx)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
bool bDone = false;
@@ -1157,7 +1159,7 @@ void OutputDevice::DrawTransformedBitmapEx(
const basegfx::B2DHomMatrix& rTransformation,
const BitmapEx& rBitmapEx)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -1330,7 +1332,7 @@ namespace
void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, DrawImageFlags nStyle )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
DrawImage( rPos, Size(), rImage, nStyle );
}
@@ -1338,7 +1340,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, DrawImageF
void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
const Image& rImage, DrawImageFlags nStyle )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
bool bIsSizeValid = rSize.getWidth() != 0 && rSize.getHeight() != 0;
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 0190a4d67fd4..342d5e8ba8b8 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -25,7 +27,7 @@
void OutputDevice::DrawEllipse( const Rectangle& rRect )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaEllipseAction( rRect ) );
@@ -73,7 +75,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
void OutputDevice::DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaArcAction( rRect, rStartPt, rEndPt ) );
@@ -117,7 +119,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
void OutputDevice::DrawPie( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaPieAction( rRect, rStartPt, rEndPt ) );
@@ -168,7 +170,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
void OutputDevice::DrawChord( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaChordAction( rRect, rStartPt, rEndPt ) );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 41c245558899..75520bee5111 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <tools/poly.hxx>
#include <vcl/gradient.hxx>
@@ -32,7 +34,7 @@
void OutputDevice::DrawGradient( const Rectangle& rRect,
const Gradient& rGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// Convert rectangle to a tools::PolyPolygon by first converting to a Polygon
Polygon aPolygon ( rRect );
@@ -44,7 +46,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mnDrawMode & DrawModeFlags::NoGradient )
return; // nothing to draw!
@@ -172,7 +174,7 @@ void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, cons
void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( !mpMetaFile )
return;
@@ -260,7 +262,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
const Gradient& rGradient,
const tools::PolyPolygon* pClixPolyPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// get BoundRect of rotated rectangle
Rectangle aRect;
@@ -438,19 +440,17 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
}
}
-void OutputDevice::assert_if_double_buffered_window() const
+bool OutputDevice::is_double_buffered_window() const
{
-#ifndef NDEBUG
const vcl::Window *pWindow = dynamic_cast<const vcl::Window*>(this);
- assert(!pWindow || !pWindow->SupportsDoubleBuffering());
-#endif
+ return pWindow && pWindow->SupportsDoubleBuffering();
}
void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
const Gradient& rGradient,
const tools::PolyPolygon* pClixPolyPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// Determine if we output via Polygon or PolyPolygon
// For all rasteroperations other then Overpaint always use PolyPolygon,
@@ -616,7 +616,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
const Gradient& rGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// get BoundRect of rotated rectangle
Rectangle aRect;
@@ -796,7 +796,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
const Gradient& rGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// Determine if we output via Polygon or PolyPolygon
// For all rasteroperations other then Overpaint always use PolyPolygon,
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 05162cb0b25a..4c992b6f476e 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <tools/line.hxx>
#include <vcl/hatch.hxx>
@@ -44,7 +46,7 @@ extern "C" int SAL_CALL HatchCmpFnc( const void* p1, const void* p2 )
void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
Hatch aHatch( rHatch );
@@ -139,7 +141,7 @@ void OutputDevice::AddHatchActions( const tools::PolyPolygon& rPolyPoly, const H
void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if(rPolyPoly.Count())
{
@@ -322,7 +324,7 @@ void OutputDevice::CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt
void OutputDevice::DrawHatchLine( const Line& rLine, const tools::PolyPolygon& rPolyPoly,
Point* pPtBuffer, bool bMtf )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
double fX, fY;
long nAdd, nPCounter = 0;
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 0f38a1b9ff5d..1a8a3f5536e8 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
#include <numeric>
#include <vcl/outdev.hxx>
@@ -35,7 +36,7 @@
void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
const LineInfo& rLineInfo )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( rLineInfo.IsDefault() )
{
@@ -89,7 +90,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaLineAction( rStartPt, rEndPt ) );
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index facbb9ae7c04..ed69b4830427 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -34,7 +36,7 @@ extern const sal_uLong nVCLLut[ 256 ];
void OutputDevice::DrawMask( const Point& rDestPt,
const Bitmap& rBitmap, const Color& rMaskColor )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
const Size aSizePix( rBitmap.GetSizePixel() );
DrawMask( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, rMaskColor, MetaActionType::MASK );
@@ -43,7 +45,7 @@ void OutputDevice::DrawMask( const Point& rDestPt,
void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap, const Color& rMaskColor )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
DrawMask( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, rMaskColor, MetaActionType::MASKSCALE );
}
@@ -53,7 +55,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap, const Color& rMaskColor,
const MetaActionType nAction )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( ImplIsRecordLayout() )
return;
@@ -108,7 +110,7 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
const ImpBitmap* pImpBmp = rMask.ImplGetImpBitmap();
if ( pImpBmp )
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index 071102141a31..ae036d6d0193 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -273,7 +275,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
const ImplControlValue& aValue,
const OUString& aCaption )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( !EnableNativeWidget( *this ) )
return false;
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index 0dba1fbd6ae8..b031ef40c1e7 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <memory>
@@ -57,7 +60,7 @@ Color OutputDevice::GetPixel( const Point& rPt ) const
void OutputDevice::DrawPixel( const Point& rPt )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaPointAction( rPt ) );
@@ -87,7 +90,7 @@ void OutputDevice::DrawPixel( const Point& rPt )
void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
Color aColor = ImplDrawModeToColor( rColor );
@@ -116,7 +119,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( !pColors )
{
@@ -163,7 +166,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 79995b6de684..b5b790fe1c5d 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -33,7 +36,7 @@
void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) );
@@ -131,7 +134,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
void OutputDevice::DrawPolygon( const basegfx::B2DPolygon& rB2DPolygon)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// AW: Do NOT paint empty polygons
if(rB2DPolygon.count())
@@ -143,7 +146,7 @@ void OutputDevice::DrawPolygon( const basegfx::B2DPolygon& rB2DPolygon)
void OutputDevice::DrawPolygon( const Polygon& rPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
@@ -239,7 +242,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
void OutputDevice::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyPolygonAction( tools::PolyPolygon( rB2DPolyPoly ) ) );
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index eae524a2c38f..06ba7bc4f8ef 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -31,7 +34,7 @@
void OutputDevice::DrawPolyLine( const Polygon& rPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyLineAction( rPoly ) );
@@ -101,7 +104,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( rLineInfo.IsDefault() )
{
@@ -129,7 +132,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
basegfx::B2DLineJoin eLineJoin,
css::drawing::LineCap eLineCap)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( mpMetaFile )
{
@@ -275,7 +278,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon,
css::drawing::LineCap eLineCap,
bool bBypassAACheck )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// AW: Do NOT paint empty PolyPolygons
if(!rB2DPolygon.count())
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index a9ebc0a676d2..b06a52baa51f 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <tools/poly.hxx>
@@ -29,7 +32,7 @@
void OutputDevice::DrawRect( const Rectangle& rRect )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaRectAction( rRect ) );
@@ -68,7 +71,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
void OutputDevice::DrawRect( const Rectangle& rRect,
sal_uLong nHorzRound, sal_uLong nVertRound )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaRoundRectAction( rRect, nHorzRound, nVertRound ) );
@@ -128,7 +131,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt32 nLen, Color aStart, Color aEnd)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
@@ -154,7 +157,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
aDstRect.Intersection( rRect );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9c4f07131bb3..392d4ef056ff 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <cassert>
#include <cmath>
#include <sal/types.h>
@@ -838,7 +839,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
MetricVector* pVector, OUString* pDisplayText
)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if(nLen == 0x0FFFF)
{
@@ -961,7 +962,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
const long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if(nLen == 0x0FFFF)
{
@@ -1166,7 +1167,7 @@ void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if(nIndex < 0 || nIndex == 0x0FFFF || nLen == 0x0FFFF)
{
@@ -1840,7 +1841,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
MetricVector* pVector, OUString* pDisplayText,
vcl::ITextLayout* _pTextLayout )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if (mpOutDevData->mpRecordLayout)
{
@@ -2148,7 +2149,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen,
DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if(nLen == 0x0FFFF)
{
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 551e55649cec..52be910dcefe 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <vcl/outdev.hxx>
@@ -941,7 +944,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
FontUnderline eOverline,
bool bUnderlineAbove )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaTextLineAction( rPos, nWidth, eStrikeout, eUnderline, eOverline ) );
@@ -985,7 +988,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 30efb47ed958..bc4d8228b1fc 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <cassert>
+
#include <sal/types.h>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -218,7 +221,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency)
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// AW: Do NOT paint empty PolyPolygons
if(!rB2DPolyPoly.count())
@@ -282,7 +285,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
void OutputDevice::DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// short circuit if the polygon border is invisible too
if( !mbLineColor )
@@ -298,7 +301,7 @@ void OutputDevice::DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly )
bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly,
sal_uInt16 nTransparencePercent )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
bool bDrawn = false;
@@ -607,7 +610,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly,
sal_uInt16 nTransparencePercent )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// short circuit for drawing an opaque polygon
if( (nTransparencePercent < 1) || (mnDrawMode & DrawModeFlags::NoTransparency) )
@@ -659,7 +662,7 @@ void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly,
void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rTransparenceGradient )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
const Color aBlack( COL_BLACK );
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 367eceae7f7e..b889e636533f 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <cassert>
+
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -26,7 +28,7 @@
void OutputDevice::DrawWallpaper( const Rectangle& rRect,
const Wallpaper& rWallpaper )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaWallpaperAction( rRect, rWallpaper ) );
@@ -54,7 +56,7 @@ void OutputDevice::DrawWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
if( rWallpaper.IsBitmap() )
DrawBitmapWallpaper( nX, nY, nWidth, nHeight, rWallpaper );
@@ -68,7 +70,7 @@ void OutputDevice::DrawColorWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
// draw wallpaper without border
Color aOldLineColor = GetLineColor();
@@ -107,7 +109,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
BitmapEx aBmpEx;
const BitmapEx* pCached = rWallpaper.ImplGetImpWallpaper()->ImplGetCachedBitmap();
@@ -345,7 +347,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- assert_if_double_buffered_window();
+ assert(!is_double_buffered_window());
Rectangle aBound;
GDIMetaFile* pOldMetaFile = mpMetaFile;