From 5f1e3bff24310560c4a3c314bb0cd909d1f423c2 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 9 Feb 2010 11:33:08 +0100 Subject: aw079 #i99386# finer granular changes for MPBGO removal --- svx/inc/svx/sdrmasterpagedescriptor.hxx | 7 ++ svx/inc/svx/svdobj.hxx | 4 ++ svx/inc/svx/svdpage.hxx | 118 ++++++++++++++++++++------------ 3 files changed, 85 insertions(+), 44 deletions(-) (limited to 'svx/inc') diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx index 52752945255c..a8780c614285 100644 --- a/svx/inc/svx/sdrmasterpagedescriptor.hxx +++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx @@ -34,9 +34,12 @@ #include #include +#define NEWPBG + ////////////////////////////////////////////////////////////////////////////// // predeclarations class SdrObject; +class SfxItemSet; namespace sdr { @@ -92,8 +95,12 @@ namespace sdr sal_Bool operator==(const MasterPageDescriptor& rCandidate) const; sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const; +#ifdef NEWPBG + const SfxItemSet& getCorrectFillAttributes() const; +#else // #i42075# Get the correct BackgroundObject SdrObject* GetBackgroundObject() const; +#endif }; } // end of namespace sdr diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index fce776ef0abf..edab358a2e4a 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -31,6 +31,8 @@ #ifndef _SVDOBJ_HXX #define _SVDOBJ_HXX +#define NEWPBG + #include #include #include @@ -1102,10 +1104,12 @@ public: sal_Bool IsTransparent( BOOL bCheckForAlphaChannel = FALSE ) const; +#ifndef NEWPBG // #111111# // Needed again and again i will now add a test for finding out if // this object is the BackgroundObject of the page. sal_Bool IsMasterPageBackgroundObject() const; +#endif // #116168# // Give info if object is in destruction diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx index 02181afb1674..60193f132db9 100644 --- a/svx/inc/svx/svdpage.hxx +++ b/svx/inc/svx/svdpage.hxx @@ -31,59 +31,29 @@ #ifndef _SVDPAGE_HXX #define _SVDPAGE_HXX -#include +#define NEWPBG -#ifndef _PRINT_HXX //autogen +#include #include -#endif -#ifndef _GDIMTF_HXX //autogen #include -#endif #include #include #include #include - -////////////////////////////////////////////////////////////////////////////// -// sdr::Comment interface #include - -// #111111# #include #include - -// StandardCheckVisisbilityRedirector #include #include #include "svx/svxdllapi.h" - #include #include #include -// #110094# -namespace sdr -{ - namespace contact - { - class ViewContact; - } // end of namespace contact -} // end of namespace sdr - -// ------------------------------ -// - intern benutzte Paint-Modi - -// ------------------------------ - -//#if 0 // _SOLAR__PRIVATE - -#define IMP_PAGEPAINT_NORMAL 0 -#define IMP_PAGEPAINT_PREPARE_CACHE 1 -#define IMP_PAGEPAINT_PAINT_CACHE 2 -#define IMP_PAGEPAINT_PREPARE_BG_CACHE 3 -#define IMP_PAGEPAINT_PAINT_BG_CACHE 4 - -//#endif // __PRIVATE +////////////////////////////////////////////////////////////////////////////// +// predefines +namespace sdr { namespace contact { class ViewContact; }} class SdrPage; class SdrModel; class SfxItemPool; @@ -113,7 +83,11 @@ public: SdrInsertReasonKind GetReason() const { return eReason; } }; -class SVX_DLLPUBLIC SdrObjList { +////////////////////////////////////////////////////////////////////////////// +// class SdrObjList + +class SVX_DLLPUBLIC SdrObjList +{ private: typedef ::std::vector SdrObjectContainerType; SdrObjectContainerType maList; @@ -350,8 +324,12 @@ Objektes abgefragt sowie direkt gesetzt werden. // Used for all methods which return a page number #define SDRPAGE_NOTFOUND 0xFFFF +////////////////////////////////////////////////////////////////////////////// +// class SdrPageGridFrame + // Fuer das Fangraster/Punkgitter im Writer -class SdrPageGridFrame { +class SdrPageGridFrame +{ Rectangle aPaper; Rectangle aUserArea; public: @@ -383,8 +361,50 @@ public: }; //////////////////////////////////////////////////////////////////////////////////////////////////// +// class SdrPageProperties + +#ifdef NEWPBG + +class SVX_DLLPUBLIC SdrPageProperties : public SfxListener +{ +private: + // data + SdrPage* mpSdrPage; + SfxStyleSheet* mpStyleSheet; + SfxItemSet* mpProperties; + + // internal helpers + void ImpRemoveStyleSheet(); + void ImpAddStyleSheet(SfxStyleSheet& rNewStyleSheet); + + // not implemented + SdrPageProperties& operator=(const SdrPageProperties& rCandidate); + +public: + // construct/destruct + SdrPageProperties(SdrPage& rSdrPage); + SdrPageProperties(const SdrPageProperties& rCandidate); + virtual ~SdrPageProperties(); + + // Notify(...) from baseclass SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + // data read/write + const SfxItemSet& GetItemSet() const; + void PutItemSet(const SfxItemSet& rSet); + void PutItem(const SfxPoolItem& rItem); + void ClearItem(const sal_uInt16 nWhich = 0); + + // StyleSheet access + void SetStyleSheet(SfxStyleSheet* pStyleSheet); + SfxStyleSheet* GetStyleSheet() const; +}; + +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////// +// class SdrPage -class SVX_DLLPUBLIC SdrPage: public SdrObjList, public tools::WeakBase< SdrPage > +class SVX_DLLPUBLIC SdrPage : public SdrObjList, public tools::WeakBase< SdrPage > { /////////////////////////////////////////////////////////////////////////////// // start PageUser section @@ -430,9 +450,19 @@ friend class ChXChartDocument; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxUnoPage; protected: - SdrLayerAdmin* pLayerAdmin; - SdrObject* pBackgroundObj; + SdrLayerAdmin* pLayerAdmin; +#ifndef NEWPBG + SdrObject* pBackgroundObj; +#else +private: + SdrPageProperties* mpSdrPageProperties; + +public: + SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; } + const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; } +#endif +protected: // new MasterPageDescriptorVector ::sdr::MasterPageDescriptor* mpMasterPageDescriptor; @@ -537,8 +567,10 @@ public: bool IsSwappingLocked() const { return mbSwappingLocked; } void SetSwappingLocked(bool bLock) { mbSwappingLocked = bLock; } +#ifndef NEWPBG SdrObject* GetBackgroundObj() const { return pBackgroundObj; } void SetBackgroundObj( SdrObject* pObj ); +#endif ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoPage(); @@ -567,8 +599,8 @@ public: /** Check if page is the HandoutMasterPage (in SVX, no PK_HANDOUT available) */ bool isHandoutMasterPage() const; -////////////////////////////////////////////////////////////////////////////// -// sdr::Comment interface + ////////////////////////////////////////////////////////////////////////////// + // sdr::Comment interface private: sdr::CommentVector maComments; @@ -577,8 +609,6 @@ public: const sdr::Comment& GetCommentByIndex(sal_uInt32 nIndex); void AddComment(const sdr::Comment& rNew); void ReplaceCommentByIndex(sal_uInt32 nIndex, const sdr::Comment& rNew); - -////////////////////////////////////////////////////////////////////////////// }; typedef tools::WeakReference< SdrPage > SdrPageWeakRef; -- cgit