LibreOffice Module sw (master)  1
Classes | Typedefs | Enumerations | Functions | Variables
pam.hxx File Reference
#include <sal/types.h>
#include "ring.hxx"
#include "index.hxx"
#include "ndindex.hxx"
#include "swdllapi.h"
#include <iostream>
Include dependency graph for pam.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SwPosition
 Marks a position in the document model. More...
 
class  SwPaM
 PaM is Point and Mark: a selection of the document model. More...
 

Typedefs

using SwGoInDoc = auto(*)(SwPaM &rPam, SwMoveFnCollection const &fnMove) -> bool
 

Enumerations

enum  SwComparePosition {
  SwComparePosition::Before,
  SwComparePosition::Behind,
  SwComparePosition::Inside,
  SwComparePosition::Outside,
  SwComparePosition::Equal,
  SwComparePosition::OverlapBefore,
  SwComparePosition::OverlapBehind,
  SwComparePosition::CollideStart,
  SwComparePosition::CollideEnd
}
 

Functions

SW_DLLPUBLIC std::ostream & operator<< (std::ostream &s, const SwPosition &position)
 
template<typename T >
SwComparePosition ComparePosition (const T &rStt1, const T &rEnd1, const T &rStt2, const T &rEnd2)
 
SW_DLLPUBLIC bool GoInDoc (SwPaM &, SwMoveFnCollection const &)
 
bool GoInSection (SwPaM &, SwMoveFnCollection const &)
 
SW_DLLPUBLIC bool GoInNode (SwPaM &, SwMoveFnCollection const &)
 
SW_DLLPUBLIC bool GoInContent (SwPaM &, SwMoveFnCollection const &)
 
bool GoInContentCells (SwPaM &, SwMoveFnCollection const &)
 
bool GoInContentSkipHidden (SwPaM &, SwMoveFnCollection const &)
 
bool GoInContentCellsSkipHidden (SwPaM &, SwMoveFnCollection const &)
 
SW_DLLPUBLIC std::ostream & operator<< (std::ostream &s, const SwPaM &pam)
 
bool CheckNodesRange (const SwNodeIndex &, const SwNodeIndex &, bool bChkSection)
 Check if the given range is inside one of the defined top-level sections. More...
 

Variables

SW_DLLPUBLIC SwMoveFnCollection const & fnMoveForward
 SwPam::Move()/Find() default argument. More...
 
SW_DLLPUBLIC SwMoveFnCollection const & fnMoveBackward
 

Typedef Documentation

using SwGoInDoc = auto (*)(SwPaM& rPam, SwMoveFnCollection const & fnMove) -> bool

Definition at line 126 of file pam.hxx.

Enumeration Type Documentation

enum SwComparePosition
strong
Enumerator
Before 

Pos1 before Pos2.

Behind 

Pos1 behind Pos2.

Inside 

Pos1 completely contained in Pos2.

Outside 

Pos2 completely contained in Pos1.

Equal 

Pos1 is as large as Pos2.

OverlapBefore 

Pos1 overlaps Pos2 at the beginning.

OverlapBehind 

Pos1 overlaps Pos2 at the end.

CollideStart 

Pos1 start touches at Pos2 end.

CollideEnd 

Pos1 end touches at Pos2 start.

Definition at line 64 of file pam.hxx.

Function Documentation

bool CheckNodesRange ( const SwNodeIndex rStt,
const SwNodeIndex rEnd,
bool  bChkSection 
)

Check if the given range is inside one of the defined top-level sections.

The top-level sections are Content, AutoText, PostIts, Inserts, and Redlines.

Parameters
bChkSectionif true, also check that the given range is inside a single second-level section inside any of the top-level sections, except for the Content section.
Returns
<true> if valid range

Definition at line 250 of file pam.cxx.

References SwNodes::GetEndOfAutotext(), SwNodes::GetEndOfContent(), SwNodes::GetEndOfInserts(), SwNodes::GetEndOfPostIts(), SwNodes::GetEndOfRedlines(), SwNodeIndex::GetIndex(), SwNodeIndex::GetNodes(), lcl_ChkOneRange(), and lcl_TstIdx().

