fdo#68959: sw: fix painting of tab fill characters in small caps text
The member SwDrawTextInfo::pPos was changed from a pointer to some
externally provided Point to a real object; unfortunately there were
some functions which hold backups of the current pPos as a
reference/pointer and then restore it, and the restore is a no-op now.
So use real Points as backups.
(regression from f22006dc6a
)
Change-Id: I8470143ec494cb194a88ddcbd12d96867974278f
This commit is contained in:
@@ -568,7 +568,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
|
||||
}
|
||||
|
||||
Point aPos( rInf.GetPos().X(), rInf.GetPos().Y() + rInf.GetAscent() );
|
||||
const Point &rOld = rInf.GetPos();
|
||||
const Point aOldPos(rInf.GetPos());
|
||||
rInf.SetPos( aPos );
|
||||
|
||||
if( !bOpaque )
|
||||
@@ -577,7 +577,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
|
||||
rInf.GetFont()->_DrawStretchText( rInf );
|
||||
else
|
||||
rInf.GetFont()->_DrawText( rInf );
|
||||
rInf.SetPos( rOld );
|
||||
rInf.SetPos(aOldPos);
|
||||
return sal_False;
|
||||
}
|
||||
else if( !aRegion.empty() )
|
||||
@@ -595,7 +595,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
|
||||
rInf.GetFont()->_DrawText( rInf );
|
||||
}
|
||||
}
|
||||
rInf.SetPos( rOld );
|
||||
rInf.SetPos(aOldPos);
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
|
@@ -516,9 +516,9 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf )
|
||||
if( rInf.GetLen() == COMPLETE_STRING )
|
||||
rInf.SetLen( rInf.GetText().getLength() );
|
||||
|
||||
const Point& rOldPos = rInf.GetPos();
|
||||
const Point aOldPos = rInf.GetPos();
|
||||
const sal_uInt16 nCapWidth = (sal_uInt16)( GetCapitalSize( rInf ).Width() );
|
||||
rInf.SetPos( rOldPos );
|
||||
rInf.SetPos(aOldPos);
|
||||
|
||||
rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE ||
|
||||
GetOverline() != UNDERLINE_NONE ||
|
||||
|
@@ -1195,12 +1195,12 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
|
||||
|
||||
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
|
||||
|
||||
const Point aOldPos(rInf.GetPos());
|
||||
Point aPos( rInf.GetPos() );
|
||||
|
||||
if( GetEscapement() )
|
||||
CalcEsc( rInf, aPos );
|
||||
|
||||
const Point &rOld = rInf.GetPos();
|
||||
rInf.SetPos( aPos );
|
||||
rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
|
||||
|
||||
@@ -1300,7 +1300,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
|
||||
rInf.SetLen( nOldLen );
|
||||
}
|
||||
|
||||
rInf.SetPos( rOld );
|
||||
rInf.SetPos(aOldPos);
|
||||
}
|
||||
|
||||
void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
|
||||
@@ -1325,13 +1325,13 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
|
||||
|
||||
rInf.ApplyAutoColor();
|
||||
|
||||
const Point aOldPos(rInf.GetPos());
|
||||
Point aPos( rInf.GetPos() );
|
||||
|
||||
if( GetEscapement() )
|
||||
CalcEsc( rInf, aPos );
|
||||
|
||||
rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
|
||||
const Point &rOld = rInf.GetPos();
|
||||
rInf.SetPos( aPos );
|
||||
|
||||
if( IsCapital() )
|
||||
@@ -1382,7 +1382,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
|
||||
rInf.SetLen( nOldLen );
|
||||
}
|
||||
|
||||
rInf.SetPos( rOld );
|
||||
rInf.SetPos(aOldPos);
|
||||
}
|
||||
|
||||
sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf )
|
||||
|
Reference in New Issue
Block a user