22#include <osl/diagnose.h>
36 maStartPaM( rPaM ), maEndPaM( rPaM )
41 maStartPaM( rStart ), maEndPaM( rEnd )
129 sal_Int32 nTmpPos = 0;
130 for ( std::size_t nPortion = 0; nPortion <
maPortions.size(); nPortion++ )
133 nTmpPos += rPortion.
GetLen();
134 if ( nTmpPos >= nCharPos )
137 if ( ( nTmpPos != nCharPos ) || !bPreferStartingPortion || ( nPortion ==
maPortions.size() - 1 ) )
139 nPortionStart = nTmpPos - rPortion.
GetLen();
144 OSL_FAIL(
"FindPortion: Not found!" );
150 , mnInvalidPosStart {0}
184 SAL_WARN_IF( ( nDiff < 0 ) && ( (nStart+nDiff) < 0 ),
"vcl",
"MarkInvalid: Diff out of Range" );
216 for ( std::vector<TextLine>::size_type nLine = 0; nLine <
maLines.size(); nLine++ )
219 if ( ( bInclEnd && ( rLine.
GetEnd() >= nChar ) ) ||
220 ( rLine.
GetEnd() > nChar ) )
227 OSL_ENSURE(nChar ==
maLines.back().GetEnd(),
"wrong Index");
228 OSL_ENSURE(!bInclEnd,
"Line not found: FindLine");
234 sal_uInt16 nLines =
maLines.size();
235 SAL_WARN_IF( !nLines,
"vcl",
"CorrectPortionNumbersFromLine: Empty portion?" );
236 if ( nLastFormattedLine >= ( nLines - 1 ) )
242 sal_Int32 nTextDiff = rUnformatted.
GetStart() - rLastFormatted.
GetEnd();
248 std::ptrdiff_t nPDiff = -( nPortionDiff-1 );
249 const sal_Int32 nTDiff = -( nTextDiff-1 );
250 if ( !(nPDiff || nTDiff) )
253 for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ )
272 :
Idle(
"vcl::TextEngine mpIdleFormatter")
321 : aOldTextAfterStartPos(
std::move(_aOldTextAfterStartPos))
324 , bWasCursorOverwrite(false)
An idle is a timer to be scheduled immediately.
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
std::vector< TEWritingDirectionInfo > maWritingDirectionInfos
void MarkInvalid(sal_Int32 nStart, sal_Int32 nDiff)
sal_Int32 mnInvalidPosStart
void CorrectValuesBehindLastFormattedLine(sal_uInt16 nLastFormattedLine)
void MarkSelectionInvalid(sal_Int32 nStart)
std::vector< TextLine > maLines
std::vector< TextLine >::size_type GetLineNumber(sal_Int32 nIndex, bool bInclEnd)
TEParaPortion(TextNode *pNode)
TETextPortion & operator[](std::size_t nPos)
std::vector< TETextPortion >::iterator end()
std::size_t FindPortion(sal_Int32 nCharPos, sal_Int32 &rPortionStart, bool bPreferStartingPortion=false)
std::vector< TETextPortion >::iterator insert(const std::vector< TETextPortion >::iterator &aIter, const TETextPortion &rTP)
std::vector< TETextPortion >::iterator begin()
std::vector< TETextPortion >::iterator erase(const std::vector< TETextPortion >::iterator &aIter)
void DeleteFromPortion(std::size_t nDelFrom)
std::vector< TETextPortion > maPortions
void push_back(const TETextPortion &aTP)
void SetPriority(TaskPriority ePriority)
void SetEndPortion(std::size_t n)
void SetStartPortion(std::size_t n)
std::size_t GetEndPortion() const
sal_Int32 GetStart() const
void SetStart(sal_Int32 n)
std::size_t GetStartPortion() const
virtual void Invoke() override
Calls the maInvokeHandler with the parameter this.
#define SAL_WARN_IF(condition, area, stream)
void CopyAttribs(const ExtTextInputAttr *pA, sal_Int32 nL)
std::unique_ptr< ExtTextInputAttr[]> pAttribs
TEIMEInfos(const TextPaM &rPos, OUString aOldTextAfterStartPos)
@ HIGH_IDLE
Important idle events to be run before processing drawing events.