Referenced by SwCursorShell::Combine(), SwNodes::Delete(), SwSectionNode::DelFrames(), SwNodes::FindPrvNxtFrameNode(), GoNextNds(), GoPreviousNds(), XMLRedlineImportHelper::InsertIntoDocument(), SwCursor::IsSelOvr(), SwTableCursor::IsSelOvrCheck(), lcl_CheckEmptyLayFrame(), SwFltStackEntry::MakeRegion(), SwNodes::SectionDown(), SwNodes::SectionUp(), SwCursorShell::SetCursor(), sw::mark::SaveBookmark::SetInDoc(), and SwCursor::UpDown().

template<typename T >
SwComparePosition ComparePosition ( const T &  rStt1,
const T &  rEnd1,
const T &  rStt2,
const T &  rEnd2 
)
SW_DLLPUBLIC bool GoInContent ( SwPaM ,
SwMoveFnCollection const &   
)
bool GoInContentCells ( SwPaM ,
SwMoveFnCollection const &   
)
bool GoInContentCellsSkipHidden ( SwPaM ,
SwMoveFnCollection const &   
)
bool GoInContentSkipHidden ( SwPaM ,
SwMoveFnCollection const &   
)
SW_DLLPUBLIC bool GoInDoc ( SwPaM ,
SwMoveFnCollection const &   
)
SW_DLLPUBLIC bool GoInNode ( SwPaM ,
SwMoveFnCollection const &   
)

Definition at line 906 of file pam.cxx.

References SwIndex::Assign(), fnMoveForward, SwMoveFnCollection::fnNds, SwPaM::GetPoint(), GetSttOrEnd(), SwPosition::nContent, and SwPosition::nNode.

