Kaydet (Commit) 10f28d5c authored tarafından Thomas Arnhold's avatar Thomas Arnhold

callcatcher: build fixes

- remove the correct SetUpdateMode()
- Clone() always returns NULL
- SetFont() doesn't do anything
üst 264ef46b
...@@ -196,7 +196,6 @@ protected: ...@@ -196,7 +196,6 @@ protected:
void FormatAndUpdate( TextView* pCurView = 0 ); void FormatAndUpdate( TextView* pCurView = 0 );
sal_Bool IsFormatting() const { return mbIsFormatting; } sal_Bool IsFormatting() const { return mbIsFormatting; }
void UpdateViews( TextView* pCurView = 0 ); 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 ); void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
...@@ -250,6 +249,7 @@ public: ...@@ -250,6 +249,7 @@ public:
void SetLeftMargin( sal_uInt16 n ); void SetLeftMargin( sal_uInt16 n );
sal_uInt16 GetLeftMargin() const; sal_uInt16 GetLeftMargin() const;
void SetUpdateMode( sal_Bool bUpdate );
sal_Bool GetUpdateMode() const { return mbUpdate; } sal_Bool GetUpdateMode() const { return mbUpdate; }
sal_uInt16 GetViewCount() const; sal_uInt16 GetViewCount() const;
......
...@@ -54,14 +54,14 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond ) ...@@ -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 ) TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd )
{ {
mpAttr = rAttr.Clone(); mpAttr = NULL;
mnStart = nStart, mnStart = nStart,
mnEnd = nEnd; mnEnd = nEnd;
} }
TextCharAttrib::TextCharAttrib( const TextCharAttrib& rTextCharAttrib ) TextCharAttrib::TextCharAttrib( const TextCharAttrib& rTextCharAttrib )
{ {
mpAttr = rTextCharAttrib.GetAttr().Clone(); mpAttr = NULL;
mnStart = rTextCharAttrib.mnStart; mnStart = rTextCharAttrib.mnStart;
mnEnd = rTextCharAttrib.mnEnd; mnEnd = rTextCharAttrib.mnEnd;
} }
......
...@@ -339,6 +339,20 @@ sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const ...@@ -339,6 +339,20 @@ sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const
return mpDoc->GetNodes().GetObject( nPara )->GetText().Len(); 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 TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
{ {
sal_Bool bDoesChange = sal_False; sal_Bool bDoesChange = sal_False;
...@@ -1466,11 +1480,7 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp ...@@ -1466,11 +1480,7 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp
if ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) ) if ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
|| !pNode->GetText().Len() ) || !pNode->GetText().Len() )
{ {
if ( pAttrib->Which() != TEXTATTR_FONTCOLOR ) if ( pAttrib->Which() == TEXTATTR_FONTCOLOR )
{
pAttrib->GetAttr().SetFont( rFont );
}
else
{ {
if ( pOutDev ) if ( pOutDev )
pOutDev->SetTextColor( ((TextAttribFontColor&)pAttrib->GetAttr()).GetColor() ); pOutDev->SetTextColor( ((TextAttribFontColor&)pAttrib->GetAttr()).GetColor() );
...@@ -1510,15 +1520,6 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp ...@@ -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 ) void TextEngine::FormatAndUpdate( TextView* pCurView )
{ {
if ( mbDowning ) if ( mbDowning )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment