LibreOffice Module editeng (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
EditDoc Class Reference

#include <editdoc.hxx>

Collaboration diagram for EditDoc:
[legend]

Public Member Functions

 EditDoc (SfxItemPool *pItemPool)
 
 ~EditDoc ()
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
void ClearSpellErrors ()
 
bool IsModified () const
 
void SetModified (bool b)
 
void DisableAttributeExpanding ()
 
void SetModifyHdl (const Link< LinkParamNone *, void > &rLink)
 
void CreateDefFont (bool bUseStyles)
 
const SvxFontGetDefFont () const
 
void SetDefTab (sal_uInt16 nTab)
 
sal_uInt16 GetDefTab () const
 
void SetVertical (bool bVertical)
 
bool IsEffectivelyVertical () const
 
bool IsTopToBottom () const
 
bool GetVertical () const
 
void SetRotation (TextRotation nRotation)
 
TextRotation GetRotation () const
 
void SetFixedCellHeight (bool bUseFixedCellHeight)
 
bool IsFixedCellHeight () const
 
EditPaM Clear ()
 
EditPaM RemoveText ()
 
void RemoveChars (EditPaM aPaM, sal_Int32 nChars)
 
EditPaM InsertText (EditPaM aPaM, std::u16string_view rStr)
 
EditPaM InsertParaBreak (EditPaM aPaM, bool bKeepEndingAttribs)
 
EditPaM InsertFeature (EditPaM aPaM, const SfxPoolItem &rItem)
 
EditPaM ConnectParagraphs (ContentNode *pLeft, ContentNode *pRight)
 
OUString GetText (LineEnd eEnd) const
 
sal_Int32 GetTextLen () const
 
OUString GetParaAsString (sal_Int32 nNode) const
 
EditPaM GetStartPaM () const
 
EditPaM GetEndPaM () const
 
SfxItemPoolGetItemPool ()
 
const SfxItemPoolGetItemPool () const
 
void RemoveItemsFromPool (const ContentNode &rNode)
 
void InsertAttrib (const SfxPoolItem &rItem, ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd)
 
void InsertAttrib (ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem &rPoolItem)
 
void InsertAttribInSelection (ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem &rPoolItem)
 
bool RemoveAttribs (ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nWhich)
 
bool RemoveAttribs (ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd, EditCharAttrib *&rpStarting, EditCharAttrib *&rpEnding, sal_uInt16 nWhich)
 
sal_Int32 GetPos (const ContentNode *pNode) const
 
const ContentNodeGetObject (sal_Int32 nPos) const
 
ContentNodeGetObject (sal_Int32 nPos)
 
sal_Int32 Count () const
 
const ContentNodeoperator[] (sal_Int32 nPos) const
 
ContentNodeoperator[] (sal_Int32 nPos)
 
void Insert (sal_Int32 nPos, ContentNode *p)
 
void Remove (sal_Int32 nPos)
 deletes More...
 
void Release (sal_Int32 nPos)
 does not delete More...
 

Static Public Member Functions

static OUString GetParaAsString (const ContentNode *pNode, sal_Int32 nStartPos=0, sal_Int32 nEndPos=-1)
 
static void FindAttribs (ContentNode *pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, SfxItemSet &rCurSet)
 
static OUString GetSepStr (LineEnd eEnd)
 

Private Member Functions

void ImplDestroyContents ()
 

Private Attributes

sal_Int32 nLastCache
 
std::vector< std::unique_ptr< ContentNode > > maContents
 
rtl::Reference< SfxItemPoolpItemPool
 
Link< LinkParamNone *, void > aModifyHdl
 
SvxFont maDefFont
 
sal_uInt16 nDefTab
 
bool bIsVertical:1
 
TextRotation mnRotation
 
bool bIsFixedCellHeight:1
 
bool bModified:1
 
bool bDisableAttributeExpanding:1
 

Detailed Description

Definition at line 744 of file editdoc.hxx.

Constructor & Destructor Documentation

◆ EditDoc()

EditDoc::EditDoc ( SfxItemPool pItemPool)

Definition at line 1919 of file editdoc.cxx.

References DEFTAB, and NONE.

◆ ~EditDoc()

EditDoc::~EditDoc ( )

Definition at line 1932 of file editdoc.cxx.

References ImplDestroyContents().

Member Function Documentation

◆ Clear()

EditPaM EditDoc::Clear ( )

◆ ClearSpellErrors()

void EditDoc::ClearSpellErrors ( )

Definition at line 2235 of file editdoc.cxx.

References maContents.

Referenced by ImpEditEngine::ClearSpellErrors().

◆ ConnectParagraphs()

EditPaM EditDoc::ConnectParagraphs ( ContentNode pLeft,
ContentNode pRight 
)

◆ Count()

sal_Int32 EditDoc::Count ( ) const

◆ CreateDefFont()

void EditDoc::CreateDefFont ( bool  bUseStyles)

◆ DisableAttributeExpanding()

void EditDoc::DisableAttributeExpanding ( )
inline

Definition at line 775 of file editdoc.hxx.

References bDisableAttributeExpanding.

◆ dumpAsXml()

void EditDoc::dumpAsXml ( xmlTextWriterPtr  pWriter) const

Definition at line 2712 of file editdoc.cxx.

References i, and maContents.

◆ FindAttribs()

void EditDoc::FindAttribs ( ContentNode pNode,
sal_Int32  nStartPos,
sal_Int32  nEndPos,
SfxItemSet rCurSet 
)
static

◆ GetDefFont()

const SvxFont & EditDoc::GetDefFont ( ) const
inline

Definition at line 780 of file editdoc.hxx.

References maDefFont.

Referenced by ImpEditEngine::InsertTextObject().

◆ GetDefTab()

sal_uInt16 EditDoc::GetDefTab ( ) const
inline

Definition at line 783 of file editdoc.hxx.

References nDefTab.

Referenced by ImpEditEngine::CreateLines(), and ImpEditEngine::WriteRTF().

◆ GetEndPaM()

EditPaM EditDoc::GetEndPaM ( ) const

◆ GetItemPool() [1/2]

SfxItemPool & EditDoc::GetItemPool ( )
inline

◆ GetItemPool() [2/2]

const SfxItemPool & EditDoc::GetItemPool ( ) const
inline

Definition at line 813 of file editdoc.hxx.

References pItemPool.

◆ GetObject() [1/2]

ContentNode * EditDoc::GetObject ( sal_Int32  nPos)

Definition at line 2096 of file editdoc.cxx.

References maContents, o3tl::make_unsigned(), and nPos.

◆ GetObject() [2/2]

const ContentNode * EditDoc::GetObject ( sal_Int32  nPos) const

Definition at line 2091 of file editdoc.cxx.

References maContents, o3tl::make_unsigned(), and nPos.

Referenced by EditRTFParser::AddRTFDefaultValues(), EditRTFParser::CallParser(), ImpEditEngine::ConnectContents(), ImpEditEngine::ConvertSelection(), CreateDefFont(), ImpEditEngine::CreateTextObject(), ImpEditEngine::CursorEndOfDoc(), ImpEditEngine::CursorStartOfDoc(), ParaPortionList::DbgCheck(), ImpEditEngine::DoOnlineSpelling(), ImpEditView::dragGestureRecognized(), ImpEditEngine::GetAllMisspellRanges(), GetEndPaM(), ImpEditEngine::GetLineNumberAtIndex(), GetParaAsString(), ImpEditEngine::GetRightToLeft(), ImpEditEngine::GetSelected(), GetStartPaM(), ImpEditEngine::GetStyleSheet(), GetText(), GetTextLen(), ImpEditEngine::HasSpellErrors(), ImpEditEngine::ImplInitLayoutMode(), ImpEditEngine::ImpSearch(), ImpEditEngine::ImpSpell(), ImpEditEngine::InitDoc(), ImpEditEngine::InsertParagraph(), operator[](), EditUndoDelContent::Redo(), ImpEditEngine::RemoveStyleFromParagraphs(), RemoveText(), ImpEditEngine::SelectParagraph(), ImpEditEngine::SetAllMisspellRanges(), EditRTFParser::SetAttrInDoc(), EditRTFParser::SetEndPrevPara(), ImpEditEngine::SetStyleSheet(), ImpEditView::SpellIgnoreWord(), ImpEditEngine::SpellSentence(), ImpEditEngine::SplitContent(), SvxReadXML(), ImpEditEngine::TransliterateText(), EditUndoSetAttribs::Undo(), ImpEditEngine::UpdateParagraphsWithStyleSheet(), ImpEditEngine::WordLeft(), ImpEditEngine::WordRight(), ImpEditEngine::WriteItemAsRTF(), ImpEditEngine::WriteRTF(), and ImpEditEngine::WriteText().

◆ GetParaAsString() [1/2]

OUString EditDoc::GetParaAsString ( const ContentNode pNode,
sal_Int32  nStartPos = 0,
sal_Int32  nEndPos = -1 
)
static

Definition at line 2192 of file editdoc.cxx.

References ContentNode::GetExpandedText().

◆ GetParaAsString() [2/2]

OUString EditDoc::GetParaAsString ( sal_Int32  nNode) const

◆ GetPos()

sal_Int32 EditDoc::GetPos ( const ContentNode pNode) const

Definition at line 2086 of file editdoc.cxx.

References maContents, nLastCache, and p.

Referenced by EditRTFParser::AddRTFDefaultValues(), EditSelection::Adjust(), ImpEditEngine::CalcLineWidth(), EditRTFParser::CallParser(), ImpEditEngine::Command(), ConnectParagraphs(), ImpEditEngine::CreateAttribUndo(), ImpEditEngine::CreateEPaM(), ImpEditEngine::CreateESel(), ImpEditEngine::CreateTextObject(), ImpEditEngine::CursorVisualLeftRight(), ImpEditEngine::CursorVisualStartEnd(), EditPaM::DbgIsBuggy(), ImpEditView::dragOver(), ImpEditView::DrawSelectionXOR(), ImpEditView::drop(), ImpEditEngine::FindParaPortion(), ImpEditView::GetEditCursor(), ImpEditView::GetField(), ImpEditEngine::GetI18NScriptType(), EditNodeIdx::GetIdx(), ImpEditEngine::GetItemScriptType(), ImpEditEngine::GetNumberFormat(), EdtAutoCorrDoc::GetPrevPara(), ImpEditEngine::GetSelected(), ImpEditEngine::HasDifferentRTLLevels(), ImpEditEngine::ImpConnectParagraphs(), ImpEditEngine::ImpDeleteSelection(), EdtAutoCorrDoc::ImplStartUndoAction(), ImpEditEngine::ImpSearch(), EditHTMLParser::ImpSetAttribs(), EditHTMLParser::ImpSetStyleSheet(), InsertParaBreak(), ImpEditEngine::InsertTextObject(), ImpEditView::IsBulletArea(), ImpEditView::IsInSelection(), ImpEditEngine::IsScriptChange(), EditHTMLParser::NextToken(), ImpEditEngine::ParaAttribsChanged(), ImpEditView::Paste(), EditRTFParser::SetAttrInDoc(), EditRTFParser::SetEndPrevPara(), ImpEditEngine::SetStyleSheet(), ImpEditView::ShowCursor(), ImpEditEngine::TransliterateText(), ImpEditEngine::WordLeft(), ImpEditEngine::WordRight(), ImpEditEngine::WriteRTF(), and ImpEditEngine::WriteText().

◆ GetRotation()

TextRotation EditDoc::GetRotation ( ) const
inline

Definition at line 790 of file editdoc.hxx.

References mnRotation.

Referenced by ImpEditEngine::GetRotation().

◆ GetSepStr()

OUString EditDoc::GetSepStr ( LineEnd  eEnd)
static

Definition at line 2154 of file editdoc.cxx.

References LINEEND_CR, and LINEEND_LF.

Referenced by ImpEditEngine::GetSelected(), and GetText().

◆ GetStartPaM()

EditPaM EditDoc::GetStartPaM ( ) const

◆ GetText()

OUString EditDoc::GetText ( LineEnd  eEnd) const

Definition at line 2163 of file editdoc.cxx.

References aBuffer, Count(), GetObject(), GetParaAsString(), GetSepStr(), and GetTextLen().

◆ GetTextLen()

sal_Int32 EditDoc::GetTextLen ( ) const

Definition at line 2210 of file editdoc.cxx.

References Count(), ContentNode::GetExpandedLen(), and GetObject().

Referenced by GetText().

◆ GetVertical()

bool EditDoc::GetVertical ( ) const

Definition at line 2081 of file editdoc.cxx.

References bIsVertical.

Referenced by ImpEditEngine::GetVertical().

◆ ImplDestroyContents()

void EditDoc::ImplDestroyContents ( )
private

Definition at line 1960 of file editdoc.cxx.

References maContents.

Referenced by Clear(), RemoveText(), and ~EditDoc().

◆ Insert()

void EditDoc::Insert ( sal_Int32  nPos,
ContentNode p 
)

◆ InsertAttrib() [1/2]

void EditDoc::InsertAttrib ( const SfxPoolItem rItem,
ContentNode pNode,
sal_Int32  nStart,
sal_Int32  nEnd 
)

◆ InsertAttrib() [2/2]

void EditDoc::InsertAttrib ( ContentNode pNode,
sal_Int32  nStart,
sal_Int32  nEnd,
const SfxPoolItem rPoolItem 
)

◆ InsertAttribInSelection()

void EditDoc::InsertAttribInSelection ( ContentNode pNode,
sal_Int32  nStart,
sal_Int32  nEnd,
const SfxPoolItem rPoolItem 
)

◆ InsertFeature()

EditPaM EditDoc::InsertFeature ( EditPaM  aPaM,
const SfxPoolItem rItem 
)

◆ InsertParaBreak()

EditPaM EditDoc::InsertParaBreak ( EditPaM  aPaM,
bool  bKeepEndingAttribs 
)

◆ InsertText()

EditPaM EditDoc::InsertText ( EditPaM  aPaM,
std::u16string_view  rStr 
)

◆ IsEffectivelyVertical()

bool EditDoc::IsEffectivelyVertical ( ) const

Definition at line 2069 of file editdoc.cxx.

References bIsVertical, mnRotation, and NONE.

Referenced by CreateDefFont(), and ImpEditEngine::IsEffectivelyVertical().

◆ IsFixedCellHeight()

bool EditDoc::IsFixedCellHeight ( ) const
inline

Definition at line 793 of file editdoc.hxx.

References bIsFixedCellHeight.

Referenced by ImpEditEngine::IsFixedCellHeight().

◆ IsModified()

bool EditDoc::IsModified ( ) const
inline

Definition at line 772 of file editdoc.hxx.

References bModified.

Referenced by ImpEditEngine::IsModified().

◆ IsTopToBottom()

bool EditDoc::IsTopToBottom ( ) const

Definition at line 2075 of file editdoc.cxx.

References bIsVertical, mnRotation, NONE, and TOPTOBOTTOM.

Referenced by CreateDefFont(), and ImpEditEngine::IsTopToBottom().

◆ operator[]() [1/2]

ContentNode * EditDoc::operator[] ( sal_Int32  nPos)

Definition at line 2106 of file editdoc.cxx.

References GetObject(), and nPos.

◆ operator[]() [2/2]

const ContentNode * EditDoc::operator[] ( sal_Int32  nPos) const

Definition at line 2101 of file editdoc.cxx.

References GetObject(), and nPos.

◆ Release()

void EditDoc::Release ( sal_Int32  nPos)

does not delete

Definition at line 2131 of file editdoc.cxx.

References maContents, o3tl::make_unsigned(), nPos, and SAL_WARN.

Referenced by ImpEditEngine::ImpMoveParagraphs(), and EditUndoDelContent::Redo().

◆ Remove()

void EditDoc::Remove ( sal_Int32  nPos)

deletes

Definition at line 2121 of file editdoc.cxx.

References maContents, o3tl::make_unsigned(), nPos, and SAL_WARN.

Referenced by ConnectParagraphs().

◆ RemoveAttribs() [1/2]

bool EditDoc::RemoveAttribs ( ContentNode pNode,
sal_Int32  nStart,
sal_Int32  nEnd,
EditCharAttrib *&  rpStarting,
EditCharAttrib *&  rpEnding,
sal_uInt16  nWhich 
)

◆ RemoveAttribs() [2/2]

bool EditDoc::RemoveAttribs ( ContentNode pNode,
sal_Int32  nStart,
sal_Int32  nEnd,
sal_uInt16  nWhich 
)

Definition at line 2421 of file editdoc.cxx.

References RemoveAttribs().

Referenced by InsertAttribInSelection(), and RemoveAttribs().

◆ RemoveChars()

void EditDoc::RemoveChars ( EditPaM  aPaM,
sal_Int32  nChars 
)

◆ RemoveItemsFromPool()

void EditDoc::RemoveItemsFromPool ( const ContentNode rNode)

◆ RemoveText()

EditPaM EditDoc::RemoveText ( )

◆ SetDefTab()

void EditDoc::SetDefTab ( sal_uInt16  nTab)
inline

Definition at line 782 of file editdoc.hxx.

References DEFTAB, and nDefTab.

◆ SetFixedCellHeight()

void EditDoc::SetFixedCellHeight ( bool  bUseFixedCellHeight)
inline

Definition at line 792 of file editdoc.hxx.

References bIsFixedCellHeight.

Referenced by ImpEditEngine::SetFixedCellHeight().

◆ SetModified()

void EditDoc::SetModified ( bool  b)

◆ SetModifyHdl()

void EditDoc::SetModifyHdl ( const Link< LinkParamNone *, void > &  rLink)
inline

Definition at line 777 of file editdoc.hxx.

References aModifyHdl.

Referenced by ImpEditEngine::ImpEditEngine().

◆ SetRotation()

void EditDoc::SetRotation ( TextRotation  nRotation)
inline

Definition at line 789 of file editdoc.hxx.

References mnRotation.

Referenced by ImpEditEngine::SetRotation().

◆ SetVertical()

void EditDoc::SetVertical ( bool  bVertical)
inline

Definition at line 785 of file editdoc.hxx.

References bIsVertical.

Referenced by ImpEditEngine::SetVertical().

Member Data Documentation

◆ aModifyHdl

Link<LinkParamNone*,void> EditDoc::aModifyHdl
private

Definition at line 751 of file editdoc.hxx.

Referenced by SetModified(), and SetModifyHdl().

◆ bDisableAttributeExpanding

bool EditDoc::bDisableAttributeExpanding
private

Definition at line 760 of file editdoc.hxx.

Referenced by DisableAttributeExpanding(), and InsertAttribInSelection().

◆ bIsFixedCellHeight

bool EditDoc::bIsFixedCellHeight
private

Definition at line 757 of file editdoc.hxx.

Referenced by IsFixedCellHeight(), and SetFixedCellHeight().

◆ bIsVertical

bool EditDoc::bIsVertical
private

Definition at line 755 of file editdoc.hxx.

Referenced by GetVertical(), IsEffectivelyVertical(), IsTopToBottom(), and SetVertical().

◆ bModified

bool EditDoc::bModified
private

Definition at line 759 of file editdoc.hxx.

Referenced by IsModified(), and SetModified().

◆ maContents

std::vector<std::unique_ptr<ContentNode> > EditDoc::maContents
private

◆ maDefFont

SvxFont EditDoc::maDefFont
private

Definition at line 753 of file editdoc.hxx.

Referenced by CreateDefFont(), and GetDefFont().

◆ mnRotation

TextRotation EditDoc::mnRotation
private

Definition at line 756 of file editdoc.hxx.

Referenced by GetRotation(), IsEffectivelyVertical(), IsTopToBottom(), and SetRotation().

◆ nDefTab

sal_uInt16 EditDoc::nDefTab
private

Definition at line 754 of file editdoc.hxx.

Referenced by GetDefTab(), and SetDefTab().

◆ nLastCache

sal_Int32 EditDoc::nLastCache
mutableprivate

Definition at line 747 of file editdoc.hxx.

Referenced by GetPos().

◆ pItemPool

rtl::Reference<SfxItemPool> EditDoc::pItemPool
private

Definition at line 750 of file editdoc.hxx.

Referenced by GetItemPool().


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