Referenced by SwEditShell::AutoFormatBySplitNode(), SwHTMLParser::Continue(), SwXText::Impl::ConvertCell(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwXRedlineText::createEnumeration(), SwXRedline::createEnumeration(), SwXFootnote::createEnumeration(), SwXCell::createEnumeration(), SwXHeadFootText::createEnumeration(), SwXTextFrame::createEnumeration(), XMLRedlineImportHelper::CreateRedlineTextSection(), wwSectionManager::CreateSep(), SwXRedlineText::createTextCursor(), SwXRedline::createTextCursor(), SwXCell::createTextCursor(), SwXFootnote::createTextCursor(), SwXHeadFootText::createTextCursor(), SwXTextFrame::createTextCursor(), SwXHeadFootText::createTextCursorByRange(), SwDoc::DeleteRowCol(), sw::DocumentContentOperationsManager::DelFullPara(), SwChartDataSequence::ExtendTo(), SwDoc::FillRubyList(), SwXText::Impl::finishOrAppendParagraph(), SwXCellRange::getCellRangeByPosition(), GetFormatAndCreateCursorFromRangeRep(), SwXTextTable::getPropertyValue(), SwUnoCursorHelper::GetSelectableFromAny(), GoInContent(), GoInContentCells(), GoInContentCellsSkipHidden(), GoInContentSkipHidden(), GoNextPara(), GoPrevPara(), SwXTableRows::insertByIndex(), SwXTableColumns::insertByIndex(), SwContentAtPos::IsInRTLText(), SwCursorShell::MakeOutlineSel(), SwEditShell::MoveNumParas(), SwFEShell::Paste(), SwUndoDelete::RedoImpl(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwAccessibleTable::selectAccessibleChild(), SwCursorShell::SelTableBox(), SwXTextTable::setPropertyValue(), SwDoc::SetRubyList(), SwDoc::SplitDoc(), SwHTMLParser::StripTrailingPara(), SwUndoDelete::SwUndoDelete(), SwXTextTableCursor::SwXTextTableCursor(), SwCursor::UpDown(), and SwASCWriter::WriteStream().

bool GoInSection ( SwPaM ,
SwMoveFnCollection const &   
)

Definition at line 900 of file pam.cxx.

References SwMoveFnCollection::fnSections, and SwPaM::GetPoint().

Referenced by IMPL_LINK(), and lcl_CpyBox().

SW_DLLPUBLIC std::ostream& operator<< ( std::ostream &  s,
const SwPosition position 
)
SW_DLLPUBLIC std::ostream& operator<< ( std::ostream &  s,
const SwPaM pam 
)

Definition at line 1106 of file pam.cxx.

References SwPaM::GetMark(), SwPaM::GetPoint(), and SwPaM::HasMark().

Variable Documentation

SW_DLLPUBLIC SwMoveFnCollection const& fnMoveBackward

Definition at line 58 of file paminit.cxx.

Referenced by sw::DocumentContentOperationsManager::AppendTextNode(), SwXFrame::attachToRange(), SwEditShell::AutoFormatBySplitNode(), SwHTMLParser::BuildTableCell(), SwHTMLParser::CallParser(), SwDoc::ClearLineNumAttrs(), SwHTMLParser::Continue(), SwHHCWrapper::Convert(), SwXText::Impl::ConvertCell(), SwDoc::ConvertFieldsToText(), SwFormatClipboard::Copy(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwWW8ImplReader::CoreLoad(), SwXBodyText::createEnumeration(), wwSectionManager::CreateSep(), SwXBodyText::CreateTextCursor(), SwDoc::DeleteRowCol(), SwEditShell::DeleteSel(), SwDoc::DeleteTOX(), sw::DocumentContentOperationsManager::DelFullPara(), SwHTMLParser::EndAttr(), SwXMLImport::endDocument(), DocxExportFilter::exportDocument(), RtfExportFilter::filter(), SwCursor::FindAll(), SwCursorShell::FindValidContentNode(), SwXText::Impl::finishOrAppendParagraph(), SwXDocumentIndex::getAnchor(), SwXTextSection::getAnchor(), SwServerObject::GetData(), GoPrevPara(), GotoCurrRegionAndSkip(), GotoCurrTable(), GotoNextTable(), GotoPrevTable(), SwXTextCursor::gotoStart(), IMPL_LINK(), SwHTMLParser::InsertComment(), SwHTMLParser::InsertHorzRule(), SwHTMLParser::InsertImage(), wwSectionManager::InsertSegments(), IsEmptyBox(), lcl_FindSelection(), SwCursor::LeftRight(), SwCursor::MakeFindRange(), SwCursorShell::MakeOutlineSel(), SwImpBlocks::MakePaM(), SwUndoSaveContent::MoveFromUndoNds(), SwEditShell::MoveNumParas(), SwDoc::MoveParagraphImpl(), SwUndoSaveContent::MovePtBackward(), sw::DocumentContentOperationsManager::MoveRange(), SwHTMLParser::NewDivision(), SwHTMLParser::NewMultiCol(), SwFEShell::Paste(), SwWW8ImplReader::Read_F_Macro(), SwWW8ImplReader::Read_F_Tox(), SwUndoSplitNode::RedoImpl(), SwUndoAttr::RedoImpl(), SwUndoInsert::RedoImpl(), SwUndoDelete::RedoImpl(), SwUndo::RemoveIdxFromRange(), SwUndoInsert::RepeatImpl(), sw::DocumentContentOperationsManager::ReplaceRange(), sw::DocumentContentOperationsManager::ReplaceRangeImpl(), SwCursorShell::SelTable(), SwCursorShell::SelTableBox(), SwCursorShell::SelTableRowOrCol(), SwHTMLParser::SetAnchorAndAdjustment(), SwHTMLParser::SetAttr_(), SwUndRng::SetPaM(), SwXFrame::setPropertyValue(), SwXShape::setPropertyValue(), SwHTMLParser::SplitAttrTab(), SwDoc::SplitDoc(), sw::DocumentContentOperationsManager::SplitNode(), SwXMLImport::startDocument(), SwWW8ImplReader::StopAnlToRestart(), SwHTMLParser::StripTrailingPara(), SwCursor::SttEndDoc(), SwUndoInsert::UndoImpl(), SwUndoTextToTable::UndoImpl(), SwUndoTableToText::UndoImpl(), SwUndoInserts::UndoImpl(), SwUndoSplitTable::UndoImpl(), SwTOXBaseSection::Update(), SwCursorShell::UpdateCursor(), SwDoc::UpdatePagesForPrintingWithPostItData(), SwCursor::UpDown(), and SwWriter::Write().

SW_DLLPUBLIC SwMoveFnCollection const& fnMoveForward

SwPam::Move()/Find() default argument.

Definition at line 59 of file paminit.cxx.

Referenced by SwEditShell::AutoFormatBySplitNode(), SwHTMLParser::Continue(), SwXText::convertToTextFrame(), SwFormatClipboard::Copy(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwEditShell::CopySelToDoc(), SwXRedlineText::createEnumeration(), SwXRedline::createEnumeration(), SwXFootnote::createEnumeration(), SwXCell::createEnumeration(), SwXHeadFootText::createEnumeration(), SwXTextFrame::createEnumeration(), XMLRedlineImportHelper::CreateRedlineTextSection(), SwXRedlineText::createTextCursor(), SwXRedline::createTextCursor(), SwXCell::createTextCursor(), SwXFootnote::createTextCursor(), SwXHeadFootText::createTextCursor(), SwXTextFrame::createTextCursor(), SwXHeadFootText::createTextCursorByRange(), SwDoc::DeleteRowCol(), SwEditShell::DeleteSel(), sw::DocumentContentOperationsManager::DelFullPara(), DoSearch(), SwAutoFormat::DoTable(), SwHTMLParser::EndAttr(), SwHTMLParser::EndSection(), SwChartDataSequence::ExtendTo(), SwDoc::FillRubyList(), sw::FindAttrImpl(), FindAttrsImpl(), sw::FindFormatImpl(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), SwXDocumentIndex::getAnchor(), SwXTextSection::getAnchor(), SwXCellRange::getCellRangeByPosition(), SwServerObject::GetData(), GetFormatAndCreateCursorFromRangeRep(), GetNode(), SwXTextTable::getPropertyValue(), SwUnoCursorHelper::GetSelectableFromAny(), GoCurrPara(), GoCurrSection(), GoInNode(), GoNextPara(), GoPrevPara(), SwXTextCursor::gotoEnd(), GotoNextRegion(), GotoNextTable(), GotoPrevRegion(), GotoPrevTable(), SwCursor::GotoRegion(), SwCursor::GotoTable(), SwCursor::GotoTableBox(), IMPL_LINK(), SwXTableRows::insertByIndex(), SwXTableColumns::insertByIndex(), SwHTMLParser::InsertComment(), SwHTMLParser::InsertHorzRule(), SwHTMLParser::InsertImage(), IsEmptyBox(), SwContentAtPos::IsInRTLText(), lcl_CpyBox(), lcl_EnsureValidPam(), lcl_SearchAttr(), SwCursor::LeftRight(), SwTableCursor::MakeBoxSels(), SwCursor::MakeFindRange(), SwImpBlocks::MakePaM(), SwCursor::MovePara(), SwUndoSaveContent::MovePtForward(), sw::DocumentContentOperationsManager::MoveRange(), SwFEShell::Paste(), SwUndoDelete::RedoImpl(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwUndo::RemoveIdxFromRange(), SwUndoDelete::RepeatImpl(), SwUndoTableToText::RepeatImpl(), SwAccessibleTable::selectAccessibleChild(), SwCursorShell::SelTable(), SwCursorShell::SelTableBox(), SwCursorShell::SelTableRowOrCol(), SwHTMLParser::SetAnchorAndAdjustment(), SwUndRng::SetPaM(), SwXTextTable::setPropertyValue(), SwDoc::SetRubyList(), SwHTMLParser::SplitAttrTab(), SwDoc::SplitDoc(), SwCursor::SttEndDoc(), SwFormatField::SwClientNotify(), SwUndoDelete::SwUndoDelete(), SwXTextTableCursor::SwXTextTableCursor(), SwEditShell::TableToText(), SwUndoTableToText::UndoImpl(), SwTOXBaseSection::Update(), SwCursorShell::UpdateCursor(), SwEditShell::UpdateOneField(), SwDoc::UpdatePagesForPrintingWithPostItData(), SwWriter::Write(), and SwASCWriter::WriteStream().