[Libreoffice-commits] core.git: Branch 'feature/perfwork4' - 2 commits - svx/inc

Kohei Yoshida kohei.yoshida at collabora.com
Fri Oct 31 17:16:03 PDT 2014


 svx/inc/sdr/contact/viewcontactofsdrpage.hxx |  373 ++++++++++-----------------
 1 file changed, 145 insertions(+), 228 deletions(-)

New commits:
commit 345d3ad69d99601c26b2723971a4f5d0d3099637
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Oct 31 18:58:58 2014 -0400

    Add class description.
    
    Change-Id: I400efc68f7fdcfcb3be56804c9491775341782ce

diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
index b708a8f..5965dcd 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
@@ -108,6 +108,13 @@ public:
     virtual ~ViewContactOfInnerPageBorder();
 };
 
+/**
+ * This view contact corresponds with all SdrObject instances in a single
+ * SdrPage.  Its GetObjectCount() returns the number of SdrObject instances
+ * in the SdrPage that it represents, and its GetViewContact() returns the
+ * view contact of the SdrObject instance associated with the identifier
+ * passed to the method.
+ */
 class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
 {
 protected:
commit 4fcc389741931e0dd627d0ff8e6587317fd2a7f4
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Oct 31 18:34:50 2014 -0400

    Remove repetitive namespace close / open / close etc & unindent.
    
    Change-Id: I4fefd9ad6dbbc23aa0c96cf6dae6ab0b7400f27b

diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
index 09d96d0..b708a8f 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx
@@ -23,280 +23,190 @@
 #include <sal/types.h>
 #include <svx/sdr/contact/viewcontact.hxx>
 
-
-// predeclarations
 class SdrPage;
 
 namespace sdr { namespace contact {
-    class ViewContactOfSdrPage;
-}}
 
+class ViewContactOfSdrPage;
 
-
-namespace sdr
+class ViewContactOfPageSubObject : public ViewContact
 {
-    namespace contact
-    {
-        class ViewContactOfPageSubObject : public ViewContact
-        {
-        protected:
-            ViewContactOfSdrPage&                       mrParentViewContactOfSdrPage;
+protected:
+    ViewContactOfSdrPage&                       mrParentViewContactOfSdrPage;
 
-        public:
-            explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfPageSubObject();
+public:
+    explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfPageSubObject();
 
-            virtual ViewContact* GetParentContact() const SAL_OVERRIDE;
-            const SdrPage& getPage() const;
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+    virtual ViewContact* GetParentContact() const SAL_OVERRIDE;
+    const SdrPage& getPage() const;
+};
 
-
-
-namespace sdr
+class ViewContactOfPageBackground : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfPageBackground : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-
-        public:
-            explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfPageBackground();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfPageBackground();
+};
 
-
-namespace sdr
+class ViewContactOfPageShadow : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfPageShadow : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-
-        public:
-            explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfPageShadow();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
-
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfPageShadow();
+};
 
-namespace sdr
+class ViewContactOfPageFill : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfPageFill : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-
-        public:
-            explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfPageFill();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfPageFill();
+};
 
-
-namespace sdr
+class ViewContactOfMasterPage : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfMasterPage : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
-        public:
-            explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfMasterPage();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+public:
+    explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfMasterPage();
+};
 
-
-
-namespace sdr
+class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
-        public:
-            explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfOuterPageBorder();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+public:
+    explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfOuterPageBorder();
+};
 
+class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
+{
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfInnerPageBorder();
+};
 
-namespace sdr
+class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-
-        public:
-            explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfInnerPageBorder();
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+protected:
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+    virtual ~ViewContactOfPageHierarchy();
 
+    virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
+    virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
+};
 
-namespace sdr
+class ViewContactOfGrid : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
-        {
-        protected:
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-
-        public:
-            explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
-            virtual ~ViewContactOfPageHierarchy();
+protected:
+    // bitfield
+    bool                                        mbFront : 1;
 
-            virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
-            virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
+public:
+    ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
+    virtual ~ViewContactOfGrid();
 
+    bool getFront() const { return mbFront; }
+};
 
