From ad4f00a992f9df5d0e7051a44e2f714ad8e03d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 12 Jan 2014 11:09:33 +0000 Subject: [PATCH] longparas: raise 16bit Impl_IMEInfos limits to 32bit Change-Id: I2196119a8205892724f0d8b75a05940666839642 --- vcl/source/control/edit.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 52bbedf91306..f7c2415d70f1 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -124,22 +124,22 @@ struct Impl_IMEInfos { OUString aOldTextAfterStartPos; sal_uInt16* pAttribs; - xub_StrLen nPos; - xub_StrLen nLen; + sal_Int32 nPos; + sal_Int32 nLen; bool bCursor; bool bWasCursorOverwrite; - Impl_IMEInfos( xub_StrLen nPos, const OUString& rOldTextAfterStartPos ); - ~Impl_IMEInfos(); + Impl_IMEInfos(sal_Int32 nPos, const OUString& rOldTextAfterStartPos); + ~Impl_IMEInfos(); - void CopyAttribs( const xub_StrLen* pA, xub_StrLen nL ); + void CopyAttribs(const sal_uInt16* pA, sal_Int32 nL); void DestroyAttribs(); }; // ----------------------------------------------------------------------- -Impl_IMEInfos::Impl_IMEInfos( xub_StrLen nP, const OUString& rOldTextAfterStartPos ) - : aOldTextAfterStartPos( rOldTextAfterStartPos ) +Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos) + : aOldTextAfterStartPos(rOldTextAfterStartPos) { nPos = nP; nLen = 0; @@ -157,7 +157,7 @@ Impl_IMEInfos::~Impl_IMEInfos() // ----------------------------------------------------------------------- -void Impl_IMEInfos::CopyAttribs( const xub_StrLen* pA, xub_StrLen nL ) +void Impl_IMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL) { nLen = nL; delete[] pAttribs; @@ -1182,7 +1182,7 @@ void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible ) long nCursorWidth = 0; if ( !mbInsertMode && !maSelection.Len() && (maSelection.Max() < aText.getLength()) ) - nCursorWidth = GetTextWidth( aText, (xub_StrLen)maSelection.Max(), 1 ); + nCursorWidth = GetTextWidth(aText, maSelection.Max(), 1); long nCursorPosX = nTextPos + mnXOffset + ImplGetExtraOffset(); // cursor should land in visible area @@ -1357,7 +1357,7 @@ void Edit::ImplLoadRes( const ResId& rResId ) { Control::ImplLoadRes( rResId ); - xub_StrLen nTextLength = ReadShortRes(); + sal_uInt16 nTextLength = ReadShortRes(); if ( nTextLength ) SetMaxTextLen( nTextLength ); }