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
This commit is contained in:
@@ -93,8 +93,8 @@ private:
|
||||
SAL_DLLPRIVATE void ImplInitEditData();
|
||||
SAL_DLLPRIVATE void ImplModified();
|
||||
SAL_DLLPRIVATE OUString ImplGetText() const;
|
||||
SAL_DLLPRIVATE void ImplRepaint( sal_Int32 nStart = 0, sal_Int32 nEnd = STRING_LEN, bool bLayout = false );
|
||||
SAL_DLLPRIVATE void ImplInvalidateOrRepaint( sal_Int32 nStart = 0, sal_Int32 nEnd = STRING_LEN );
|
||||
SAL_DLLPRIVATE void ImplRepaint(bool bLayout = false);
|
||||
SAL_DLLPRIVATE void ImplInvalidateOrRepaint();
|
||||
SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode );
|
||||
SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection = 0 );
|
||||
SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False );
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user