-namespace sdr
+class ViewContactOfHelplines : public ViewContactOfPageSubObject
 {
-    namespace contact
-    {
-        class ViewContactOfGrid : public ViewContactOfPageSubObject
-        {
-        protected:
-            // bitfield
-            bool                                        mbFront : 1;
-
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
+protected:
+    // bitfield
+    bool                                        mbFront : 1;
 
-        public:
-            ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
-            virtual ~ViewContactOfGrid();
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
 
-            bool getFront() const { return mbFront; }
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+public:
+    ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
+    virtual ~ViewContactOfHelplines();
 
+    bool getFront() const { return mbFront; }
+};
 
-
-namespace sdr
+class ViewContactOfSdrPage : public ViewContact
 {
-    namespace contact
+protected:
+    // the owner of this ViewContact. Set from constructor and not
+    // to be changed in any way.
+    SdrPage&                                        mrPage;
+
+    // helper viewContacts to build a clear paint hierarchy
+    ViewContactOfPageBackground                     maViewContactOfPageBackground;
+    ViewContactOfPageShadow                         maViewContactOfPageShadow;
+    ViewContactOfPageFill                           maViewContactOfPageFill;
+    ViewContactOfMasterPage                         maViewContactOfMasterPage;
+    ViewContactOfOuterPageBorder                    maViewContactOfOuterPageBorder;
+    ViewContactOfInnerPageBorder                    maViewContactOfInnerPageBorder;
+    ViewContactOfGrid                               maViewContactOfGridBack;
+    ViewContactOfHelplines                          maViewContactOfHelplinesBack;
+    ViewContactOfPageHierarchy                      maViewContactOfPageHierarchy;
+    ViewContactOfGrid                               maViewContactOfGridFront;
+    ViewContactOfHelplines                          maViewContactOfHelplinesFront;
+
+    // Create a Object-Specific ViewObjectContact, set ViewContact and
+    // ObjectContact. Always needs to return something. Default is to create
+    // a standard ViewObjectContact containing the given ObjectContact and *this
+    virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
+
+public:
+    // access to SdrObject
+    SdrPage& GetSdrPage() const
     {
-        class ViewContactOfHelplines : public ViewContactOfPageSubObject
-        {
-        protected:
-            // bitfield
-            bool                                        mbFront : 1;
-
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
+        return mrPage;
+    }
 
-        public:
-            ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
-            virtual ~ViewContactOfHelplines();
+    // basic constructor, used from SdrPage.
+    explicit ViewContactOfSdrPage(SdrPage& rObj);
+    virtual ~ViewContactOfSdrPage();
 
-            bool getFront() const { return mbFront; }
-        };
-    } // end of namespace contact
-} // end of namespace sdr
+    // Access to possible sub-hierarchy
+    virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
+    virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
 
+    // React on changes of the object of this ViewContact
+    virtual void ActionChanged() SAL_OVERRIDE;
 
+    // overload for acessing the SdrPage
+    virtual SdrPage* TryToGetSdrPage() const SAL_OVERRIDE;
 
-namespace sdr
-{
-    namespace contact
-    {
-        class ViewContactOfSdrPage : public ViewContact
-        {
-        protected:
-            // the owner of this ViewContact. Set from constructor and not
-            // to be changed in any way.
-            SdrPage&                                        mrPage;
-
-            // helper viewContacts to build a clear paint hierarchy
-            ViewContactOfPageBackground                     maViewContactOfPageBackground;
-            ViewContactOfPageShadow                         maViewContactOfPageShadow;
-            ViewContactOfPageFill                           maViewContactOfPageFill;
-            ViewContactOfMasterPage                         maViewContactOfMasterPage;
-            ViewContactOfOuterPageBorder                    maViewContactOfOuterPageBorder;
-            ViewContactOfInnerPageBorder                    maViewContactOfInnerPageBorder;
-            ViewContactOfGrid                               maViewContactOfGridBack;
-            ViewContactOfHelplines                          maViewContactOfHelplinesBack;
-            ViewContactOfPageHierarchy                      maViewContactOfPageHierarchy;
-            ViewContactOfGrid                               maViewContactOfGridFront;
-            ViewContactOfHelplines                          maViewContactOfHelplinesFront;
-
-            // Create a Object-Specific ViewObjectContact, set ViewContact and
-            // ObjectContact. Always needs to return something. Default is to create
-            // a standard ViewObjectContact containing the given ObjectContact and *this
-            virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
-
-        public:
-            // access to SdrObject
-            SdrPage& GetSdrPage() const
-            {
-                return mrPage;
-            }
-
-            // basic constructor, used from SdrPage.
-            explicit ViewContactOfSdrPage(SdrPage& rObj);
-            virtual ~ViewContactOfSdrPage();
-
-            // Access to possible sub-hierarchy
-            virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
-            virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
-
-            // React on changes of the object of this ViewContact
-            virtual void ActionChanged() SAL_OVERRIDE;
-
-            // overload for acessing the SdrPage
-            virtual SdrPage* TryToGetSdrPage() const SAL_OVERRIDE;
-
-        protected:
-            // This method is responsible for creating the graphical visualisation data
-            // ONLY based on model data
-            virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
-        };
-    } // end of namespace contact
-} // end of namespace sdr
-
+protected:
+    // This method is responsible for creating the graphical visualisation data
+    // ONLY based on model data
+    virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
+};
 
+}}
 
 #endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
 


More information about the Libreoffice-commits mailing list