LibreOffice Module sw (master) 1
Namespaces | Functions
pam.cxx File Reference
#include <sal/config.h>
#include <tools/gen.hxx>
#include <editeng/protitem.hxx>
#include <officecfg/Office/Common.hxx>
#include <unotools/configmgr.hxx>
#include <cntfrm.hxx>
#include <pagefrm.hxx>
#include <doc.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <docary.hxx>
#include <pam.hxx>
#include <pamtyp.hxx>
#include <txtfrm.hxx>
#include <fmtcntnt.hxx>
#include <frmatr.hxx>
#include <flyfrm.hxx>
#include <fmteiro.hxx>
#include <section.hxx>
#include <sectfrm.hxx>
#include <ndtxt.hxx>
#include <swcrsr.hxx>
#include <IMark.hxx>
#include <DocumentSettingManager.hxx>
#include <hints.hxx>
#include <txatbase.hxx>
#include <osl/diagnose.h>
#include <utility>
#include <xmloff/odffields.hxx>
#include <rtl/ustrbuf.hxx>
#include <editsh.hxx>
#include <textcontentcontrol.hxx>
Include dependency graph for pam.cxx:

Go to the source code of this file.

Namespaces

namespace  sw
 Dialog to specify the properties of date form field.
 

Functions

static sal_Int32 GetSttOrEnd (bool bCondition, const SwContentNode &rNd)
 
std::ostream & operator<< (std::ostream &s, const SwPosition &position)
 
static CHKSECTION lcl_TstIdx (SwNodeOffset nSttIdx, SwNodeOffset nEndIdx, const SwNode &rEndNd)
 
static bool lcl_ChkOneRange (CHKSECTION eSec, bool bChkSections, const SwNode &rBaseEnd, SwNodeOffset nStt, SwNodeOffset nEnd)
 
bool CheckNodesRange (const SwNode &rStt, const SwNode &rEnd, bool bChkSection)
 Check if the given range is inside one of the defined top-level sections. More...
 
