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 &, const bool bForceJoinNext=false)=0 |
complete delete of a given PaM More... | |
virtual bool | MoveRange (SwPaM &, SwPosition &, SwMoveFlags)=0 |
virtual bool | MoveNodeRange (SwNodeRange &, SwNodeIndex &, SwMoveFlags)=0 |
virtual bool | 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 | 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 SwFlyFrameFormat * | InsertGraphicObject (const SwPaM &rRg, const GraphicObject &rGrfObj, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet)=0 |
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, bool bExpandCharToPara=false, 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... | |
Protected Member Functions | |
virtual | ~IDocumentContentOperations () |
Text operation/manipulation interface.
Definition at line 87 of file IDocumentContentOperations.hxx.
|
inlineprotectedvirtual |
Definition at line 245 of file IDocumentContentOperations.hxx.
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwDoc::AppendDoc(), 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(), 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
#i100466# Add optional parameter <bForceJoinNext>, default value <false> Needed for hiding of deletion redlines
Implemented in sw::DocumentContentOperationsManager.
Referenced by sw::DocumentRedlineManager::AppendRedline(), SwXTextField::attach(), SwXTextTable::attach(), SwDoc::ConvertFieldsToText(), SwRangeRedline::DelCopyOfSection(), SwXTextCursor::DeleteAndInsert(), SwEditShell::DeleteSel(), SwAutoCorrDoc::DeleteSelImpl(), SwTextField::DeleteTextField(), SwXFootnote::dispose(), SwXMeta::dispose(), SwUnoCursorHelper::InsertFile(), SwDoc::MakeFlyAndMove(), SwUndoDelete::RedoImpl(), SwUndoDelete::RepeatImpl(), SwUnoCursorHelper::SetString(), and SwUndoReplace::Impl::UndoImpl().
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(), SwDoc::RemoveInvisibleContent(), and SwFormatField::SwClientNotify().
Delete section containing the node.
Implemented in sw::DocumentContentOperationsManager.
Referenced by DeleteBox_(), SwDoc::DeleteRowCol(), sw::DocumentLayoutManager::DelLayoutFormat(), SwDoc::DelSectionFormat(), 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(), wwSectionManager::InsertSegments(), SwFEShell::PastePages(), SwUndoDelete::RedoImpl(), SwDoc::RemoveInvisibleContent(), SwXText::removeTextContentAfter(), SwXText::removeTextContentBefore(), SwUndoDelete::RepeatImpl(), SwUndoInsert::UndoImpl(), SwUndoDelete::UndoImpl(), and SwUndoRedlineSort::UndoRedlineImpl().
|
pure virtual |
Insert a DrawObject.
The object must be already registered in DrawModel.
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwXDrawPage::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 SwXFrame::attachToRange(), 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 SwXFrame::attachToRange(), 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.
|
pure virtual |
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwAutoFormat::DoUnderline(), SwPageBreakWin::execute(), UnfloatTableButton::MouseButtonDown(), SwUndoAttr::RedoImpl(), 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 SwXFrame::attachToRange(), 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 SwXTextField::attach(), SwFEShell::ChgCurPageDesc(), SwWW8ImplReader::End_Field(), GiveNodePageDesc(), SwEditShell::Insert(), SwXReferenceMark::Impl::InsertRefMark(), wwSectionManager::InsertSegments(), SwWW8ImplReader::InsertTagField(), 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(), 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(), SwAutoFormat::DelMoreLinesBlanks(), SwUnoCursorHelper::DocInsertStringSplitCR(), SwTextShell::ExecField(), IMPL_LINK(), SwAutoCorrDoc::Insert(), SwWW8ImplReader::InsertTagField(), lcl_FormatPostIt(), SwWW8ImplReader::Read_F_Symbol(), SwWW8ImplReader::Read_SubF_Ruby(), SwWW8ImplReader::ReadChar(), SwWW8ImplReader::ReadChars(), SwUndoInsert::RepeatImpl(), SwAutoCorrDoc::ReplaceRange(), SwDoc::SetRubyList(), SwCursorShell::SetShadowCursorPos(), SwWW8ImplReader::simpleAddTextToParagraph(), SwFormatField::SwClientNotify(), 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(), SwUndoMove::RedoImpl(), SwUndoSort::RedoImpl(), SwDoc::SortText(), SwUndoMove::UndoImpl(), and SwUndoSort::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.
|
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.
Referenced by SwXFrame::setPropertyValue().
|
pure virtual |
Split a node at rPos (implemented only for TextNode).
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwXTextTable::attach(), SwEditShell::Copy(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwWW8ImplReader::CoreLoad(), SwUnoCursorHelper::DocInsertStringSplitCR(), SwEditShell::InsertDDETable(), SwDoc::InsertSwSection(), SwEditShell::InsertTable(), lcl_FormatPostIt(), SwNodes::MoveRange(), SwDoc::NoNum(), SwDOCXReader::Read(), SwUndoSplitNode::RedoImpl(), SwUndoSplitNode::RepeatImpl(), SwXMLImport::startDocument(), SwUndoDelete::SwUndoDelete(), SwDoc::TextToTable(), SwUndoDelete::UndoImpl(), and SwUndoReplace::Impl::UndoImpl().
|
pure virtual |
change text to Upper/Lower/Hiragana/Katakana/...
Implemented in sw::DocumentContentOperationsManager.
Referenced by SwUndoTransliterate::DoTransliterate().