diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-03-06 13:34:09 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-03-06 20:03:40 +0100 |
commit | 8b4fcb9c048d8189693a866c89bc257021352b86 (patch) | |
tree | a18ddc4676e6fe8786ed57c146eae0d34c30ac8f /sw | |
parent | 3871223bee2fcf7968d522a56e4062098a1e5633 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 88be7b681d74..da97bcfab084 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -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 |