// As odd as it may seem: the query for GetLen() must return // false due to the ExpandPortions _after_ the aDiffText (see SoftHyphs) // caused by the SetFull ... if( !nFullLen )
{ // Do not Init(), because we need height and ascent
Width(0); returnfalse;
} return SwTextPortion::Format( rInf );
}
void SwExpandPortion::Paint( const SwTextPaintInfo &rInf ) const
{
rInf.DrawCSDFHighlighting(*this); // here it detects as CS and not DF
SwTextSlot aDiffText( &rInf, this, true, true ); const SwFont aOldFont = *rInf.GetFont(); if( GetJoinBorderWithPrev() ) const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetLeftBorder(nullptr); if( GetJoinBorderWithNext() ) const_cast<SwTextPaintInfo&>(rInf).GetFont()->SetRightBorder(nullptr); // rInf.DrawCSDFHighlighting(*this); // here it detects as DF and only the '/' is detected as CS
// Do we have to repaint a post it portion? if( rInf.OnWin() && mpNextPortion && !mpNextPortion->Width() )
mpNextPortion->PrePaint( rInf, this );
// The contents of field portions is not considered during the // calculation of the directions. Therefore we let vcl handle // the calculation by removing the BIDI_STRONG_FLAG temporarily.
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
// If a Blank is preceding us, we do not need to trigger underflow // If a Blank is succeeding us, we do not need to pass on the underflow if (bUnderflow
&& nIdx + TextFrameIndex(1) < TextFrameIndex(rInf.GetText().getLength())
&& CH_BLANK == rInf.GetText()[sal_Int32(nIdx) + 1])
{ return0;
} if( nIdx && !const_cast<SwTextFormatInfo&>(rInf).GetFly() )
{ while( pPos && !pPos->IsFlyPortion() )
pPos = pPos->GetNextPortion(); if( !pPos )
{ // We check to see if there are useful line breaks, blanks or fields etc. left // In case there still are some, no underflow // If there are Flys, we still allow the underflow
TextFrameIndex nBlank = nIdx; while( --nBlank > rInf.GetLineStart() )
{ const sal_Unicode cCh = rInf.GetChar( nBlank ); if( CH_BLANK == cCh ||
(( CH_TXTATR_BREAKWORD == cCh || CH_TXTATR_INWORD == cCh )
&& rInf.HasHint( nBlank ) ) ) break;
} if( nBlank <= rInf.GetLineStart() ) return0;
}
} if (nIdx < TextFrameIndex(2)) return1;
sal_Unicode const cCh(rInf.GetChar(nIdx - TextFrameIndex(1))); if (CH_BLANK == cCh) return1; if( CH_BREAK == cCh ) return0; return2;
}
bool SwPostItsPortion::Format( SwTextFormatInfo &rInf )
{ constbool bRet = SwLinePortion::Format( rInf ); // PostIts should not have an effect on line height etc.
SetAscent( 1 );
Height( 1 ); return bRet;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.