LibreOffice Module svx (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
SdrPage Class Reference

A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / margins). More...

#include <svdpage.hxx>

Inheritance diagram for SdrPage:
Collaboration diagram for SdrPage:

Public Member Functions

void AddPageUser (sdr::PageUser &rNewUser)
void RemovePageUser (sdr::PageUser &rOldUser)
SdrModelgetSdrModelFromSdrPage () const
const sdr::contact::ViewContactGetViewContact () const
sdr::contact::ViewContactGetViewContact ()
void ActionChanged ()
SdrPagePropertiesgetSdrPageProperties ()
const SdrPagePropertiesgetSdrPageProperties () const
const SdrPagePropertiesgetCorrectSdrPageProperties () const
 SdrPage (SdrModel &rModel, bool bMasterPage=false)
virtual ~SdrPage () override
virtual SdrPageCloneSdrPage (SdrModel &rTargetModel) const
bool IsMasterPage () const
void SetInserted (bool bNew=true)
bool IsInserted () const
void SetChanged ()
virtual SdrPagegetSdrPageFromSdrObjList () const override
void SetPageNum (sal_uInt16 nNew)
sal_uInt16 GetPageNum () const
void setPageBorderOnlyLeftRight (bool bNew)
bool getPageBorderOnlyLeftRight () const
virtual void SetSize (const Size &aSiz)
Size GetSize () const
virtual void SetOrientation (Orientation eOri)
virtual Orientation GetOrientation () const
sal_Int32 GetWidth () const
sal_Int32 GetHeight () const
virtual void SetBorder (sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr)
virtual void SetLeftBorder (sal_Int32 nBorder)
virtual void SetUpperBorder (sal_Int32 nBorder)
virtual void SetRightBorder (sal_Int32 nBorder)
virtual void SetLowerBorder (sal_Int32 nBorder)
sal_Int32 GetLeftBorder () const
sal_Int32 GetUpperBorder () const
sal_Int32 GetRightBorder () const
sal_Int32 GetLowerBorder () const
bool TRG_HasMasterPage () const
void TRG_SetMasterPage (SdrPage &rNew)
void TRG_ClearMasterPage ()
SdrPageTRG_GetMasterPage () const
const SdrLayerIDSetTRG_GetMasterPageVisibleLayers () const
void TRG_SetMasterPageVisibleLayers (const SdrLayerIDSet &rNew)
sdr::contact::ViewContactTRG_GetMasterPageDescriptorViewContact () const
void MakePageObjectsNamesUnique ()
const SdrLayerAdminGetLayerAdmin () const
 changing the layers does not set the modified-flag! More...
SdrLayerAdminGetLayerAdmin ()
virtual OUString GetLayoutName () const
virtual const SdrPageGridFrameListGetGridFrameList (const SdrPageView *pPV, const tools::Rectangle *pRect) const
 for snap-to-grid in Writer, also for AlignObjects if 1 object is marked if pRect != null, then the pages that are intersected by this Rect, otherwise the visible pages More...
css::uno::Reference< css::uno::XInterface > const & getUnoPage ()
virtual SfxStyleSheetGetTextStyleSheetForObject (SdrObject *pObj) const
Color GetPageBackgroundColor () const
 deprecated returns an averaged background color of this page More...
Color GetPageBackgroundColor (SdrPageView const *pView, bool bScreenDisplay=true) const
 deprecated returns an averaged background color of this page More...
virtual bool checkVisibility (const sdr::contact::ViewObjectContact &rOriginal, const sdr::contact::DisplayInfo &rDisplayInfo, bool bEdit)
 this method returns true if the object from the ViewObjectContact should be visible on this page while rendering. More...
- Public Member Functions inherited from SdrObjList
virtual SdrObjectgetSdrObjectFromSdrObjList () const
void CopyObjects (const SdrObjList &rSrcList)
void ClearSdrObjList ()
void RecalcObjOrdNums ()
 recalculate order numbers / ZIndex More...