bool GoNext (SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
 
bool GoPrevious (SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
 
SwContentNodeGoNextNds (SwNodeIndex *pIdx, bool bChk)
 
SwContentNodeGoPreviousNds (SwNodeIndex *pIdx, bool bChk)
 
SwContentNodeGoNextPos (SwPosition *pIdx, bool bChk)
 
SwContentNodeGoPreviousPos (SwPosition *pIdx, bool bChk)
 
void sw::MakeRegion (SwMoveFnCollection const &fnMove, const SwPaM &rOrigRg, std::optional< SwPaM > &rPam)
 make a new region More...
 
static const SwFramelcl_FindEditInReadonlyFrame (const SwFrame &rFrame)
 
SwContentNodeGetNode (SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
 This function returns the next node in direction of search. More...
 
void GoStartDoc (SwPosition *pPos)
 
void GoEndDoc (SwPosition *pPos)
 
void GoStartSection (SwPosition *pPos)
 
void GoStartOfSection (SwPosition *pPos)
 
void GoEndSection (SwPosition *pPos)
 go to the end of the current base section More...
 
void GoEndOfSection (SwPosition *pPos)
 
bool GoInDoc (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInSection (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInNode (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInContent (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInContentCells (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInContentSkipHidden (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoInContentCellsSkipHidden (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
bool GoPrevPara (SwPaM &rPam, SwMoveFnCollection const &aPosPara)
 
bool GoCurrPara (SwPaM &rPam, SwMoveFnCollection const &aPosPara)
 
bool GoNextPara (SwPaM &rPam, SwMoveFnCollection const &aPosPara)
 
bool GoCurrSection (SwPaM &rPam, SwMoveFnCollection const &fnMove)
 
std::ostream & operator<< (std::ostream &s, const SwPaM &pam)
 

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().

◆ GetNode()

SwContentNode * GetNode ( SwPaM rPam,
bool &  rbFirst,
SwMoveFnCollection const &  fnMove,
bool const  bInReadOnly,
SwRootFrame const *const  i_pLayout 
)

This function returns the next node in direction of search.

If there is no left or the next is out of the area, then a null-pointer is returned.

Parameters
rbFirstIf <true> then first time request. If so than the position of the PaM must not be changed!

Definition at line 1043 of file pam.cxx.

References SwPosition::Assign(), SwPosition::AssignEndIndex(), SwNode::FindSectionNode(), SwMoveFnCollection::fnCmpOp, fnMoveForward, IDocumentLayoutAccess::GetCurrentLayout(), SwPaM::GetDoc(), sw::GetFirstAndLastNode(), SwDoc::getIDocumentLayoutAccess(), SwContentNode::getLayoutFrame(), SwPaM::GetMark(), SwPosition::GetNode(), SwPosition::GetNodes(), SwPaM::GetPoint(), SwPaM::GetPointContentNode(), SwSectionNode::GetSection(), SwNodes::GoNextSection(), SwNodes::GoPrevSection(), SwTextFrame::IsHiddenNow(), SwSection::IsProtect(), SwFrame::IsProtected(), SwFrame::IsTextFrame(), and SwNode::IsTextNode().

Referenced by SwTextNode::AddToList(), SwFlyFreeFrame::CheckClip(), SwFlyFrame::ChgSize(), SwWrtShell::ClickToField(), SwFEShell::DeleteRow(), DelFlyInRange(), SwBreakDashedLine::execute(), SwShellCursor::FillRects(), sw::FindAttrImpl(), FindAttrsImpl(), SwFEShell::FindFlyFrame(), sw::FindFormatImpl(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), sw::FrameContainsNode(), SwFrame::GetAttrSet(), SwFEShell::GetBestObject(), GetBorderCacheOwner(), SwFlyFrame::GetContour(), SwAccessibleEmbeddedObject::getExtendedAttributes(), SwFEShell::GetGrfAtPos(), SwFrameFormat::GetIMapObject(), SwPageFrame::GetModelPositionForViewPoint(), SwEditShell::GetOLEObject(), SwFEShell::GetOleRef(), SwFrame::getSdrAllFillAttributesHelper(), SwWrtShell::GetSelectionType(), SwWrtShell::GoEnd(), SwWrtShell::GoStart(), SwFEShell::GotoFly(), SwCursor::GotoNextFootnoteAnchor(), SwCursor::GotoPrevFootnoteAnchor(), SwEditShell::HandleCorrectionError(), SwEditShell::HasBullet(), SwEditShell::HasNumber(), SwFEShell::ImpEndCreate(), SwContentNotify::ImplDestroy(), SwWrtShell::Insert(), SwWrtShell::InsertField2(), SwPaM::InvalidatePaM(), sw::mark::Bookmark::IsInContent(), SwEditShell::IsNoNum(), SwFrame::IsProtected(), SwFEShell::IsSelObjProtected(), SwTableCursor::IsSelOvrCheck(), lcl_CreatePortions(), lcl_UpDown(), SwCursor::LeftRight(), SwRedlineTable::LOKRedlineNotification(), SwCursorShell::LRMargin(), SwSectionNode::MakeOwnFrames(), SwNodes::MakeTextSection(), SwRangeRedline::MoveFromSection(), SwWrtShell::NumOrBulletOff(), SwWrtShell::NumOrBulletOn(), sw::mark::TextFieldmark::ReplaceContent(), sw::mark::DateFieldmark::ReplaceContent(), SwFEShell::RequestObjectResize(), SwFEShell::SelFlyGrabCursor(), SwFEShell::SelTableRowCol(), SwFlyAtContentFrame::SetAbsPos(), SwDoc::SortText(), SwTabFrame::Split(), SwPaM::SwPaM(), SwTOXBaseSection::Update(), SwFlyFrame::UpdateAttr_(), SwCursorShell::UpdateMarkedListLevel(), and SwCursor::UpDown().

◆ GetSttOrEnd()

static sal_Int32 GetSttOrEnd ( bool  bCondition,
const SwContentNode rNd 
)
static

Definition at line 57 of file pam.cxx.

References SwContentNode::Len().

Referenced by GoCurrPara(), GoCurrSection(), GoInNode(), GoNextPara(), and GoPrevPara().

◆ GoCurrPara()

bool GoCurrPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)

◆ GoCurrSection()

bool GoCurrSection ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoEndDoc()

void GoEndDoc ( SwPosition pPos)

◆ GoEndOfSection()

void GoEndOfSection ( SwPosition pPos)

◆ GoEndSection()

void GoEndSection ( SwPosition pPos)

◆ GoInContent()

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()

bool GoInDoc ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

◆ GoInNode()

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().

◆ GoNext()

bool GoNext ( SwNode pNd,
SwContentIndex pIdx,
SwCursorSkipMode  nMode 
)

Definition at line 381 of file pam.cxx.

References GoNext(), and SwNode::IsContentNode().

Referenced by SwEditShell::GCAttr(), and GoNext().

◆ GoNextNds()

SwContentNode * GoNextNds ( SwNodeIndex pIdx,
bool  bChk 
)

◆ GoNextPara()

bool GoNextPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)

◆ GoNextPos()

SwContentNode * GoNextPos ( SwPosition pIdx,
bool  bChk 
)

◆ GoPrevious()

bool GoPrevious ( SwNode pNd,
SwContentIndex pIdx,
SwCursorSkipMode  nMode 
)

Definition at line 388 of file pam.cxx.

References GoPrevious(), and SwNode::IsContentNode().

Referenced by GoPrevious().

◆ GoPreviousNds()

SwContentNode * GoPreviousNds ( SwNodeIndex pIdx,
bool  bChk 
)

◆ GoPreviousPos()

SwContentNode * GoPreviousPos ( SwPosition pIdx,
bool  bChk 
)

◆ GoPrevPara()

bool GoPrevPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)

◆ GoStartDoc()

void GoStartDoc ( SwPosition pPos)

◆ GoStartOfSection()

void GoStartOfSection ( SwPosition pPos)

◆ GoStartSection()

void GoStartSection ( SwPosition pPos)

◆ lcl_ChkOneRange()

static bool lcl_ChkOneRange ( CHKSECTION  eSec,
bool  bChkSections,
const SwNode rBaseEnd,
SwNodeOffset  nStt,
SwNodeOffset  nEnd 
)
static

◆ lcl_FindEditInReadonlyFrame()

static const SwFrame * lcl_FindEditInReadonlyFrame ( const SwFrame rFrame)
static

◆ lcl_TstIdx()

static CHKSECTION lcl_TstIdx ( SwNodeOffset  nSttIdx,
SwNodeOffset  nEndIdx,
const SwNode rEndNd 
)
static

Definition at line 295 of file pam.cxx.

References SwNode::GetIndex(), and SwNode::StartOfSectionIndex().

Referenced by CheckNodesRange().

◆ operator<<() [1/2]

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]

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

Definition at line 284 of file pam.cxx.

References position().