36 #include <osl/diagnose.h>
45 #if OSL_DEBUG_LEVEL > 0
52 OSL_ENSURE( bFound,
"ChgCurPageDesc with invalid descriptor." );
59 ::std::optional<sal_uInt16> oPageNumOffset;
61 OSL_ENSURE( !
GetCursor()->
HasMark(),
"ChgCurPageDesc only without selection!");
89 OSL_ENSURE( pFlow,
"Document without content?!?" );
103 ? *
static_cast<SwTextFrame const*
>(pFlow)->GetTextNodeFirst()
136 if( !pDesc && bGetFromPool )
139 if( USHRT_MAX != nPoolId &&
157 pPage = static_cast<const SwPageFrame*>( pPage->
GetNext() );
188 const SwFrame* pMkFrame, *pPtFrame;
191 std::pair<Point, bool>
const tmp(aNulPt,
false);
202 if( rPaM.HasMark() &&
209 if( !pMkFrame || !pPtFrame )
211 else if( pMkFrame == pPtFrame )
216 if( static_cast<const SwPageFrame*>(pMkFrame)->GetPhyPageNum() >
219 const SwFrame* pTmp = pMkFrame; pMkFrame = pPtFrame; pPtFrame = pTmp;
224 while( pFnd && pMkFrame != pPtFrame )
226 pMkFrame = pMkFrame->
GetNext();
227 if( !pMkFrame || pFnd != static_cast<const SwPageFrame*>(pMkFrame)->
GetPageDesc() )
232 if( reinterpret_cast<SwPageDesc*>(sal_IntPtr(-1)) == pRetDesc )
234 else if( pFnd != pRetDesc )
SAL_DLLPRIVATE void EndAllActionAndCall()
Terminate actions for all shells and call ChangeLink.
Base class of the Writer layout elements.
Represents the visualization of a paragraph.
const ::std::optional< sal_uInt16 > & GetNumOffset() const
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
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.
const SwPageDesc * GetSelectedPageDescs() const
if inside all selection only one PageDesc,
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
size_t GetPageDescCnt() const
SwPageDesc * GetPageDesc()
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
SwContentFrame * FindFirstBodyContent()
virtual const SwFormatPageDesc & GetPageDescItem() const
IDocumentContentOperations const & getIDocumentContentOperations() const
size_t GetMousePageDesc(const Point &rPt) const
const SwRect & getFrameArea() const
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history...
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
IDocumentStylePoolAccess & getIDocumentStylePoolAccess()
Provides access to the document style pool interface.
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
PaM is Point and Mark: a selection of the document model.
bool IsContentFrame() const
const SwPageDesc & GetPageDesc(const size_t i) const
SwPageFrame * FindPageFrame()
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
const SwFrame * Lower() const
SwPageDesc * GetPageDesc()
SwContentNode * GetContentNode()
const SwPageDesc & GetPageDesc(size_t i) const
size_t GetPageDescCnt() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
ring_container GetRingContainer()
A page of the document layout.
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
void Bottom(const tools::Long nBottom)
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId, -HlpId can be prevented.
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
void ChgPageDesc(size_t i, const SwPageDesc &)
SwPageDesc * GetPageDescFromPool(sal_uInt16 nId)
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
void StartAllAction()
For all views of this document.
SwRootFrame * GetLayout() const
size_t GetCurPageDesc(const bool bCalcFrame=true) const
virtual const SwFrameFormat * GetFormat() const
SwTabFrame * FindTabFrame()