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:
[legend]
Collaboration diagram for SdrPage:
[legend]

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
 
SdrModelmrSdrModelFromSdrPage
 
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
 

Friends

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 366 of file svdpage.hxx.

Constructor & Destructor Documentation

SdrPage::SdrPage ( const SdrPage )
privatedelete

Referenced by CloneSdrPage().

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

Definition at line 1235 of file svdpage.cxx.

References mnHeight, mnWidth, and mpSdrPageProperties.

SdrPage::~SdrPage ( )
overridevirtual

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 
)
virtual

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 1740 of file svdpage.cxx.

SdrPage * SdrPage::CloneSdrPage ( SdrModel rTargetModel) const
virtual

Reimplemented in FmFormPage.

Definition at line 1341 of file svdpage.cxx.

References lateInit(), and SdrPage().

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

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

Definition at line 1103 of file svdpage.cxx.

Referenced by GetViewContact().

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

Definition at line 1685 of file svdpage.cxx.

Referenced by getUnoPage().

const SdrPageProperties * SdrPage::getCorrectSdrPageProperties ( ) const

Definition at line 1772 of file svdpage.cxx.

References getSdrPageProperties(), and mpMasterPageDescriptor.

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

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 1626 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 1636 of file svdpage.cxx.

References mpLayerAdmin.

OUString SdrPage::GetLayoutName ( ) const
virtual

Definition at line 1641 of file svdpage.cxx.

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

Definition at line 1391 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 1729 of file svdpage.cxx.

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

Reimplemented from SdrObjList.

Definition at line 1531 of file svdpage.cxx.

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

Definition at line 1767 of file svdpage.cxx.

References mpSdrPageProperties.

Size SdrPage::GetSize ( ) const
SfxStyleSheet * SdrPage::GetTextStyleSheetForObject ( SdrObject pObj) const
virtual
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 1117 of file svdpage.cxx.

References CreateObjectSpecificViewContact(), and mpViewContact.

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

Definition at line 1405 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)
virtual

Definition at line 1439 of file svdpage.cxx.

References mnBorderLeft, and SetChanged().

void SdrPage::SetLowerBorder ( sal_Int32  nBorder)
virtual

Definition at line 1466 of file svdpage.cxx.

References mnBorderLower, and SetChanged().

void SdrPage::SetOrientation ( Orientation  eOri)
virtual

Definition at line 1380 of file svdpage.cxx.

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

void SdrPage::setPageBorderOnlyLeftRight ( bool  bNew)
inline

Definition at line 465 of file svdpage.hxx.

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

Definition at line 1457 of file svdpage.cxx.

References mnBorderRight, and SetChanged().

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

Definition at line 1669 of file svdpage.cxx.

References mxUnoPage.

void SdrPage::SetUpperBorder ( sal_Int32  nBorder)
virtual

Definition at line 1448 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
inline
void SdrPage::TRG_ImpMasterPageRemoved ( const SdrPage rRemovedPage)
protected

Definition at line 1588 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
friend

Definition at line 374 of file svdpage.hxx.

friend class SdrModel
friend

Definition at line 369 of file svdpage.hxx.

friend class SvxUnoDrawPagesAccess
friend

Definition at line 370 of file svdpage.hxx.

Member Data Documentation

sdr::PageUserVector SdrPage::maPageUsers
private

Definition at line 382 of file svdpage.hxx.

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

bool SdrPage::mbInserted
protected

Definition at line 430 of file svdpage.hxx.

Referenced by GetPageNum(), and SetInserted().

bool SdrPage::mbMaster
protected

Definition at line 429 of file svdpage.hxx.

Referenced by GetPageNum(), and lateInit().

bool SdrPage::mbObjectsNotPersistent
protected

Definition at line 431 of file svdpage.hxx.

Referenced by lateInit().

bool SdrPage::mbPageBorderOnlyLeftRight
protected

Definition at line 434 of file svdpage.hxx.

Referenced by lateInit().

sal_Int32 SdrPage::mnBorderLeft
private

Definition at line 409 of file svdpage.hxx.

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

sal_Int32 SdrPage::mnBorderLower
private

Definition at line 412 of file svdpage.hxx.

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

sal_Int32 SdrPage::mnBorderRight
private

Definition at line 411 of file svdpage.hxx.

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

sal_Int32 SdrPage::mnBorderUpper
private

Definition at line 410 of file svdpage.hxx.

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

sal_Int32 SdrPage::mnHeight
private

Definition at line 408 of file svdpage.hxx.

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

sal_Int32 SdrPage::mnWidth
private

Definition at line 407 of file svdpage.hxx.

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

std::unique_ptr<SdrLayerAdmin> SdrPage::mpLayerAdmin
private

Definition at line 414 of file svdpage.hxx.

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

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

Definition at line 415 of file svdpage.hxx.

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

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

Definition at line 384 of file svdpage.hxx.

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

SdrModel& SdrPage::mrSdrModelFromSdrPage
private

Definition at line 404 of file svdpage.hxx.

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

Definition at line 427 of file svdpage.hxx.

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


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