LibreOffice Module sw (master)
1
|
#include <sal/config.h>
#include <string_view>
#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>
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) |
SwContentNode * | GoNextNds (SwNodeIndex *pIdx, bool bChk) |
SwContentNode * | GoPreviousNds (SwNodeIndex *pIdx, bool bChk) |
std::unique_ptr< SwPaM > | sw::MakeRegion (SwMoveFnCollection const &fnMove, const SwPaM &rOrigRg) |
make a new region More... | |
static const SwFrame * | lcl_FindEditInReadonlyFrame (const SwFrame &rFrame) |
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. 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) |
enum CHKSECTION |
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.
bChkSection | if 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. |
Definition at line 259 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.
rbFirst | If <true> then first time request. If so than the position of the PaM must not be changed! |
Definition at line 823 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(), SwPageBreakWin::execute(), SwFEShell::FindAnchorPos(), sw::FindAttrImpl(), FindAttrsImpl(), SwFEShell::FindFlyFrame(), sw::FindFormatImpl(), SwNode::FindPageDesc(), sw::FindTextImpl(), SwCursorShell::FindValidContentNode(), sw::FrameContainsNode(), SwDoc::GetAllFlyFormats(), SwFrame::GetAttrSet(), SwFEShell::GetBestObject(), GetBorderCacheOwner(), SwEditShell::GetCntType(), SwPaM::GetContentNode(), SwFlyFrame::GetContour(), SwAccessibleEmbeddedObject::getExtendedAttributes(), SwFEShell::GetGrfAtPos(), SwFrameFormat::GetIMapObject(), SwPageFrame::GetModelPositionForViewPoint(), SwFEShell::GetObjCntType(), SwFEShell::GetOleRef(), SwFrame::getSdrAllFillAttributesHelper(), SwDoc::GetTextDirection(), SwFEShell::GotoFly(), SwFEShell::ImpEndCreate(), SwFrame::IsProtected(), SwFEShell::IsSelObjProtected(), lcl_FindAnchorPos(), lcl_UpDown(), SwFEShell::NewFlyFrame(), SwFEShell::RequestObjectResize(), SwFEShell::SelFlyGrabCursor(), SwFlyAtContentFrame::SetAbsPos(), SwTabFrame::Split(), SwFlyAtContentFrame::SwClientNotify(), SwFlyFrame::UpdateAttr_(), and SwContentNotify::~SwContentNotify().
|
static |
Definition at line 56 of file pam.cxx.
References SwContentNode::Len().
Referenced by GetNode(), GoCurrPara(), GoCurrSection(), GoInNode(), GoNextPara(), and GoPrevPara().
bool GoCurrPara | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | aPosPara | ||
) |
Definition at line 1016 of file pam.cxx.
References SwIndex::Assign(), fnMoveForward, fnParaEnd, fnParaStart, SwNode::GetContentNode(), SwIndex::GetIndex(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetSttOrEnd(), GoNextNds(), GoPreviousNds(), SwContentNode::Len(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwWrtShell::BwdSentence_(), SwXText::convertToTextFrame(), SwInsertDBColAutoPilot::DataToDoc(), SwWrtShell::DelToEndOfPara(), SwWrtShell::DelToEndOfSentence(), SwWrtShell::DelToStartOfPara(), SwWrtShell::EndPara(), SwWrtShell::EndWrd(), SwWrtShell::FwdSentence_(), SwXTextCursor::gotoEndOfParagraph(), SwXTextCursor::gotoEndOfSentence(), SwXTextCursor::gotoPreviousSentence(), SwXTextCursor::gotoStartOfParagraph(), SwMailMergeLayoutPage::InsertGreeting(), lcl_SelectParaAndReset(), SwCursor::MovePara(), SwWrtShell::NxtWrd_(), SwWrtShell::NxtWrdForDelete(), SwWrtShell::PrvWrd_(), SwWrtShell::PrvWrdForDelete(), SwLangHelper::SelectCurrentPara(), SwWrtShell::SelPara(), SwXParagraph::setPropertyToDefault(), SwXParagraph::setString(), SwWrtShell::SttPara(), SwWrtShell::SttWrd(), and SwDropCapsPict::UpdatePaintSettings().
bool GoCurrSection | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 1058 of file pam.cxx.
References SwIndex::Assign(), fnMoveForward, SwMoveFnCollection::fnNds, SwMoveFnCollection::fnSection, SwNode::GetContentNode(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetSttOrEnd(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwInputWindow::DelBoxContent(), SwWrtShell::GoEnd(), SwWrtShell::GoStart(), SwXTextCursor::gotoEnd(), SwXTextCursor::gotoStart(), SwEditWin::KeyInput(), SwWrtShell::SelAll(), SwInputWindow::ShowWin(), and SwCursorShell::UpdateCursor().
void GoEndDoc | ( | SwPosition * | pPos | ) |
Definition at line 912 of file pam.cxx.
References SwNodes::GetEndOfContent(), SwNodeIndex::GetNodes(), GoPreviousNds(), SwContentNode::MakeEndIndex(), SwPosition::nContent, and SwPosition::nNode.
void GoEndSection | ( | SwPosition * | pPos | ) |
go to the end of the current base section
Definition at line 935 of file pam.cxx.
References SwNode::GetContentNode(), SwNodes::GetEndOfContent(), SwNodeIndex::GetNode(), SwNodeIndex::GetNodes(), SwNodes::GetSectionLevel(), SwNodes::GoEndOfSection(), GoPreviousNds(), SwContentNode::MakeEndIndex(), SwPosition::nContent, SwPosition::nNode, and SwNode::StartOfSectionIndex().
Referenced by sw::GetAllValidRanges().
bool GoInContent | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 970 of file pam.cxx.
References CRSR_SKIP_CHARS, SwMoveFnCollection::fnNd, SwNodeIndex::GetNode(), SwPaM::GetPoint(), GoInNode(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwXText::convertToTextFrame(), sw::DocumentContentOperationsManager::CopyImplImpl(), SwEditShell::CopySelToDoc(), SwXTextRange::DeleteAndInsert(), SwEditShell::DeleteSel(), DoSearch(), SwCursorShell::FindValidContentNode(), SwXDocumentIndex::getAnchor(), SwXTextSection::getAnchor(), SwXTextRange::getEnd(), SwXTextRange::getStart(), SwCursor::GotoRegion(), SwCursor::GotoTable(), SwCursor::GotoTableBox(), IsEmptyBox(), lcl_EnsureValidPam(), SwCursor::LeftRight(), SwUndoSaveContent::MoveFromUndoNds(), sw::DocumentContentOperationsManager::MoveRange(), SwUndoDelete::RepeatImpl(), SwUndoTableToText::RepeatImpl(), SwCursorShell::SelTable(), SwCursorShell::SelTableRowOrCol(), SwUndRng::SetPaM(), SwWW8ImplReader::StopAnlToRestart(), SwEditShell::TableToText(), SwUndoTextToTable::UndoImpl(), SwUndoTableToText::UndoImpl(), SwUndoInserts::UndoImpl(), SwUndoSplitTable::UndoImpl(), and SwCursorShell::UpdateCursor().
bool GoInContentCells | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 978 of file pam.cxx.
References CRSR_SKIP_CELLS, SwMoveFnCollection::fnNd, SwNodeIndex::GetNode(), SwPaM::GetPoint(), GoInNode(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwCursor::LeftRight().
bool GoInContentCellsSkipHidden | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 994 of file pam.cxx.
References CRSR_SKIP_CELLS, CRSR_SKIP_HIDDEN, SwMoveFnCollection::fnNd, SwNodeIndex::GetNode(), SwPaM::GetPoint(), GoInNode(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwCursor::LeftRight().
bool GoInContentSkipHidden | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 986 of file pam.cxx.
References CRSR_SKIP_CHARS, CRSR_SKIP_HIDDEN, SwMoveFnCollection::fnNd, SwNodeIndex::GetNode(), SwPaM::GetPoint(), GoInNode(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwCursor::LeftRight().
bool GoInDoc | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 949 of file pam.cxx.
References SwMoveFnCollection::fnDoc, and SwPaM::GetPoint().
Referenced by SwXFrame::attachToRange(), SwHHCWrapper::Convert(), SwXBodyText::createEnumeration(), SwXBodyText::CreateTextCursor(), DocxExportFilter::exportDocument(), RtfExportFilter::filter(), SwXTextCursor::gotoEnd(), SwXTextCursor::gotoStart(), SwImpBlocks::MakePaM(), SwXFrame::setPropertyValue(), SwXShape::setPropertyValue(), SwCursor::SttEndDoc(), SwDoc::UpdatePagesForPrintingWithPostItData(), and SwWriter::Write().
bool GoInNode | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 961 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(), 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().
bool GoInSection | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | fnMove | ||
) |
Definition at line 955 of file pam.cxx.
References SwMoveFnCollection::fnSections, and SwPaM::GetPoint().
Referenced by IMPL_LINK(), and lcl_CpyBox().
Definition at line 291 of file pam.cxx.
References SwNode::IsContentNode().
Referenced by SwEditShell::GCAttr(), and SwDoc::InsCopyOfTable().
SwContentNode* GoNextNds | ( | SwNodeIndex * | pIdx, |
bool | bChk | ||
) |
Definition at line 305 of file pam.cxx.
References CheckNodesRange(), SwNodeIndex::GetIndex(), SwNodeIndex::GetNodes(), and SwNodes::GoNext().
Referenced by GoCurrPara().
bool GoNextPara | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | aPosPara | ||
) |
Definition at line 1044 of file pam.cxx.
References SwIndex::Assign(), fnMoveForward, SwNode::GetContentNode(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetSttOrEnd(), GoInNode(), SwPaM::Move(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwWrtShell::FwdPara_(), SwXTextCursor::gotoNextParagraph(), SwXTextCursor::gotoNextSentence(), SwXTextCursor::gotoNextWord(), and SwCursor::MovePara().
Definition at line 298 of file pam.cxx.
References SwNode::IsContentNode().
SwContentNode* GoPreviousNds | ( | SwNodeIndex * | pIdx, |
bool | bChk | ||
) |
Definition at line 320 of file pam.cxx.
References CheckNodesRange(), SwNodeIndex::GetIndex(), and SwNodes::GoPrevious().
Referenced by sw::GetAllValidRanges(), GoCurrPara(), GoEndDoc(), and GoEndSection().
bool GoPrevPara | ( | SwPaM & | rPam, |
SwMoveFnCollection const & | aPosPara | ||
) |
Definition at line 1002 of file pam.cxx.
References SwIndex::Assign(), fnMoveBackward, fnMoveForward, SwNode::GetContentNode(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), GetSttOrEnd(), GoInNode(), SwPaM::Move(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwWrtShell::BwdPara_(), SwHTMLParser::Continue(), SwXTextCursor::gotoPreviousParagraph(), and SwXTextCursor::gotoPreviousSentence().
void GoStartDoc | ( | SwPosition * | pPos | ) |
Definition at line 902 of file pam.cxx.
References SwNodes::GetEndOfContent(), SwNodeIndex::GetNodes(), SwNodes::GoNext(), SwContentNode::MakeStartIndex(), SwPosition::nContent, SwPosition::nNode, and SwNode::StartOfSectionNode().
void GoStartSection | ( | SwPosition * | pPos | ) |
Definition at line 921 of file pam.cxx.
References SwNode::GetContentNode(), SwNodes::GetEndOfContent(), SwNodeIndex::GetNode(), SwNodeIndex::GetNodes(), SwNodes::GetSectionLevel(), SwNodes::GoStartOfSection(), SwContentNode::MakeStartIndex(), SwPosition::nContent, SwPosition::nNode, and SwNode::StartOfSectionIndex().
|
static |
Definition at line 214 of file pam.cxx.
References SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), SwNode::GetIndex(), SwNode::GetNodes(), SwNode::IsStartNode(), SwNode::StartOfSectionIndex(), and SwNode::StartOfSectionNode().
Referenced by CheckNodesRange().
Definition at line 573 of file pam.cxx.
References SwFrame::FindFlyFrame(), SwFrame::FindSctFrame(), SwSectionFrame::GetSection(), SwSection::IsEditInReadonlyFlag(), SwFrame::IsInFly(), SwFrame::IsInSct(), SwFrame::IsNoTextFrame(), and SwLayoutFrame::Lower().
Referenced by SwPaM::HasReadonlySel().
|
static |
Definition at line 205 of file pam.cxx.
References SwNode::GetIndex(), and SwNode::StartOfSectionIndex().
Referenced by CheckNodesRange().
std::ostream& operator<< | ( | std::ostream & | s, |
const SwPosition & | position | ||
) |
Definition at line 194 of file pam.cxx.
References SwIndex::GetIndex(), SwNodeIndex::GetIndex(), SwPosition::nContent, and SwPosition::nNode.
std::ostream& operator<< | ( | std::ostream & | s, |
const SwPaM & | pam | ||
) |
Definition at line 1169 of file pam.cxx.
References SwPaM::GetMark(), SwPaM::GetPoint(), and SwPaM::HasMark().