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


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


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 SwNodeIndex &rStt, const SwNodeIndex &rEnd, bool bChkSection)
 Check if the given range is inside one of the defined top-level sections. More...
bool GoNext (SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
bool GoPrevious (SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
SwContentNodeGoNextNds (SwNodeIndex *pIdx, bool bChk)
SwContentNodeGoPreviousNds (SwNodeIndex *pIdx, bool bChk)
std::unique_ptr< SwPaMsw::MakeRegion (SwMoveFnCollection const &fnMove, const SwPaM &rOrigRg)
 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 GoEndSection (SwPosition *pPos)
 go to the end of the current base section More...
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 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.

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.
<true> if valid range

Definition at line 258 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(), sw::FindNeighbourFrameForNode(), 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().

◆ 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.

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

Definition at line 847 of file pam.cxx.

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

Referenced by SwFlyFreeFrame::CheckClip(), SwFlyFrame::ChgSize(), SwPaM::DeleteMark(), SwFEShell::DeleteRow(), DelFlyInRange(), SwBreakDashedLine::execute(), SwFEShell::FindAnchorPos(), sw::FindAttrImpl(), FindAttrsImpl(), SwFEShell::FindFlyFrame(), sw::FindFormatImpl(), SwNode::FindPageDesc(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), sw::FrameContainsNode(), SwFrame::GetAttrSet(), SwFEShell::GetBestObject(), GetBorderCacheOwner(), SwEditShell::GetCntType(), SwPaM::GetContentNode(), SwFlyFrame::GetContour(), SwAccessibleEmbeddedObject::getExtendedAttributes(), SwFEShell::GetGrfAtPos(), SwFrameFormat::GetIMapObject(), SwPageFrame::GetModelPositionForViewPoint(), SwFEShell::GetOleRef(), SwFrame::getSdrAllFillAttributesHelper(), SwDoc::GetTextDirection(), SwFEShell::GotoFly(), SwFEShell::ImpEndCreate(), SwContentNotify::ImplDestroy(), SwFrame::IsProtected(), SwFEShell::IsSelObjProtected(), lcl_UpDown(), SwFEShell::RequestObjectResize(), SwFEShell::SelFlyGrabCursor(), SwFlyAtContentFrame::SetAbsPos(), SwTabFrame::Split(), and SwFlyFrame::UpdateAttr_().

◆ GetSttOrEnd()

static sal_Int32 GetSttOrEnd ( bool  bCondition,
const SwContentNode rNd 

Definition at line 55 of file pam.cxx.

References SwContentNode::Len().

Referenced by GetNode(), 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)

◆ 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 985 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(), SwXTextFrame::createEnumeration(), SwXRedlineText::createEnumeration(), SwXRedline::createEnumeration(), SwXCell::createEnumeration(), SwXHeadFootText::createEnumeration(), SwXFootnote::createEnumeration(), XMLRedlineImportHelper::CreateRedlineTextSection(), wwSectionManager::CreateSep(), SwXTextFrame::createTextCursor(), SwXRedlineText::createTextCursor(), SwXRedline::createTextCursor(), SwXCell::createTextCursor(), SwXFootnote::createTextCursor(), SwXHeadFootText::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(), 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 979 of file pam.cxx.

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

Referenced by IMPL_LINK(), and lcl_CpyBox().

◆ GoNext()

bool GoNext ( SwNode pNd,
SwIndex pIdx,
sal_uInt16  nMode 

Definition at line 290 of file pam.cxx.

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

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

◆ GoNextNds()

SwContentNode * GoNextNds ( SwNodeIndex pIdx,
bool  bChk 

Definition at line 304 of file pam.cxx.

References CheckNodesRange(), SwNodeIndex::GetIndex(), SwNodeIndex::GetNodes(), and SwNodes::GoNext().

Referenced by GoCurrPara().

◆ GoNextPara()

bool GoNextPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 

◆ GoPrevious()

bool GoPrevious ( SwNode pNd,
SwIndex pIdx,
sal_uInt16  nMode 

Definition at line 297 of file pam.cxx.

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

Referenced by GoPrevious().

◆ GoPreviousNds()

SwContentNode * GoPreviousNds ( SwNodeIndex pIdx,
bool  bChk 

◆ GoPrevPara()

bool GoPrevPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 

◆ GoStartDoc()

void GoStartDoc ( SwPosition pPos)

◆ GoStartSection()

void GoStartSection ( SwPosition pPos)

◆ lcl_ChkOneRange()

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

◆ lcl_FindEditInReadonlyFrame()

static const SwFrame * lcl_FindEditInReadonlyFrame ( const SwFrame rFrame)

◆ lcl_TstIdx()

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

Definition at line 204 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 1193 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 193 of file pam.cxx.

References position().