LibreOffice Module vcl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TextDoc Class Reference

#include <textdoc.hxx>

Public Member Functions

 TextDoc ()
 ~TextDoc ()
void Clear ()
std::vector< std::unique_ptr< TextNode > > & GetNodes ()
const std::vector< std::unique_ptr< TextNode > > & GetNodes () const
void RemoveChars (const TextPaM &rPaM, sal_Int32 nChars)
TextPaM InsertText (const TextPaM &rPaM, sal_Unicode c)
TextPaM InsertText (const TextPaM &rPaM, std::u16string_view rStr)
TextPaM InsertParaBreak (const TextPaM &rPaM)
TextPaM ConnectParagraphs (TextNode *pLeft, const TextNode *pRight)
sal_Int32 GetTextLen (const sal_Unicode *pSep, const TextSelection *pSel=nullptr) const
OUString GetText (const sal_Unicode *pSep) const
OUString GetText (sal_uInt32 nPara) const
void SetLeftMargin (sal_uInt16 n)
sal_uInt16 GetLeftMargin () const
bool IsValidPaM (const TextPaM &rPaM)

Private Member Functions

void DestroyTextNodes ()

Private Attributes

std::vector< std::unique_ptr< TextNode > > maTextNodes
sal_uInt16 mnLeftMargin

Detailed Description

Definition at line 93 of file textdoc.hxx.

Constructor & Destructor Documentation

◆ TextDoc()

TextDoc::TextDoc ( )

Definition at line 382 of file textdoc.cxx.

◆ ~TextDoc()

TextDoc::~TextDoc ( )

Definition at line 387 of file textdoc.cxx.

References DestroyTextNodes().

Member Function Documentation

◆ Clear()

void TextDoc::Clear ( )

Definition at line 392 of file textdoc.cxx.

References DestroyTextNodes().

◆ ConnectParagraphs()

TextPaM TextDoc::ConnectParagraphs ( TextNode pLeft,
const TextNode pRight 

Definition at line 499 of file textdoc.cxx.

References TextNode::Append(), TextNode::GetText(), maTextNodes, and p.

◆ DestroyTextNodes()

void TextDoc::DestroyTextNodes ( )

Definition at line 397 of file textdoc.cxx.

References maTextNodes.

Referenced by Clear(), and ~TextDoc().

◆ GetLeftMargin()

sal_uInt16 TextDoc::GetLeftMargin ( ) const

Definition at line 121 of file textdoc.hxx.

References mnLeftMargin.

◆ GetNodes() [1/2]

std::vector< std::unique_ptr< TextNode > > & TextDoc::GetNodes ( )

Definition at line 106 of file textdoc.hxx.

References maTextNodes.

Referenced by TextUndoDelPara::Redo().

◆ GetNodes() [2/2]

const std::vector< std::unique_ptr< TextNode > > & TextDoc::GetNodes ( ) const

Definition at line 107 of file textdoc.hxx.

References maTextNodes.

◆ GetText() [1/2]

OUString TextDoc::GetText ( const sal_Unicode pSep) const

Definition at line 402 of file textdoc.cxx.

References TextNode::GetText(), and maTextNodes.

◆ GetText() [2/2]

OUString TextDoc::GetText ( sal_uInt32  nPara) const

Definition at line 419 of file textdoc.cxx.

References get(), TextNode::GetText(), and maTextNodes.

◆ GetTextLen()

sal_Int32 TextDoc::GetTextLen ( const sal_Unicode pSep,
const TextSelection pSel = nullptr 
) const

◆ InsertParaBreak()

TextPaM TextDoc::InsertParaBreak ( const TextPaM rPaM)

◆ InsertText() [1/2]

TextPaM TextDoc::InsertText ( const TextPaM rPaM,
sal_Unicode  c 

◆ InsertText() [2/2]

TextPaM TextDoc::InsertText ( const TextPaM rPaM,
std::u16string_view  rStr 

◆ IsValidPaM()

bool TextDoc::IsValidPaM ( const TextPaM rPaM)

Definition at line 521 of file textdoc.cxx.

References TextPaM::GetIndex(), TextPaM::GetPara(), TextNode::GetText(), and maTextNodes.

◆ RemoveChars()

void TextDoc::RemoveChars ( const TextPaM rPaM,
sal_Int32  nChars 

◆ SetLeftMargin()

void TextDoc::SetLeftMargin ( sal_uInt16  n)

Definition at line 120 of file textdoc.hxx.

References mnLeftMargin, and n.

Member Data Documentation

◆ maTextNodes

std::vector<std::unique_ptr<TextNode> > TextDoc::maTextNodes

◆ mnLeftMargin

sal_uInt16 TextDoc::mnLeftMargin

Definition at line 96 of file textdoc.hxx.

Referenced by GetLeftMargin(), and SetLeftMargin().

The documentation for this class was generated from the following files: