summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-12 11:20:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-12 20:09:32 +0000
commitf042e84e63d14fca4252235d7b9a68b1cb1074b4 (patch)
tree19537f1a2f86ea0735f52e14aaeb0450a2aad00d /vcl
parentad4f00a992f9df5d0e7051a44e2f714ad8e03d2a (diff)
longparas: nStart and nEnd are always overwritten
so simplify to the reality, which conveniently removes some hard-coded 0xFFFF and STRING_LEN uses Change-Id: I4fc014a972f6a157c18f8194c410b7cbff03de4a
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/edit.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f7c2415d70f1..f3bd838dddc3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -496,7 +496,7 @@ OUString Edit::ImplGetText() const
// -----------------------------------------------------------------------
-void Edit::ImplInvalidateOrRepaint( sal_Int32 nStart, sal_Int32 nEnd )
+void Edit::ImplInvalidateOrRepaint()
{
if( IsPaintTransparent() )
{
@@ -506,7 +506,7 @@ void Edit::ImplInvalidateOrRepaint( sal_Int32 nStart, sal_Int32 nEnd )
Update();
}
else
- ImplRepaint( nStart, nEnd );
+ ImplRepaint();
}
// -----------------------------------------------------------------------
@@ -522,14 +522,14 @@ long Edit::ImplGetTextYPosition() const
// -----------------------------------------------------------------------
-void Edit::ImplRepaint( sal_Int32 nStart, sal_Int32 nEnd, bool bLayout )
+void Edit::ImplRepaint(bool bLayout)
{
if ( !IsReallyVisible() )
return;
OUString aText = ImplGetText();
- nStart = 0;
- nEnd = aText.getLength();
+ sal_Int32 nStart = 0;
+ sal_Int32 nEnd = aText.getLength();
sal_Int32 nDXBuffer[256];
sal_Int32* pDXBuffer = NULL;
@@ -1275,7 +1275,7 @@ void Edit::ImplAlign()
void Edit::ImplAlignAndPaint()
{
ImplAlign();
- ImplInvalidateOrRepaint( 0, STRING_LEN );
+ ImplInvalidateOrRepaint();
ImplShowCursor();
}
@@ -1861,7 +1861,7 @@ void Edit::KeyInput( const KeyEvent& rKEvt )
void Edit::FillLayoutData() const
{
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
- const_cast<Edit*>(this)->ImplRepaint( 0, STRING_LEN, true );
+ const_cast<Edit*>(this)->ImplRepaint(true);
}
// -----------------------------------------------------------------------
@@ -2343,7 +2343,7 @@ void Edit::StateChanged( StateChangedType nType )
if ( !mpSubEdit )
{
// change text color only
- ImplInvalidateOrRepaint( 0, 0xFFFF );
+ ImplInvalidateOrRepaint();
}
}
else if ( nType == STATE_CHANGE_STYLE || nType == STATE_CHANGE_MIRRORING )
@@ -2648,7 +2648,7 @@ void Edit::ImplSetSelection( const Selection& rSelection, sal_Bool bPaint )
maSelection = aNew;
if ( bPaint && ( aOld.Len() || aNew.Len() || IsPaintTransparent() ) )
- ImplInvalidateOrRepaint( 0, maText.getLength() );
+ ImplInvalidateOrRepaint();
ImplShowCursor();
sal_Bool bCaret = sal_False, bSelection = sal_False;