22 #include <com/sun/star/beans/PropertyValues.hpp>
50 namespace sw {
class WrongListIterator; }
52 #define ARROW_WIDTH 200
53 #define DIR_LEFT2RIGHT 0
54 #define DIR_BOTTOM2TOP 1
55 #define DIR_RIGHT2LEFT 2
56 #define DIR_TOP2BOTTOM 3
82 {
const_cast<SwLineInfo*
>(
this)->m_nDefTabStop = nNew; }
241 if (m_pText && nPos <
TextFrameIndex(m_pText->getLength()))
return (*m_pText)[sal_Int32(nPos)];
253 sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
261 const sal_uInt16 nComp,
265 const sal_uInt16 nComp,
275 void SetText(
const OUString &rNew ){ m_pText = &rNew; }
296 m_aMaxWidth.insert( std::make_pair( nKey, nVal ) );
300 SwTextPortionMap::iterator it = m_aMaxWidth.find( nKey );
302 if( it != m_aMaxWidth.end() )
313 return !m_aMaxWidth.empty();
322 void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
325 {
return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->
size() )
334 m_pCachedVclData = pCachedVclData;
352 const bool bKern,
const bool bWrong =
false,
353 const bool bSmartTag =
false,
354 const bool bGrammarCheck =
false );
360 : m_pWrongList(nullptr)
361 , m_pGrammarCheckList(nullptr)
362 , m_pSmartTags(nullptr)
364 , pBrushItem(nullptr)
388 const bool bKern =
false)
const;
390 const bool bKern =
false )
const;
393 const bool bSmartTags,
394 const bool bGrammarCheck )
const;
424 SwRect* pIntersect =
nullptr,
const bool bInsideBox =
false )
const;
429 void SetPos(
const Point &rNew ) { aPos = rNew; }
441 {
return ( pSpaceAdd && nSpaceIdx < pSpaceAdd->
size() )
444 void SetpSpaceAdd( std::vector<tools::Long>* pNew ){ pSpaceAdd = pNew; }
513 bool InitHyph(
const bool bAuto =
false );
518 const bool bQuick =
false,
const bool bTst =
false );
520 const bool bQuickL =
false,
const bool bTst =
false);
528 void Width(
const sal_uInt16 nNew ) { m_nWidth = nNew; }
549 void RealWidth(
const sal_uInt16 nNew ) { m_nRealWidth = nNew; }
636 bool ChgHyph(
const bool bNew );
644 css::uno::Reference< css::linguistic2::XHyphenatedWord >
645 HyphWord(
const OUString &rText,
const sal_Int32 nMinTrail );
691 bool bExgLists, OUString
const & rCh = OUString() );
727 return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen );
743 const bool bKern )
const
757 const bool bSmartTags,
758 const bool bGrammarCheck )
const
760 const_cast<SwTextPaintInfo*
>(
this)->
DrawText_( *m_pText, rPor, m_nIdx, nLength,
false, bWrong, bSmartTags, bGrammarCheck );
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
std::unique_ptr< SvxTabStopItem > m_pRuler
rtl_TextEncoding GetCharSet(const SwFontScript nWhich) const
void SetLineNetHeight(const sal_uInt16 nNew)
void RemoveFirstSpaceAdd()
bool IsFirstMulti() const
VclPtr< OutputDevice > m_pRef
Represents the visualization of a paragraph.
void SetUnderFnt(SwUnderlineFont *pNew)
void DrawBackBrush(const SwLinePortion &rPor) const
void SetSnapToGrid(const bool bN)
SwTextInfo(SwTextFrame *pFrame)
void SetArrowDone(const bool bNew)
std::shared_ptr< vcl::TextLayoutCache > m_pOldCachedVclData
const sal_uInt8 & MaxHyph() const
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
SwLinePortion * GetUnderflow()
const css::beans::PropertyValues & GetHyphValues() const
SwTwips GetPaintOfst() const
void First(const SwTwips nNew)
sal_Unicode m_cTabDecimal
void SetPos(const Point &rNew)
void SetFootnoteInside(const bool bNew)
void Width(const sal_uInt16 nNew)
sal_Unicode GetTabDecimal() const
void SetFakeLineStart(const bool bNew)
void SetOnWin(const bool bNew)
The purpose of this class is to be the universal interface between formatting/text output and the pos...
void SetLast(SwLinePortion *pNewLast)
SwTabPortion * GetLastTab()
TextFrameIndex GetUnderScorePos() const
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
void Y(const SwTwips nNew)
sal_uInt16 GetTextHeight() const
void SetIgnoreFly(const bool bNew)
void SetScriptSpace(const bool bNew)
sal_uInt16 GetLineNetHeight() const
void LeftMargin(const SwTwips nNew)
const OUString * pOldText
sw::WrongListIterator * GetGrammarCheckList() const
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
tools::Long GetSpaceAdd() const
sal_uInt16 RealWidth() const
void NoteAnimation() const
void DrawPostIts(bool bScript) const
Dialog to specify the properties of date form field.
void SetText(const OUString &rNew)
void SetKanaComp(std::deque< sal_uInt16 > *pNew)
void SetMulti(const bool bNew)
Of course Writer needs its own rectangles.
void SetGrammarCheckList(sw::WrongListIterator *const pNew)
bool HasHint(TextFrameIndex nPos) const
tools::Long m_nListTabStopPosition
void DrawText_(const OUString &rText, const SwLinePortion &rPor, const TextFrameIndex nIdx, const TextFrameIndex nLen, const bool bKern, const bool bWrong=false, const bool bSmartTag=false, const bool bGrammarCheck=false)
const SwViewShell * GetVsh() const
void SetHanging(const bool bNew)
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
bool ChgHyph(const bool bNew)
void SetDefTabStop(sal_uInt16 nNew) const
sal_uInt16 ForcedLeftMargin() const
const SvxLineSpacingItem * GetLineSpacing() const
void Right(const SwTwips nNew)
void SetHookChar(const sal_Unicode cNew)
const SvxBrushItem * pBrushItem
void Left(const SwTwips nNew)
const SwFont * GetFont() const
void SetFull(const bool bNew)
sw::WrongListIterator * GetSmartTags() const
void SetLastTab(SwTabPortion *pNew)
bool IsTabOverflow() const
bool IsFootnoteInside() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_Unicode GetChar(TextFrameIndex const nPos) const
void CtorInitLineInfo(const SwAttrSet &rAttrSet, const SwTextNode &rTextNode)
void SetKanaIdx(sal_uInt16 nNew)
void SetRoot(SwLineLayout *pNew)
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
SwLinePortion * m_pUnderflow
vcl::RenderContext * GetRefDev()
bool m_bListTabStopIncluded
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
sal_uInt8 GetDirection() const
void CtorInitTextSizeInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, TextFrameIndex nIdx)
TextFrameIndex GetLineStart() const
SwFontScript GetActual() const
const vcl::RenderContext * GetOut() const
std::deque< sal_uInt16 > * GetpKanaComp() const
void SetPaintOfst(const SwTwips nNew)
void SetNumDone(const bool bNew)
std::unique_ptr< SwMultiCreator > GetMultiCreator(TextFrameIndex &rPos, SwMultiPortion const *pM) const
bool HasScriptSpace() const
const SwViewOption & GetOpt() const
SwTextNode const * GetTextNodeForParaProps() const
sal_uInt16 m_nLineNetHeight
SwPosSize GetTextSize() const
css::beans::PropertyValues m_aHyphVals
std::vector< tools::Long > * GetpSpaceAdd() const
TextFrameIndex m_nTextStart
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
Collection of SwLinePortion instances, representing one line of text.
void RealWidth(const sal_uInt16 nNew)
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
vcl::RenderContext * GetOut()
void SetFont(SwFont *pNew)
void DrawLineBreak(const SwLinePortion &rPor) const
void SetStop(const bool bNew)
SwParaPortion * GetParaPortion()
bool HasForbiddenChars() const
SwCharRange & GetReformat()
void SetUnderflow(SwLinePortion *pNew)
bool InitHyph(const bool bAuto=false)
std::unique_ptr< SwWrongList > m_pTempList
SwTextSlot(const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen, bool bExgLists, OUString const &rCh=OUString())
bool IsHyphForbud() const
void SetMaxWidthDiff(const SwLinePortion *nKey, sal_uInt16 nVal)
sw::WrongListIterator * m_pGrammarCheckList
void CalcRect(const SwLinePortion &rPor, SwRect *pRect, SwRect *pIntersect=nullptr, const bool bInsideBox=false) const
Calculate the rectangular area where the portion takes place.
const SwFormatDrop * GetDropFormat() const
SwUnderlineFont * m_pUnderFnt
std::vector< tools::Long > * pSpaceAdd
void SetUnderScorePos(TextFrameIndex const nNew)
sw::WrongListIterator * m_pSmartTags
void DrawTab(const SwLinePortion &rPor) const
TextFrameIndex GetIdx() const
bool CheckFootnotePortion(SwLineLayout const *pCurr)
void DrawRect(const SwRect &rRect, bool bRetouche) const
void SetTabDecimal(const sal_Unicode cNew)
const SwLineLayout * GetRoot() const
const SvxTabStop * GetTabStop(const SwTwips nSearchPos, const SwTwips nRight) const
#i24363# tab stops relative to indent
void SetTabOverflow(bool bOverflow)
sal_uInt16 GetMaxWidthDiff(const SwLinePortion *nKey)
void SetRuby(const bool bNew)
sal_Unicode GetHookChar() const
SwTextPaintInfo & operator=(const SwTextPaintInfo &)=delete
void X(const tools::Long nNew)
void CtorInitTextPaintInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint)
void SetFly(SwFlyPortion *pNew)
sw::WrongListIterator * GetpWrongList() const
SwTextFrame * GetTextFrame()
const vcl::RenderContext * GetRefDev() const
SwTabPortion * m_pLastTab
const OUString & GetText() const
const SwAttrSet & GetCharAttr() const
const SwLinePortion * GetUnderflow() const
VclPtr< OutputDevice > m_pOut
SwUnderlineFont * GetUnderFnt() const
void CtorInitTextInfo(SwTextFrame *pFrame)
const Point & GetPos() const
void SetForbiddenChars(const bool bN)
const std::shared_ptr< vcl::TextLayoutCache > & GetCachedVclData() const
bool m_bOtherThanFootnoteInside
const SwTextFly & GetTextFly() const
Base class for anything that can be part of a line in the Writer layout.
TextFrameIndex GetReformatStart() const
void SetSoftHyphPos(TextFrameIndex const nNew)
SwTextNode is a paragraph in the document model.
const SwViewOption * m_pOpt
std::deque< sal_uInt16 > * m_pKanaComp
bool IsHyphenate() const
If the Hyphenator returns ERROR or the language is set to NOLANGUAGE we do not hyphenate.
void SetLen(const TextFrameIndex nNew)
std::map< SwLinePortion const *, sal_uInt16 > SwTextPortionMap
For the text replacement and restoration of SwTextSizeInfo.
css::uno::Reference< css::linguistic2::XHyphenatedWord > HyphWord(const OUString &rText, const sal_Int32 nMinTrail)
sal_uInt16 GetDefTabStop() const
void SetFirstMulti(const bool bNew)
sal_uInt16 NumberOfTabStops() const
void ForcedLeftMargin(const sal_uInt16 nN)
sal_uInt16 GetKanaIdx() const
const SvxLineSpacingItem * m_pSpace
void SetFootnoteDone(const bool bNew)
void SetFootnote(const bool bNew)
Will be moved soon.
bool HasSpecialAlign(bool bVert) const
std::unique_ptr< sw::WrongListIterator > m_pTempIter
SwLinePortion * GetRest()
void ChkNoHyph(const sal_uInt8 bEnd, const sal_uInt8 bMid)
const SvxBrushItem * GetBrushItem() const
void SetStopUnderflow(const bool bNew)
friend void SetParaPortion(SwTextInfo *pInf, SwParaPortion *pRoot)
We format a row for interactive hyphenation We can assume that we've already formatted.
void SetWrongList(sw::WrongListIterator *const pNew)
TextFrameIndex GetLen() const
void SetCachedVclData(std::shared_ptr< vcl::TextLayoutCache > const &pCachedVclData)
sw::WrongListIterator * m_pWrongList
void SetErgoDone(const bool bNew)
void SetDirection(const sal_uInt8 nNew)
void SetSpaceIdx(sal_uInt16 nNew)
SwTwips m_nLeftMargin
First or left margin, depending on context.
void SetShift(const bool bNew)
void SetLineStart(TextFrameIndex const nNew)
SwFontSave(const SwTextSizeInfo &rInf, SwFont *pFnt, SwAttrIter *pItr=nullptr)
sw::WrongListIterator * m_pOldSmartTagList
TextFrameIndex GetTextBreak(const tools::Long nLineWidth, const TextFrameIndex nMaxLen, const sal_uInt16 nComp, vcl::TextLayoutCache const *) const
SwLinePortion * GetLast()
void SetpSpaceAdd(std::vector< tools::Long > *pNew)
bool CheckCurrentPosBookmark()
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
void DrawRedArrow(const SwLinePortion &rPor) const
void SetOut(OutputDevice *pNewOut)
bool StopUnderflow() const
bool IsFakeLineStart() const
std::shared_ptr< vcl::TextLayoutCache > m_pCachedVclData
TextFrameIndex m_nLineStart
Current line start in rText.
void SetNewLine(const bool bNew)
const SwParaPortion * GetParaPortion() const
void SetOtherThanFootnoteInside(const bool bNew)
SwTwips GetOffset() const
void SetLineHeight(const sal_uInt16 nNew)
bool IsOtherThanFootnoteInside() const
const SwRect & GetPaintRect() const
void DrawBackground(const SwLinePortion &rPor) const
void SetOffset(const SwTwips nNew)
bool IsListTabStopIncluded() const
void SetSmartTags(sw::WrongListIterator *const pNew)
sal_uInt16 GetKanaComp() const
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
sal_uInt16 GetLineHeight() const
void SetIdx(const TextFrameIndex nNew)
SvxParaVertAlignItem::Align GetVertAlign() const
sal_uInt16 m_nForcedLeftMargin
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
void SetRest(SwLinePortion *pNewRest)
SvxParaVertAlignItem::Align m_nVertAlign
void SetDropInit(const bool bNew)
tools::Long GetListTabStopPosition() const
void DrawMarkedText(const SwLinePortion &rPor, TextFrameIndex nLen, const bool bWrong, const bool bSmartTags, const bool bGrammarCheck) const
const sal_Int32 COMPLETE_STRING
TextFrameIndex GetTextStart() const
TextFrameIndex GetSoftHyphPos() const
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich) const
bool IsFootnoteDone() const
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
const SwTextFrame * GetTextFrame() const
SwTextPortionMap m_aMaxWidth
sal_uInt16 GetAscent() const
sal_uInt16 GetSpaceIdx() const
sw::WrongListIterator * m_pOldGrammarCheckList
void SetNotEOL(const bool bNew)