diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-06-18 10:37:01 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-06-18 11:43:19 +0300 |
commit | dc3d621411a1de2ec6b61da07741bdf1c80ffc1f (patch) | |
tree | 71c1eef613e033f05baac4bd8304a91691eda955 /vcl/source/outdev/text.cxx | |
parent | 0aa10c0b3d5794cd5b701b57de2387eee12076b6 (diff) |
Assertions should tell the line number where the problem is
Let's not hide the assert() in a function whose sole purpose is to
call assert().
Change-Id: I7a8a04aad560b0f22398daabf12d00bbe58e89f1
Diffstat (limited to 'vcl/source/outdev/text.cxx')
-rw-r--r-- | vcl/source/outdev/text.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
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) { |