summaryrefslogtreecommitdiff
path: root/vcl/source/edit/xtextedt.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-08-15 12:54:57 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-08-16 09:10:19 +0200
commit866e287adee448c1c8b431c6c084d3fe3283649d (patch)
tree53864635bcb2832c92834678a66b7090f1181147 /vcl/source/edit/xtextedt.cxx
parenta00c47afd4cf379ce2b22f3c33bb7975a5a6366a (diff)
sal_uLong to sal_uInt32 as TextPaM paragraph number
Applied also to related functions. Also fix a couple of minor issues while at it. Change-Id: I615094d047c87a0f4854054e720492d3ab25c575
Diffstat (limited to 'vcl/source/edit/xtextedt.cxx')
-rw-r--r--vcl/source/edit/xtextedt.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx
index 222cbe4ff00a..8abe3438f06b 100644
--- a/vcl/source/edit/xtextedt.cxx
+++ b/vcl/source/edit/xtextedt.cxx
@@ -38,8 +38,8 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
{
TextSelection aSel( rCursor );
const sal_Int32 nPos = rCursor.GetIndex();
- sal_uLong nPara = rCursor.GetPara();
- sal_uLong nParas = GetParagraphCount();
+ sal_uInt32 nPara = rCursor.GetPara();
+ const sal_uInt32 nParas = GetParagraphCount();
if ( ( nPara < nParas ) && ( nPos < GetTextLen( nPara ) ) )
{
sal_Int32 nMatchIndex = maGroupChars.indexOf( GetText( rCursor.GetPara() )[ nPos ] );
@@ -147,21 +147,21 @@ bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
}
bool bFound = false;
- sal_uLong nStartNode, nEndNode;
+ sal_uInt32 nEndNode;
if ( bSearchInSelection )
nEndNode = bForward ? aSel.GetEnd().GetPara() : aSel.GetStart().GetPara();
else
nEndNode = bForward ? (GetParagraphCount()-1) : 0;
- nStartNode = aStartPaM.GetPara();
+ const sal_uInt32 nStartNode = aStartPaM.GetPara();
util::SearchOptions aOptions( rSearchOptions );
aOptions.Locale = Application::GetSettings().GetLanguageTag().getLocale();
utl::TextSearch aSearcher( rSearchOptions );
// iterate over the paragraphs
- for ( sal_uLong nNode = nStartNode;
+ for ( sal_uInt32 nNode = nStartNode;
bForward ? ( nNode <= nEndNode) : ( nNode >= nEndNode );
bForward ? nNode++ : nNode-- )
{
@@ -339,14 +339,14 @@ bool ExtTextView::ImpIndentBlock( bool bRight )
HideSelection();
GetTextEngine()->UndoActionStart();
- sal_uLong nStartPara = aSel.GetStart().GetPara();
- sal_uLong nEndPara = aSel.GetEnd().GetPara();
+ const sal_uInt32 nStartPara = aSel.GetStart().GetPara();
+ sal_uInt32 nEndPara = aSel.GetEnd().GetPara();
if ( aSel.HasRange() && !aSel.GetEnd().GetIndex() )
{
nEndPara--; // do not indent
}
- for ( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for ( sal_uInt32 nPara = nStartPara; nPara <= nEndPara; ++nPara )
{
if ( bRight )
{