LibreOffice Module sw (master)  1
Public Member Functions | Protected Member Functions | List of all members
IDocumentContentOperations Class Referenceabstract

Text operation/manipulation interface. More...

#include <IDocumentContentOperations.hxx>

Inheritance diagram for IDocumentContentOperations:
[legend]

Public Member Functions

virtual bool CopyRange (SwPaM &rPam, SwPosition &rPos, const bool bCopyAll, bool bCheckPos) 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 SwFlyFrameFormatInsertGraphic (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 SwFlyFrameFormatInsertGraphicObject (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 SwDrawFrameFormatInsertDrawObj (const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
 Insert a DrawObject. More...
 
virtual SwFlyFrameFormatInsertEmbObject (const SwPaM &rRg, const svt::EmbeddedObjectRef &xObj, const SfxItemSet *pFlyAttrSet)=0
 Insert OLE-objects. More...
 
virtual SwFlyFrameFormatInsertOLE (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)=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 ()
 

Detailed Description

Text operation/manipulation interface.

Definition at line 73 of file IDocumentContentOperations.hxx.

Constructor & Destructor Documentation

virtual IDocumentContentOperations::~IDocumentContentOperations ( )
inlineprotectedvirtual

Definition at line 229 of file IDocumentContentOperations.hxx.

Member Function Documentation

virtual bool IDocumentContentOperations::AppendTextNode ( SwPosition rPos)
pure virtual
virtual bool IDocumentContentOperations::CopyRange ( SwPaM rPam,
SwPosition rPos,
const bool  bCopyAll,
bool  bCheckPos 
) const
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!

Warning
The range has to include at least two nodes or has to be a SwDoc::IsColumnSelection, because the rPam is treated [mark, point[.

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:

SwNodeIndex aSourceIdx( rSource.GetNodes().GetEndOfExtras(), 1 );

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.

Parameters
rPamThe source node range to copy
rPosThe target copy destination
bCheckPosIf 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(), SwCompareLine::ChangesInLine(), SwAutoCorrDoc::ChgAutoCorrWord(), SwEditShell::CopySelToDoc(), SwRangeRedline::CopyToSection(), SwIntrnlSectRefLink::DataChanged(), SwXMLTableCellContext_Impl::EndElement(), SwDoc::InsertGlossary(), SwDOCXReader::MakeEntries(), WW8Glossary::MakeEntries(), SwDoc::MakeFlyAndMove(), SwDoc::MoveParagraphImpl(), SwFEShell::Paste(), SwUndoInserts::RepeatImpl(), and SwEditShell::SaveGlossaryDoc().

virtual bool IDocumentContentOperations::DeleteAndJoin ( SwPaM ,
const bool  bForceJoinNext = false 
)
pure virtual
virtual void IDocumentContentOperations::DeleteRange ( SwPaM )
pure virtual
virtual void IDocumentContentOperations::DeleteSection ( SwNode pNode)
pure virtual
virtual bool IDocumentContentOperations::DelFullPara ( SwPaM )
pure virtual
virtual SwDrawFrameFormat* IDocumentContentOperations::InsertDrawObj ( const SwPaM rRg,
SdrObject rDrawObj,
const SfxItemSet rFlyAttrSet 
)
pure virtual
virtual SwFlyFrameFormat* IDocumentContentOperations::InsertEmbObject ( const SwPaM rRg,
const svt::EmbeddedObjectRef xObj,
const SfxItemSet pFlyAttrSet 
)
pure virtual
virtual SwFlyFrameFormat* IDocumentContentOperations::InsertGraphic ( const SwPaM rRg,
const OUString &  rGrfName,
const OUString &  rFltName,
const Graphic pGraphic,
const SfxItemSet pFlyAttrSet,
const SfxItemSet pGrfAttrSet,
SwFrameFormat  
)
pure virtual
virtual SwFlyFrameFormat* IDocumentContentOperations::InsertGraphicObject ( const SwPaM rRg,
const GraphicObject rGrfObj,
const SfxItemSet pFlyAttrSet,
const SfxItemSet pGrfAttrSet 
)
pure virtual
virtual void IDocumentContentOperations::InsertItemSet ( const SwPaM rRg,
const SfxItemSet ,
const SetAttrMode  nFlags = SetAttrMode::DEFAULT,
SwRootFrame const *  pLayout = nullptr 
)
pure virtual
virtual SwFlyFrameFormat* IDocumentContentOperations::InsertOLE ( const SwPaM rRg,
const OUString &  rObjName,
sal_Int64  nAspect,
const SfxItemSet pFlyAttrSet,
const SfxItemSet pGrfAttrSet 
)
pure virtual
virtual bool IDocumentContentOperations::InsertPoolItem ( const SwPaM rRg,
const SfxPoolItem ,
const SetAttrMode  nFlags = SetAttrMode::DEFAULT,
SwRootFrame const *  pLayout = nullptr,
bool  bExpandCharToPara = false 
)
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(), GiveNodePageDesc(), SwEditShell::Insert(), SwXReferenceMark::Impl::InsertRefMark(), wwSectionManager::InsertSegments(), lcl_FormatPostIt(), lcl_ImportTox(), lcl_SetAPageOffset(), HTMLReader::Read(), SwWW8ImplReader::Read_And(), SwWW8ImplReader::Read_F_DBField(), SwWW8ImplReader::Read_F_DBNext(), SwWW8ImplReader::Read_F_DBNum(), SwWW8ImplReader::Read_F_Equation(), SwWW8ImplReader::ReadChar(), SwASCIIParser::ReadChars(), SwWW8ImplReader::ReadText(), SwRedlineExtraData_Format::Reject(), SwFltControlStack::SetAttrInDoc(), SwWW8FltControlStack::SetAttrInDoc(), SwWW8FltRefStack::SetAttrInDoc(), SwEditShell::SetAttrItem(), SwDoc::SetCounted(), SwDoc::SetNumRule(), SwDoc::SetRubyList(), SwCursorShell::SetShadowCursorPos(), SwTextBoxHelper::syncProperty(), and SwExtTextInput::~SwExtTextInput().

virtual bool IDocumentContentOperations::InsertString ( const SwPaM rRg,
const OUString &  ,
const SwInsertFlags  nInsertMode = SwInsertFlags::EMPTYEXPAND 
)
pure virtual
virtual bool IDocumentContentOperations::MoveAndJoin ( SwPaM ,
SwPosition  
)
pure virtual

Move a range.

Implemented in sw::DocumentContentOperationsManager.

Referenced by SwRangeRedline::MoveToSection().

virtual bool IDocumentContentOperations::MoveNodeRange ( SwNodeRange ,
SwNodeIndex ,
SwMoveFlags   
)
pure virtual
virtual bool IDocumentContentOperations::MoveRange ( SwPaM ,
SwPosition ,
SwMoveFlags   
)
pure virtual
virtual bool IDocumentContentOperations::Overwrite ( const SwPaM rRg,
const OUString &  rStr 
)
pure virtual

Overwrite string in an existing text node.

Implemented in sw::DocumentContentOperationsManager.

Referenced by SwUndoOverwrite::RepeatImpl(), SwAutoCorrDoc::ReplaceRange(), and SwExtTextInput::~SwExtTextInput().

virtual void IDocumentContentOperations::RemoveLeadingWhiteSpace ( const SwPosition rPos)
pure virtual

Removes any leading white space from the paragraph.

Implemented in sw::DocumentContentOperationsManager.

virtual bool IDocumentContentOperations::ReplaceRange ( SwPaM rPam,
const OUString &  rNewStr,
const bool  bRegExReplace 
)
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(), SwUndoReplace::Impl::RedoImpl(), sw::ReplaceImpl(), SwAutoCorrDoc::ReplaceRange(), and SwDoc::SetRubyList().

virtual void IDocumentContentOperations::ReRead ( SwPaM ,
const OUString &  rGrfName,
const OUString &  rFltName,
const Graphic pGraphic 
)
pure virtual

Transpose graphic (with undo)

Implemented in sw::DocumentContentOperationsManager.

Referenced by SwXFrame::setPropertyValue().

virtual bool IDocumentContentOperations::SplitNode ( const SwPosition rPos,
bool  bChkTableStart 
)
pure virtual
virtual void IDocumentContentOperations::TransliterateText ( const SwPaM rPaM,
utl::TransliterationWrapper  
)
pure virtual

change text to Upper/Lower/Hiragana/Katakana/...

Implemented in sw::DocumentContentOperationsManager.

Referenced by SwUndoTransliterate::DoTransliterate().


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