diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/edit/textdoc.cxx | 4 | ||||
-rw-r--r-- | svtools/source/edit/texteng.cxx | 29 |
2 files changed, 17 insertions, 16 deletions
diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx index 615ac1258f4d..4fad052dd498 100644 --- a/svtools/source/edit/textdoc.cxx +++ b/svtools/source/edit/textdoc.cxx @@ -54,14 +54,14 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond ) // ------------------------------------------------------------------------- TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ) { - mpAttr = rAttr.Clone(); + mpAttr = NULL; mnStart = nStart, mnEnd = nEnd; } TextCharAttrib::TextCharAttrib( const TextCharAttrib& rTextCharAttrib ) { - mpAttr = rTextCharAttrib.GetAttr().Clone(); + mpAttr = NULL; mnStart = rTextCharAttrib.mnStart; mnEnd = rTextCharAttrib.mnEnd; } diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx index 2b041f23be8a..9decddde44f9 100644 --- a/svtools/source/edit/texteng.cxx +++ b/svtools/source/edit/texteng.cxx @@ -339,6 +339,20 @@ sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const return mpDoc->GetNodes().GetObject( nPara )->GetText().Len(); } +void TextEngine::SetUpdateMode( sal_Bool bUpdate ) +{ + if ( bUpdate != mbUpdate ) + { + mbUpdate = bUpdate; + if ( mbUpdate ) + { + FormatAndUpdate( GetActiveView() ); + if ( GetActiveView() ) + GetActiveView()->ShowCursor(); + } + } +} + sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) { sal_Bool bDoesChange = sal_False; @@ -1466,11 +1480,7 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp if ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) ) || !pNode->GetText().Len() ) { - if ( pAttrib->Which() != TEXTATTR_FONTCOLOR ) - { - pAttrib->GetAttr().SetFont( rFont ); - } - else + if ( pAttrib->Which() == TEXTATTR_FONTCOLOR ) { if ( pOutDev ) pOutDev->SetTextColor( ((TextAttribFontColor&)pAttrib->GetAttr()).GetColor() ); @@ -1510,15 +1520,6 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp } } -void TextEngine::SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate ) -{ - sal_Bool bChanged = ( GetUpdateMode() != bUp ); - - mbUpdate = bUp; - if ( mbUpdate && ( bChanged || bForceUpdate ) ) - FormatAndUpdate( pCurView ); -} - void TextEngine::FormatAndUpdate( TextView* pCurView ) { if ( mbDowning ) |