diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-01 19:31:34 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-01 19:33:22 +0200 |
commit | 44cd9ef88bfc14b4520de8a73a692f0d59c40946 (patch) | |
tree | f7a358c1a6dc342519b45b9e248ee40eab5edc4f /basctl | |
parent | 9b49846fad132f121b2848c69477e42a0051884e (diff) |
sal_uInt16 to sal_Int32, constify, minor optimizations
Change-Id: Icc41bbe09e495454ca27e9281eca6f4731a135c8
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 9512e4052aef..0a4277ff128a 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -598,7 +598,7 @@ void EditorWindow::HandleAutoCorrect() { TextSelection aSel = GetEditView()->GetSelection(); sal_uLong nLine = aSel.GetStart().GetPara(); - sal_uInt16 nIndex = aSel.GetStart().GetIndex(); + const sal_Int32 nIndex = aSel.GetStart().GetIndex(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified const OUString& sActSubName = GetActualSubName( nLine ); // the actual procedure @@ -609,7 +609,7 @@ void EditorWindow::HandleAutoCorrect() return; HighlightPortion& r = aPortions.back(); - if( nIndex != aPortions.size()-1 ) + if( static_cast<size_t>(nIndex) != aPortions.size()-1 ) {//cursor is not standing at the end of the line for (std::vector<HighlightPortion>::iterator i(aPortions.begin()); i != aPortions.end(); ++i) @@ -675,14 +675,14 @@ void EditorWindow::HandleAutoCorrect() TextSelection EditorWindow::GetLastHighlightPortionTextSelection() {//creates a text selection from the highlight portion on the cursor sal_uLong nLine = GetEditView()->GetSelection().GetStart().GetPara(); - sal_uInt16 nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); + const sal_Int32 nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( aLine, aPortions ); assert(!aPortions.empty()); HighlightPortion& r = aPortions.back(); - if( nIndex != aPortions.size()-1 ) + if( static_cast<size_t>(nIndex) != aPortions.size()-1 ) {//cursor is not standing at the end of the line for (std::vector<HighlightPortion>::iterator i(aPortions.begin()); i != aPortions.end(); ++i) @@ -906,8 +906,8 @@ void EditorWindow::SetupAndShowCodeCompleteWnd( const std::vector< OUString >& a pCodeCompleteWnd->ResizeAndPositionListBox(); pCodeCompleteWnd->SelectFirstEntry(); // correct text selection, and set it - aSel.GetStart().GetIndex() += 1; - aSel.GetEnd().GetIndex() += 1; + ++aSel.GetStart().GetIndex(); + ++aSel.GetEnd().GetIndex(); pCodeCompleteWnd->SetTextSelection( aSel ); //give the focus to the EditView pEditView->GetWindow()->GrabFocus(); |