summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-07-13 21:46:17 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-07-14 08:19:56 +0200
commit10f28d5c9a072bf108a79f3b05ad8247ca0dcea5 (patch)
treec7e60a8a5a2dd683354b259a3d25160c7c6435c9 /svtools
parent264ef46bed7263fd01a32804fcbd3ccda78b0725 (diff)
callcatcher: build fixes
- remove the correct SetUpdateMode() - Clone() always returns NULL - SetFont() doesn't do anything
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/texteng.hxx2
-rw-r--r--svtools/source/edit/textdoc.cxx4
-rw-r--r--svtools/source/edit/texteng.cxx29
3 files changed, 18 insertions, 17 deletions
diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx
index ea81c4806206..e9f0b6c51b06 100644
--- a/svtools/inc/svtools/texteng.hxx
+++ b/svtools/inc/svtools/texteng.hxx
@@ -196,7 +196,6 @@ protected:
void FormatAndUpdate( TextView* pCurView = 0 );
sal_Bool IsFormatting() const { return mbIsFormatting; }
void UpdateViews( TextView* pCurView = 0 );
- void SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate );
void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
@@ -250,6 +249,7 @@ public:
void SetLeftMargin( sal_uInt16 n );
sal_uInt16 GetLeftMargin() const;
+ void SetUpdateMode( sal_Bool bUpdate );
sal_Bool GetUpdateMode() const { return mbUpdate; }
sal_uInt16 GetViewCount() const;
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 )