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?!?" );
136 if( !pDesc && bGetFromPool )
139 if( USHRT_MAX != nPoolId &&
188 const SwFrame* pMkFrame, *pPtFrame;
191 std::pair<Point, bool>
const tmp(aNulPt,
false);
196 if(
nullptr != (pCNd = rPaM.GetPointContentNode() ) &&
202 if( rPaM.HasMark() &&
203 nullptr != (pCNd = rPaM.GetMarkContentNode() ) &&
209 if( !pMkFrame || !pPtFrame )
211 else if( pMkFrame == pPtFrame )
219 const SwFrame* pTmp = pMkFrame; pMkFrame = pPtFrame; pPtFrame = pTmp;
224 while( pFnd && pMkFrame != pPtFrame )
226 pMkFrame = pMkFrame->
GetNext();
232 if(
reinterpret_cast<SwPageDesc*
>(sal_IntPtr(-1)) == pRetDesc )
234 else if( pFnd != pRetDesc )
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
constexpr tools::Long Y() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
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 CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId,...
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
size_t GetPageDescCnt() 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.
IDocumentContentOperations const & getIDocumentContentOperations() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
const SwPageDesc & GetPageDesc(const size_t i) const
void StartAllAction()
For all views of this document.
SwPageDesc * GetPageDescFromPool(sal_uInt16 nId)
const SwPageDesc * GetSelectedPageDescs() const
if inside all selection only one PageDesc,
void ChgPageDesc(size_t i, const SwPageDesc &)
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
size_t GetMousePageDesc(const Point &rPt) const
size_t GetPageDescCnt() const
SAL_DLLPRIVATE void EndAllActionAndCall()
Terminate actions for all shells and call ChangeLink.
size_t GetCurPageDesc(const bool bCalcFrame=true) const
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
const SwPageDesc & GetPageDesc(size_t i) const
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
SwPageDesc * GetPageDesc()
const ::std::optional< sal_uInt16 > & GetNumOffset() const
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
SwTabFrame * FindTabFrame()
bool IsContentFrame() const
SwPageFrame * FindPageFrame()
virtual const SwFormatPageDesc & GetPageDescItem() const
virtual const SwFrameFormat * GetFormat() const
const SwFrame * Lower() const
const SwContentNode * GetNode() const
PaM is Point and Mark: a selection of the document model.
A page of the document layout.
sal_uInt16 GetPhyPageNum() const
SwContentFrame * FindFirstBodyContent()
SwPageDesc * GetPageDesc()
void Bottom(const tools::Long nBottom)
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
Represents the visualization of a paragraph.
SwTextNode * GetTextNodeFirst()
SwRootFrame * GetLayout() const
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
IDocumentStylePoolAccess & getIDocumentStylePoolAccess()
Provides access to the document style pool interface.
ring_container GetRingContainer()