summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-03 14:39:34 +0200
committerNoel Grandin <noel@peralex.com>2013-12-04 08:55:35 +0200
commiteb56848029a3b26a9d4f07a55364749e9e7d8339 (patch)
tree24251c1b0ffba038e03da356991f851fd4aa23f0 /sw/inc
parente7c10fba9083e8ec9498a1fee4ef3ce31eb3e8d1 (diff)
convert SwInterHyphInfo from xub_StrLen->sal_Int32
Change-Id: Ie5a877fb90c360506f05d0417524966e137e5d77
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/splargs.hxx39
1 files changed, 18 insertions, 21 deletions
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 45fc34d41bf8..0210ad52fb0d 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -126,43 +126,40 @@ struct SwSpellArgs : SwArgsBase
class SwInterHyphInfo
{
- ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
- const Point aCrsrPos;
+ ::css::uno::Reference< ::css::linguistic2::XHyphenatedWord > xHyphWord;
+ const Point aCrsrPos;
sal_Bool bNoLang : 1;
sal_Bool bCheck : 1;
public:
- xub_StrLen nStart;
- xub_StrLen nLen;
- xub_StrLen nWordStart;
- xub_StrLen nWordLen;
- xub_StrLen nHyphPos;
+ sal_Int32 nStart;
+ sal_Int32 nEnd;
+ sal_Int32 nWordStart;
+ sal_Int32 nWordLen;
+ sal_Int32 nHyphPos;
sal_uInt16 nMinTrail;
inline SwInterHyphInfo( const Point &rCrsrPos,
- const sal_uInt16 nStartPos = 0,
- const sal_uInt16 nLength = USHRT_MAX )
+ sal_Int32 nStartPos = 0,
+ sal_Int32 nLength = SAL_MAX_INT32 )
: aCrsrPos( rCrsrPos ),
bNoLang(sal_False), bCheck(sal_False),
- nStart(nStartPos), nLen(nLength),
+ nStart(nStartPos),
+ nEnd( std::max(SAL_MAX_INT32, nStartPos + nLength) ),
nWordStart(0), nWordLen(0),
nHyphPos(0), nMinTrail(0)
{ }
- inline xub_StrLen GetEnd() const
- { return STRING_LEN == nLen ? nLen : nStart + nLen; }
+ inline sal_Int32 GetEnd() const
+ { return nEnd; }
inline const Point *GetCrsrPos() const
- { return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0; }
+ { return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0; }
inline sal_Bool IsCheck() const { return bCheck; }
inline void SetCheck( const sal_Bool bNew ) { bCheck = bNew; }
inline void SetNoLang( const sal_Bool bNew ) { bNoLang = bNew; }
- inline void
- SetHyphWord(const ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XHyphenatedWord > &rxHW)
- { xHyphWord = rxHW; }
- inline ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XHyphenatedWord >
- GetHyphWord() { return xHyphWord; }
+ inline void SetHyphWord(const ::css::uno::Reference< ::css::linguistic2::XHyphenatedWord > &rxHW)
+ { xHyphWord = rxHW; }
+ inline ::css::uno::Reference< ::css::linguistic2::XHyphenatedWord > GetHyphWord()
+ { return xHyphWord; }
};