LibreOffice Module sw (master)  1
Namespaces | Enumerations | Functions
pam.cxx File Reference
#include <sal/config.h>
#include <string_view>
#include <tools/gen.hxx>
#include <editeng/protitem.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 <xmloff/odffields.hxx>
#include <editsh.hxx>
Include dependency graph for pam.cxx:

Go to the source code of this file.

Namespaces

 sw
 Dialog to specify the properties of date form field.
 

Enumerations

enum  CHKSECTION
 

Functions

static sal_Int32 GetSttOrEnd (bool bCondition, const SwContentNode &rNd)
 
std::ostream & operator<< (std::ostream &s, const SwPosition &position)
 
static CHKSECTION lcl_TstIdx (sal_uLong nSttIdx, sal_uLong nEndIdx, const SwNode &rEndNd)
 
static bool lcl_ChkOneRange (CHKSECTION eSec, bool bChkSections, const SwNode &rBaseEnd, sal_uLong nStt, sal_uLong 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)
 

Enumeration Type Documentation

enum CHKSECTION

Definition at line 196 of file pam.cxx.

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

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 768 of file pam.cxx.

References SwMoveFnCollection::fnCmpOp, fnMoveForward, SwPaM::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwPaM::GetDoc(), sw::GetFirstAndLastNode(), SwDoc::getIDocumentLayoutAccess(), SwPaM::GetMark(), SwPaM::GetPoint(), GetSttOrEnd(), SwNodes::GoNextSection(), and SwNodes::GoPrevSection().

Referenced by SwFlyFreeFrame::CheckClip(), SwFEShell::CheckUnboundObjects(), SwDoc::ChgAnchor(), SwFEShell::ChgCurPageDesc(), SwFlyFrame::ChgSize(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwPaM::DeleteMark(), SwFEShell::DeleteRow(), DelFlyInRange(), SwFEShell::FindAnchorPos(), sw::FindAttrImpl(), FindAttrsImpl(), SwFEShell::FindFlyFrame(), sw::FindFormatImpl(), SwNode::FindPageDesc(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), sw::FrameContainsNode(), SwDoc::GetAllFlyFormats(), SwFrame::GetAttrSet(), SwFEShell::GetBestObject(), GetCacheOwner(), SwEditShell::GetCntType(), SwPaM::GetContentNode(), SwFlyFrame::GetContour(), SwPageFrame::GetCursorOfst(), SwAccessibleEmbeddedObject::getExtendedAttributes(), SwFEShell::GetGrfAtPos(), SwFrameFormat::GetIMapObject(), SwFEShell::GetObjCntType(), SwFEShell::GetOleRef(), SwFrame::getSdrAllFillAttributesHelper(), SwDoc::GetTextDirection(), SwFEShell::GotoFly(), SwFEShell::ImpEndCreate(), SwFrame::IsProtected(), SwFEShell::IsSelObjProtected(), lcl_FindAnchorPos(), lcl_UpDown(), SwFlyAtContentFrame::Modify(), SwFEShell::NewFlyFrame(), SwFEShell::RequestObjectResize(), SwPageBreakWin::Select(), SwFEShell::SelFlyGrabCursor(), SwFlyAtContentFrame::SetAbsPos(), SwTabFrame::Split(), SwFlyFrame::UpdateAttr_(), and SwContentNotify::~SwContentNotify().

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

Definition at line 51 of file pam.cxx.

References SwContentNode::Len().

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

bool GoCurrPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)
bool GoCurrSection ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
void GoEndDoc ( SwPosition pPos)
void GoEndSection ( SwPosition pPos)
bool GoInContent ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
bool GoInContentCells ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
bool GoInContentCellsSkipHidden ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
bool GoInContentSkipHidden ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
bool GoInDoc ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)
bool GoInNode ( SwPaM rPam,
SwMoveFnCollection const &  fnMove 
)

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 rPam,
SwMoveFnCollection const &  fnMove 
)

Definition at line 900 of file pam.cxx.

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

Referenced by IMPL_LINK(), and lcl_CpyBox().

bool GoNext ( SwNode pNd,
SwIndex pIdx,
sal_uInt16  nMode 
)

Definition at line 282 of file pam.cxx.

References SwNode::IsContentNode().

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

SwContentNode* GoNextNds ( SwNodeIndex pIdx,
bool  bChk 
)

Definition at line 296 of file pam.cxx.

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

Referenced by GoCurrPara().

bool GoNextPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)
bool GoPrevious ( SwNode pNd,
SwIndex pIdx,
sal_uInt16  nMode 
)

Definition at line 289 of file pam.cxx.

References SwNode::IsContentNode().

SwContentNode* GoPreviousNds ( SwNodeIndex pIdx,
bool  bChk 
)
bool GoPrevPara ( SwPaM rPam,
SwMoveFnCollection const &  aPosPara 
)
void GoStartDoc ( SwPosition pPos)
void GoStartSection ( SwPosition pPos)
static bool lcl_ChkOneRange ( CHKSECTION  eSec,
bool  bChkSections,
const SwNode rBaseEnd,
sal_uLong  nStt,
sal_uLong  nEnd 
)
static
static const SwFrame* lcl_FindEditInReadonlyFrame ( const SwFrame rFrame)
static
static CHKSECTION lcl_TstIdx ( sal_uLong  nSttIdx,
sal_uLong  nEndIdx,
const SwNode rEndNd 
)
static

Definition at line 200 of file pam.cxx.

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

Referenced by CheckNodesRange().

std::ostream& operator<< ( std::ostream &  s,
const SwPosition position 
)
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().