LibreOffice Module sw (master) 1
Classes | Typedefs | Enumerations | Functions | Variables
pam.hxx File Reference
#include <sal/types.h>
#include "ring.hxx"
#include "contentindex.hxx"
#include "ndindex.hxx"
#include "swdllapi.h"
#include "nodeoffset.hxx"
#include <iostream>
#include <utility>
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 class  SwComparePosition {
  Before ,
  Behind ,
  Inside ,
  Outside ,
  Equal ,
  OverlapBefore ,
  OverlapBehind ,
  CollideStart ,
  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 SwNode &, const SwNode &, 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

◆ SwGoInDoc

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

Definition at line 172 of file pam.hxx.

Enumeration Type Documentation

◆ SwComparePosition

enum class 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 110 of file pam.hxx.

Function Documentation

◆ CheckNodesRange()

bool CheckNodesRange ( const SwNode rStt,
const SwNode 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 349 of file pam.cxx.

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

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

◆ ComparePosition()

template<typename T >
SwComparePosition ComparePosition ( const T &  rStt1,
const T &  rEnd1,
const T &  rStt2,
const T &  rEnd2 
)

◆ GoInContent()

SW_DLLPUBLIC bool GoInContent ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInContentCells()

bool GoInContentCells ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInContentCellsSkipHidden()

bool GoInContentCellsSkipHidden ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInContentSkipHidden()

bool GoInContentSkipHidden ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInDoc()

SW_DLLPUBLIC bool GoInDoc ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInNode()

SW_DLLPUBLIC bool GoInNode ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

Definition at line 1194 of file pam.cxx.

References fnMoveForward, SwMoveFnCollection::fnPos, SwPaM::GetPoint(), GetSttOrEnd(), and SwPosition::SetContent().

Referenced by SwEditShell::AutoFormatBySplitNode(), SwHTMLParser::Continue(), SwXText::Impl::ConvertCell(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwXTextFrame::createEnumeration(), SwXRedlineText::createEnumeration(), SwXRedline::createEnumeration(), SwXCell::createEnumeration(), SwXHeadFootText::createEnumeration(), SwXFootnote::createEnumeration(), XMLRedlineImportHelper::CreateRedlineTextSection(), wwSectionManager::CreateSep(), SwXHeadFootText::CreateTextCursor(), SwXTextFrame::createXTextCursor(), SwXRedlineText::createXTextCursor(), SwXRedline::createXTextCursor(), SwXCell::createXTextCursor(), SwXFootnote::createXTextCursor(), SwXHeadFootText::createXTextCursorByRange(), sw::DocumentContentOperationsManager::DelFullPara(), SwDoc::DelTable(), 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(), SwUndoDelete::RedoImpl(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwAccessibleTable::selectAccessibleChild(), SwCursorShell::SelTableBox(), SwXTextTable::setPropertyValue(), SwDoc::SetRubyList(), SwDoc::SplitDoc(), SwHTMLParser::StripTrailingPara(), SwUndoDelete::SwUndoDelete(), SwXTextTableCursor::SwXTextTableCursor(), SwUndoInserts::UndoImpl(), SwCursor::UpDown(), and SwASCWriter::WriteStream().

◆ GoInSection()

bool GoInSection ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

Definition at line 1188 of file pam.cxx.

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

Referenced by IMPL_LINK(), and lcl_CpyBox().

◆ operator<<() [1/2]

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

Definition at line 1398 of file pam.cxx.

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

◆ operator<<() [2/2]

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

Definition at line 284 of file pam.cxx.

References position().

Variable Documentation

◆ fnMoveBackward

SW_DLLPUBLIC SwMoveFnCollection const& fnMoveBackward
extern

Definition at line 60 of file paminit.cxx.

Referenced by sw::DocumentContentOperationsManager::AppendTextNode(), 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::createParagraphEnumeration(), wwSectionManager::CreateSep(), SwXBodyText::CreateTextCursor(), SwXTextRange::DeleteAndInsert(), SwFEShell::DeleteRow(), SwEditShell::DeleteSel(), SwDoc::DeleteTOX(), sw::DocumentContentOperationsManager::DelFullPara(), SwDoc::DelTable(), SwHTMLParser::EndAttr(), SwXMLImport::endDocument(), SwTextShell::ExecField(), SwTextShell::Execute(), DocxExportFilter::exportDocument(), RtfExportFilter::filter(), SwCursor::FindAll(), SwCursorShell::FindValidContentNode(), SwXText::Impl::finishOrAppendParagraph(), SwXDocumentIndex::getAnchor(), SwXTextSection::getAnchor(), SwServerObject::GetData(), SwXTextRange::getEnd(), SwXTextRange::GetPositions(), GoPrevPara(), GotoCurrRegionAndSkip(), GotoCurrTable(), GotoNextTable(), GotoPrevTable(), SwXTextCursor::gotoStart(), IMPL_LINK(), SwHTMLParser::InsertComment(), SwFieldMgr::InsertField(), SwHTMLParser::InsertHorzRule(), SwTextShell::InsertHyperlink(), SwHTMLParser::InsertImage(), SwBaseShell::InsertRegionDialog(), wwSectionManager::InsertSegments(), SwNodes::InsertTextSection(), IsEmptyBox(), lcl_FindSelection(), SwCursor::LeftRight(), SwCursor::MakeFindRange(), SwCursorShell::MakeOutlineSel(), SwImpBlocks::MakePaM(), ModelToViewHelper::ModelToViewHelper(), SwUndoSaveContent::MoveFromUndoNds(), SwEditShell::MoveNumParas(), SwCursorShell::MoveOutOfTable(), SwDoc::MoveParagraphImpl(), SwUndoSaveContent::MovePtBackward(), sw::DocumentContentOperationsManager::MoveRange(), SwHTMLParser::NewDivision(), SwHTMLParser::NewMultiCol(), SwWW8ImplReader::Read_F_Tox(), SwUndoAttr::redoAttribute(), SwUndoDelete::RedoImpl(), SwUndoInsert::RedoImpl(), SwUndoSplitNode::RedoImpl(), SwUndo::RemoveIdxFromRange(), SwUndoInsert::RepeatImpl(), sw::DocumentContentOperationsManager::ReplaceRange(), sw::DocumentContentOperationsManager::ReplaceRangeImpl(), SwCursorShell::SelTable(), SwCursorShell::SelTableBox(), SwCursorShell::SelTableRowOrCol(), SwHTMLParser::SetAnchorAndAdjustment(), SwHTMLParser::SetAttr_(), SwUndRng::SetPaM(), SwXShape::setPropertyValue(), SwHTMLParser::SplitAttrTab(), SwDoc::SplitDoc(), SwXMLImport::startDocument(), SwWW8ImplReader::StopAnlToRestart(), SwHTMLParser::StripTrailingPara(), SwCursor::SttEndDoc(), SwUndoInserts::UndoImpl(), SwUndoInsert::UndoImpl(), SwUndoTextToTable::UndoImpl(), SwUndoTableToText::UndoImpl(), SwUndoSplitTable::UndoImpl(), SwTOXBaseSection::Update(), SwCursorShell::UpdateCursor(), SwTextRefMark::UpdateFieldContent(), SwDoc::UpdatePagesForPrintingWithPostItData(), SwCursor::UpDown(), and SwWriter::Write().

◆ fnMoveForward

SW_DLLPUBLIC SwMoveFnCollection const& fnMoveForward
extern

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

Definition at line 61 of file paminit.cxx.

Referenced by SwEditShell::AutoFormatBySplitNode(), SwHTMLParser::Continue(), SwXText::convertToTextFrame(), SwFormatClipboard::Copy(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwEditShell::CopySelToDoc(), SwXTextFrame::createEnumeration(), SwXRedlineText::createEnumeration(), SwXRedline::createEnumeration(), SwXCell::createEnumeration(), SwXHeadFootText::createEnumeration(), SwXFootnote::createEnumeration(), XMLRedlineImportHelper::CreateRedlineTextSection(), SwXHeadFootText::CreateTextCursor(), SwXTextFrame::createXTextCursor(), SwXRedlineText::createXTextCursor(), SwXRedline::createXTextCursor(), SwXCell::createXTextCursor(), SwXFootnote::createXTextCursor(), SwXHeadFootText::createXTextCursorByRange(), SwXTextRange::DeleteAndInsert(), SwEditShell::DeleteSel(), sw::DocumentContentOperationsManager::DelFullPara(), SwDoc::DelTable(), DoSearch(), SwAutoFormat::DoTable(), SwHTMLParser::EndAttr(), SwHTMLParser::EndSection(), SwTextShell::ExecField(), SwTextShell::Execute(), SwChartDataSequence::ExtendTo(), SwDoc::FillRubyList(), sw::FindAttrImpl(), FindAttrsImpl(), sw::FindFormatImpl(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), SwXDocumentIndex::getAnchor(), SwXTextSection::getAnchor(), SwXCellRange::getCellRangeByPosition(), SwServerObject::GetData(), GetFormatAndCreateCursorFromRangeRep(), GetNode(), SwXTextRange::GetPositions(), SwXTextTable::getPropertyValue(), SwUnoCursorHelper::GetSelectableFromAny(), SwXTextRange::getStart(), 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(), SwFieldMgr::InsertField(), SwHTMLParser::InsertHorzRule(), SwHTMLParser::InsertImage(), IsEmptyBox(), SwContentAtPos::IsInRTLText(), lcl_CpyBox(), lcl_EnsureValidPam(), lcl_SearchAttr(), SwCursor::LeftRight(), SwTableCursor::MakeBoxSels(), SwCursor::MakeFindRange(), SwImpBlocks::MakePaM(), SwCursorShell::MoveOutOfTable(), SwCursor::MovePara(), SwUndoSaveContent::MovePtForward(), sw::DocumentContentOperationsManager::MoveRange(), SwUndoDelete::RedoImpl(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwUndo::RemoveIdxFromRange(), SwUndoDelete::RepeatImpl(), SwUndoTableToText::RepeatImpl(), SwAccessibleTable::selectAccessibleChild(), SwCursorShell::SelTable(), SwCursorShell::SelTableBox(), SwHTMLParser::SetAnchorAndAdjustment(), SwUndRng::SetPaM(), SwXTextTable::setPropertyValue(), SwDoc::SetRubyList(), SwHTMLParser::SplitAttrTab(), SwDoc::SplitDoc(), SwCursor::SttEndDoc(), SwFormatField::SwClientNotify(), SwUndoDelete::SwUndoDelete(), SwXTextTableCursor::SwXTextTableCursor(), SwEditShell::TableToText(), SwUndoInserts::UndoImpl(), SwUndoTableToText::UndoImpl(), SwTOXBaseSection::Update(), SwCursorShell::UpdateCursor(), SwEditShell::UpdateOneField(), SwDoc::UpdatePagesForPrintingWithPostItData(), SwWriter::Write(), and SwASCWriter::WriteStream().