summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-12-17 05:18:35 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-12-18 01:54:16 +0000
commit4c539fac018dfd44cd8db52161a8cb930c627da7 (patch)
treed7530d03926971e58584b64ce618984eb47baf74 /include
parent8272ffb8ed00f211a8fbda71136d695b42249b70 (diff)
vcl get rid of xub_StrLen and STRING_LEN in outdev3
a new log section (sal.rtl.xub) is used to display alert in case of suspicious len == 0xFFFF (aka STRING_LEN) Change-Id: I3ed2aa7896e12592be9e003580dd6c8eda4add5e Reviewed-on: https://gerrit.libreoffice.org/7117 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/sal/log-areas.dox1
-rw-r--r--include/vcl/outdev.hxx30
2 files changed, 16 insertions, 15 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ed8e39e59ded..58ffbaa444bc 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -24,6 +24,7 @@ certain functionality.
@li @c sal.file
@li @c sal.osl - SAL OSL library
@li @c sal.rtl - SAL RTL library
+@li @c sal.rtl.xub - SAL RTL warnings related to possible String->OUString conversion issues.
@li @c sal.textenc - the textencoding SAL library
@section basctl
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 00016cfa0d75..b0d5089743e2 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -570,7 +570,7 @@ public:
sal_Bool bUnderlineAbove = sal_False );
void DrawText( const Point& rStartPt, const OUString& rStr,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
/// Height where any character of the current font fits; in logic coordinates.
@@ -578,8 +578,8 @@ public:
float approximate_char_width() const;
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
const sal_Int32* pDXAry = NULL,
- xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN );
+ sal_Int32 nIndex = 0,
+ sal_Int32 nLen = -1 );
long GetTextArray( const OUString& rStr, sal_Int32* pDXAry = NULL,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
bool GetCaretPositions( const OUString&, sal_Int32* pCaretXArray,
@@ -588,7 +588,7 @@ public:
sal_Bool bCellBreaking = sal_True ) const;
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
+ sal_Int32 nIndex = 0, sal_Int32 nLen = -1 );
sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
long nCharExtra = 0 ) const;
@@ -619,29 +619,29 @@ public:
OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS ) const;
void DrawCtrlText( const Point& rPos, const OUString& rStr,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
- long GetCtrlTextWidth( const OUString& rStr, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN,
+ long GetCtrlTextWidth( const OUString& rStr, sal_Int32 nIndex = 0,
+ sal_Int32 nLen = -1,
sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC ) const;
static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
static OUString GetNonMnemonicString( const OUString& rStr )
{ sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
sal_Bool GetTextBoundRect( Rectangle& rRect,
- const OUString& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
sal_Bool GetTextOutline( PolyPolygon&,
- const OUString& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
+ sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True,
sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
sal_Bool GetTextOutlines( PolyPolyVector&,
- const OUString& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
+ sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True,
sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
sal_Bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector&,
- const OUString& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
+ sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True,
sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
sal_Bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
int nLen, int nBase, MetricVector& rVector );
@@ -901,7 +901,7 @@ public:
SystemFontData GetSysFontData( int nFallbacklevel ) const;
SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
const sal_Int32* pDXAry = NULL ) const;
void SetTextColor( const Color& rColor );