diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-12-17 05:18:35 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-12-18 01:54:16 +0000 |
commit | 4c539fac018dfd44cd8db52161a8cb930c627da7 (patch) | |
tree | d7530d03926971e58584b64ce618984eb47baf74 /vcl/inc | |
parent | 8272ffb8ed00f211a8fbda71136d695b42249b70 (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 'vcl/inc')
-rw-r--r-- | vcl/inc/outfont.hxx | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 4e1af96bfde1..8229169ddbbc 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -367,20 +367,25 @@ class ImplTextLineInfo { private: long mnWidth; - xub_StrLen mnIndex; - xub_StrLen mnLen; + sal_Int32 mnIndex; + sal_Int32 mnLen; public: - ImplTextLineInfo( long nWidth, xub_StrLen nIndex, xub_StrLen nLen ) - { - mnWidth = nWidth; - mnIndex = nIndex; - mnLen = nLen; - } - - long GetWidth() const { return mnWidth; } - xub_StrLen GetIndex() const { return mnIndex; } - xub_StrLen GetLen() const { return mnLen; } + ImplTextLineInfo( long nWidth, sal_Int32 nIndex, sal_Int32 nLen ) + { + if(nIndex == -1 || nIndex == 0x0FFFF || nLen == -1 || nLen == 0x0FFFF) + { + SAL_INFO("sal.rtl.xub", + "ImplTextLine Info Suspicious arguments nIndex:" << nIndex << " nLen:" << nLen); + } + mnWidth = nWidth; + mnIndex = nIndex; + mnLen = nLen; + } + + long GetWidth() const { return mnWidth; } + sal_Int32 GetIndex() const { return mnIndex; } + sal_Int32 GetLen() const { return mnLen; } }; #define MULTITEXTLINEINFO_RESIZE 16 @@ -390,8 +395,8 @@ class ImplMultiTextLineInfo { private: PImplTextLineInfo* mpLines; - xub_StrLen mnLines; - xub_StrLen mnSize; + sal_Int32 mnLines; + sal_Int32 mnSize; public: ImplMultiTextLineInfo(); @@ -402,7 +407,7 @@ public: ImplTextLineInfo* GetLine( sal_uInt16 nLine ) const { return mpLines[nLine]; } - xub_StrLen Count() const { return mnLines; } + sal_Int32 Count() const { return mnLines; } private: ImplMultiTextLineInfo( const ImplMultiTextLineInfo& ); |