20 #ifndef INCLUDED_VCL_SOURCE_EDIT_TEXTDAT2_HXX
21 #define INCLUDED_VCL_SOURCE_EDIT_TEXTDAT2_HXX
35 #define PORTIONKIND_TEXT 0
36 #define PORTIONKIND_TAB 1
38 #define DELMODE_SIMPLE 0
39 #define DELMODE_RESTOFWORD 1
40 #define DELMODE_RESTOFCONTENT 2
44 #define TRAVEL_X_DONTKNOW 0xFFFF
45 #define MAXCHARSINPARA 0x3FFF-CHARPOSGROW
62 , bRightToLeft {
false}
78 static constexpr
auto npos = std::numeric_limits<std::size_t>::max();
84 std::vector<std::unique_ptr<TETextPortion>>::iterator
begin();
85 std::vector<std::unique_ptr<TETextPortion>>::const_iterator
begin()
const;
86 std::vector<std::unique_ptr<TETextPortion>>::iterator
end();
87 std::vector<std::unique_ptr<TETextPortion>>::const_iterator
end()
const;
89 std::size_t
size()
const;
90 std::vector<std::unique_ptr<TETextPortion>>::iterator
erase(
const std::vector<std::unique_ptr<TETextPortion>>::iterator& aIter );
91 std::vector<std::unique_ptr<TETextPortion>>::iterator
insert(
const std::vector<std::unique_ptr<TETextPortion>>::iterator& aIter,
92 std::unique_ptr<TETextPortion> pTP );
93 void push_back( std::unique_ptr<TETextPortion> pTP );
96 std::size_t
FindPortion( sal_Int32 nCharPos, sal_Int32& rPortionStart,
bool bPreferStartingPortion =
false );
106 : bLeftToRight {LeftToRight}
134 bool IsIn( sal_Int32 nIndex,
bool bInclEnd )
const
135 {
return nIndex >= mnStart && ( bInclEnd ? nIndex <= mnEnd : nIndex <
mnEnd ); }
140 void SetEnd( sal_Int32 n ) { mnEnd = n; }
195 void SetValid() { mbInvalid =
false; mbSimple =
true;}
197 void MarkInvalid( sal_Int32 nStart, sal_Int32 nDiff );
208 std::vector<TextLine>::size_type
GetLineNumber( sal_Int32 nIndex,
bool bInclEnd );
215 std::vector<std::unique_ptr<TEParaPortion>>
mvData;
221 sal_uInt32
Count()
const {
return static_cast<sal_uInt32
>(mvData.size()); }
223 void Insert(
TEParaPortion* pObject, sal_uInt32 nPos ) { mvData.emplace( mvData.begin()+nPos, pObject ); }
224 void Remove( sal_uInt32 nPos ) { mvData.erase( mvData.begin()+nPos ); }
239 virtual void SetCursorAtPoint(
const Point& rPointPixel,
bool bDontSelectAtCursor =
false )
override;
274 , mbStarterOfDD {
false}
275 , mbVisCursor {
false}
281 #endif // INCLUDED_VCL_SOURCE_EDIT_TEXTDAT2_HXX
std::vector< std::unique_ptr< TEParaPortion > > mvData
virtual void DestroyAnchor() override
std::size_t GetStartPortion() const
TETextPortion * operator[](std::size_t nPos)
TextSelFunctionSet(TextView *pView)
sal_Int32 GetInvalidDiff() const
std::vector< std::unique_ptr< TETextPortion > >::iterator insert(const std::vector< std::unique_ptr< TETextPortion >>::iterator &aIter, std::unique_ptr< TETextPortion > pTP)
std::size_t mnStartPortion
TETextPortion(sal_Int32 nL)
std::vector< std::unique_ptr< TETextPortion > >::iterator begin()
void SetNotSimpleInvalid()
TEParaPortion * GetObject(sal_uInt32 nIndex)
void SetStart(sal_Int32 n)
bool IsSimpleInvalid() const
bool IsRightToLeft() const
void SetEndPortion(std::size_t n)
bool operator==(const TextLine &rLine) const
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
sal_Int32 mnInvalidPosStart
std::vector< std::unique_ptr< TETextPortion > >::iterator end()
std::vector< TextLine > maLines
static constexpr auto npos
void CorrectValuesBehindLastFormattedLine(sal_uInt16 nLastFormattedLine)
TEParaPortion(TextNode *pNode)
bool IsIn(sal_Int32 nIndex, bool bInclEnd) const
void SetStyle(sal_uInt16 nStyle)
void Remove(sal_uInt32 nPos)
TETextPortionList maTextPortions
void SetRightToLeft(bool b)
void MarkInvalid(sal_Int32 nStart, sal_Int32 nDiff)
virtual void CreateAnchor() override
std::vector< std::unique_ptr< TETextPortion > > maPortions
void MarkSelectionInvalid(sal_Int32 nStart)
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
void operator=(const TEParaPortion &)=delete
virtual void BeginDrag() override
std::vector< TextLine >::size_type GetLineNumber(sal_Int32 nIndex, bool bInclEnd)
std::size_t FindPortion(sal_Int32 nCharPos, sal_Int32 &rPortionStart, bool bPreferStartingPortion=false)
void DeleteFromPortion(std::size_t nDelFrom)
void SetStartPortion(std::size_t n)
std::vector< TEWritingDirectionInfo > & GetWritingDirectionInfos()
virtual void DeselectAtPoint(const Point &) override
std::vector< TEWritingDirectionInfo > maWritingDirectionInfos
void push_back(std::unique_ptr< TETextPortion > pTP)
TextNode * GetNode() const
virtual void DeselectAll() override
sal_Int32 GetStart() const
sal_Int32 GetInvalidPosStart() const
std::vector< std::unique_ptr< TETextPortion > >::iterator erase(const std::vector< std::unique_ptr< TETextPortion >>::iterator &aIter)
TETextPortionList & GetTextPortions()
TEWritingDirectionInfo(bool LeftToRight, sal_Int32 Start, sal_Int32 End)
std::size_t GetEndPortion() const
std::vector< TextLine > & GetLines()
An idle is a timer to be scheduled immediately.
void Insert(TEParaPortion *pObject, sal_uInt32 nPos)