Kaydet (Commit) c18d4753 authored tarafından Matteo Casalin's avatar Matteo Casalin

Small code cleanup

Change-Id: I3e39e48a42fd593b03e971dd032e46c5287897a7
üst 964e8203
...@@ -1396,15 +1396,13 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify ) ...@@ -1396,15 +1396,13 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
// muss der Master darueber hinaus die Widow-Regel ueberpruefen. // muss der Master darueber hinaus die Widow-Regel ueberpruefen.
if( !nHave ) if( !nHave )
{ {
bool bSplit; bool bSplit = true;
if( !IsFollow() ) // only a master decides about orphans if( !IsFollow() ) // only a master decides about orphans
{ {
const WidowsAndOrphans aWidOrp( this ); const WidowsAndOrphans aWidOrp( this );
bSplit = ( aLine.GetLineNr() >= aWidOrp.GetOrphansLines() && bSplit = ( aLine.GetLineNr() >= aWidOrp.GetOrphansLines() &&
aLine.GetLineNr() >= aLine.GetDropLines() ); aLine.GetLineNr() >= aLine.GetDropLines() );
} }
else
bSplit = true;
if( bSplit ) if( bSplit )
{ {
...@@ -2002,7 +2000,8 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs ...@@ -2002,7 +2000,8 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs
aLine.Bottom(); aLine.Bottom();
// is breaking necessary? // is breaking necessary?
if ( 0 != ( bSplit = !aFrmBreak.IsInside( aLine ) ) ) bSplit = !aFrmBreak.IsInside( aLine );
if ( bSplit )
bRet = !aFrmBreak.IsKeepAlways() && aFrmBreak.WouldFit( aLine, rMaxHeight, bTst ); bRet = !aFrmBreak.IsKeepAlways() && aFrmBreak.WouldFit( aLine, rMaxHeight, bTst );
else 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