bool IsObjOrdNumsDirty () const
virtual void NbcInsertObject (SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual void InsertObject (SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
void sort (std::vector< sal_Int32 > &sortOrder)
void InsertObjectThenMakeNameUnique (SdrObject *pObj)
void InsertObjectThenMakeNameUnique (SdrObject *pObj, std::unordered_set< rtl::OUString > &rNameSet, size_t nPos=SAL_MAX_SIZE)
virtual SdrObjectNbcRemoveObject (size_t nObjNum)
 remove from list without delete More...
virtual SdrObjectRemoveObject (size_t nObjNum)
virtual SdrObjectReplaceObject (SdrObject *pNewObj, size_t nObjNum)
 Replace existing object by different one. More...
virtual SdrObjectSetObjectOrdNum (size_t nOldObjNum, size_t nNewObjNum)
 Modify ZOrder of an SdrObject. More...
void SetSdrObjListRectsDirty ()
const tools::RectangleGetAllObjSnapRect () const
const tools::RectangleGetAllObjBoundRect () const
void NbcReformatAllTextObjects ()
 reformat all text objects, e.g. when changing printer More...
void ReformatAllTextObjects ()
void ReformatAllEdgeObjects ()
 #103122# reformats all edge objects that are connected to other objects More...
void BurnInStyleSheetAttributes ()
 convert attributes of the style to hard formatting More...
size_t GetObjCount () const
SdrObjectGetObj (size_t nNum) const
virtual bool IsReadOnly () const
 linked page or linked group object More...
void FlattenGroups ()
 Makes the object list flat, i.e. More...
void UnGroupObj (size_t nObjNum)
 Ungroup the object at the given index. More...
bool HasObjectNavigationOrder () const
 Return whether there is an explicit, user defined, object navigation order. More...
void SetObjectNavigationPosition (SdrObject &rObject, const sal_uInt32 nNewNavigationPosition)
 Set the navigation position of the given object to the specified value. More...
SdrObjectGetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const
 Return the object for the given navigation position. More...
void ClearObjectNavigationOrder ()
 Restore the navigation order to that defined by the z-order. More...
bool RecalcNavigationPositions ()
 Set the navigation position of all SdrObjects to their position in the mxNavigationOrder list. More...
void SetNavigationOrder (const css::uno::Reference< css::container::XIndexAccess > &rxOrder)
 Set the navigation order to the one defined by the given list of XShape objects. More...
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
- Public Member Functions inherited from tools::WeakBase
 WeakBase ()
virtual ~WeakBase ()
void clearWeak ()

Protected Member Functions

std::unique_ptr< sdr::contact::ViewContactCreateObjectSpecificViewContact ()
void SetUnoPage (css::uno::Reference< css::drawing::XDrawPage > const &)
virtual css::uno::Reference< css::uno::XInterface > createUnoPage ()
void lateInit (const SdrPage &rSrcPage)
void TRG_ImpMasterPageRemoved (const SdrPage &rRemovedPage)
- Protected Member Functions inherited from SdrObjList
void RecalcRects ()
 SdrObjList ()
virtual ~SdrObjList ()

Protected Attributes

std::unique_ptr< sdr::MasterPageDescriptormpMasterPageDescriptor
sal_uInt16 nPageNum
bool mbMaster: 1
bool mbInserted: 1
bool mbObjectsNotPersistent: 1
bool mbPageBorderOnlyLeftRight: 1

Private Member Functions

SdrPageoperator= (const SdrPage &)=delete
 SdrPage (const SdrPage &)=delete

Private Attributes

sdr::PageUserVector maPageUsers
std::unique_ptr< sdr::contact::ViewContactmpViewContact
sal_Int32 mnWidth
sal_Int32 mnHeight
sal_Int32 mnBorderLeft
sal_Int32 mnBorderUpper
sal_Int32 mnBorderRight
sal_Int32 mnBorderLower
std::unique_ptr< SdrLayerAdminmpLayerAdmin
std::unique_ptr< SdrPagePropertiesmpSdrPageProperties
css::uno::Reference< css::uno::XInterface > mxUnoPage


class SdrModel
class SvxUnoDrawPagesAccess
class reportdesign::OSection

Detailed Description

A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / margins).

The latter is required to "catch" objects during drag-and-drop. The SdrPage allows (via SdrObjList) inserting and removing SdrObjects, as well as moving them into the foreground or background. Also it's possible to request and directly set the order number (ZOrder) of SdrObjects.

Definition at line 365 of file svdpage.hxx.

Constructor & Destructor Documentation

SdrPage::SdrPage ( const SdrPage )

Referenced by CloneSdrPage().

SdrPage::SdrPage ( SdrModel rModel,
bool  bMasterPage = false 

Definition at line 1227 of file svdpage.cxx.

References mnHeight, mnWidth, and mpSdrPageProperties.

SdrPage::~SdrPage ( )

Member Function Documentation

void SdrPage::ActionChanged ( )
void SdrPage::AddPageUser ( sdr::PageUser rNewUser)
bool SdrPage::checkVisibility ( const sdr::contact::ViewObjectContact rOriginal,
const sdr::contact::DisplayInfo rDisplayInfo,
bool  bEdit 

this method returns true if the object from the ViewObjectContact should be visible on this page while rendering.

bEdit selects if visibility test is for an editing view or a final render, like printing.

Definition at line 1733 of file svdpage.cxx.

SdrPage * SdrPage::CloneSdrPage ( SdrModel rTargetModel) const

Reimplemented in FmFormPage.

Definition at line 1333 of file svdpage.cxx.

References lateInit(), and SdrPage().

Referenced by SdrModel::CopyPages(), and unogallery::GalleryTheme::insertDrawingByIndex().

std::unique_ptr< sdr::contact::ViewContact > SdrPage::CreateObjectSpecificViewContact ( )

Definition at line 1095 of file svdpage.cxx.

Referenced by GetViewContact().

uno::Reference< uno::XInterface > SdrPage::createUnoPage ( )

Definition at line 1678 of file svdpage.cxx.

Referenced by getUnoPage().

const SdrPageProperties * SdrPage::getCorrectSdrPageProperties ( ) const

Definition at line 1765 of file svdpage.cxx.

References getSdrPageProperties(), and mpMasterPageDescriptor.

const SdrPageGridFrameList * SdrPage::GetGridFrameList ( const SdrPageView pPV,
const tools::Rectangle pRect 
) const

for snap-to-grid in Writer, also for AlignObjects if 1 object is marked if pRect != null, then the pages that are intersected by this Rect, otherwise the visible pages

Definition at line 1619 of file svdpage.cxx.

Referenced by SdrEditView::AlignMarkedObjects(), and SdrPageView::DrawPageViewGrid().

sal_Int32 SdrPage::GetHeight ( ) const
const SdrLayerAdmin & SdrPage::GetLayerAdmin ( ) const
SdrLayerAdmin & SdrPage::GetLayerAdmin ( )

Definition at line 1629 of file svdpage.cxx.

References mpLayerAdmin.

OUString SdrPage::GetLayoutName ( ) const

Definition at line 1634 of file svdpage.cxx.

sal_Int32 SdrPage::GetLeftBorder ( ) const
sal_Int32 SdrPage::GetLowerBorder ( ) const
Orientation SdrPage::GetOrientation ( ) const

Definition at line 1384 of file svdpage.cxx.

References GetSize(), Size::Height(), and Size::Width().

Color SdrPage::GetPageBackgroundColor ( ) const

deprecated returns an averaged background color of this page

*deprecated, use GetBackgroundColor with SdrPageView

Definition at line 1722 of file svdpage.cxx.

Color SdrPage::GetPageBackgroundColor ( SdrPageView const *  pView,
bool  bScreenDisplay = true 
) const
bool SdrPage::getPageBorderOnlyLeftRight ( ) const
sal_uInt16 SdrPage::GetPageNum ( ) const
sal_Int32 SdrPage::GetRightBorder ( ) const
SdrModel& SdrPage::getSdrModelFromSdrPage ( ) const
SdrPage * SdrPage::getSdrPageFromSdrObjList ( ) const

Reimplemented from SdrObjList.

Definition at line 1524 of file svdpage.cxx.

SdrPageProperties & SdrPage::getSdrPageProperties ( )
const SdrPageProperties & SdrPage::getSdrPageProperties ( ) const

Definition at line 1760 of file svdpage.cxx.

References mpSdrPageProperties.

Size SdrPage::GetSize ( ) const
SfxStyleSheet * SdrPage::GetTextStyleSheetForObject ( SdrObject pObj) const
uno::Reference< uno::XInterface > const & SdrPage::getUnoPage ( )
sal_Int32 SdrPage::GetUpperBorder ( ) const
const sdr::contact::ViewContact & SdrPage::GetViewContact ( ) const
sdr::contact::ViewContact & SdrPage::GetViewContact ( )

Definition at line 1109 of file svdpage.cxx.

References CreateObjectSpecificViewContact(), and mpViewContact.

sal_Int32 SdrPage::GetWidth ( ) const
bool SdrPage::IsInserted ( ) const
bool SdrPage::IsMasterPage ( ) const
void SdrPage::lateInit ( const SdrPage rSrcPage)
void SdrPage::MakePageObjectsNamesUnique ( )
SdrPage& SdrPage::operator= ( const SdrPage )
void SdrPage::RemovePageUser ( sdr::PageUser rOldUser)
void SdrPage::SetBorder ( sal_Int32  nLft,
sal_Int32  nUpp,
sal_Int32  nRgt,
sal_Int32  Lwr 

Definition at line 1398 of file svdpage.cxx.

References mnBorderLeft, mnBorderLower, mnBorderRight, mnBorderUpper, and SetChanged().

Referenced by GraphCtrl::InitSdrModel().

void SdrPage::SetChanged ( )
void SdrPage::SetInserted ( bool  bNew = true)
void SdrPage::SetLeftBorder ( sal_Int32  nBorder)

Definition at line 1432 of file svdpage.cxx.

References mnBorderLeft, and SetChanged().

void SdrPage::SetLowerBorder ( sal_Int32  nBorder)

Definition at line 1459 of file svdpage.cxx.

References mnBorderLower, and SetChanged().

void SdrPage::SetOrientation ( Orientation  eOri)

Definition at line 1372 of file svdpage.cxx.

References GetSize(), Size::Height(), SetSize(), and Size::Width().

void SdrPage::setPageBorderOnlyLeftRight ( bool  bNew)

Definition at line 464 of file svdpage.hxx.

void SdrPage::SetPageNum ( sal_uInt16  nNew)
void SdrPage::SetRightBorder ( sal_Int32  nBorder)

Definition at line 1450 of file svdpage.cxx.

References mnBorderRight, and SetChanged().

void SdrPage::SetSize ( const Size aSiz)
void SdrPage::SetUnoPage ( css::uno::Reference< css::drawing::XDrawPage > const &  )

Definition at line 1662 of file svdpage.cxx.

References mxUnoPage.

void SdrPage::SetUpperBorder ( sal_Int32  nBorder)

Definition at line 1441 of file svdpage.cxx.

References mnBorderUpper, and SetChanged().

void SdrPage::TRG_ClearMasterPage ( )
SdrPage & SdrPage::TRG_GetMasterPage ( ) const
sdr::contact::ViewContact & SdrPage::TRG_GetMasterPageDescriptorViewContact ( ) const
const SdrLayerIDSet & SdrPage::TRG_GetMasterPageVisibleLayers ( ) const
bool SdrPage::TRG_HasMasterPage ( ) const
void SdrPage::TRG_ImpMasterPageRemoved ( const SdrPage rRemovedPage)

Definition at line 1581 of file svdpage.cxx.

References TRG_ClearMasterPage(), TRG_GetMasterPage(), and TRG_HasMasterPage().

Referenced by SdrModel::RemoveMasterPage().

void SdrPage::TRG_SetMasterPage ( SdrPage rNew)
void SdrPage::TRG_SetMasterPageVisibleLayers ( const SdrLayerIDSet rNew)

Friends And Related Function Documentation

friend class reportdesign::OSection

Definition at line 373 of file svdpage.hxx.

friend class SdrModel

Definition at line 368 of file svdpage.hxx.

friend class SvxUnoDrawPagesAccess

Definition at line 369 of file svdpage.hxx.

Member Data Documentation

sdr::PageUserVector SdrPage::maPageUsers

Definition at line 381 of file svdpage.hxx.

Referenced by AddPageUser(), RemovePageUser(), and ~SdrPage().

bool SdrPage::mbInserted

Definition at line 429 of file svdpage.hxx.

Referenced by GetPageNum(), and SetInserted().

bool SdrPage::mbMaster

Definition at line 428 of file svdpage.hxx.

Referenced by GetPageNum(), and lateInit().

bool SdrPage::mbObjectsNotPersistent

Definition at line 430 of file svdpage.hxx.

Referenced by lateInit().

bool SdrPage::mbPageBorderOnlyLeftRight

Definition at line 433 of file svdpage.hxx.

Referenced by lateInit().

sal_Int32 SdrPage::mnBorderLeft

Definition at line 408 of file svdpage.hxx.

Referenced by GetLeftBorder(), lateInit(), SetBorder(), and SetLeftBorder().

sal_Int32 SdrPage::mnBorderLower

Definition at line 411 of file svdpage.hxx.

Referenced by GetLowerBorder(), lateInit(), SetBorder(), and SetLowerBorder().

sal_Int32 SdrPage::mnBorderRight

Definition at line 410 of file svdpage.hxx.

Referenced by GetRightBorder(), lateInit(), SetBorder(), and SetRightBorder().

sal_Int32 SdrPage::mnBorderUpper

Definition at line 409 of file svdpage.hxx.

Referenced by GetUpperBorder(), lateInit(), SetBorder(), and SetUpperBorder().

sal_Int32 SdrPage::mnHeight

Definition at line 407 of file svdpage.hxx.

Referenced by GetHeight(), GetSize(), lateInit(), and SetSize().

sal_Int32 SdrPage::mnWidth

Definition at line 406 of file svdpage.hxx.

Referenced by GetSize(), GetWidth(), lateInit(), and SetSize().

std::unique_ptr<SdrLayerAdmin> SdrPage::mpLayerAdmin

Definition at line 413 of file svdpage.hxx.

Referenced by GetLayerAdmin(), and ~SdrPage().

std::unique_ptr<sdr::MasterPageDescriptor> SdrPage::mpMasterPageDescriptor
std::unique_ptr<SdrPageProperties> SdrPage::mpSdrPageProperties

Definition at line 414 of file svdpage.hxx.

Referenced by getSdrPageProperties(), lateInit(), SdrPage(), and ~SdrPage().

std::unique_ptr<sdr::contact::ViewContact> SdrPage::mpViewContact

Definition at line 383 of file svdpage.hxx.

Referenced by GetViewContact(), lateInit(), and ~SdrPage().

SdrModel& SdrPage::mrSdrModelFromSdrPage

Definition at line 403 of file svdpage.hxx.

css::uno::Reference< css::uno::XInterface > SdrPage::mxUnoPage
sal_uInt16 SdrPage::nPageNum

Definition at line 426 of file svdpage.hxx.

Referenced by GetPageNum(), lateInit(), and SetPageNum().

The documentation for this class was generated from the following files: