LibreOffice Module sw (master) 1
|
Text operation/manipulation interface. More...
#include <IDocumentContentOperations.hxx>
Public Member Functions | |
virtual bool | CopyRange (SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0 |
Copy a selected content range to a position. More... | |
virtual void | DeleteSection (SwNode *pNode)=0 |
Delete section containing the node. More... | |
virtual void | DeleteRange (SwPaM &)=0 |
Delete a range SwFlyFrameFormat. More... | |
virtual bool | DelFullPara (SwPaM &)=0 |
Delete full paragraphs. More... | |
virtual bool | DeleteAndJoin (SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0 |
complete delete of a given PaM More... | |
virtual bool | MoveRange (SwPaM &, SwPosition &, SwMoveFlags)=0 |
virtual bool | MoveNodeRange (SwNodeRange &, SwNode &, SwMoveFlags)=0 |
virtual void | MoveAndJoin (SwPaM &, SwPosition &)=0 |
Move a range. More... | |
virtual bool | Overwrite (const SwPaM &rRg, const OUString &rStr)=0 |
Overwrite string in an existing text node. More... | |
virtual bool | InsertString (const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0 |
Insert string into existing text node at position rRg.Point(). More... | |
virtual void | SetIME (bool bIME)=0 |
States that the last inserted string came from IME. More... | |
virtual bool | GetIME () const =0 |
Did the last inserted string come from IME? More... | |
virtual void | TransliterateText (const SwPaM &rPaM, utl::TransliterationWrapper &)=0 |
change text to Upper/Lower/Hiragana/Katakana/... More... | |
virtual SwFlyFrameFormat * | InsertGraphic (const SwPaM &rRg, const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet, SwFrameFormat *)=0 |
Insert graphic or formula. More... | |
virtual void | ReRead (SwPaM &, const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic)=0 |
Transpose graphic (with undo) More... | |
virtual SwDrawFrameFormat * | InsertDrawObj (const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0 |
Insert a DrawObject. More... | |
virtual SwFlyFrameFormat * | InsertEmbObject (const SwPaM &rRg, const svt::EmbeddedObjectRef &xObj, SfxItemSet *pFlyAttrSet)=0 |
Insert OLE-objects. More... | |
virtual SwFlyFrameFormat * | InsertOLE (const SwPaM &rRg, const OUString &rObjName, sal_Int64 nAspect, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet)=0 |
virtual bool | SplitNode (const SwPosition &rPos, bool bChkTableStart)=0 |
Split a node at rPos (implemented only for TextNode). More... | |
virtual bool | AppendTextNode (SwPosition &rPos)=0 |
virtual bool | ReplaceRange (SwPaM &rPam, const OUString &rNewStr, const bool bRegExReplace)=0 |
Replace selected range in a TextNode with string. More... | |
virtual bool | InsertPoolItem (const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0 |
Insert an attribute. More... | |
virtual void | InsertItemSet (const SwPaM &rRg, const SfxItemSet &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr)=0 |
virtual void | RemoveLeadingWhiteSpace (const SwPosition &rPos)=0 |
Removes any leading white space from the paragraph. More... | |
virtual void | RemoveLeadingWhiteSpace (SwPaM &rPaM)=0 |
Protected Member Functions | |
virtual | ~IDocumentContentOperations () |
Text operation/manipulation interface.
Definition at line 96 of file IDocumentContentOperations.hxx.
|
inlineprotectedvirtual |
Definition at line 250 of file IDocumentContentOperations.hxx.
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwDoc::AppendDoc(), SwEditShell::AppendTextNode(), SwWW8ImplReader::AppendTextNode(), SwXText::convertToTextFrame(), SwEditShell::DeleteGlobalDocContent(), SwDoc::DeleteTOX(), SwEditShell::DoSpecialInsert(), GetMergeSel(), SwEditShell::InsertGlobalDocContent(), SwXText::insertTextContentAfter(), SwXText::insertTextContentBefore(), SwRangeRedline::MoveFromSection(), SwDoc::MoveParagraphImpl(), SwTable::PrepareMerge(), SwUndoInsert::RedoImpl(), SwUndoInsert::RepeatImpl(), SwCursorShell::SetShadowCursorPos(), and SwXText::setString().
|
pure virtual |
Copy a selected content range to a position.
The position can be in the same or in an another document. It can also be within the range!
Normally this function should work only with content nodes. But there is a special case used by SwDoc::Paste, which starts the SwPaM at the content start node. This position doesn't contain any content:
This is important, because it prevents merging of the first node of the range into the node pointed to by rPos
. As a result this keeps all properties of the first real content node, which is the 2nd, including the Flys and the page description. In this case the first (fake) node is silently dropped and all other nodes are just copied.
rPam | The source node range to copy |
rPos | The target copy destination |
flags | SwCopyFlags::CheckPos: If this function should check if rPos is in a fly frame anchored in rPam. If false, then no such check will be performed, and it is assumed that the caller took care of verifying this constraint already. |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwDoc::AppendDoc(), SwAutoCorrDoc::ChgAutoCorrWord(), SwEditShell::CopySelToDoc(), SwRangeRedline::CopyToSection(), SwDoc::InsertGlossary(), lcl_CopySelToDoc(), SwDOCXReader::MakeEntries(), WW8Glossary::MakeEntries(), SwDoc::MakeFlyAndMove(), SwDoc::MoveParagraphImpl(), SwFEShell::Paste(), SwTransferable::PrepareForCopyTextRange(), SwUndoInserts::RepeatImpl(), and SwEditShell::SaveGlossaryDoc().
|
pure virtual |
complete delete of a given PaM
Implemented in sw::DocumentContentOperationsManager.
Referenced by sw::DocumentRedlineManager::AppendRedline(), SwXTextTable::attach(), SwXTextField::attach(), SwXFootnote::attach(), SwDoc::ConvertFieldsToText(), SwRangeRedline::DelCopyOfSection(), SwTextContentControl::Delete(), SwXTextCursor::DeleteAndInsert(), SwFEShell::DeleteCol(), IDocumentMarkAccess::DeleteFieldmarkCommand(), SwEditShell::DeleteSel(), SwAutoCorrDoc::DeleteSelImpl(), SwTextField::DeleteTextField(), SwXContentControl::dispose(), SwXFootnote::dispose(), SwXMeta::dispose(), SwTextShell::ExecField(), SwTextShell::Execute(), SwFieldMgr::InsertField(), SwUnoCursorHelper::InsertFile(), SwBaseShell::InsertRegionDialog(), SwDoc::MakeFlyAndMove(), SwUndoDelete::RedoImpl(), SwUndoDelete::RepeatImpl(), sw::ReplaceImpl(), SwDoc::SetRowNotTracked(), SwUnoCursorHelper::SetString(), SwXTextField::TransmuteLeadToInputField(), SwUndoReplace::Impl::UndoImpl(), and SwTextRefMark::UpdateFieldContent().
|
pure virtual |
Delete a range SwFlyFrameFormat.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwRangeRedline::DelCopyOfSection(), SwScriptInfo::DeleteHiddenRanges(), SwAutoCorrDoc::DeleteSelImpl(), SwDoc::DeleteTOXMark(), SwWW8ImplReader::End_Footnote(), IMPL_LINK(), XMLRedlineImportHelper::InsertIntoDocument(), SwWW8ImplReader::Read_LineBreakClear(), SwDoc::RemoveInvisibleContent(), SwFormatField::SwClientNotify(), and SwDoc::UpdatePagesForPrintingWithPostItData().
|
pure virtual |
Delete section containing the node.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwDoc::ChgPageDesc(), DeleteBox_(), sw::DocumentLayoutManager::DelLayoutFormat(), SwDoc::DelSectionFormat(), SwDoc::DelTable(), XMLRedlineImportHelper::InsertIntoDocument(), lcl_DelHFFormat(), SwXMLTableContext::MakeTable(), SwRangeRedline::MoveFromSection(), SwTextFootnote::SetStartNode(), SwUndoTableNdsChg::UndoImpl(), SwUndoTableMerge::UndoImpl(), and SwRangeRedline::~SwRangeRedline().
|
pure virtual |
Delete full paragraphs.
Implemented in sw::DocumentContentOperationsManager.
Referenced by sw::DocumentRedlineManager::AppendRedline(), SwXText::convertToTextFrame(), SwRangeRedline::DelCopyOfSection(), wwExtraneousParas::delete_all_from_doc(), SwEditShell::DeleteGlobalDocContent(), SwEditShell::DelFullPara(), SwXParagraph::dispose(), SwDoc::InsertGlossary(), wwSectionManager::InsertSegments(), SwFEShell::PastePages(), SwUndoDelete::RedoImpl(), SwDoc::RemoveInvisibleContent(), SwXText::removeTextContentAfter(), SwXText::removeTextContentBefore(), SwUndoDelete::RepeatImpl(), SwUndoDelete::UndoImpl(), SwUndoInsert::UndoImpl(), and SwUndoRedlineSort::UndoRedlineImpl().
|
pure virtual |
Did the last inserted string come from IME?
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwExtTextInput::~SwExtTextInput().
|
pure virtual |
Insert a DrawObject.
The object must be already registered in DrawModel.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwFmDrawPage::add(), SwFEShell::Copy(), SwFEShell::CopyDrawSel(), SwWW8ImplReader::ImportGraf(), SwWW8ImplReader::ImportOle(), SwFEShell::InsertDrawObj(), SwFEShell::Paste(), SwWW8ImplReader::Read_GrafLayer(), and SwWW8ImplReader::ReadGrafLayer1().
|
pure virtual |
Insert OLE-objects.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwXMLTextImportHelper::createAndInsertApplet(), SwXMLTextImportHelper::createAndInsertFloatingFrame(), SwXMLTextImportHelper::createAndInsertOLEObject(), SwXMLTextImportHelper::createAndInsertOOoLink(), SwXMLTextImportHelper::createAndInsertPlugin(), SwFEShell::InsertObject(), and SwUndoInsert::RepeatImpl().
|
pure virtual |
Insert graphic or formula.
The XXXX are copied.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwWW8ImplReader::ImportGraf(), SwWW8ImplReader::ImportOle(), SwWW8ImplReader::ImportReplaceableDrawables(), SwFEShell::Insert(), SwWW8ImplReader::MakeGrafInContent(), SwWW8ImplReader::MakeGrafNotInContent(), SwWW8ImplReader::Read_F_IncludePicture(), SwUndoInsert::RepeatImpl(), and SwFEShell::ReplaceSdrObj().
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwAutoFormat::DoUnderline(), SwBreakDashedLine::execute(), UnfloatTableButton::MouseButtonDown(), SwUndoAttr::redoAttribute(), SwRedlineExtraData_FormatColl::Reject(), SwUndoAttr::RepeatImpl(), SwEditShell::SetAttrSet(), SwUnoCursorHelper::SetCursorAttr(), SwDoc::SetFormatItemByAutoFormat(), SwTextNode::SetLanguageAndFont(), SwCursorShell::SetShadowCursorPos(), and SwDoc::SetTextFormatCollByAutoFormat().
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwXMLTextImportHelper::createAndInsertOLEObject(), and SwWW8ImplReader::InsertOle().
|
pure virtual |
Insert an attribute.
If rRg spans several nodes the attribute is split, provided it makes sense. Nodes, where this attribute does not make sense are ignored. In nodes completely enclosed in the selection the attribute becomes hard-formatted, in all other (text-) nodes the attribute is inserted into the attribute array. For a character attribute, in cases where no selection exists an "empty" hint is inserted. If there is a selection the attribute is hard-formatted and added to the node at rRg.Start(). If the attribute could not be inserted, the method returns false.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwDoc::AppendDoc(), SwXTextField::attach(), SwXFootnote::attach(), SwXLineBreak::attach(), SwXMeta::AttachImpl(), SwXContentControl::AttachImpl(), SwFEShell::ChgCurPageDesc(), SwWW8ImplReader::End_Field(), GiveNodePageDesc(), SwEditShell::Insert(), SwEditShell::InsertField(), SwXReferenceMark::Impl::InsertRefMark(), wwSectionManager::InsertSegments(), SwWW8ImplReader::InsertTagField(), SwXDocumentIndexMark::Impl::InsertTOXMark(), lcl_FormatPostIt(), lcl_ImportTox(), lcl_SetAPageOffset(), HTMLReader::Read(), SwWW8ImplReader::Read_And(), SwWW8ImplReader::Read_F_ANumber(), SwWW8ImplReader::Read_F_Author(), SwWW8ImplReader::Read_F_CurPage(), SwWW8ImplReader::Read_F_DateTime(), SwWW8ImplReader::Read_F_DBField(), SwWW8ImplReader::Read_F_DBNext(), SwWW8ImplReader::Read_F_DBNum(), SwWW8ImplReader::Read_F_DocInfo(), SwWW8ImplReader::Read_F_Equation(), SwWW8ImplReader::Read_F_FileName(), SwWW8ImplReader::Read_F_FormListBox(), SwWW8ImplReader::Read_F_FormTextBox(), SwWW8ImplReader::Read_F_Input(), SwWW8ImplReader::Read_F_InputVar(), SwWW8ImplReader::Read_F_Macro(), SwWW8ImplReader::Read_F_Num(), SwWW8ImplReader::Read_F_PgRef(), SwWW8ImplReader::Read_F_Ref(), SwWW8ImplReader::Read_F_Seq(), SwWW8ImplReader::Read_F_Set(), SwWW8ImplReader::Read_F_Styleref(), SwWW8ImplReader::Read_F_TemplName(), SwWW8ImplReader::ReadChar(), SwWW8ImplReader::ReadText(), SwRedlineExtraData_Format::Reject(), SwFltControlStack::SetAttrInDoc(), SwWW8FltControlStack::SetAttrInDoc(), SwWW8FltRefStack::SetAttrInDoc(), SwEditShell::SetAttrItem(), SwDoc::SetCounted(), SwDoc::SetNumRule(), SwDoc::SetRubyList(), SwCursorShell::SetShadowCursorPos(), SwXTextField::TransmuteLeadToInputField(), and SwExtTextInput::~SwExtTextInput().
|
pure virtual |
Insert string into existing text node at position rRg.Point().
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwAutoFormat::AutoCorrect(), SwAutoFormat::BuildEnum(), SwAutoFormat::BuildIndent(), SwAutoFormat::BuildNegIndent(), SwAutoFormat::BuildText(), SwAutoFormat::BuildTextIndent(), SwDoc::ConvertFieldsToText(), SwFEShell::DeleteCol(), SwAutoFormat::DelMoreLinesBlanks(), SwUnoCursorHelper::DocInsertStringSplitCR(), SwTextShell::ExecField(), IMPL_LINK(), SwAutoCorrDoc::Insert(), SwEditShell::Insert(), SwEditShell::Insert2(), SwTable::InsertRow_(), SwWW8ImplReader::InsertTagField(), lcl_FormatPostIt(), SwUnoCursorHelper::makeTableCellRedline(), SwUnoCursorHelper::makeTableRowRedline(), SwTable::NewInsertCol(), SwWW8ImplReader::Read_F_Symbol(), SwWW8ImplReader::Read_SubF_Ruby(), SwWW8ImplReader::ReadChar(), SwWW8ImplReader::ReadChars(), SwUndoInsert::RepeatImpl(), SwAutoCorrDoc::ReplaceRange(), SwDoc::SetRowNotTracked(), SwDoc::SetRubyList(), SwCursorShell::SetShadowCursorPos(), SwWW8ImplReader::simpleAddTextToParagraph(), SwFormatField::SwClientNotify(), SwTextRefMark::UpdateFieldContent(), and SwExtTextInput::~SwExtTextInput().
|
pure virtual |
Move a range.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwRangeRedline::MoveToSection().
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwTable::ConvertSubtableBox(), GetMergeSel(), SwDoc::MakeFlyAndMove(), UnfloatTableButton::MouseButtonDown(), SwUndoTableMerge::MoveBoxContent(), MoveCell(), SwEditShell::MoveGlobalDocContent(), SwDoc::MoveParagraphImpl(), SwTable::PrepareMerge(), SwUndoSort::RedoImpl(), SwUndoMove::RedoImpl(), SwDoc::SortText(), SwUndoSort::UndoImpl(), and SwUndoMove::UndoImpl().
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwRangeRedline::MoveFromSection(), SwRangeRedline::MoveToSection(), SwUndoMove::RedoImpl(), and SwUndoMove::UndoImpl().
|
pure virtual |
Overwrite string in an existing text node.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwUndoOverwrite::RepeatImpl(), and SwExtTextInput::~SwExtTextInput().
|
pure virtual |
Removes any leading white space from the paragraph.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwWrtShell::NumOrBulletOn().
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
|
pure virtual |
Replace selected range in a TextNode with string.
Intended for search & replace. bRegExpRplc - replace tabs (\t) and insert the found string ( not & ). E.g.: Find: "zzz", Replace: "xx\t\\t..&..\&" --> "xx\t<Tab>..zzz..&"
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwAutoFormat::AutoCorrect(), SwXFlatParagraph::changeText(), SwAutoCorrDoc::ChgAutoCorrWord(), SwAutoFormat::DelEmptyLine(), SwUndoReplace::Impl::RedoImpl(), sw::ReplaceImpl(), SwAutoCorrDoc::ReplaceRange(), SwDoc::SetRubyList(), SwAutoCorrDoc::TransliterateRTLWord(), SwTextNode::TransliterateText(), and SwUndoReplace::Impl::UndoImpl().
|
pure virtual |
Transpose graphic (with undo)
Implemented in sw::DocumentContentOperationsManager.
|
pure virtual |
States that the last inserted string came from IME.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwEditShell::Insert2(), and SwExtTextInput::~SwExtTextInput().
|
pure virtual |
Split a node at rPos (implemented only for TextNode).
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwXTextTable::attach(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwWW8ImplReader::CoreLoad(), SwUnoCursorHelper::DocInsertStringSplitCR(), SwTextShell::ExecField(), SwTextShell::Execute(), SwEditShell::InsertDDETable(), SwFieldMgr::InsertField(), SwDoc::InsertSwSection(), SwEditShell::InsertTable(), lcl_FormatPostIt(), SwNodes::MoveRange(), SwDoc::NoNum(), SwDOCXReader::Read(), SwUndoSplitNode::RedoImpl(), SwUndoSplitNode::RepeatImpl(), SwEditShell::SplitNode(), SwXMLImport::startDocument(), SwUndoDelete::SwUndoDelete(), SwDoc::TextToTable(), SwUndoReplace::Impl::UndoImpl(), and SwUndoDelete::UndoImpl().
|
pure virtual |
change text to Upper/Lower/Hiragana/Katakana/...
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwUndoTransliterate::DoTransliterate(), and SwEditShell::TransliterateText().