LibreOffice Module editeng (master) 1
|
#include <editdoc.hxx>
Public Member Functions | |
ContentNode (SfxItemPool &rItemPool) | |
ContentNode (const OUString &rStr, const ContentAttribs &rContentAttribs) | |
~ContentNode () | |
ContentNode (const ContentNode &)=delete | |
ContentNode & | operator= (const ContentNode &)=delete |
void | dumpAsXml (xmlTextWriterPtr pWriter) const |
ContentAttribs & | GetContentAttribs () |
const ContentAttribs & | GetContentAttribs () const |
CharAttribList & | GetCharAttribs () |
const CharAttribList & | GetCharAttribs () const |
void | ExpandAttribs (sal_Int32 nIndex, sal_Int32 nNewChars, SfxItemPool &rItemPool) |
void | CollapseAttribs (sal_Int32 nIndex, sal_Int32 nDelChars, SfxItemPool &rItemPool) |
void | AppendAttribs (ContentNode *pNextNode) |
void | CopyAndCutAttribs (ContentNode *pPrevNode, SfxItemPool &rPool, bool bKeepEndingAttribs) |
void | SetStyleSheet (SfxStyleSheet *pS, bool bRecalcFont=true) |
void | SetStyleSheet (SfxStyleSheet *pS, const SvxFont &rFontFromStyle) |
SfxStyleSheet * | GetStyleSheet () |
void | CreateDefFont () |
void | EnsureWrongList () |
WrongList * | GetWrongList () |
const WrongList * | GetWrongList () const |
void | SetWrongList (WrongList *p) |
void | CreateWrongList () |
void | DestroyWrongList () |
bool | IsFeature (sal_Int32 nPos) const |
sal_Int32 | Len () const |
const OUString & | GetString () const |
sal_Int32 | GetExpandedLen () const |
return length including expanded fields More... | |
OUString | GetExpandedText (sal_Int32 nStartPos=0, sal_Int32 nEndPos=-1) const |
return content including expanded fields More... | |
void | UnExpandPositions (sal_Int32 &rStartPos, sal_Int32 &rEndPos) |
re-write offsets in the expanded text to string offsets More... | |
void | SetChar (sal_Int32 nPos, sal_Unicode c) |
void | Insert (std::u16string_view rStr, sal_Int32 nPos) |
void | Append (std::u16string_view rStr) |
void | Erase (sal_Int32 nPos) |
void | Erase (sal_Int32 nPos, sal_Int32 nCount) |
OUString | Copy (sal_Int32 nPos) const |
OUString | Copy (sal_Int32 nPos, sal_Int32 nCount) const |
sal_Unicode | GetChar (sal_Int32 nPos) const |
Private Member Functions | |
void | UnExpandPosition (sal_Int32 &rStartPos, bool bBiasStart) |
Private Attributes | |
OUString | maString |
ContentAttribs | aContentAttribs |
CharAttribList | aCharAttribList |
std::unique_ptr< WrongList > | mpWrongList |
Definition at line 235 of file editdoc.hxx.
ContentNode::ContentNode | ( | SfxItemPool & | rItemPool | ) |
Definition at line 1199 of file editdoc.cxx.
ContentNode::ContentNode | ( | const OUString & | rStr, |
const ContentAttribs & | rContentAttribs | ||
) |
Definition at line 1203 of file editdoc.cxx.
References maString.
ContentNode::~ContentNode | ( | ) |
Definition at line 1208 of file editdoc.cxx.
|
delete |
void ContentNode::Append | ( | std::u16string_view | rStr | ) |
Definition at line 1741 of file editdoc.cxx.
References maString.
Referenced by EditDoc::ConnectParagraphs().
void ContentNode::AppendAttribs | ( | ContentNode * | pNextNode | ) |
Definition at line 1509 of file editdoc.cxx.
References aCharAttribList, CharAttribList::DbgCheckAttribs(), GetAttrib(), CharAttribList::GetAttribs(), GetCharAttribs(), EditCharAttrib::GetEnd(), EditCharAttrib::GetItem(), EditCharAttrib::GetLen(), EditCharAttrib::GetStart(), CharAttribList::InsertAttrib(), EditCharAttrib::IsFeature(), maString, CharAttribList::Remove(), and EditCharAttrib::Which().
Referenced by EditDoc::ConnectParagraphs().
void ContentNode::CollapseAttribs | ( | sal_Int32 | nIndex, |
sal_Int32 | nDelChars, | ||
SfxItemPool & | rItemPool | ||
) |
Definition at line 1354 of file editdoc.cxx.
References aCharAttribList, EditCharAttrib::Collaps(), DBG_ASSERT, CharAttribList::DbgCheckAttribs(), GetAttrib(), CharAttribList::GetAttribs(), EditCharAttrib::GetEnd(), EditCharAttrib::GetItem(), EditCharAttrib::GetLen(), EditCharAttrib::GetStart(), EditCharAttrib::IsEmpty(), EditCharAttrib::IsFeature(), Len(), EditCharAttrib::MoveBackward(), mpWrongList, nIndex, SfxItemPool::Remove(), CharAttribList::ResortAttribs(), and CharAttribList::SetHasEmptyAttribs().
Referenced by EditDoc::RemoveChars().
OUString ContentNode::Copy | ( | sal_Int32 | nPos | ) | const |
Definition at line 1756 of file editdoc.cxx.
References maString, and nPos.
Referenced by EdtAutoCorrDoc::ChgAutoCorrWord(), ImpEditEngine::Command(), ImpEditEngine::CreateTextObject(), EditEngine::DumpData(), ImpEditEngine::ImpRemoveChars(), EditDoc::InsertParaBreak(), and ImpEditEngine::TransliterateText().
OUString ContentNode::Copy | ( | sal_Int32 | nPos, |
sal_Int32 | nCount | ||
) | const |
Definition at line 1761 of file editdoc.cxx.
void ContentNode::CopyAndCutAttribs | ( | ContentNode * | pPrevNode, |
SfxItemPool & | rPool, | ||
bool | bKeepEndingAttribs | ||
) |
Definition at line 1450 of file editdoc.cxx.
References aCharAttribList, CharAttribList::DbgCheckAttribs(), CharAttribList::FindAttrib(), GetAttrib(), CharAttribList::GetAttribs(), GetCharAttribs(), EditCharAttrib::GetEnd(), EditCharAttrib::GetItem(), EditCharAttrib::GetStart(), CharAttribList::InsertAttrib(), EditCharAttrib::IsFeature(), EditCharAttrib::IsInside(), Len(), MakeCharAttrib(), EditCharAttrib::MoveBackward(), and SfxPoolItem::Which().
Referenced by EditDoc::InsertParaBreak().
void ContentNode::CreateDefFont | ( | ) |
Definition at line 1579 of file editdoc.cxx.
References aContentAttribs, CreateFont(), GetCharAttribs(), GetContentAttribs(), ContentAttribs::GetStyleSheet(), and pS.
Referenced by EditDoc::CreateDefFont(), ImpEditEngine::InsertTextObject(), and SetStyleSheet().
void ContentNode::CreateWrongList | ( | ) |
Definition at line 1792 of file editdoc.cxx.
References mpWrongList, and SAL_WARN_IF.
Referenced by EnsureWrongList(), ImpEditEngine::InitDoc(), ImpEditEngine::SetAllMisspellRanges(), and EditEngine::SetControlWord().
void ContentNode::DestroyWrongList | ( | ) |
Definition at line 1799 of file editdoc.cxx.
References mpWrongList.
Referenced by EditEngine::SetControlWord().
void ContentNode::dumpAsXml | ( | xmlTextWriterPtr | pWriter | ) | const |
Definition at line 1804 of file editdoc.cxx.
References aCharAttribList, aContentAttribs, ContentAttribs::dumpAsXml(), CharAttribList::dumpAsXml(), and maString.
void ContentNode::EnsureWrongList | ( | ) |
Definition at line 1771 of file editdoc.cxx.
References CreateWrongList(), and mpWrongList.
Referenced by ImpEditEngine::DoOnlineSpelling().
void ContentNode::Erase | ( | sal_Int32 | nPos | ) |
Definition at line 1746 of file editdoc.cxx.
References maString, and nPos.
Referenced by EditDoc::InsertParaBreak(), and EditDoc::RemoveChars().
void ContentNode::Erase | ( | sal_Int32 | nPos, |
sal_Int32 | nCount | ||
) |
void ContentNode::ExpandAttribs | ( | sal_Int32 | nIndex, |
sal_Int32 | nNewChars, | ||
SfxItemPool & | rItemPool | ||
) |
Definition at line 1212 of file editdoc.cxx.
References aCharAttribList, DBG_ASSERT, CharAttribList::DbgCheckAttribs(), EditCharAttrib::Expand(), CharAttribList::FindEmptyAttrib(), GetAttrib(), CharAttribList::GetAttribs(), EditCharAttrib::GetEnd(), EditCharAttrib::GetItem(), EditCharAttrib::GetLen(), EditCharAttrib::GetStart(), EditCharAttrib::IsEdge(), EditCharAttrib::IsEmpty(), EditCharAttrib::IsFeature(), IsFeature(), Len(), maString, EditCharAttrib::MoveForward(), mpWrongList, nIndex, SfxItemPool::Remove(), CharAttribList::ResortAttribs(), EditCharAttrib::SetEdge(), SfxPoolItem::Which(), and EditCharAttrib::Which().
Referenced by EditDoc::InsertFeature(), and EditDoc::InsertText().
sal_Unicode ContentNode::GetChar | ( | sal_Int32 | nPos | ) | const |
Definition at line 1766 of file editdoc.cxx.
References maString, and nPos.
Referenced by WrongList::ClearWrongs(), ImpEditEngine::Command(), ImpEditEngine::CursorEndOfLine(), ImpEditEngine::DoOnlineSpelling(), ImpEditEngine::ImpAdjustBlocks(), ImpEditEngine::ImpBreakLine(), ImpEditEngine::ImpFindNextError(), ImpEditEngine::ImplCalcAsianCompression(), ImpEditEngine::ImpSpell(), EditEngine::PostKeyEvent(), and EditHTMLParser::ThrowAwayBlank().
|
inline |
Definition at line 256 of file editdoc.hxx.
References aCharAttribList.
Referenced by ImpEditEngine::AddPortionIterated(), AppendAttribs(), ImpEditEngine::CalcLineWidth(), CopyAndCutAttribs(), CreateDefFont(), EditDoc::CreateDefFont(), ImpEditEngine::CreateLines(), ImpEditEngine::CreateTextObject(), ImpEditEngine::CreateTextPortions(), ImpEditEngine::CreateTransferable(), ImpEditEngine::CursorEndOfLine(), ImpEditEngine::CursorMoved(), EditEngine::DumpData(), EditDoc::FindAttribs(), GetExpandedLen(), GetExpandedText(), ImpEditView::GetField(), EditView::GetFieldAtSelection(), EditEngine::GetFieldCount(), EditEngine::GetFieldInfo(), ImpEditEngine::GetLanguage(), EditEngine::GetStandardSvxFont(), ImpEditEngine::ImpBreakLine(), ImpEditEngine::ImpConnectParagraphs(), ImpEditEngine::ImpRemoveChars(), ImpEditEngine::InitScriptTypes(), EditDoc::InsertAttrib(), EditDoc::InsertAttribInSelection(), EditDoc::InsertFeature(), EditDoc::InsertParaBreak(), ImpEditEngine::InsertTextObject(), lcl_FindValidAttribs(), ImpEditEngine::Paint(), ImpEditEngine::RecalcTextPortion(), EditDoc::RemoveAttribs(), EditEngine::RemoveFields(), EditDoc::RemoveItemsFromPool(), EditDoc::RemoveText(), ImpEditEngine::SeekCursor(), EditRTFParser::SetAttrInDoc(), SetStyleSheet(), ImpEditEngine::SplitTextPortion(), ImpEditEngine::TransliterateText(), EditUndoTransliteration::Undo(), UnExpandPosition(), and ImpEditEngine::WriteRTF().
|
inline |
Definition at line 257 of file editdoc.hxx.
References aCharAttribList.
|
inline |
Definition at line 254 of file editdoc.hxx.
References aContentAttribs.
Referenced by EditRTFParser::AddRTFDefaultValues(), ImpEditEngine::CalcVertLineSpacing(), EditRTFParser::CallParser(), ImpEditEngine::CreateAndInsertEmptyLine(), CreateDefFont(), ImpEditEngine::CreateLines(), ImpEditEngine::CreateTextObject(), EditEngine::DumpData(), ImpEditEngine::GetLanguage(), ImpEditEngine::GetLRSpaceItem(), ImpEditEngine::GetStyleSheet(), ImpEditEngine::ImpBreakLine(), ImpEditEngine::ImpConnectParagraphs(), EditHTMLParser::ImpSetStyleSheet(), EditDoc::InsertParaBreak(), EditHTMLParser::NextToken(), ImpEditEngine::Paint(), EditDoc::RemoveText(), ImpEditEngine::SeekCursor(), EditRTFParser::SetAttrInDoc(), ImpEditEngine::SetStyleSheet(), SetStyleSheet(), and ImpEditEngine::WriteRTF().
|
inline |
Definition at line 255 of file editdoc.hxx.
References aContentAttribs.
sal_Int32 ContentNode::GetExpandedLen | ( | ) | const |
return length including expanded fields
Definition at line 1620 of file editdoc.cxx.
References EE_FEATURE_FIELD(), CharAttribList::GetAttribs(), GetCharAttribs(), maString, and EditCharAttrib::Which().
Referenced by EditDoc::GetTextLen(), and ImpEditEngine::ImpSearch().
OUString ContentNode::GetExpandedText | ( | sal_Int32 | nStartPos = 0 , |
sal_Int32 | nEndPos = -1 |
||
) | const |
return content including expanded fields
! beware of sub string length of -1
Definition at line 1639 of file editdoc.cxx.
References aStr, DBG_ASSERT, EE_FEATURE_FIELD(), EE_FEATURE_LINEBR(), EE_FEATURE_TAB(), CharAttribList::FindFeature(), GetCharAttribs(), EditCharAttrib::GetItem(), EditCharAttrib::GetStart(), GetString(), Len(), nIndex, and SfxPoolItem::Which().
Referenced by EditDoc::GetParaAsString(), and ImpEditEngine::ImpSearch().
|
inline |
Definition at line 281 of file editdoc.hxx.
References maString.
Referenced by ImpEditEngine::CalcLineWidth(), EdtAutoCorrDoc::ChgAutoCorrWord(), EditDoc::ConnectParagraphs(), ImpEditEngine::CreateLines(), ImpEditEngine::CursorLeft(), ImpEditEngine::CursorRight(), ImpEditEngine::CursorVisualLeftRight(), ImpEditEngine::CursorVisualStartEnd(), ImpEditEngine::DeleteLeftOrRight(), EditEngine::DumpData(), ImpEditEngine::EndOfWord(), EditView::ExecuteSpellPopup(), GetExpandedText(), EdtAutoCorrDoc::GetPrevPara(), ImpEditEngine::ImpBreakLine(), ImpEditEngine::ImpFindKashidas(), ImpEditEngine::InitScriptTypes(), ImpEditEngine::InitWritingDirections(), ImpEditEngine::Paint(), ImpEditEngine::SelectSentence(), ImpEditEngine::SelectWord(), ImpEditEngine::SplitTextPortion(), ImpEditEngine::StartOfWord(), ImpEditEngine::TransliterateText(), ImpEditEngine::WordLeft(), and ImpEditEngine::WordRight().
|
inline |
Definition at line 266 of file editdoc.hxx.
References aContentAttribs, and ContentAttribs::GetStyleSheet().
Referenced by ImpEditEngine::CreateTextObject(), EditEngine::DumpData(), ImpEditEngine::ImpConnectParagraphs(), EditDoc::InsertParaBreak(), ImpEditEngine::RemoveStyleFromParagraphs(), EditDoc::RemoveText(), ImpEditEngine::SetStyleSheet(), ImpEditEngine::UpdateParagraphsWithStyleSheet(), and ImpEditEngine::WriteRTF().
WrongList * ContentNode::GetWrongList | ( | ) |
Definition at line 1777 of file editdoc.cxx.
References mpWrongList.
Referenced by ImpEditEngine::CreateTextObject(), ImpEditEngine::DoOnlineSpelling(), EditView::ExecuteSpellPopup(), ImpEditEngine::GetAllMisspellRanges(), EditEngine::HasOnlineSpellErrors(), ImpEditEngine::ImpConnectParagraphs(), ImpEditView::IsWrongSpelledWord(), ImpEditEngine::Paint(), ImpEditEngine::SetAllMisspellRanges(), EditEngine::SetControlWord(), ImpEditEngine::SetStyleSheet(), ImpEditView::SpellIgnoreWord(), and ImpEditEngine::UpdateParagraphsWithStyleSheet().
const WrongList * ContentNode::GetWrongList | ( | ) | const |
Definition at line 1782 of file editdoc.cxx.
References mpWrongList.
void ContentNode::Insert | ( | std::u16string_view | rStr, |
sal_Int32 | nPos | ||
) |
Definition at line 1736 of file editdoc.cxx.
References maString, and nPos.
Referenced by EditDoc::InsertFeature(), and EditDoc::InsertText().
bool ContentNode::IsFeature | ( | sal_Int32 | nPos | ) | const |
Definition at line 1610 of file editdoc.cxx.
References CH_FEATURE, maString, and nPos.
Referenced by WrongList::ClearWrongs(), ImpEditEngine::CursorEndOfLine(), and ExpandAttribs().
sal_Int32 ContentNode::Len | ( | ) | const |
Definition at line 1615 of file editdoc.cxx.
References maString.
Referenced by EditSelection::Adjust(), ImpEditEngine::ApplyChangedSentence(), EditRTFParser::CallParser(), EditSpellWrapper::CheckSpellTo(), WrongList::ClearWrongs(), CollapseAttribs(), EditDoc::ConnectParagraphs(), ImpEditEngine::Convert(), ImpEditEngine::ConvertSelection(), CopyAndCutAttribs(), ParaPortion::CorrectValuesBehindLastFormattedLine(), ImpEditEngine::CreateAndInsertEmptyLine(), ImpEditEngine::CreateLines(), ImpEditEngine::CreateTextObject(), EditEngine::CreateTextObject(), ImpEditEngine::CreateTextPortions(), ImpEditEngine::CursorDown(), ImpEditEngine::CursorEndOfDoc(), ImpEditEngine::CursorEndOfLine(), ImpEditEngine::CursorEndOfParagraph(), ImpEditEngine::CursorLeft(), ImpEditEngine::CursorMoved(), ImpEditEngine::CursorRight(), ImpEditEngine::CursorVisualLeftRight(), ParaPortion::DbgCheckTextPortions(), EditPaM::DbgIsBuggy(), ImpEditEngine::DeleteLeftOrRight(), ImpEditEngine::DoOnlineSpelling(), ImpEditView::dragGestureRecognized(), EditEngine::DumpData(), ImpEditEngine::EndOfWord(), EditView::ExecuteSpellPopup(), ExpandAttribs(), EditEngine::GetCharacterBounds(), EditDoc::GetEndPaM(), GetExpandedText(), ImpEditView::GetField(), ImpEditEngine::GetI18NScriptType(), ImpEditEngine::GetItemScriptType(), ImpEditEngine::GetLineNumberAtIndex(), EdtAutoCorrDoc::GetPrevPara(), ImpEditEngine::GetRightToLeft(), ImpEditEngine::GetSelected(), EditView::GetSurroundingText(), EditEngine::GetTextLen(), ImpEditEngine::HasSpellErrors(), EditHTMLParser::HasTextInCurrentPara(), ImpEditEngine::ImpBreakLine(), ImpEditEngine::ImpConnectParagraphs(), ImpEditEngine::ImpDeleteSelection(), ImpEditEngine::ImpFindNextError(), ImpEditView::ImplGetEditCursor(), EditHTMLParser::ImpSetAttribs(), ImpEditEngine::ImpSpell(), ImpEditEngine::InitScriptTypes(), ImpEditEngine::InitWritingDirections(), ImpEditEngine::InsertParagraph(), ImpEditEngine::InsertTextObject(), ImpEditEngine::InvalidateFromParagraph(), EditRTFParser::IsEndPara(), ImpEditEngine::IsScriptChange(), lcl_DoSetSelection(), ImpEditEngine::MouseButtonDown(), ImpEditEngine::Paint(), EditEngine::PostKeyEvent(), EditUndoDelContent::Redo(), EdtAutoCorrDoc::ReplaceRange(), ImpEditEngine::ReplaceTextOnly(), ImpEditEngine::SeekCursor(), ImpEditEngine::SelectParagraph(), ImpEditEngine::SelectSentence(), ImpEditEngine::SelectWord(), EditRTFParser::SetAttrInDoc(), EditRTFParser::SetEndPrevPara(), EditView::SetSelection(), ImpEditEngine::SetStyleSheet(), ImpEditEngine::Spell(), ImpEditEngine::SpellSentence(), ImpEditEngine::StartOfWord(), ImpEditEngine::StartSearchAndReplace(), EditHTMLParser::ThrowAwayBlank(), EditUndoDelContent::Undo(), UnExpandPosition(), ImpEditEngine::UpdateParagraphsWithStyleSheet(), ImpEditEngine::UpdateSelections(), ImpEditEngine::WordLeft(), ImpEditEngine::WordRight(), ImpEditEngine::WriteRTF(), and ImpEditEngine::WriteText().
|
delete |
void ContentNode::SetChar | ( | sal_Int32 | nPos, |
sal_Unicode | c | ||
) |
Definition at line 1731 of file editdoc.cxx.
References maString, and nPos.
Referenced by ImpEditEngine::ReplaceTextOnly().
void ContentNode::SetStyleSheet | ( | SfxStyleSheet * | pS, |
bool | bRecalcFont = true |
||
) |
Definition at line 1603 of file editdoc.cxx.
References aContentAttribs, CreateDefFont(), pS, and ContentAttribs::SetStyleSheet().
Referenced by ImpEditEngine::ImpConnectParagraphs(), EditDoc::InsertParaBreak(), ImpEditEngine::RemoveStyleFromParagraphs(), EditDoc::RemoveText(), ImpEditEngine::SetStyleSheet(), and ImpEditEngine::UpdateParagraphsWithStyleSheet().
void ContentNode::SetStyleSheet | ( | SfxStyleSheet * | pS, |
const SvxFont & | rFontFromStyle | ||
) |
Definition at line 1591 of file editdoc.cxx.
References aContentAttribs, CreateFont(), GetCharAttribs(), GetContentAttribs(), CharAttribList::GetDefFont(), pS, and ContentAttribs::SetStyleSheet().
void ContentNode::SetWrongList | ( | WrongList * | p | ) |
Definition at line 1787 of file editdoc.cxx.
References mpWrongList, and p.
Referenced by ImpEditEngine::InsertTextObject().
|
private |
Definition at line 1682 of file editdoc.cxx.
References EE_FEATURE_FIELD(), CharAttribList::GetAttribs(), GetCharAttribs(), EditCharAttrib::GetEnd(), EditCharAttrib::GetStart(), Len(), and EditCharAttrib::Which().
Referenced by UnExpandPositions().
void ContentNode::UnExpandPositions | ( | sal_Int32 & | rStartPos, |
sal_Int32 & | rEndPos | ||
) |
re-write offsets in the expanded text to string offsets
Definition at line 1725 of file editdoc.cxx.
References UnExpandPosition().
Referenced by ImpEditEngine::ImpSearch().
|
private |
Definition at line 240 of file editdoc.hxx.
Referenced by AppendAttribs(), CollapseAttribs(), CopyAndCutAttribs(), dumpAsXml(), ExpandAttribs(), and GetCharAttribs().
|
private |
Definition at line 239 of file editdoc.hxx.
Referenced by CreateDefFont(), dumpAsXml(), GetContentAttribs(), GetStyleSheet(), and SetStyleSheet().
|
private |
Definition at line 238 of file editdoc.hxx.
Referenced by Append(), AppendAttribs(), Copy(), dumpAsXml(), Erase(), ExpandAttribs(), GetChar(), GetExpandedLen(), GetString(), Insert(), IsFeature(), Len(), and SetChar().
|
private |
Definition at line 241 of file editdoc.hxx.
Referenced by CollapseAttribs(), CreateWrongList(), DestroyWrongList(), EnsureWrongList(), ExpandAttribs(), GetWrongList(), and SetWrongList().