diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 09:50:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 10:37:51 +0200 |
commit | 8bc951daf79decbd8a599a409c6d33c5456710e0 (patch) | |
tree | 61d220d83e90a176fbcbe667827eee4b9631a4ca /vcl/source/control/field2.cxx | |
parent | 10eefdfa6c0250c6069e641e404f34e5a91fe993 (diff) |
long->sal_Int32 in tools/gen.hxx
which triggered a lot of changes in sw/
Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6
Reviewed-on: https://gerrit.libreoffice.org/48806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/field2.cxx')
-rw-r--r-- | vcl/source/control/field2.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index e438fb0a7efa..e05960b660f0 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -467,7 +467,7 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, sal_Unicode cChar = rKEvt.GetCharCode(); sal_uInt16 nKeyCode = aCode.GetCode(); bool bShift = aCode.IsShift(); - sal_Int32 nCursorPos = static_cast<sal_Int32>(aOldSel.Max()); + sal_Int32 nCursorPos = aOldSel.Max(); sal_Int32 nNewPos; sal_Int32 nTempPos; @@ -524,7 +524,7 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, // all was selected by the focus Selection aSel( aOldSel ); aSel.Justify(); - nCursorPos = static_cast<sal_Int32>(aSel.Min()); + nCursorPos = aSel.Min(); ImplPatternMaxPos( pEdit->GetText(), rEditMask, nFormatFlags, bSameMask, nCursorPos, nNewPos ); aSel.Max() = nNewPos; if ( bShift ) @@ -541,16 +541,16 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, Selection aSel = aOldSel; aSel.Justify(); - nNewPos = static_cast<sal_Int32>(aSel.Min()); + nNewPos = aSel.Min(); // if selection then delete it if ( aSel.Len() ) { if ( bSameMask ) - aStr.remove( static_cast<sal_Int32>(aSel.Min()), static_cast<sal_Int32>(aSel.Len()) ); + aStr.remove( aSel.Min(), aSel.Len() ); else { - OUString aRep = rLiteralMask.copy( static_cast<sal_Int32>(aSel.Min()), static_cast<sal_Int32>(aSel.Len()) ); + OUString aRep = rLiteralMask.copy( aSel.Min(), aSel.Len() ); aStr.remove( aSel.Min(), aRep.getLength() ); aStr.insert( aSel.Min(), aRep ); } @@ -1324,7 +1324,7 @@ void DateField::ImplDateSpinArea( bool bUp ) Selection aSelection = GetField()->GetSelection(); aSelection.Justify(); OUString aText( GetText() ); - if ( static_cast<sal_Int32>(aSelection.Len()) == aText.getLength() ) + if ( aSelection.Len() == aText.getLength() ) ImplDateIncrementDay( aDate, bUp ); else { @@ -1344,7 +1344,7 @@ void DateField::ImplDateSpinArea( bool bUp ) for ( sal_Int8 i = 1; i <= 3; i++ ) { nPos = aText.indexOf( aDateSep, nPos ); - if (nPos < 0 || nPos >= static_cast<sal_Int32>(aSelection.Max())) + if (nPos < 0 || nPos >= aSelection.Max()) { nDateArea = i; break; @@ -1585,7 +1585,7 @@ void DateFormatter::ImplNewFieldValue( const Date& rDate ) OUString aText = GetField()->GetText(); // If selected until the end then keep it that way - if ( static_cast<sal_Int32>(aSelection.Max()) == aText.getLength() ) + if ( aSelection.Max() == aText.getLength() ) { if ( !aSelection.Len() ) aSelection.Min() = SELECTION_MAX; @@ -2364,7 +2364,7 @@ void TimeFormatter::ImplNewFieldValue( const tools::Time& rTime ) OUString aText = GetField()->GetText(); // If selected until the end then keep it that way - if ( static_cast<sal_Int32>(aSelection.Max()) == aText.getLength() ) + if ( aSelection.Max() == aText.getLength() ) { if ( !aSelection.Len() ) aSelection.Min() = SELECTION_MAX; |