LCOV - code coverage report
Current view: top level - include/svx - svdpage.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 26 29 89.7 %
Date: 2014-11-03 Functions: 26 29 89.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SVX_SVDPAGE_HXX
      21             : #define INCLUDED_SVX_SVDPAGE_HXX
      22             : 
      23             : #include <svl/stylesheetuser.hxx>
      24             : #include <vcl/bitmap.hxx>
      25             : #include <vcl/print.hxx>
      26             : #include <vcl/gdimtf.hxx>
      27             : #include <tools/weakbase.hxx>
      28             : #include <tools/contnr.hxx>
      29             : #include <cppuhelper/weakref.hxx>
      30             : #include <svx/svdtypes.hxx>
      31             : #include <svx/svdlayer.hxx>
      32             : #include <vector>
      33             : #include <svx/sdrpageuser.hxx>
      34             : #include <svx/sdr/contact/viewobjectcontactredirector.hxx>
      35             : #include <svx/sdrmasterpagedescriptor.hxx>
      36             : #include <svx/svxdllapi.h>
      37             : #include <com/sun/star/container/XIndexAccess.hpp>
      38             : #include <com/sun/star/drawing/XDrawPage.hpp>
      39             : #include <svx/svdobj.hxx>
      40             : #include <boost/scoped_ptr.hpp>
      41             : 
      42             : 
      43             : // predefines
      44             : 
      45             : namespace reportdesign { class OSection; }
      46             : namespace sdr { namespace contact { class ViewContact; }}
      47             : class SdrPage;
      48             : class SdrModel;
      49             : class SfxItemPool;
      50             : class SdrPageView;
      51             : class SdrLayerAdmin;
      52             : class SetOfByte;
      53             : class Color;
      54             : class SfxStyleSheet;
      55             : class SvxUnoDrawPagesAccess;
      56             : 
      57             : enum SdrInsertReasonKind {SDRREASON_UNKNOWN,    // unbekannt
      58             :                           SDRREASON_STREAMING,  // einlesen eines Doks
      59             :                           SDRREASON_UNDO,       // kommt aus dem Undo
      60             :                           SDRREASON_COPY,       // irgendjemand kopiert...
      61             :                           SDRREASON_VIEWCREATE, // vom Anwender interaktiv erzeugt
      62             :                           SDRREASON_VIEWCALL};  // Durch SdrView::Group(), ...
      63             : 
      64             : class SdrInsertReason {
      65             :     const SdrObject* pRefObj;
      66             :     SdrInsertReasonKind eReason;
      67             : public:
      68             :     SdrInsertReason(): pRefObj(NULL),eReason(SDRREASON_UNKNOWN) {}
      69         574 :     SdrInsertReason(SdrInsertReasonKind eR,const SdrObject* pO=NULL): pRefObj(pO),eReason(eR) {}
      70             :     void SetReferenceObject(const SdrObject* pO)  { pRefObj=pO; }
      71             :     const SdrObject* GetReferenceObject() const   { return pRefObj; }
      72             :     void SetReason(SdrInsertReasonKind eR)        { eReason=eR; }
      73         252 :     SdrInsertReasonKind GetReason() const         { return eReason; }
      74             : };
      75             : 
      76             : 
      77             : // class SdrObjList
      78             : 
      79             : class SVX_DLLPUBLIC SdrObjList
      80             : {
      81             : private:
      82             :     typedef ::std::vector<SdrObject*> SdrObjectContainerType;
      83             :     SdrObjectContainerType maList;
      84             : 
      85             : protected:
      86             : friend class SdrObjListIter;
      87             : friend class SdrEditView;
      88             :     SdrObjList* pUpList;   // Vaterliste
      89             :     SdrModel*   pModel;    // Diese Liste gehoert zu diesem Model (Layer,ItemPool,Storage).
      90             :     SdrPage*    pPage;     // Page, in die Liste haengt. Kann auch this sein.
      91             :     SdrObject*  pOwnerObj; // OwnerObject, falls Liste eines GruppenObjekts.
      92             :     Rectangle   aOutRect;
      93             :     Rectangle   aSnapRect;
      94             :     SdrObjListKind eListKind;
      95             :     bool    bObjOrdNumsDirty;
      96             :     bool    bRectsDirty;
      97             : protected:
      98             :     virtual void RecalcRects();
      99             : 
     100             : private:
     101             :     /// simple ActionChildInserted forwarder to have it on a central place
     102             :     void impChildInserted(SdrObject& rChild) const;
     103             : public:
     104             :     TYPEINFO();
     105             :     SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList=NULL);
     106             :     SdrObjList(const SdrObjList& rSrcList);
     107             :     virtual ~SdrObjList();
     108             :     // !!! Diese Methode nur fuer Leute, die ganz genau wissen was sie tun !!!
     109             : 
     110             :     // #110094# This should not be needed (!)
     111             :     void SetObjOrdNumsDirty()                           { bObjOrdNumsDirty=true; }
     112             :     // pModel, pPage, pUpList und pOwnerObj werden Zuweisungeoperator nicht veraendert!
     113             :     void operator=(const SdrObjList& rSrcList);
     114             :     void CopyObjects(const SdrObjList& rSrcList);
     115             :     // alles Aufraeumen (ohne Undo)
     116             :     void    Clear();
     117      984715 :     SdrObjListKind GetListKind() const                  { return eListKind; }
     118       28831 :     void           SetListKind(SdrObjListKind eNewKind) { eListKind=eNewKind; }
     119           0 :     SdrObjList*    GetUpList() const                    { return pUpList; }
     120       36453 :     void           SetUpList(SdrObjList* pNewUpList)    { pUpList=pNewUpList; }
     121     3132484 :     SdrObject*     GetOwnerObj() const                  { return pOwnerObj; }
     122       28831 :     void           SetOwnerObj(SdrObject* pNewOwner)    { pOwnerObj=pNewOwner; }
     123             :     virtual SdrPage* GetPage() const;
     124             :     virtual void     SetPage(SdrPage* pNewPage);
     125             :     virtual SdrModel* GetModel() const;
     126             :     virtual void      SetModel(SdrModel* pNewModel);
     127             :     // Neuberechnung der Objekt-Ordnungsnummern
     128             :     void     RecalcObjOrdNums();
     129       82479 :     bool IsObjOrdNumsDirty() const        { return bObjOrdNumsDirty; }
     130             :     virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE
     131             :                                  , const SdrInsertReason* pReason=NULL
     132             :                                                                       );
     133             :     virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE
     134             :                               , const SdrInsertReason* pReason=NULL
     135             :                                                                      );
     136             :     // aus Liste entfernen ohne delete
     137             :     virtual SdrObject* NbcRemoveObject(size_t nObjNum);
     138             :     virtual SdrObject* RemoveObject(size_t nObjNum);
     139             :     // Vorhandenes Objekt durch ein anderes ersetzen.
     140             :     // Wie Remove&Insert jedoch performanter, da die Ordnungsnummern
     141             :     // nicht Dirty gesetzt werden muessen.
     142             :     virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum);
     143             :     virtual SdrObject* ReplaceObject(SdrObject* pNewObj, size_t nObjNum);
     144             :     // Die Z-Order eines Objekts veraendern
     145             :     virtual SdrObject* NbcSetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
     146             :     virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
     147             : 
     148             :     virtual void SetRectsDirty();
     149             : 
     150             :     const Rectangle& GetAllObjSnapRect() const;
     151             :     const Rectangle& GetAllObjBoundRect() const;
     152             : 
     153             :     // Alle Textobjekte neu formatieren, z.B. bei Druckerwechsel
     154             :     void NbcReformatAllTextObjects();
     155             :     void ReformatAllTextObjects();
     156             : 
     157             :     /** #103122# reformats all edge objects that are connected to other objects */
     158             :     void ReformatAllEdgeObjects();
     159             : 
     160             :     // Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
     161             :     void BurnInStyleSheetAttributes();
     162             : 
     163             :     size_t GetObjCount() const;
     164             :     SdrObject* GetObj(size_t nNum) const;
     165             : 
     166             :     // Gelinkte Seite oder gelinktes Gruppenobjekt
     167             :     virtual bool IsReadOnly() const;
     168             : 
     169             :     // Zaehlt alle Objekte inkl. Objekte in Objektgruppen, ...
     170             :     size_t CountAllObjects() const;
     171             : 
     172             :     // Alle aufgelagerten Teile (z.B. Grafiken) der Liste in den
     173             :     // Speicher laden.
     174             :     void    ForceSwapInObjects() const;
     175             :     void    ForceSwapOutObjects() const;
     176             : 
     177             :     void    SwapInAll() const { ForceSwapInObjects(); }
     178             :     void    SwapOutAll() const { ForceSwapOutObjects(); }
     179             : 
     180             :     /** Makes the object list flat, i.e. the object list content are
     181             :         then tree leaves
     182             : 
     183             :         This method travels recursively over all group objects in this
     184             :         list, extracts the content, inserts it flat to the list and
     185             :         removes the group object afterwards.
     186             :      */
     187             :     virtual void FlattenGroups();
     188             :     /** Ungroup the object at the given index
     189             : 
     190             :         This method ungroups the content of the group object at the
     191             :         given index, i.e. the content is put flat into the object list
     192             :         (if the object at the given index is no group, this method is
     193             :         a no-op). If the group itself contains group objects, the
     194             :         operation is performed recursively, such that the content of
     195             :         the given object contains no groups afterwards.
     196             :      */
     197             :     virtual void UnGroupObj( size_t nObjNum );
     198             : 
     199             :     /** Return whether there is an explicit, user defined, object navigation
     200             :         order.  When there is one this method returns <TRUE/> and the
     201             :         GetObjectForNavigationPosition() and
     202             :         SdrObject::GetNavigationPosition() methods will return values
     203             :         different from those returne by SdrObject::GetOrdNum() and
     204             :         GetObj().
     205             :     */
     206             :     bool HasObjectNavigationOrder (void) const;
     207             : 
     208             :     /** Set the navigation position of the given object to the specified
     209             :         value.  Note that this changes the navigation position for all
     210             :         objects on or following the old or new position.
     211             :     */
     212             :     void SetObjectNavigationPosition (
     213             :         SdrObject& rObject,
     214             :         const sal_uInt32 nNewNavigationPosition);
     215             : 
     216             :     /** Return the object for the given navigation position.  When there is
     217             :         a user defined navigation order, i.e. mpNavigationOrder is not NULL,
     218             :         then that is used to look up the object.  Otherwise the z-order is
     219             :         used by looking up the object in maList.
     220             :         @param nNavigationPosition
     221             :             Valid values include 0 and are smaller than the number of
     222             :             objects as returned by GetObjCount().
     223             :         @return
     224             :             The returned pointer is NULL for invalid positions.
     225             :     */
     226             :     SdrObject* GetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const;
     227             : 
     228             :     /** Restore the navigation order to that defined by the z-order.
     229             :     */
     230             :     void ClearObjectNavigationOrder (void);
     231             : 
     232             :     /** Set the navigation position of all SdrObjects to their position in
     233             :         the mpNavigationOrder list.  This method returns immediately when no
     234             :         update is necessary.
     235             :         @return
     236             :             This method returns <TRUE/> when the navigation positions stored
     237             :             in SdrObjects are up to date.
     238             :             It returns <FALSE/> when the navigation positions are not valid,
     239             :             for example because no explicit navigation order has been
     240             :             defined, i.e. HasObjectNavigationOrder() would return <FALSE/>.
     241             :     */
     242             :     bool RecalcNavigationPositions (void);
     243             : 
     244             :     /** Set the navigation order to the one defined by the given list of
     245             :         XShape objects.
     246             :         @param rxOrder
     247             :             When this is an empty reference then the navigation order is
     248             :             reset to the z-order. The preferred way to do this, however, is
     249             :             to call ClearObjectNavigationOrder().
     250             :             Otherwise this list is expected to contain all the shapes in the
     251             :             called SdrObjList.
     252             :     */
     253             :     void SetNavigationOrder (const ::com::sun::star::uno::Reference<
     254             :         ::com::sun::star::container::XIndexAccess>& rxOrder);
     255             : 
     256             : private:
     257             :     class WeakSdrObjectContainerType;
     258             :     /// This list, if it exists, defines the navigation order.  It it does
     259             :     /// not exist then maList defines the navigation order.
     260             :     ::boost::scoped_ptr<WeakSdrObjectContainerType> mpNavigationOrder;
     261             : 
     262             :     /// This flag is <TRUE/> when the mpNavigation list has been changed but
     263             :     /// the indices of the referenced SdrObjects still have their old values.
     264             :     bool mbIsNavigationOrderDirty;
     265             : 
     266             :     /** Insert an SdrObject into maList.  Do not modify the maList member
     267             :         directly.
     268             :         @param rObject
     269             :             The object to insert into the object list.
     270             :         @param nInsertPosition
     271             :             The given object is inserted before the object at this
     272             :             position.  Valid values include 0 (the object is inserted at the
     273             :             head of the list) and the number of objects in the list as
     274             :             returned by GetObjCount() (the object is inserted at the end of
     275             :             the list.)
     276             :     */
     277             :     void InsertObjectIntoContainer (
     278             :         SdrObject& rObject,
     279             :         const sal_uInt32 nInsertPosition);
     280             : 
     281             :     /** Replace an object in the object list.
     282             :         @param rObject
     283             :             The new object that replaces the one in the list at the
     284             :             specified position.
     285             :         @param nObjectPosition
     286             :             The object at this position in the object list is replaced by
     287             :             the given object.  Valid values include 0 and are smaller than
     288             :             the number of objects in the list.
     289             :     */
     290             :     void ReplaceObjectInContainer (
     291             :         SdrObject& rObject,
     292             :         const sal_uInt32 nObjectPosition);
     293             : 
     294             :     /** Remove an object from the object list.
     295             :         The object list has to contain at least one element.
     296             :         @param nObjectPosition
     297             :             The object at this position is removed from the object list.
     298             :             Valid values include 0 and are smaller than the number of
     299             :             objects in the list.
     300             :     */
     301             :     void RemoveObjectFromContainer (
     302             :         const sal_uInt32 nObjectPosition);
     303             : };
     304             : 
     305             : /*
     306             : Eine Sdraw-Seite enthaelt genau eine Objektliste sowie eine Beschreibung
     307             : der physikalischen Seitendimensionen (Groesse/Raender). Letzteres wird
     308             : lediglich zum Fangen von Objekten beim Draggen benoetigt.
     309             : An der Seite lassen sich (ueber SdrObjList) Objekte einfuegen und loeschen,
     310             : nach vorn und nach hinten stellen. Ausserdem kann die Ordnungszahl eines
     311             : Objektes abgefragt sowie direkt gesetzt werden.
     312             : */
     313             : 
     314             : // Used for all methods which return a page number
     315             : #define SDRPAGE_NOTFOUND 0xFFFF
     316             : 
     317             : 
     318             : // class SdrPageGridFrame
     319             : 
     320             : // Fuer das Fangraster/Punkgitter im Writer
     321             : class SdrPageGridFrame
     322             : {
     323             :     Rectangle aPaper;
     324             :     Rectangle aUserArea;
     325             : public:
     326             :     SdrPageGridFrame(const Rectangle& rPaper): aPaper(rPaper), aUserArea(rPaper) {}
     327          16 :     SdrPageGridFrame(const Rectangle& rPaper, const Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {}
     328             :     void             SetPaperRect(const Rectangle& rPaper) { aPaper=rPaper; }
     329             :     void             SetUserArea(const Rectangle& rUser)   { aUserArea=rUser; }
     330          48 :     const Rectangle& GetPaperRect() const                  { return aPaper; }
     331          80 :     const Rectangle& GetUserArea() const                   { return aUserArea; }
     332             : };
     333             : 
     334             : class SVX_DLLPUBLIC SdrPageGridFrameList {
     335             :     std::vector<SdrPageGridFrame*> aList;
     336             : private:
     337             :     SVX_DLLPRIVATE SdrPageGridFrameList(const SdrPageGridFrameList& rSrcList);      // never implemented
     338             :     SVX_DLLPRIVATE void           operator=(const SdrPageGridFrameList& rSrcList);  // never implemented
     339             : protected:
     340          32 :     SdrPageGridFrame* GetObject(sal_uInt16 i) const { return aList[i]; }
     341             : public:
     342           2 :     SdrPageGridFrameList(): aList()                                    {}
     343           2 :     ~SdrPageGridFrameList()                                            { Clear(); }
     344             :     void           Clear();
     345          32 :     sal_uInt16         GetCount() const                                    { return sal_uInt16(aList.size()); }
     346          16 :     void           Insert(const SdrPageGridFrame& rGF) { aList.push_back(new SdrPageGridFrame(rGF)); }
     347             :     void           Insert(const SdrPageGridFrame& rGF, sal_uInt16 nPos)
     348             :     {
     349             :         if(nPos==0xFFFF)
     350             :             aList.push_back(new SdrPageGridFrame(rGF));
     351             :         else
     352             :             aList.insert(aList.begin()+nPos,new SdrPageGridFrame(rGF));
     353             :     }
     354             :     void           Delete(sal_uInt16 nPos)
     355             :     {
     356             :         SdrPageGridFrame* p = aList[nPos];
     357             :         aList.erase(aList.begin()+nPos);
     358             :         delete p;
     359             :     }
     360             :     void           Move(sal_uInt16 nPos, sal_uInt16 nNewPos)
     361             :     {
     362             :         SdrPageGridFrame* p = aList[nPos];
     363             :         aList.erase(aList.begin()+nPos);
     364             :         aList.insert(aList.begin()+nNewPos,p);
     365             :     }
     366             :     SdrPageGridFrame&       operator[](sal_uInt16 nPos)                    { return *GetObject(nPos); }
     367          16 :     const SdrPageGridFrame& operator[](sal_uInt16 nPos) const              { return *GetObject(nPos); }
     368             : };
     369             : 
     370             : 
     371             : // class SdrPageProperties
     372             : 
     373             : class SVX_DLLPUBLIC SdrPageProperties : public SfxListener, public svl::StyleSheetUser
     374             : {
     375             : private:
     376             :     // data
     377             :     SdrPage*                mpSdrPage;
     378             :     SfxStyleSheet*          mpStyleSheet;
     379             :     SfxItemSet*             mpProperties;
     380             : 
     381             :     // internal helpers
     382             :     void ImpRemoveStyleSheet();
     383             :     void ImpAddStyleSheet(SfxStyleSheet& rNewStyleSheet);
     384             : 
     385             :     // not implemented
     386             :     SdrPageProperties& operator=(const SdrPageProperties& rCandidate);
     387             : 
     388             : public:
     389             :     // construct/destruct
     390             :     SdrPageProperties(SdrPage& rSdrPage);
     391             :     virtual ~SdrPageProperties();
     392             : 
     393             :     // Notify(...) from baseclass SfxListener
     394             :     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE;
     395             : 
     396             :     virtual bool isUsedByModel() const SAL_OVERRIDE;
     397             : 
     398             :     // data read/write
     399       18625 :     const SfxItemSet& GetItemSet() const { return *mpProperties;}
     400             :     void PutItemSet(const SfxItemSet& rSet);
     401             :     void PutItem(const SfxPoolItem& rItem);
     402             :     void ClearItem(const sal_uInt16 nWhich = 0);
     403             : 
     404             :     // StyleSheet access
     405             :     void SetStyleSheet(SfxStyleSheet* pStyleSheet);
     406        1372 :     SfxStyleSheet* GetStyleSheet() const { return mpStyleSheet;}
     407             : };
     408             : 
     409             : 
     410             : // class SdrPage
     411             : 
     412             : class SVX_DLLPUBLIC SdrPage : public SdrObjList, public tools::WeakBase< SdrPage >
     413             : {
     414             : 
     415             :     // start PageUser section
     416             : private:
     417             :     // #111111# PageUser section
     418             :     sdr::PageUserVector                                             maPageUsers;
     419             : 
     420             : public:
     421             :     void AddPageUser(sdr::PageUser& rNewUser);
     422             :     void RemovePageUser(sdr::PageUser& rOldUser);
     423             : 
     424             : 
     425             :     // end PageUser section
     426             : 
     427             : 
     428             :     // #110094# DrawContact section
     429             : private:
     430             :     sdr::contact::ViewContact*                                      mpViewContact;
     431             : protected:
     432             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
     433             : public:
     434             :     sdr::contact::ViewContact& GetViewContact() const;
     435             : 
     436             :     // #110094# DrawContact support: Methods for handling Page changes
     437             :     void ActionChanged() const;
     438             : 
     439             :     // #i9076#
     440             :     friend class SdrModel;
     441             :     friend class SvxUnoDrawPagesAccess;
     442             : 
     443             : // this class uses its own UNO wrapper
     444             : // and thus has to set mxUnoPage (it also relies on mxUnoPage not being WeakRef)
     445             : friend class reportdesign::OSection;
     446             : 
     447             :     sal_Int32 nWdt;     // Seitengroesse
     448             :     sal_Int32 nHgt;     // Seitengroesse
     449             :     sal_Int32 nBordLft; // Seitenrand links
     450             :     sal_Int32 nBordUpp; // Seitenrand oben
     451             :     sal_Int32 nBordRgt; // Seitenrand rechts
     452             :     sal_Int32 nBordLwr; // Seitenrand unten
     453             : 
     454             : protected:
     455             :     SdrLayerAdmin*      pLayerAdmin;
     456             : private:
     457             :     SdrPageProperties*  mpSdrPageProperties;
     458             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxUnoPage;
     459             : 
     460             : public:
     461       17311 :     SdrPageProperties& getSdrPageProperties() { return *mpSdrPageProperties; }
     462        4552 :     const SdrPageProperties& getSdrPageProperties() const { return *mpSdrPageProperties; }
     463             :     const SdrPageProperties* getCorrectSdrPageProperties() const;
     464             : 
     465             : protected:
     466             :     // new MasterPageDescriptorVector
     467             :     ::sdr::MasterPageDescriptor*                    mpMasterPageDescriptor;
     468             : 
     469             :     SetOfByte  aPrefVisiLayers;
     470             :     sal_uInt16     nPageNum;
     471             : 
     472             :     // bitfield
     473             :     bool                mbMaster : 1;               // flag if this is a MasterPage
     474             :     bool                mbInserted : 1;
     475             :     bool                mbObjectsNotPersistent : 1;
     476             :     bool                mbSwappingLocked : 1;
     477             : 
     478             :     // #i93597#
     479             :     bool                mbPageBorderOnlyLeftRight : 1;
     480             : 
     481             :     void SetUnoPage(::com::sun::star::uno::Reference<
     482             :                         ::com::sun::star::drawing::XDrawPage> const&);
     483             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
     484             : 
     485             : public:
     486             :     TYPEINFO_OVERRIDE();
     487             :     SdrPage(SdrModel& rNewModel, bool bMasterPage=false);
     488             :     // Copy-Ctor und Zuweisungeoperator sind nicht getestet!
     489             :     SdrPage(const SdrPage& rSrcPage);
     490             :     virtual ~SdrPage();
     491             :     // pModel, pPage, pUpList, pOwnerObj und mbInserted werden Zuweisungeoperator nicht veraendert!
     492             :     SdrPage& operator=(const SdrPage& rSrcPage);
     493             :     virtual SdrPage* Clone() const;
     494             :     virtual SdrPage* Clone(SdrModel* pNewModel) const;
     495       80681 :     bool IsMasterPage() const       { return mbMaster; }
     496             :     void SetInserted(bool bNew = true);
     497       13355 :     bool IsInserted() const         { return mbInserted; }
     498             :     virtual void SetChanged();
     499             : 
     500             :     // #i68775# React on PageNum changes (from Model in most cases)
     501             :     void SetPageNum(sal_uInt16 nNew);
     502             :     sal_uInt16 GetPageNum() const;
     503             : 
     504             :     // #i93597# Allow page border definition to not be the full rectangle but to
     505             :     // use only the left and right vertical edges (reportdesigner)
     506           0 :     void setPageBorderOnlyLeftRight(bool bNew) { mbPageBorderOnlyLeftRight = bNew; }
     507        1941 :     bool getPageBorderOnlyLeftRight() const { return mbPageBorderOnlyLeftRight; }
     508             : 
     509             :     virtual void SetSize(const Size& aSiz);
     510             :     virtual Size GetSize() const;
     511             :     virtual void SetOrientation(Orientation eOri);
     512             :     virtual Orientation GetOrientation() const;
     513             :     virtual sal_Int32 GetWdt() const;
     514             :     virtual sal_Int32 GetHgt() const;
     515             :     virtual void  SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr);
     516             :     virtual void  SetLftBorder(sal_Int32 nBorder);
     517             :     virtual void  SetUppBorder(sal_Int32 nBorder);
     518             :     virtual void  SetRgtBorder(sal_Int32 nBorder);
     519             :     virtual void  SetLwrBorder(sal_Int32 nBorder);
     520             :     virtual sal_Int32 GetLftBorder() const;
     521             :     virtual sal_Int32 GetUppBorder() const;
     522             :     virtual sal_Int32 GetRgtBorder() const;
     523             :     virtual sal_Int32 GetLwrBorder() const;
     524             : 
     525             :     virtual void SetModel(SdrModel* pNewModel) SAL_OVERRIDE;
     526             : 
     527             :     // New MasterPage interface
     528      134552 :     bool TRG_HasMasterPage() const { return (0L != mpMasterPageDescriptor); }
     529             :     void TRG_SetMasterPage(SdrPage& rNew);
     530             :     void TRG_ClearMasterPage();
     531             :     SdrPage& TRG_GetMasterPage() const;
     532             :     const SetOfByte& TRG_GetMasterPageVisibleLayers() const;
     533             :     void TRG_SetMasterPageVisibleLayers(const SetOfByte& rNew);
     534             :     sdr::contact::ViewContact& TRG_GetMasterPageDescriptorViewContact() const;
     535             : 
     536             : protected:
     537             :     void TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage);
     538             : public:
     539             : 
     540             :     // Aenderungen an den Layern setzen nicht das Modified-Flag !
     541           0 :     const         SdrLayerAdmin& GetLayerAdmin() const                  { return *pLayerAdmin; }
     542       34768 :                   SdrLayerAdmin& GetLayerAdmin()                        { return *pLayerAdmin; }
     543             : 
     544             :     virtual OUString GetLayoutName() const;
     545             : 
     546             :     // fuer's Raster im Writer, auch fuer AlignObjects wenn 1 Objekt markiert ist
     547             :     // wenn pRect!=NULL, dann die Seiten, die von diesem Rect intersected werden
     548             :     // ansonsten die sichtbaren Seiten.
     549             :     virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const Rectangle* pRect) const;
     550             :     bool IsObjectsNotPersistent() const          { return mbObjectsNotPersistent; }
     551             :     void SetObjectsNotPersistent(bool b)     { mbObjectsNotPersistent = b; }
     552             :     // Durch Setzen dieses Flags, kann das Auslagern (Swappen) von
     553             :     // Teilen der Page (z.B. Grafiken) unterbunden werden.
     554             :     // Es werden hierdurch jedoch nicht automatisch alle ausgelagerten
     555             :     // Teile nachgeladen, dies geschieht erst bei konkretem Bedarf oder
     556             :     // durch Aufruf von SwapInAll().
     557             :     // Fuer die MasterPage(s) der Page muss dies ggf. separat gemacht werden.
     558             :     bool IsSwappingLocked() const { return mbSwappingLocked; }
     559             :     void SetSwappingLocked(bool bLock) { mbSwappingLocked = bLock; }
     560             : 
     561             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoPage();
     562             : 
     563             :     virtual SfxStyleSheet* GetTextStyleSheetForObject( SdrObject* pObj ) const;
     564             : 
     565             :     /** *deprecated* returns an averaged background color of this page */
     566             :     // #i75566# GetBackgroundColor -> GetPageBackgroundColor
     567             :     Color GetPageBackgroundColor() const;
     568             : 
     569             :     /** *deprecated* returns an averaged background color of this page */
     570             :     // #i75566# GetBackgroundColor -> GetPageBackgroundColor and bScreenDisplay hint value
     571             :     Color GetPageBackgroundColor( SdrPageView* pView, bool bScreenDisplay = true) const;
     572             : 
     573             :     /** this method returns true if the object from the ViewObjectContact should
     574             :         be visible on this page while rendering.
     575             :         bEdit selects if visibility test is for an editing view or a final render,
     576             :         like printing.
     577             :     */
     578             :     virtual bool checkVisibility(
     579             :         const sdr::contact::ViewObjectContact& rOriginal,
     580             :         const sdr::contact::DisplayInfo& rDisplayInfo,
     581             :         bool bEdit );
     582             : };
     583             : 
     584             : typedef tools::WeakReference< SdrPage > SdrPageWeakRef;
     585             : 
     586             : 
     587             : // use new redirector instead of pPaintProc
     588             : 
     589             : class SVX_DLLPUBLIC StandardCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector
     590             : {
     591             : public:
     592             :     StandardCheckVisisbilityRedirector();
     593             :     virtual ~StandardCheckVisisbilityRedirector();
     594             : 
     595             :     // all default implementations just call the same methods at the original. To do something
     596             :     // different, overload the method and at least do what the method does.
     597             :     virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
     598             :         const sdr::contact::ViewObjectContact& rOriginal,
     599             :         const sdr::contact::DisplayInfo& rDisplayInfo) SAL_OVERRIDE;
     600             : };
     601             : 
     602             : 
     603             : 
     604             : #endif // INCLUDED_SVX_SVDPAGE_HXX
     605             : 
     606             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10