diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-15 15:14:47 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-16 09:10:20 +0200 |
commit | 8353793c94416a9a3a5af074d881624e43e5ec2f (patch) | |
tree | 17f6e377b489ccf6439484371d4212e9afe734cd /vcl | |
parent | 9d0f86326cbf6b986176c5b5fe7660fa510c8d70 (diff) |
Use constants instead of (possibly wrong) magic numbers
Change-Id: I0829d271337b9fe77341c62a1c2ef4d6ae62c727
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/edit/texteng.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index ef5455cd2983..e1df6d898274 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2707,7 +2707,7 @@ void TextEngine::ValidatePaM( TextPaM& rPaM ) const if ( rPaM.GetPara() >= nParas ) { rPaM.GetPara() = nParas ? nParas-1 : 0; - rPaM.GetIndex() = 0xFFFF; + rPaM.GetIndex() = TEXT_INDEX_ALL; } const sal_Int32 nMaxIndex = GetTextLen( rPaM.GetPara() ); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 6e18ae4883e1..5a73070ad201 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -773,7 +773,7 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent ) ( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() ) ) { - mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); + mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) ); bDone = true; } else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() ) @@ -879,7 +879,7 @@ void TextWindow::Command( const CommandEvent& rCEvt ) mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); break; - case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); + case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) ); break; case SV_MENU_EDIT_INSERTSYMBOL: { @@ -915,7 +915,7 @@ void TextWindow::GetFocus() // select everything, but do not scroll bool bAutoScroll = mpExtTextView->IsAutoScroll(); mpExtTextView->SetAutoScroll( false ); - mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); + mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) ); mpExtTextView->SetAutoScroll( bAutoScroll ); bGotoCursor = false; } @@ -1516,7 +1516,7 @@ bool VclMultiLineEdit::PreNotify( NotifyEvent& rNEvt ) { if ( rKEvent.GetKeyCode().IsMod1() ) pImpVclMEdit->GetTextWindow()->GetTextView()-> - SetSelection( TextSelection( TextPaM( 0xFFFF, 0xFFFF ) ) ); + SetSelection( TextSelection( TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) ); } break; default: |