Kaydet (Commit) 8b4fcb9c authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Avoid infinite loop caused by vertical content alignment

In some case invalidations makes the program to go
into an infinite loop.
Move InvalidateContentPos() call upper in the
SwCntntFrm::MakeAll method so it won't be called
when size invalidation is made inside this
method.

Change-Id: I25deccb1760b82a764cad3e90aafb092631a1533
üst 3871223b
......@@ -1266,6 +1266,14 @@ void SwCntntFrm::MakeAll()
}
(Frm().*fnRect->fnSetWidth)( nNewFrmWidth );
// When a lower of a vertically aligned fly frame changes it's size we need to recalculate content pos.
if( GetUpper() && GetUpper()->IsFlyFrm() &&
GetUpper()->GetFmt()->GetTextVertAdjust().GetValue() != SDRTEXTVERTADJUST_TOP )
{
static_cast<SwFlyFrm*>(GetUpper())->InvalidateContentPos();
GetUpper()->SetCompletePaint();
}
}
if ( !mbValidPrtArea )
{
......@@ -1340,14 +1348,6 @@ void SwCntntFrm::MakeAll()
if ( nConsequetiveFormatsWithoutChange <= cnStopFormat )
{
Format();
// When a lower of a vertically aligned fly frame changes it's size we need to recalculate content pos.
if( GetUpper() && GetUpper()->IsFlyFrm() &&
GetUpper()->GetFmt()->GetTextVertAdjust().GetValue() != SDRTEXTVERTADJUST_TOP )
{
static_cast<SwFlyFrm*>(GetUpper())->InvalidateContentPos();
GetUpper()->SetCompletePaint();
}
}
#if OSL_DEBUG_LEVEL > 0
else
......
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