36 #include <osl/diagnose.h>
38 #include <com/sun/star/i18n/XBreakIterator.hpp>
40 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
42 #include <com/sun/star/i18n/WordType.hpp>
44 #include <com/sun/star/i18n/InputSequenceChecker.hpp>
45 #include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
46 #include <com/sun/star/i18n/ScriptType.hpp>
55 #include <unicode/ubidi.h>
62 #include <string_view>
69 : mpActiveView {
nullptr}
78 , mbIsFormatting {
false}
82 , mbUndoEnabled {
false}
85 , mbRightToLeft {
false}
86 , mbHasMultiLineParas {
false}
91 mpIdleFormatter->SetInvokeHandler(
LINK(
this,
TextEngine, IdleFormatHdl ) );
95 ImpInitLayoutMode( mpRefDev );
99 vcl::Font aFont(mpRefDev->GetFont().GetFamilyName(),
Size(0, 0));
101 Color aFillColor( aFont.GetFillColor() );
103 aFont.SetFillColor( aFillColor );
123 mpViews->push_back( pTextView );
132 TextViews::iterator it = std::find(
mpViews->begin(),
mpViews->end(), pTextView );
202 for (
auto nView =
mpViews->size(); nView; )
204 TextView* pView = (*mpViews)[ --nView ];
260 OUStringBuffer aText;
263 for ( sal_uInt32 nP = 0; nP < nParas; ++nP )
267 const size_t nLines = pTEParaPortion->
GetLines().size();
268 for (
size_t nL = 0; nL < nLines; ++nL )
272 if ( pSep && ( ( (nP+1) < nParas ) || ( (nL+1) < nLines ) ) )
276 return aText.makeStringAndClear();
281 return mpDoc->GetText( nPara );
299 return mpDoc->GetNodes()[ nPara ]->GetText().getLength();
318 bool bDoesChange =
false;
373 std::unique_ptr<TextNode> pNode(
new TextNode( OUString() ));
374 mpDoc->GetNodes().insert(
mpDoc->GetNodes().begin(), std::move(pNode) );
393 OUStringBuffer aText;
397 for ( sal_uInt32 nNode = aSel.
GetStart().
GetPara(); nNode <= nEndPara; ++nNode )
401 sal_Int32 nStartPos = 0;
402 sal_Int32 nEndPos = pNode->
GetText().getLength();
403 if ( nNode == nStartPara )
405 if ( nNode == nEndPara )
408 aText.append(pNode->
GetText().subView(nStartPos, nEndPos-nStartPos));
409 if ( nNode < nEndPara )
412 return aText.makeStringAndClear();
422 pView->ImpSetSelection( aEmptySel );
438 if ( !rText.isEmpty() )
443 pView->ImpSetSelection( aEmptySel );
450 if( rText.isEmpty() )
469 SAL_WARN_IF( !nChars,
"vcl",
"ImpRemoveChars: 0 Chars?!" );
477 const sal_Int32 nStart = rPaM.
GetIndex();
478 const sal_Int32 nEnd = nStart + nChars;
482 if ( ( rAttr.
GetEnd() >= nStart ) && ( rAttr.
GetStart() < nEnd ) )
487 InsertUndo( std::make_unique<TextUndoRemoveChars>(
this, rPaM, aStr ) );
490 mpDoc->RemoveChars( rPaM, nChars );
496 SAL_WARN_IF( nLeft == nRight,
"vcl",
"ImpConnectParagraphs: connect the very same paragraph ?" );
502 InsertUndo( std::make_unique<TextUndoConnectParas>(
this, nLeft, pLeft->
GetText().getLength() ) );
507 SAL_WARN_IF( !pLeft || !pLeftPortion,
"vcl",
"ImpConnectParagraphs(1): Hidden Portion" );
508 SAL_WARN_IF( !pRight || !pRightPortion,
"vcl",
"ImpConnectParagraphs(2): Hidden Portion" );
510 TextPaM aPaM =
mpDoc->ConnectParagraphs( pLeft, pRight );
534 SAL_WARN_IF( !
mpDoc->IsValidPaM( aStartPaM ),
"vcl",
"ImpDeleteText(1): bad Index" );
535 SAL_WARN_IF( !
mpDoc->IsValidPaM( aEndPaM ),
"vcl",
"ImpDeleteText(2): bad Index" );
537 const sal_uInt32 nStartNode = aStartPaM.GetPara();
538 sal_uInt32 nEndNode = aEndPaM.GetPara();
541 for ( sal_uInt32
z = nStartNode+1;
z < nEndNode; ++
z )
547 if ( nStartNode != nEndNode )
551 sal_Int32 nChars = pLeft->
GetText().getLength() - aStartPaM.GetIndex();
556 SAL_WARN_IF( !pPortion,
"vcl",
"ImpDeleteText(3): bad Index" );
561 nEndNode = nStartNode+1;
562 nChars = aEndPaM.GetIndex();
565 aEndPaM.GetPara() = nEndNode;
566 aEndPaM.GetIndex() = 0;
569 SAL_WARN_IF( !pPortion,
"vcl",
"ImpDeleteText(4): bad Index" );
578 const sal_Int32 nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
581 SAL_WARN_IF( !pPortion,
"vcl",
"ImpDeleteText(5): bad Index" );
582 pPortion->
MarkInvalid( aEndPaM.GetIndex(), aStartPaM.GetIndex() - aEndPaM.GetIndex() );
592 std::unique_ptr<TextNode> pNode = std::move(
mpDoc->GetNodes()[ nPara ]);
595 mpDoc->GetNodes().erase(
mpDoc->GetNodes().begin() + nPara );
597 InsertUndo( std::make_unique<TextUndoDelPara>(
this, pNode.release(), nPara ) );
620 bool bIsSequenceChecking =
625 if (bIsSequenceChecking)
628 bIsSequenceChecking = xBI.is() && i18n::ScriptType::COMPLEX == xBI->getScriptType( OUString( c ), 0 );
631 return bIsSequenceChecking;
641 SAL_WARN_IF( c ==
'\n',
"vcl",
"InsertText: NewLine!" );
642 SAL_WARN_IF( c ==
'\r',
"vcl",
"InsertText: NewLine!" );
647 bool bDoOverwrite = bOverwrite && ( aPaM.GetIndex() < pNode->GetText().getLength() );
649 bool bUndoAction = rCurSel.
HasRange() || bDoOverwrite;
658 else if ( bDoOverwrite )
673 sal_Int32 nTmpPos = aPaM.GetIndex();
675 i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC;
679 OUString aOldText(
mpDoc->GetText( aPaM.GetPara() ).
copy(0, nTmpPos) );
682 OUString aNewText( aOldText );
683 xISC->correctInputSequence( aNewText, nTmpPos - 1, c, nCheckMode );
686 const sal_Int32 nOldLen = aOldText.getLength();
687 const sal_Int32 nNewLen = aNewText.getLength();
690 sal_Int32 nChgPos = 0;
691 while ( nChgPos < nOldLen && nChgPos < nNewLen &&
692 pOldTxt[nChgPos] == pNewTxt[nChgPos] )
695 OUString aChgText( aNewText.copy( nChgPos ) );
700 if (!aChgText.isEmpty())
709 if (!xISC->checkInputSequence( aOldText, nTmpPos - 1, c, nCheckMode ))
719 std::unique_ptr<TextUndoInsertChars> pNewUndo(
new TextUndoInsertChars(
this, aPaM, OUString(c) ));
720 bool bTryMerge = !bDoOverwrite && ( c !=
' ' );
728 aPaM =
mpDoc->InsertText( aPaM, c );
752 sal_Int32 nStart = 0;
753 while ( nStart < aText.getLength() )
755 sal_Int32 nEnd = aText.indexOf(
LINE_SEP, nStart );
757 nEnd = aText.getLength();
762 OUString aLine(aText.copy(nStart, nEnd-nStart));
764 InsertUndo( std::make_unique<TextUndoInsertChars>(
this, aPaM, aLine ) );
768 if (aLine.indexOf(
'\t' ) != -1)
771 aPaM =
mpDoc->InsertText( aPaM, aLine );
775 if ( nEnd < aText.getLength() )
778 if ( nEnd == aText.getLength() )
807 bool bFirstParaContentChanged = rPaM.
GetIndex() < pNode->
GetText().getLength();
812 SAL_WARN_IF( !pPortion,
"vcl",
"ImpInsertParaBreak: Hidden Portion" );
813 pPortion->MarkInvalid( rPaM.
GetIndex(), 0 );
815 TextNode* pNewNode =
mpDoc->GetNodes()[ aPaM.GetPara() ].get();
823 if ( bFirstParaContentChanged )
842 for ( sal_uInt32 nPortion = 0; nPortion < rPaM.
GetPara(); ++nPortion )
872 sal_Int32 nCurIndex = 0;
876 if ( ( rTmpLine.GetStart() == rPaM.
GetIndex() ) || ( rTmpLine.IsIn( rPaM.
GetIndex(), bSpecial ) ) )
882 nCurIndex = nCurIndex + rTmpLine.
GetLen();
890 pLine = & ( pPortion->
GetLines().back() );
909 SAL_WARN_IF( ( nIndex < pLine->GetStart() ) || ( nIndex > pLine->
GetEnd() ) ,
"vcl",
"ImpGetXPos: Bad parameters!" );
911 bool bDoPreferPortionStart = bPreferPortionStart;
914 bDoPreferPortionStart =
true;
915 else if ( nIndex == pLine->
GetEnd() )
916 bDoPreferPortionStart =
false;
920 sal_Int32 nTextPortionStart = 0;
923 SAL_WARN_IF( ( nTextPortion < pLine->GetStartPortion() ) || ( nTextPortion > pLine->
GetEndPortion() ),
"vcl",
"GetXPos: Portion not in current line!" );
931 if ( nTextPortionStart != nIndex )
934 if ( nIndex == ( nTextPortionStart + rPortion.
GetLen() ) )
941 nX += nPortionTextWidth;
948 SAL_WARN_IF( bPreferPortionStart,
"vcl",
"ImpGetXPos: How can we get here!" );
949 nX =
ImpGetXPos( nPara, pLine, nIndex,
true );
967 nX += nPortionTextWidth - nPosInPortion;
975 nX += nPortionTextWidth;
1005 for ( sal_uInt32 nPortion = 0; nPortion <
mpTEParaPortions->Count(); ++nPortion )
1010 if ( nY > rDocPos.Y() )
1013 Point aPosInPara( rDocPos );
1014 aPosInPara.AdjustY( -nY );
1023 const sal_uInt32 nLastNode =
static_cast<sal_uInt32
>(
mpDoc->GetNodes().size() - 1);
1033 sal_Int32 nCurIndex = 0;
1037 std::vector<TextLine>::size_type nLine;
1038 for ( nLine = 0; nLine < pPortion->
GetLines().size(); nLine++ )
1042 if ( nY > rPosInPara.Y() )
1049 assert(pLine &&
"ImpFindIndex: pLine ?");
1051 nCurIndex =
GetCharPos( nPortion, nLine, rPosInPara.X() );
1053 if ( nCurIndex && ( nCurIndex == pLine->
GetEnd() ) &&
1054 ( pLine != &( pPortion->
GetLines().back() ) ) )
1058 nCurIndex = xBI->previousCharacters( pPortion->
GetNode()->
GetText(), nCurIndex,
GetLocale(), i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
1069 sal_Int32 nCurIndex = rLine.
GetStart();
1072 if ( nXPos <= nTmpX )
1080 if ( nTmpX > nXPos )
1082 if( rTextPortion.
GetLen() > 1 )
1087 SeekCursor( nPortion, nCurIndex+1, aFont,
nullptr );
1091 nPosInPortion = rTextPortion.
GetWidth() - nPosInPortion;
1097 nCurIndex += rTextPortion.
GetLen();
1126 for (
auto nLine = pPortion->
GetLines().size(); nLine; )
1133 nLineWidth += rTextPortion.
GetWidth();
1135 if ( nLineWidth > nParaWidth )
1136 nParaWidth = nLineWidth;
1173 sal_Int32 nTabPos =
mpDoc->GetNodes()[ nPara ]->GetText().indexOf(
'\t', nPortionStart );
1174 SAL_WARN_IF( nTabPos != -1 && nTabPos < (nPortionStart+nLen),
"vcl",
"CalcTextWidth: Tab!" );
1178 SeekCursor( nPara, nPortionStart+1, aFont,
nullptr );
1195 nEnd = nStart + rTextPortion.
GetLen();
1200 nStart += rTextPortion.
GetLen();
1211 return pPPortion->GetLines().size();
1221 if ( pPPortion && ( nLine < pPPortion->GetLines().
size() ) )
1223 return pPPortion->GetLines()[ nLine ].GetLen();
1234 SAL_WARN_IF( !pPPortion,
"vcl",
"GetParaHeight: paragraph not found" );
1244 sal_uInt16 nLines = pTEParaPortion->
GetLines().size();
1245 sal_uInt16 nLastInvalid, nFirstInvalid = 0;
1247 for ( nLine = 0; nLine < nLines; nLine++ )
1252 nFirstInvalid = nLine;
1257 for ( nLastInvalid = nFirstInvalid; nLastInvalid < nLines; nLastInvalid++ )
1264 if ( nLastInvalid >= nLines )
1265 nLastInvalid = nLines-1;
1272 return static_cast<sal_uInt32
>(
mpDoc->GetNodes().size());
1319 SAL_WARN_IF( !pNode,
"vcl",
"InsertContent: NULL-Pointer!" );
1323 mpDoc->GetNodes().insert(
mpDoc->GetNodes().begin() + nPara, std::move(pNode) );
1331 SAL_WARN_IF( !pNode,
"vcl",
"SplitContent: Invalid Node!" );
1333 SAL_WARN_IF( nSepPos > pNode->
GetText().getLength(),
"vcl",
"SplitContent: Bad index" );
1335 TextPaM aPaM( nNode, nSepPos );
1353 for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
1363 if ( ( ( rAttrib.
GetStart() < nPos ) && ( rAttrib.
GetEnd() >= nPos ) )
1364 || pNode->
GetText().isEmpty() )
1373 pOutDev->
SetTextColor( static_cast<const TextAttribFontColor&>(rAttrib.
GetAttr()).GetColor() );
1444 pView->HideCursor();
1447 const Size aOutSz = pView->GetWindow()->GetOutputSizePixel();
1453 Point aNewPos = pView->GetWindowPos( aClipRect.
TopLeft() );
1455 aNewPos.AdjustX( -(aOutSz.
Width() - 1) );
1456 aClipRect.
SetPos( aNewPos );
1458 pView->GetWindow()->Invalidate( aClipRect );
1472 FormatAndUpdate( mpIdleFormatter->GetView() );
1482 for ( sal_uInt32 nPortion = 0; nPortion <
mpTEParaPortions->Count(); ++nPortion )
1521 : std::numeric_limits<tools::Long>::max();
1524 Size( nWidth, aInvRange.
Len() ) );
1553 if ( nNewHeight < mnCurTextHeight )
1565 mnCurTextHeight = nNewHeight;
1595 bool bLineBreak = !pNode->
GetText().isEmpty();
1608 pTEParaPortion->
GetLines().push_back( aTmpLine );
1618 SAL_WARN_IF( nMaxBreakPos >= pNode->
GetText().getLength(),
"vcl",
"ImpBreakLine: Break?!" );
1620 if ( nMaxBreakPos == -1 )
1621 nMaxBreakPos = pNode->
GetText().getLength() - 1;
1624 i18n::LineBreakHyphenationOptions aHyphOptions(
nullptr, uno::Sequence< beans::PropertyValue >(), 1 );
1626 i18n::LineBreakUserOptions aUserOptions;
1629 aUserOptions.applyForbiddenRules =
true;
1630 aUserOptions.allowPunctuationOutsideMargin =
false;
1631 aUserOptions.allowHyphenateEnglish =
false;
1633 static const css::lang::Locale aDefLocale;
1634 i18n::LineBreakResults aLBR = xBI->getLineBreak( pNode->
GetText(), nMaxBreakPos, aDefLocale, pLine->
GetStart(), aHyphOptions, aUserOptions );
1635 sal_Int32 nBreakPos = aLBR.breakIndex;
1636 if ( nBreakPos <= pLine->GetStart() )
1638 nBreakPos = nMaxBreakPos;
1639 if ( nBreakPos <= pLine->GetStart() )
1644 pLine->
SetEnd( nBreakPos );
1647 if ( nBreakPos >= pLine->
GetStart() &&
1648 nBreakPos < pNode->
GetText().getLength() &&
1649 pNode->
GetText()[ nBreakPos ] ==
' ' )
1654 SAL_WARN_IF( nBreakPos <= pLine->GetStart(),
"vcl",
"ImpBreakLine: SplitTextPortion at beginning of line?" );
1667 std::size_t nSplitPortion;
1668 sal_Int32 nTmpPos = 0;
1672 for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
1676 if ( nTmpPos >= nPos )
1678 if ( nTmpPos == nPos )
1679 return nSplitPortion;
1680 pTextPortion = &rTP;
1685 SAL_WARN_IF( !pTextPortion,
"vcl",
"SplitTextPortion: position outside of region!" );
1687 const sal_Int32 nOverlapp = nTmpPos - nPos;
1688 pTextPortion->
GetLen() -= nOverlapp;
1693 return nSplitPortion;
1700 SAL_WARN_IF( pNode->
GetText().isEmpty(),
"vcl",
"CreateTextPortions: should not be used for empty paragraphs!" );
1707 for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
1711 aPositions.insert( rAttrib.
GetStart() );
1712 aPositions.insert( rAttrib.
GetEnd() );
1714 aPositions.insert( pNode->
GetText().getLength() );
1717 for (
const auto& rWritingDirection : rWritingDirections )
1718 aPositions.insert( rWritingDirection.nStartPos );
1727 aPositions.insert(
mpIMEInfos->aPos.GetIndex() +
n );
1733 sal_Int32 nTabPos = pNode->
GetText().indexOf(
'\t' );
1734 while ( nTabPos != -1 )
1736 aPositions.insert( nTabPos );
1737 aPositions.insert( nTabPos + 1 );
1738 nTabPos = pNode->
GetText().indexOf(
'\t', nTabPos+1 );
1744 sal_Int32 nPortionStart = 0;
1745 std::size_t nInvPortion = 0;
1750 nPortionStart += rTmpPortion.
GetLen();
1751 if ( nPortionStart >= nStartPos )
1753 nPortionStart -= rTmpPortion.
GetLen();
1758 OSL_ENSURE(nP < pTEParaPortion->GetTextPortions().
size()
1760 "CreateTextPortions: Nothing to delete!");
1761 if ( nInvPortion && ( nPortionStart+pTEParaPortion->
GetTextPortions()[nInvPortion].GetLen() > nStartPos ) )
1767 nPortionStart -= pTEParaPortion->
GetTextPortions()[nInvPortion].GetLen();
1772 aPositions.insert( nPortionStart );
1774 aPositionsIt = aPositions.
find( nPortionStart );
1775 SAL_WARN_IF( aPositionsIt == aPositions.
end(),
"vcl",
"CreateTextPortions: nPortionStart not found" );
1777 if ( aPositionsIt != aPositions.
end() )
1780 for ( ++nextIt; nextIt != aPositions.
end(); ++aPositionsIt, ++nextIt )
1786 OSL_ENSURE(pTEParaPortion->
GetTextPortions().
size(),
"CreateTextPortions: No Portions?!");
1793 OSL_ENSURE(nNewChars,
"RecalcTextPortion: Diff == 0");
1796 if ( nNewChars > 0 )
1803 ( nStartPos && ( pNode->
GetText()[ nStartPos - 1 ] ==
'\t' ) ) ||
1804 ( !nStartPos && ( nNewChars < pNode->
GetText().getLength() ) && pNode->
GetText()[ nNewChars ] ==
'\t' ) )
1806 std::size_t nNewPortionPos = 0;
1812 if ( ( nNewPortionPos < pTEParaPortion->GetTextPortions().
size() ) &&
1816 pTEParaPortion->
GetTextPortions()[nNewPortionPos].GetLen() = nNewChars;
1826 sal_Int32 nPortionStart {0};
1829 rTP.
GetLen() += nNewChars;
1840 std::size_t nPortion = 0;
1842 const sal_Int32 nEnd = nStartPos-nNewChars;
1845 for ( nPortion = 0; nPortion < nPortions; nPortion++ )
1848 if ( ( nPos+pTP->
GetLen() ) > nStartPos )
1850 SAL_WARN_IF( nPos > nStartPos,
"vcl",
"RecalcTextPortion: Bad Start!" );
1856 SAL_WARN_IF( !pTP,
"vcl",
"RecalcTextPortion: Portion not found!" );
1857 if ( ( nPos == nStartPos ) && ( (nPos+pTP->
GetLen()) == nEnd ) )
1864 SAL_WARN_IF( pTP->
GetLen() <= (-nNewChars),
"vcl",
"RecalcTextPortion: Portion too small to shrink!" );
1865 pTP->
GetLen() += nNewChars;
1868 "RecalcTextPortion: none are left!" );
1885 TextPaM const* pSelStart =
nullptr;
1886 TextPaM const* pSelEnd =
nullptr;
1887 if ( pSelection && pSelection->
HasRange() )
1889 const bool bInvers = pSelection->
GetEnd() < pSelection->
GetStart();
1890 pSelStart = !bInvers ? &pSelection->
GetStart() : &pSelection->
GetEnd();
1891 pSelEnd = bInvers ? &pSelection->
GetStart() : &pSelection->
GetEnd();
1905 if ( !pPaintArea || ( ( nY + nParaHeight ) > pPaintArea->
Top() ) )
1909 for (
auto & rLine : pPortion->
GetLines() )
1911 Point aTmpPos( rStartPos.X() + rLine.GetStartX(), nY );
1916 nIndex = rLine.GetStart();
1917 for ( std::size_t
y = rLine.GetStartPortion();
y <= rLine.GetEndPortion();
y++ )
1920 "ImpPaint: Line without Textportion!");
1925 const tools::Long nTxtWidth = rTextPortion.GetWidth();
1929 if ( ( aTmpPos.X() + nTxtWidth ) >= 0 )
1931 switch ( rTextPortion.GetKind() )
1936 SeekCursor( nPara, nIndex+1, aFont, pOutDev );
1939 else if ( pSelection )
1943 sal_Int32 nTmpIndex = nIndex;
1944 sal_Int32 nEnd = nTmpIndex + rTextPortion.GetLen();
1945 Point aPos = aTmpPos;
1951 const TextPaM aTextStart( nPara, nTmpIndex );
1952 const TextPaM aTextEnd( nPara, nEnd );
1953 if ( ( aTextStart < *pSelEnd ) && ( aTextEnd > *pSelStart ) )
1956 if ( aTextStart < *pSelStart )
1958 const sal_Int32 nL = pSelStart->
GetIndex() - nTmpIndex;
1961 aPos.setX( rStartPos.X() +
ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ) );
1963 nTmpIndex = nTmpIndex + nL;
1967 sal_Int32 nL = nEnd - nTmpIndex;
1968 if ( aTextEnd > *pSelEnd )
1969 nL = pSelEnd->
GetIndex() - nTmpIndex;
1975 aPos.setX( rStartPos.X() +
ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ) );
1979 nTmpIndex = nTmpIndex + nL;
1983 if ( nTmpIndex < nEnd )
1985 nL = nEnd-nTmpIndex;
1987 aPos.setX( rStartPos.X() +
ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ) );
2007 const TextPaM aTextStart(nPara, nIndex);
2008 const TextPaM aTextEnd(nPara, nIndex + 1);
2009 if ((aTextStart < *pSelEnd) && (aTextEnd > *pSelStart))
2019 pOutDev->
Erase( aTabArea );
2024 OSL_FAIL(
"ImpPaint: Unknown Portion-Type !" );
2028 nIndex += rTextPortion.GetLen();
2034 if ( pPaintArea && ( nY >= pPaintArea->
Bottom() ) )
2043 if ( pPaintArea && ( nY > pPaintArea->
Bottom() ) )
2056 const auto nOldLineCount = pTEParaPortion->
GetLines().size();
2063 pTEParaPortion->
GetLines().clear();
2066 return nOldLineCount != pTEParaPortion->
GetLines().size();
2070 if ( pTEParaPortion->
GetLines().empty() )
2072 pTEParaPortion->
GetLines().emplace_back( );
2077 const sal_Int32 nInvalidEnd = nInvalidStart + std::abs( nInvalidDiff );
2078 bool bQuickFormat =
false;
2085 bQuickFormat = nInvalidDiff != 0;
2086 if ( nInvalidDiff < 0 )
2093 nPos += rTP.GetLen();
2094 if ( nPos > nInvalidStart && nPos < nInvalidEnd )
2096 bQuickFormat =
false;
2111 sal_uInt16 nLine = pTEParaPortion->
GetLines().size()-1;
2112 for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
2115 if ( rLine.
GetEnd() > nInvalidStart )
2124 if ( nLine && ( !pTEParaPortion->
IsSimpleInvalid() || ( nInvalidEnd < pNode->
GetText().getLength() ) || ( nInvalidDiff <= 0 ) ) )
2138 sal_Int32 nPortionStart = 0;
2139 sal_Int32 nPortionEnd = 0;
2141 sal_Int32 nTmpPos = nIndex;
2150 bool bBrokenLine =
false;
2152 while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().
size() ) )
2154 nPortionStart = nTmpPos;
2157 if ( pNode->
GetText()[ nTmpPos ] ==
'\t' )
2161 pPortion->
GetWidth() = nTmpWidth - nCurPos -
mpDoc->GetLeftMargin();
2163 if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->
GetStartPortion() ) )
2183 nTmpPos += pPortion->
GetLen();
2184 nPortionEnd = nTmpPos;
2189 bool bFixedEnd =
false;
2190 if ( nTmpWidth > nXWidth )
2192 nPortionEnd = nTmpPos;
2193 nTmpPos -= pPortion->
GetLen();
2194 nPortionStart = nTmpPos;
2208 pLine->
SetEnd( nPortionEnd );
2210 "CreateLines: No TextPortions?");
2216 pLine->
SetEnd( nPortionStart );
2219 else if ( bBrokenLine )
2221 pLine->
SetEnd( nPortionStart+1 );
2226 SAL_WARN_IF( (nPortionEnd-nPortionStart) != pPortion->
GetLen(),
"vcl",
"CreateLines: There is a Portion after all?!" );
2228 ImpBreakLine( nPara, pLine, nPortionStart, nRemainingWidth );
2238 nTextWidth += rTextPortion.
GetWidth();
2244 pLine->
SetStartX( static_cast<sal_uInt16>(nSpace / 2) );
2246 pLine->
SetStartX( static_cast<sal_uInt16>(nSpace) );
2263 if ( pLine->
GetEnd() < nInvalidStart )
2265 if ( *pLine == aSaveLine )
2272 const sal_Int32 nStart = pLine->
GetStart();
2273 const sal_Int32 nEnd = pLine->
GetEnd();
2275 if ( nStart > nInvalidEnd )
2277 if ( ( ( nStart-nInvalidDiff ) == aSaveLine.
GetStart() ) &&
2278 ( ( nEnd-nInvalidDiff ) == aSaveLine.
GetEnd() ) )
2288 else if ( bQuickFormat && ( nEnd > nInvalidEnd) )
2293 if ( nEnd == ( aSaveLine.
GetEnd() + nInvalidDiff ) )
2302 nIndex = pLine->
GetEnd();
2309 if ( nLine < pTEParaPortion->GetLines().
size()-1 )
2310 pLine = &( pTEParaPortion->
GetLines()[ ++nLine ] );
2311 if ( pLine && ( nIndex >= pNode->
GetText().getLength() ) )
2313 nDelFromLine = nLine;
2318 if ( nIndex < pNode->
GetText().getLength() )
2322 pLine = &pTEParaPortion->
GetLines()[nLine];
2339 pTEParaPortion->
GetLines().erase( pTEParaPortion->
GetLines().begin() + nDelFromLine,
2340 pTEParaPortion->
GetLines().end() );
2347 return nOldLineCount != pTEParaPortion->
GetLines().size();
2358 i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->
GetText(), rCursorPos.
GetIndex(),
GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, true );
2360 if (aBoundary.startPos > 0 && aBoundary.startPos < pNode->
GetText().getLength() && u_charType(pNode->
GetText()[aBoundary.startPos]) == U_CONNECTOR_PUNCTUATION)
2362 aBoundary.startPos = xBI->getWordBoundary(pNode->
GetText(), aBoundary.startPos - 1,
2363 GetLocale(), css::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
true).startPos;
2365 while (aBoundary.startPos > 0 && u_charType(pNode->
GetText()[aBoundary.startPos - 1]) == U_CONNECTOR_PUNCTUATION)
2367 aBoundary.startPos = std::min(aBoundary.startPos,
2368 xBI->getWordBoundary( pNode->
GetText(), aBoundary.startPos - 2,
2369 GetLocale(), css::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
true).startPos);
2372 if (aBoundary.endPos > 0 && aBoundary.endPos < pNode->
GetText().getLength() && u_charType(pNode->
GetText()[aBoundary.endPos - 1]) == U_CONNECTOR_PUNCTUATION)
2374 aBoundary.endPos = xBI->getWordBoundary(pNode->
GetText(), aBoundary.endPos,
2375 GetLocale(), css::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
true).endPos;
2377 while (aBoundary.endPos < pNode->
GetText().getLength() && u_charType(pNode->
GetText()[aBoundary.endPos]) == U_CONNECTOR_PUNCTUATION)
2379 aBoundary.endPos = xBI->getWordBoundary(pNode->
GetText(), aBoundary.endPos + 1,
2380 GetLocale(), css::i18n::WordType::ANYWORD_IGNOREWHITESPACES,
true).endPos;
2388 *pEndOfWord = aSel.
GetEnd();
2404 const sal_uInt32 nParas =
static_cast<sal_uInt32
>(
mpDoc->GetNodes().size());
2412 OStringBuffer aLine;
2413 bool bDone = rInput.
ReadLine( aLine );
2441 const sal_uInt32 nParas =
static_cast<sal_uInt32
>(
mpDoc->GetNodes().size());
2455 const OUString aText = pNode->
GetText().copy( nStartPos, nEndPos-nStartPos );
2462 if ( nPara >=
mpDoc->GetNodes().size() )
2487 if ( nPara >=
mpDoc->GetNodes().size() )
2493 const sal_Int32 nMax = pNode->
GetText().getLength();
2494 if ( nStart > nMax )
2524 const sal_uInt32 nParas =
static_cast<sal_uInt32
>(
mpDoc->GetNodes().size());
2525 if ( rPaM.
GetPara() >= nParas )
2527 rPaM.
GetPara() = nParas ? nParas-1 : 0;
2544 for (
auto nView =
mpViews->size(); nView; )
2546 TextView* pView = (*mpViews)[ --nView ];
2549 for (
int n = 0;
n <= 1;
n++ )
2552 if ( rPaM.
GetPara() >= nPara )
2565 for (
auto nView =
mpViews->size(); nView; )
2567 TextView* pView = (*mpViews)[ --nView ];
2570 const sal_uInt32 nParas =
static_cast<sal_uInt32
>(
mpDoc->GetNodes().size());
2571 for (
int n = 0;
n <= 1;
n++ )
2576 else if ( rPaM.
GetPara() == nPara )
2579 if ( rPaM.
GetPara() >= nParas )
2593 for (
auto nView =
mpViews->size(); nView; )
2595 TextView* pView = (*mpViews)[ --nView ];
2598 const sal_Int32 nEnd = nPos + nChars;
2599 for (
int n = 0;
n <= 1;
n++ )
2602 if ( rPaM.
GetPara() == nPara )
2620 for (
auto nView =
mpViews->size(); nView; )
2622 TextView* pView = (*mpViews)[ --nView ];
2625 for (
int n = 0;
n <= 1;
n++ )
2628 if ( rPaM.
GetPara() == nPara )
2647 mpDoc->SetLeftMargin( n );
2705 UErrorCode nError = U_ZERO_ERROR;
2706 UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
2707 nError = U_ZERO_ERROR;
2709 ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel,
nullptr, &nError );
2710 nError = U_ZERO_ERROR;
2716 UBiDiLevel nCurrDir;
2718 for (
tools::Long nIdx = 0; nIdx < nCount; ++nIdx )
2720 ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
2722 rInfos.emplace_back( nCurrDir % 2 == 0, nStart, nEnd );
2726 ubidi_close( pBidi );
2730 if ( rInfos.empty() )
2731 rInfos.emplace_back( 0, 0, pParaPortion->
GetNode()->
GetText().getLength() );
2737 bool bRightToLeft =
false;
2740 if ( pNode && !pNode->
GetText().isEmpty() )
2747 for (
const auto& rWritingDirectionInfo : rDirInfos )
2749 if ( rWritingDirectionInfo.nStartPos <= nPos && rWritingDirectionInfo.nEndPos >= nPos )
2751 bRightToLeft = !rWritingDirectionInfo.bLeftToRight;
2756 return bRightToLeft;
2777 std::size_t nTmpPortion = nTextPortion+1;
2778 while ( nTmpPortion <= pLine->GetEndPortion() )
2788 nTmpPortion = nTextPortion;
2802 std::size_t nTmpPortion = nTextPortion+1;
2803 while ( nTmpPortion <= pLine->GetEndPortion() )
2813 nTmpPortion = nTextPortion;
2855 sal_Int32 nPortionStart {0};
2862 if ( ( nIndex == nPortionStart ) && ( nIndex == nIndex2 ) )
2869 nX = -nX - rTextPortion.
GetWidth();
2874 nX =
ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart );
2875 if ( nIndex2 != nIndex )
#define LINK(Instance, Class, Member)
Range GetInvalidYOffsets(sal_uInt32 nPortion)
const Color & GetTextColor() const
void SetLeftMargin(sal_uInt16 n)
std::size_t GetStartPortion() const
TextPaM SplitContent(sal_uInt32 nNode, sal_Int32 nSepPos)
void SetFillColor(const Color &)
const vcl::Font & GetFont() const
TextPaM GetPaM(const Point &rDocPos)
sal_Int32 GetInvalidDiff() const
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
void SetAlpha(sal_uInt8 nAlpha)
bool HasUndoManager() const
bool IsRightToLeft() const
TextPaM ImpInsertText(const TextSelection &rSel, sal_Unicode c, bool bOverwrite=false)
constexpr sal_uInt16 KEY_MOD1
std::vector< TETextPortion >::iterator erase(const std::vector< TETextPortion >::iterator &aIter)
void SetActiveView(TextView *pView)
void SetFont(const vcl::Font &rFont)
const Color & GetHighlightTextColor() const
const LanguageTag & GetUILanguageTag() const
void SetNotSimpleInvalid()
tools::Long ImpGetPortionXOffset(sal_uInt32 nPara, TextLine const *pLine, std::size_t nTextPortion)
const sal_Unicode static_aCRText[]
void SetRightToLeft(bool bR2L)
constexpr::Color COL_RED(0x80, 0x00, 0x00)
OUString GetText(LineEnd aSeparator=LINEEND_LF) const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
void InsertUndo(std::unique_ptr< TextUndo > pUndo, bool bTryMerge=false)
tools::Long CalcParaHeight(sal_uInt32 nParagraph) const
void SetStart(sal_Int32 n)
tools::Long mnMaxTextWidth
bool ReadLine(OStringBuffer &rStr, sal_Int32 nMaxBytesToRead=0xFFFE)
TextView * GetView(sal_uInt16 nView) const
tools::Long GetTextHeight() const
void SetUpdateMode(bool bUpdate)
const TextPaM & GetEnd() const
const_iterator find(const Value &x) const
OUString GetWord(const TextPaM &rCursorPos, TextPaM *pStartOfWord=nullptr, TextPaM *pEndOfWord=nullptr)
sal_uInt16 GetCode() const
void DeleteEmptyAttribs()
css::i18n::ForbiddenCharacters getForbiddenCharacters() const
const TextAttrib * FindAttrib(const TextPaM &rPaM, sal_uInt16 nWhich) const
void UpdateViews(TextView *pCurView=nullptr)
std::unique_ptr< TEParaPortions > mpTEParaPortions
bool IsSimpleInvalid() const
void ImpCharsInserted(sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars)
sal_Int32 GetStart() const
std::unique_ptr< TEIMEInfos > mpIMEInfos
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
bool WriteLine(std::string_view rStr)
static bool IsSimpleCharInput(const KeyEvent &rKeyEvent)
bool IsRightToLeft() const
bool IsCTLFontEnabled() const
void SetEndPortion(std::size_t n)
const TextCharAttrib * FindCharAttrib(const TextPaM &rPaM, sal_uInt16 nWhich) const
void GetTextPortionRange(const TextPaM &rPaM, sal_Int32 &nStart, sal_Int32 &nEnd)
sal_Int32 GetTextBreak(const OUString &rStr, tools::Long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, tools::Long nCharExtra=0, vcl::text::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
TextView * GetActiveView() const
void Draw(OutputDevice *pDev, const Point &rPos)
void ImpRemoveParagraph(sal_uInt32 nPara)
sal_uInt16 GetLineCount(sal_uInt32 nParagraph) const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
tools::Rectangle PaMtoEditCursor(const TextPaM &rPaM, bool bSpecial=false)
const Color & GetHighlightColor() const
bool IsCTLSequenceCheckingRestricted() const
void CreateAndInsertEmptyLine(sal_uInt32 nPara)
const TextCharAttrib & GetAttrib(sal_uInt16 n) const
tools::Long mnCurTextHeight
void push_back(const TETextPortion &aTP)
constexpr tools::Long Width() const
sal_Int32 GetLineLen(sal_uInt32 nParagraph, sal_uInt16 nLine) const
void CreateTextPortions(sal_uInt32 nPara, sal_Int32 nStartPos)
sal_Int32 GetCharPos(sal_uInt32 nPara, std::vector< TextLine >::size_type nLine, tools::Long nDocPosX)
tools::Rectangle maInvalidRect
LocaleDataWrapper * ImpGetLocaleDataWrapper()
static bool DoesKeyChangeText(const KeyEvent &rKeyEvent)
static constexpr auto npos
std::vector< TextView * > TextViews
void CorrectValuesBehindLastFormattedLine(sal_uInt16 nLastFormattedLine)
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
void InsertContent(std::unique_ptr< TextNode > pNode, sal_uInt32 nPara)
sal_uInt16 GetModifier() const
css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator
void SetUnderline(FontLineStyle)
sal_uInt32 GetParagraphCount() const
bool IsCTLSequenceChecking() const
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
TextPaM ImpInsertParaBreak(const TextSelection &rTextSelection)
virtual void SetFont(vcl::Font &rFont) const =0
vcl::Window * GetWindow() const
OUString GetTextLines(LineEnd aSeparator=LINEEND_LF) const
void DrawRect(const tools::Rectangle &rRect)
std::size_t SplitTextPortion(sal_uInt32 nPara, sal_Int32 nPos)
tools::Long CalcTextWidth()
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true)
TextPaM ImpConnectParagraphs(sal_uInt32 nLeft, sal_uInt32 nRight)
bool ImpGetRightToLeft(sal_uInt32 nPara, sal_Int32 nPos)
void InsertView(TextView *pTextView)
sal_Int32 ImpFindIndex(sal_uInt32 nPortion, const Point &rPosInPara)
bool IsUndoEnabled() const
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
void SetRightToLeft(bool b)
void ImpInitWritingDirections(sal_uInt32 nPara)
friend class TextUndoManager
void SetInputContext(const InputContext &rInputContext)
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
void ImpRemoveChars(const TextPaM &rPaM, sal_Int32 nChars)
friend class TextUndoInsertChars
tools::Long CalcTextHeight() const
void MarkInvalid(sal_Int32 nStart, sal_Int32 nDiff)
void ImpParagraphInserted(sal_uInt32 nPara)
void IdleFormatAndUpdate(TextView *pCurView, sal_uInt16 nMaxTimerRestarts=5)
IMPL_LINK_NOARG(TextEngine, IdleFormatHdl, Timer *, void)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void SetTextColor(const Color &rColor)
void ImpPaint(OutputDevice *pOut, const Point &rStartPos, tools::Rectangle const *pPaintArea, TextSelection const *pSelection=nullptr)
const TextPaM & GetStart() const
const AllSettings & GetSettings() const
const TextAttrib & GetAttr() const
const_iterator end() const
bool Read(SvStream &rInput, const TextSelection *pSel=nullptr)
void SetSelection(const TextSelection &rNewSel)
void MarkSelectionInvalid(sal_Int32 nStart)
SAL_DLLPRIVATE bool IsInputSequenceCheckingRequired(sal_Unicode c, const TextSelection &rCurSel) const
const Color & GetFillColor() const
constexpr sal_uInt16 KEY_MOD2
SfxUndoManager & GetUndoManager()
KeyFuncType GetFunction() const
static void ImpInitLayoutMode(OutputDevice *pOutDev)
sal_Int32 GetTextLen() const
css::lang::Locale const & GetLocale()
constexpr sal_uInt16 KEY_RETURN
void SetColor(const Color &)
void SetText(const OUString &rStr)
void SetAlignment(TextAlign)
tools::Long mnCurTextWidth
const TextSelection & GetSelection() const
void RecalcTextPortion(sal_uInt32 nPara, sal_Int32 nStartPos, sal_Int32 nNewChars)
void UndoActionStart(sal_uInt16 nId=0)
std::size_t FindPortion(sal_Int32 nCharPos, sal_Int32 &rPortionStart, bool bPreferStartingPortion=false)
void DeleteFromPortion(std::size_t nDelFrom)
void SetLocale(const css::lang::Locale &rLocale)
void RemoveAttribs(sal_uInt32 nPara)
std::unique_ptr< TextUndoManager > mpUndoManager
const TextCharAttribList & GetCharAttribs() const
tools::Long ImpGetOutputOffset(sal_uInt32 nPara, TextLine *pLine, sal_Int32 nIndex, sal_Int32 nIndex2)
void SetTextAlign(TxtAlign eAlign)
std::unique_ptr< IdleFormatter > mpIdleFormatter
const vcl::KeyCode & GetKeyCode() const
void ImpParagraphRemoved(sal_uInt32 nPara)
tools::Long ImpGetXPos(sal_uInt32 nPara, TextLine *pLine, sal_Int32 nIndex, bool bPreferPortionStart=false)
std::unique_ptr< TextDoc > mpDoc
tools::Rectangle GetEditCursor(const TextPaM &rPaM, bool bSpecial, bool bPreferPortionStart=false)
void Broadcast(const SfxHint &rHint)
SAL_DLLPRIVATE css::uno::Reference< css::i18n::XExtendedInputSequenceChecker > const & GetInputSequenceChecker()
const Color & GetColor() const
void SetStartPortion(std::size_t n)
std::vector< TETextPortion >::iterator begin()
void InsertAttrib(std::unique_ptr< TextCharAttrib > pAttrib)
bool IsAutoScroll() const
void SetMaxTextLen(sal_Int32 nLen)
std::vector< TEWritingDirectionInfo > & GetWritingDirectionInfos()
const sal_Unicode static_aCRLFText[]
std::unique_ptr< TextViews > mpViews
#define SAL_WARN_IF(condition, area, stream)
void SetMaxTextWidth(tools::Long nWidth)
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIterator()
void SetFont(const vcl::Font &rNewFont)
bool CreateLines(sal_uInt32 nPara)
void ImpCharsRemoved(sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars)
void SetTransparent(bool bTransparent)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
TextPaM ImpDeleteText(const TextSelection &rSel)
sal_Int32 GetIndex() const
sal_Unicode GetCharCode() const
bool HasBoundingAttrib(sal_Int32 nBound)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
void CheckIdleFormatter()
const sal_Unicode static_aLFText[]
rtl_TextEncoding GetStreamCharSet() const
void copy(const fs::path &src, const fs::path &dest)
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
Reference< XComponentContext > getProcessComponentContext()
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
double getLength(const B2DPolygon &rCandidate)
TextNode * GetNode() const
constexpr sal_uInt16 KEY_BACKSPACE
css::uno::Reference< css::i18n::XExtendedInputSequenceChecker > mxISC
VclPtr< OutputDevice > mpRefDev
bool IsFormatting() const
const OUString & GetText() const
void ReplaceText(const TextSelection &rSel, const OUString &rText)
void ImpBreakLine(sal_uInt32 nPara, TextLine *pLine, sal_Int32 nPortionStart, tools::Long nRemainingWidth)
bool IsPaintTransparent() const
void FormatAndUpdate(TextView *pCurView=nullptr)
sal_Int32 GetStart() const
bool GetUpdateMode() const
sal_Int32 GetInvalidPosStart() const
TextPaM ConnectContents(sal_uInt32 nLeftNode)
constexpr sal_uInt16 KEY_DELETE
void ImpSetSelection(const TextSelection &rSelection)
TETextPortionList & GetTextPortions()
TxtAlign ImpGetAlign() const
void Write(SvStream &rOutput)
std::vector< TETextPortion >::iterator insert(const std::vector< TETextPortion >::iterator &aIter, const TETextPortion &rTP)
static const sal_Unicode * static_getLineEndText(LineEnd aLineEnd)
void SeekCursor(sal_uInt32 nNode, sal_Int32 nPos, vcl::Font &rFont, OutputDevice *pOutDev)
VCL_DLLPUBLIC css::uno::Reference< css::i18n::XBreakIterator > CreateBreakIterator()
constexpr sal_uInt16 KEY_SHIFT
virtual ~TextEngine() override
std::pair< const_iterator, bool > insert(Value &&x)
TextCharAttrib * FindAttrib(sal_uInt16 nWhich, sal_Int32 nPos)
bool IsCTLSequenceCheckingTypeAndReplace() const
#define TEXTATTR_FONTCOLOR
void SetAttrib(const TextAttrib &rAttr, sal_uInt32 nPara, sal_Int32 nStart, sal_Int32 nEnd)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
std::size_t GetEndPortion() const
sal_uInt32 GetPara() const
std::vector< TextLine > & GetLines()
void ValidateSelection(TextSelection &rSel) const
void RemoveView(TextView *pTextView)
void ValidatePaM(TextPaM &rPaM) const
std::vector< Value >::const_iterator const_iterator
const Color & GetFillColor() const
constexpr sal_uInt16 KEY_TAB
void EnableUndo(bool bEnable)
css::lang::Locale maLocale
void CursorMoved(sal_uInt32 nNode)
sal_uInt16 GetViewCount() const