summaryrefslogtreecommitdiff
path: root/include/svx/sdr/contact
diff options
context:
space:
mode:
Diffstat (limited to 'include/svx/sdr/contact')
-rw-r--r--include/svx/sdr/contact/displayinfo.hxx107
-rw-r--r--include/svx/sdr/contact/objectcontact.hxx221
-rw-r--r--include/svx/sdr/contact/objectcontactofobjlistpainter.hxx145
-rw-r--r--include/svx/sdr/contact/objectcontactofpageview.hxx144
-rw-r--r--include/svx/sdr/contact/viewcontact.hxx168
-rw-r--r--include/svx/sdr/contact/viewcontactofe3d.hxx109
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dcube.hxx61
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dextrude.hxx61
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dlathe.hxx61
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dpolygon.hxx61
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dscene.hxx114
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dsphere.hxx61
-rw-r--r--include/svx/sdr/contact/viewcontactofgraphic.hxx86
-rw-r--r--include/svx/sdr/contact/viewcontactofgroup.hxx67
-rw-r--r--include/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx77
-rw-r--r--include/svx/sdr/contact/viewcontactofpageobj.hxx68
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrcircobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactofsdredgeobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx83
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrobj.hxx96
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx65
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrole2obj.hxx77
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrpage.hxx303
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrpathobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrrectobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewcontactoftextobj.hxx57
-rw-r--r--include/svx/sdr/contact/viewcontactofunocontrol.hxx92
-rw-r--r--include/svx/sdr/contact/viewcontactofvirtobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewobjectcontact.hxx147
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofe3d.hxx74
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofe3dscene.hxx54
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofgraphic.hxx73
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofgroup.hxx54
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx57
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofpageobj.hxx63
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx66
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx62
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx54
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofsdrpage.hxx238
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofunocontrol.hxx131
-rw-r--r--include/svx/sdr/contact/viewobjectcontactredirector.hxx66
43 files changed, 3957 insertions, 0 deletions
diff --git a/include/svx/sdr/contact/displayinfo.hxx b/include/svx/sdr/contact/displayinfo.hxx
new file mode 100644
index 000000000000..6c4b85e6f989
--- /dev/null
+++ b/include/svx/sdr/contact/displayinfo.hxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_DISPLAYINFO_HXX
+#define _SDR_CONTACT_DISPLAYINFO_HXX
+
+#include <svx/svdsob.hxx>
+#include <vcl/region.hxx>
+#include "svx/svxdllapi.h"
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC DisplayInfo
+ {
+ protected:
+ // The Layers which shall be processed (visible)
+ SetOfByte maProcessLayers;
+
+ // The redraw area, in logical coordinates of OutputDevice. If Region
+ // is empty, everything needs to be redrawn
+ Region maRedrawArea;
+
+ // bitfield
+
+ // Internal flag to know when the control layer is painted. Default is
+ // false. If set to true, painting of the page, page borders and
+ // the rasters will be suppressed as if mbPageProcessingActive is set (see there).
+ // This flag is set internally from the processing mechanism to avoid double page
+ // painting when the control layer needs to be painted as last layer
+ unsigned mbControlLayerProcessingActive : 1;
+
+ // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...)
+ // will be processed at all. This flag is user-defined and will not be changed from the
+ // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed.
+ // For more granular switching page stuff painting on and off, use the according flags at the
+ // view (->Is*Visible())
+ unsigned mbPageProcessingActive : 1;
+
+ // Internal flag to remember if EnteredGroupDrawMode is active. Default is true
+ // since this mode starts activated and gets switched off when reacing
+ // the current group level. Should only be changed by instances which do
+ // primitive processing
+ unsigned mbGhostedDrawModeActive : 1;
+
+ // Internal flag to know if a MasterPage is processed as SubContent of another
+ // page. Initialized to false, this should only be changed from the instance which
+ // is processing the MasterPage asSubContent and knows what it does
+ unsigned mbSubContentActive : 1;
+
+ public:
+ // basic constructor.
+ DisplayInfo();
+
+ // destructor
+ virtual ~DisplayInfo();
+
+ // access to ProcessLayers
+ void SetProcessLayers(const SetOfByte& rSet);
+ const SetOfByte& GetProcessLayers() const { return maProcessLayers; }
+
+ // access to RedrawArea
+ void SetRedrawArea(const Region& rRegion);
+ const Region& GetRedrawArea() const { return maRedrawArea; }
+
+ // Access to ControlLayerProcessingActive flag
+ void SetControlLayerProcessingActive(bool bDoPaint);
+ bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; }
+
+ // Access to PageProcessingActive flag
+ void SetPageProcessingActive(bool bDoPaint);
+ bool GetPageProcessingActive() const { return mbPageProcessingActive; }
+
+ // Save the original DrawMode from outdev
+ void ClearGhostedDrawMode();
+ void SetGhostedDrawMode();
+ bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; }
+
+ // access to master page painting flag
+ bool GetSubContentActive() const { return mbSubContentActive; }
+ void SetSubContentActive(bool bNew);
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_DISPLAYINFO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/objectcontact.hxx b/include/svx/sdr/contact/objectcontact.hxx
new file mode 100644
index 000000000000..fb67a18803fd
--- /dev/null
+++ b/include/svx/sdr/contact/objectcontact.hxx
@@ -0,0 +1,221 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_OBJECTCONTACT_HXX
+#define _SDR_CONTACT_OBJECTCONTACT_HXX
+
+#include <svx/sdr/animation/objectanimator.hxx>
+#include "svx/svxdllapi.h"
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SetOfByte;
+class Rectangle;
+class SdrPageView;
+class OutputDevice;
+
+namespace sdr { namespace contact {
+ class DisplayInfo;
+ class ViewContact;
+ class ViewObjectContactRedirector;
+}}
+
+namespace sdr { namespace event {
+ class TimerEventHandler;
+}}
+
+namespace basegfx {
+ class B2DRange;
+ class B2DHomMatrix;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ObjectContact
+ {
+ private:
+ // make ViewObjectContact a friend to exclusively allow it to use
+ // AddViewObjectContact/RemoveViewObjectContact
+ friend class ViewObjectContact;
+
+ // All VOCs which are created using this OC, thus remembering this OC
+ // as a reference. All those VOCs need to be deleted when the OC goes down.
+ // Registering and de-registering is done in the VOC constructors/destructors.
+ std::vector< ViewObjectContact* > maViewObjectContactVector;
+
+ // A new ViewObjectContact was created and shall be remembered.
+ void AddViewObjectContact(ViewObjectContact& rVOContact);
+
+ // A ViewObjectContact was deleted and shall be forgotten.
+ virtual void RemoveViewObjectContact(ViewObjectContact& rVOContact);
+
+ // the primitiveAnimator which is used if this View and/or the contained primitives
+ // support animatedSwitchPrimitives
+ sdr::animation::primitiveAnimator maPrimitiveAnimator;
+
+ // the EventHandler for e.g. asynchronious loading of graphics
+ sdr::event::TimerEventHandler* mpEventHandler;
+
+ // The redirector. If set it is used to pipe all supported calls
+ // to the redirector
+ ViewObjectContactRedirector* mpViewObjectContactRedirector;
+
+ // the Primitive2DParameters containing view information
+ drawinglayer::geometry::ViewInformation2D maViewInformation2D;
+
+ // bitfield
+ // flag for preview renderer
+ unsigned mbIsPreviewRenderer : 1;
+
+ // method to create a EventHandler. Needs to give a result.
+ sdr::event::TimerEventHandler* CreateEventHandler();
+
+ protected:
+ // Interface to allow derivates to travel over the registered VOC's
+ sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); }
+ ViewObjectContact* getViewObjectContact(sal_uInt32 a) const { return maViewObjectContactVector[a]; }
+
+ // interface to allow derivates to set PreviewRenderer flag
+ void setPreviewRenderer(bool bNew) { mbIsPreviewRenderer = bNew; }
+
+ // interface to allow derivates to set ViewInformation2D
+ void updateViewInformation2D(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) { maViewInformation2D = rViewInformation2D; }
+
+ public:
+ // basic constructor
+ ObjectContact();
+ virtual ~ObjectContact();
+
+ // LazyInvalidate request. This is used from the VOCs to mark that they
+ // got invalidated by an ActionCanged() call. An active view needs to remember
+ // this and take action on it. Default implementation directly calls back
+ // triggerLazyInvalidate() wich promptly handles the request
+ virtual void setLazyInvalidate(ViewObjectContact& rVOC);
+
+ // call this to support evtl. preparations for repaint. Default does nothing
+ virtual void PrepareProcessDisplay();
+
+ // Process the whole displaying
+ virtual void ProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ // test if visualizing of entered groups is switched on at all. Default
+ // implementation returns sal_False.
+ virtual bool DoVisualizeEnteredGroup() const;
+
+ // get active group's (the entered group) ViewContact
+ virtual const ViewContact* getActiveViewContact() const;
+
+ // Invalidate given rectangle at the window/output which is represented by
+ // this ObjectContact. Default does nothing.
+ virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const;
+
+ // Get info if given Rectangle is visible in this view
+ virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const;
+
+ // Get info about the need to visualize GluePoints. The default
+ // is that it is not necessary.
+ virtual bool AreGluePointsVisible() const;
+
+ // method to get the primitiveAnimator
+ sdr::animation::primitiveAnimator& getPrimitiveAnimator();
+
+ // method to get the EventHandler. It will
+ // return a existing one or create a new one using CreateEventHandler().
+ sdr::event::TimerEventHandler& GetEventHandler() const;
+
+ // delete the EventHandler
+ void DeleteEventHandler();
+
+ // test if there is an EventHandler without creating one on demand
+ bool HasEventHandler() const;
+
+ // check if text animation is allowed. Default is sal_true.
+ virtual bool IsTextAnimationAllowed() const;
+
+ // check if graphic animation is allowed. Default is sal_true.
+ virtual bool IsGraphicAnimationAllowed() const;
+
+ // check if asynchronious graphis loading is allowed. Default is sal_False.
+ virtual bool IsAsynchronGraphicsLoadingAllowed() const;
+
+ // access to ViewObjectContactRedirector
+ ViewObjectContactRedirector* GetViewObjectContactRedirector() const;
+ void SetViewObjectContactRedirector(ViewObjectContactRedirector* pNew);
+
+ // check if buffering of MasterPages is allowed. Default is sal_False.
+ virtual bool IsMasterPageBufferingAllowed() const;
+
+ // print? Default is false
+ virtual bool isOutputToPrinter() const;
+
+ // window? Default is true
+ virtual bool isOutputToWindow() const;
+
+ // VirtualDevice? Default is false
+ virtual bool isOutputToVirtualDevice() const;
+
+ // recording MetaFile? Default is false
+ virtual bool isOutputToRecordingMetaFile() const;
+
+ // pdf export? Default is false
+ virtual bool isOutputToPDFFile() const;
+
+ // gray display mode
+ virtual bool isDrawModeGray() const;
+
+ // gray display mode
+ virtual bool isDrawModeBlackWhite() const;
+
+ // high contrast display mode
+ virtual bool isDrawModeHighContrast() const;
+
+ // check if this is a preview renderer. Default is sal_False.
+ bool IsPreviewRenderer() const { return mbIsPreviewRenderer; }
+
+ // get Primitive2DParameters for this view
+ const drawinglayer::geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
+
+ // access to SdrPageView. May return 0L like the default implementations do. Needs to be overloaded as needed.
+ virtual SdrPageView* TryToGetSdrPageView() const;
+
+ // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const;
+
+ // reset ViewPort at internal ViewInformation2D. This is needed when the OC is used
+ // not for ProcessDisplay() but to get a VOC associated with it. When trying to get
+ // a sequence of primitives from the VOC then, the last initialized ViewPort from
+ // the last ProcessDisplay() is used for geometric visibility testing. If this is not
+ // wanted (like in such cases) this method is used. It will reuse the current
+ // ViewInformation2D, but clear the ViewPort (no ViewPort means all is visible)
+ void resetViewPort();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_OBJECTCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
new file mode 100644
index 000000000000..9c4a0bff1763
--- /dev/null
+++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
+#define _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
+
+#include <svx/sdr/contact/objectcontact.hxx>
+#include "svx/svxdllapi.h"
+#include <svx/svdpage.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrPage;
+class SdrObject;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact
+ {
+ protected:
+ // Hierarchy access methods
+ virtual sal_uInt32 GetPaintObjectCount() const = 0;
+ virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0;
+
+ public:
+ // basic constructor/destructor
+ ObjectContactPainter();
+ virtual ~ObjectContactPainter();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ // typedef for transferring SdrObject
+ typedef ::std::vector< SdrObject* > SdrObjectVector;
+
+ class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter
+ {
+ protected:
+ // Target OutputDevice
+ OutputDevice& mrTargetOutputDevice;
+
+ // Set StartPoint for next run, also given in constructor
+ SdrObjectVector maStartObjects;
+
+ // the processed page which is the base e.g. for PageNumberFields
+ const SdrPage* mpProcessedPage;
+
+ // Hierarchy access methods
+ virtual sal_uInt32 GetPaintObjectCount() const;
+ virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const;
+
+ public:
+ // basic constructor/destructor
+ ObjectContactOfObjListPainter(
+ OutputDevice& rTargetDevice,
+ const SdrObjectVector& rObjects,
+ const SdrPage* pProcessedPage);
+ virtual ~ObjectContactOfObjListPainter();
+
+ // Process the whole displaying
+ virtual void ProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ // VirtualDevice? Default is false
+ virtual bool isOutputToVirtualDevice() const;
+
+ // recording MetaFile? Default is false
+ virtual bool isOutputToRecordingMetaFile() const;
+
+ // pdf export? Default is false
+ virtual bool isOutputToPDFFile() const;
+
+ // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ObjectContactOfPagePainter : public ObjectContactPainter
+ {
+ protected:
+ // the original ObjectContact this painter is working on
+ ObjectContact& mrOriginalObjectContact;
+
+ // Set StartPoint for next run, also given in constructor
+ SdrPageWeakRef mxStartPage;
+
+ // Hierarchy access methods
+ virtual sal_uInt32 GetPaintObjectCount() const;
+ virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const;
+
+ public:
+ // basic constructor
+ ObjectContactOfPagePainter(
+ const SdrPage* pPage,
+ ObjectContact& rOriginalObjectContact);
+ virtual ~ObjectContactOfPagePainter();
+
+ // set another page
+ void SetStartPage(const SdrPage* pPage);
+ const SdrPage* GetStartPage() const { return mxStartPage.get(); }
+
+ // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/objectcontactofpageview.hxx b/include/svx/sdr/contact/objectcontactofpageview.hxx
new file mode 100644
index 000000000000..06371bf35b81
--- /dev/null
+++ b/include/svx/sdr/contact/objectcontactofpageview.hxx
@@ -0,0 +1,144 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+#define _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+
+#include <svx/sdr/contact/objectcontact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrPageWindow;
+class SdrPage;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ObjectContactOfPageView : public ObjectContact, public Timer
+ {
+ protected:
+ // the owner of this ObjectContactOfPageView. Set from constructor and not
+ // to be changed in any way.
+ SdrPageWindow& mrPageWindow;
+
+ // Process the whole displaying, the real version
+ void DoProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ public:
+ // access to SdrPageWindow
+ SdrPageWindow& GetPageWindow() const { return mrPageWindow; }
+
+ // access to SdrPage of PageView
+ SdrPage* GetSdrPage() const;
+
+ // basic constructor, used from SdrPageView.
+ explicit ObjectContactOfPageView(SdrPageWindow& rPageWindow);
+ virtual ~ObjectContactOfPageView();
+
+ // LazyInvalidate request. This is used from the VOCs to mark that they
+ // got invalidated by an ActionCanged() call. An active view needs to remember
+ // this and take action on it. Default implementation directly calls back
+ // triggerLazyInvalidate() wich promptly handles the request
+ virtual void setLazyInvalidate(ViewObjectContact& rVOC);
+
+ // call this to support evtl. preparations for repaint
+ virtual void PrepareProcessDisplay();
+
+ // From baseclass Timer, the timeout call triggered by te LazyInvalidate mechanism
+ virtual void Timeout();
+
+ // Process the whole displaying
+ virtual void ProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ // test if visualizing of entered groups is switched on at all
+ virtual bool DoVisualizeEnteredGroup() const;
+
+ // get active group's (the entered group) ViewContact
+ virtual const ViewContact* getActiveViewContact() const;
+
+ // Invalidate given rectangle at the window/output which is represented by
+ // this ObjectContact.
+ virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const;
+
+ // Get info if given Rectangle is visible in this view
+ virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const;
+
+ // Get info about the need to visualize GluePoints. The default
+ // is that it is not necessary.
+ virtual bool AreGluePointsVisible() const;
+
+ // check if text animation is allowed.
+ virtual bool IsTextAnimationAllowed() const;
+
+ // check if graphic animation is allowed.
+ virtual bool IsGraphicAnimationAllowed() const;
+
+ // check if asynchronious graphis loading is allowed. Default is sal_False.
+ virtual bool IsAsynchronGraphicsLoadingAllowed() const;
+
+ // check if buffering of MasterPages is allowed. Default is sal_False.
+ virtual bool IsMasterPageBufferingAllowed() const;
+
+ // print? Default is false
+ virtual bool isOutputToPrinter() const;
+
+ // window? Default is true
+ virtual bool isOutputToWindow() const;
+
+ // VirtualDevice? Default is false
+ virtual bool isOutputToVirtualDevice() const;
+
+ // recording MetaFile? Default is false
+ virtual bool isOutputToRecordingMetaFile() const;
+
+ // pdf export? Default is false
+ virtual bool isOutputToPDFFile() const;
+
+ // gray display mode
+ virtual bool isDrawModeGray() const;
+
+ // gray display mode
+ virtual bool isDrawModeBlackWhite() const;
+
+ // high contrast display mode
+ virtual bool isDrawModeHighContrast() const;
+
+ // overloaded access to SdrPageView
+ virtual SdrPageView* TryToGetSdrPageView() const;
+
+ // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const;
+
+ /** sets all UNO controls which are associated with this ObjectContact to
+ design or alive mode.
+ */
+ void SetUNOControlsDesignMode( bool _bDesignMode ) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx
new file mode 100644
index 000000000000..8e136e03afba
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontact.hxx
@@ -0,0 +1,168 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACT_HXX
+#define _SDR_CONTACT_VIEWCONTACT_HXX
+
+#include <sal/types.h>
+#include "svx/svxdllapi.h"
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SetOfByte;
+class SdrPage;
+class SdrObject;
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ObjectContact;
+ class ViewObjectContact;
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContact
+ {
+ private:
+ // make ViewObjectContact a friend to exclusively allow it to use
+ // AddViewObjectContact/RemoveViewObjectContact
+ friend class ViewObjectContact;
+
+ // List of ViewObjectContacts. This contains all VOCs which were constructed
+ // with this VC. Since the VOCs remember a reference to this VC, this list needs
+ // to be kept and is used e.g. at destructor to destroy all VOCs.
+ // Registering and de-registering is done in the VOC constructors/destructors.
+ std::vector< ViewObjectContact* > maViewObjectContactVector;
+
+ // Primitive2DSequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive2d::Primitive2DSequence mxViewIndependentPrimitive2DSequence;
+
+ // A new ViewObjectContact was created and shall be remembered.
+ void AddViewObjectContact(ViewObjectContact& rVOContact);
+
+ // A ViewObjectContact was deleted and shall be forgotten.
+ void RemoveViewObjectContact(ViewObjectContact& rVOContact);
+
+ // internal tooling to delete VOCs
+ void deleteAllVOCs();
+
+ protected:
+ // Interface to allow derivates to travel over the registered VOC's
+ sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); }
+ ViewObjectContact* getViewObjectContact(sal_uInt32 a) const { return maViewObjectContactVector[a]; }
+
+ // 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);
+
+ // This method is responsible for creating the graphical visualisation data derived ONLY from
+ // the model data. It will be stored/buffered in mxViewIndependentPrimitive2DSequence. The default implementation
+ // creates a yellow replacement rectangle (1000, 1000, 5000, 3000) to visualize missing
+ // implementations. All implementations have to provide basic geometry here, this is the central
+ // visualisation method and will also be used for BoundRect computations in the long run.
+ // This means it's always an error when the default implementation is called and thus gets
+ // asserted there
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ // method for flushing View Independent Primitive2DSequence for VOC implementations
+ void flushViewIndependentPrimitive2DSequence() { mxViewIndependentPrimitive2DSequence.realloc(0); }
+
+ // basic constructor. Since this is a base class only, it shall
+ // never be called directly
+ ViewContact();
+
+ // Methods to react on start getting viewed or stop getting
+ // viewed. This info is derived from the count of members of
+ // registered ViewObjectContacts. Default does nothing.
+ virtual void StartGettingViewed();
+ virtual void StopGettingViewed();
+
+ public:
+ // basic destructor with needed cleanups
+ virtual ~ViewContact();
+
+ // get a Object-specific ViewObjectContact for a specific
+ // ObjectContact (->View). Always needs to return something.
+ ViewObjectContact& GetViewObjectContact(ObjectContact& rObjectContact);
+
+ // Test if this ViewContact has ViewObjectContacts at all. This can
+ // be used to test if this ViewContact is visualized ATM or not
+ bool HasViewObjectContacts(bool bExcludePreviews = false) const;
+
+ // Check if this primitive is animated in any OC (View) which means it has
+ // generated a PrimitiveAnimation in it's VOC
+ bool isAnimatedInAnyViewObjectContact() const;
+
+ // Access to possible sub-hierarchy and parent. GetObjectCount() default is 0L
+ // and GetViewContact default pops up an assert since it's an error if
+ // GetObjectCount has a result != 0 and it's not overloaded.
+ virtual sal_uInt32 GetObjectCount() const;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+ virtual ViewContact* GetParentContact() const;
+
+ // React on insertion of a child into DRawHierarchy starting
+ // from this object
+ void ActionChildInserted(ViewContact& rChild);
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // access to SdrObject and/or SdrPage. May return 0L like the default
+ // implementations do. Needs to be overloaded as needed.
+ virtual SdrObject* TryToGetSdrObject() const;
+ virtual SdrPage* TryToGetSdrPage() const;
+
+ // access to the local primitive. This will ensure that the primitive is
+ // current in comparing the local one with a fresh created incarnation
+ drawinglayer::primitive2d::Primitive2DSequence getViewIndependentPrimitive2DSequence() const;
+
+ // add Gluepoints (if available)
+ virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const;
+
+ // allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
+ // is a helper normally used from getViewIndependentPrimitive2DSequence(), but there is one exception
+ // for 3D scenes
+ virtual drawinglayer::primitive2d::Primitive2DSequence embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const;
+
+ // delete all existing VOCs including DrawHierarchy which will invalidate all
+ // visualisations, too. Used mostly at object removal from DrawHierarchy to
+ // delete all existing VOCs by purpose, but can also be used for other purposes.
+ // It is always possible to delete the VOCs, these are re-created on demand
+ void flushViewObjectContacts(bool bWithHierarchy = true);
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3d.hxx b/include/svx/sdr/contact/viewcontactofe3d.hxx
new file mode 100644
index 000000000000..02bdb36e53c0
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3d.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3D_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace sdr { namespace contact {
+ class ViewContactOfE3dScene;
+}}
+
+namespace drawinglayer { namespace attribute {
+ class SdrLineAttribute;
+}}
+
+namespace basegfx {
+ class BColor;
+ class B3DHomMatrix;
+}
+
+class E3dObject;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3d : public ViewContactOfSdrObj
+ {
+ protected:
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ public:
+ // basic constructor, used from E3dObject.
+ explicit ViewContactOfE3d(E3dObject& rObj);
+ virtual ~ViewContactOfE3d();
+
+ // access to E3dObject
+ E3dObject& GetE3dObject() const
+ {
+ return (E3dObject&)GetSdrObject();
+ }
+
+ // public helpers
+ drawinglayer::primitive2d::Primitive2DSequence impCreateWithGivenPrimitive3DSequence(
+ const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const;
+
+ //////////////////////////////////////////////////////////////////////////////
+ // primitive stuff
+
+ protected:
+ // Primitive3DSequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all 3D VCs which
+ // can be visualized. It does NOT contain the object transformation to be able to
+ // buffer for all possible usages
+ drawinglayer::primitive3d::Primitive3DSequence mxViewIndependentPrimitive3DSequence;
+
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in mxViewIndependentPrimitive3DSequence, but without object transformation
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const = 0;
+
+ // This method is responsible for creating the graphical visualisation data derived ONLY from
+ // the model data. The default implementation will try to create a 3D to 2D embedding (will work
+ // when scene is known) which can then be used for 2D processing concerning ranges
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ // access to the local primitive without the object's local 3D transform. This is e.g. needed
+ // to get the not-yet transformed BoundVolume for e.g. interactions
+ drawinglayer::primitive3d::Primitive3DSequence getVIP3DSWithoutObjectTransform() const;
+
+ // access to the local primitive. This will ensure that the list is
+ // current in comparing the local list content with a fresh created incarnation. It will
+ // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's
+ // local 3d transform is used
+ drawinglayer::primitive3d::Primitive3DSequence getViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dcube.hxx b/include/svx/sdr/contact/viewcontactofe3dcube.hxx
new file mode 100644
index 000000000000..8207fa558db0
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dcube.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX
+
+#include <svx/sdr/contact/viewcontactofe3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dCubeObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3dCube : public ViewContactOfE3d
+ {
+ public:
+ // basic constructor, used from SdrObject.
+ ViewContactOfE3dCube(E3dCubeObj& rCubeObj);
+ virtual ~ViewContactOfE3dCube();
+
+ // access to SdrObject
+ E3dCubeObj& GetE3dCubeObj() const
+ {
+ return (E3dCubeObj&)GetE3dObject();
+ }
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in the local primitive list. Default creates a yellow replacement rectangle.
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dextrude.hxx b/include/svx/sdr/contact/viewcontactofe3dextrude.hxx
new file mode 100644
index 000000000000..53d6b17913d2
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dextrude.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX
+
+#include <svx/sdr/contact/viewcontactofe3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dExtrudeObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3dExtrude : public ViewContactOfE3d
+ {
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dExtrude(E3dExtrudeObj& rExtrude);
+ virtual ~ViewContactOfE3dExtrude();
+
+ // access to SdrObject
+ E3dExtrudeObj& GetE3dExtrudeObj() const
+ {
+ return (E3dExtrudeObj&)GetE3dObject();
+ }
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in the local primitive list. Default creates a yellow replacement rectangle.
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dlathe.hxx b/include/svx/sdr/contact/viewcontactofe3dlathe.hxx
new file mode 100644
index 000000000000..ad57b5588195
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dlathe.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX
+
+#include <svx/sdr/contact/viewcontactofe3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dLatheObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3dLathe : public ViewContactOfE3d
+ {
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dLathe(E3dLatheObj& rLathe);
+ virtual ~ViewContactOfE3dLathe();
+
+ // access to SdrObject
+ E3dLatheObj& GetE3dLatheObj() const
+ {
+ return (E3dLatheObj&)GetE3dObject();
+ }
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in the local primitive list. Default creates a yellow replacement rectangle.
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dpolygon.hxx b/include/svx/sdr/contact/viewcontactofe3dpolygon.hxx
new file mode 100644
index 000000000000..295d1c308697
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dpolygon.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX
+
+#include <svx/sdr/contact/viewcontactofe3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dPolygonObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3dPolygon : public ViewContactOfE3d
+ {
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dPolygon(E3dPolygonObj& rPolygon);
+ virtual ~ViewContactOfE3dPolygon();
+
+ // access to SdrObject
+ E3dPolygonObj& GetE3dPolygonObj() const
+ {
+ return (E3dPolygonObj&)GetE3dObject();
+ }
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in the local primitive list. Default creates a yellow replacement rectangle.
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dscene.hxx b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
new file mode 100644
index 000000000000..bd5879fc0b9d
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
+#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
+#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
+#include <drawinglayer/geometry/viewinformation3d.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dScene;
+
+namespace basegfx {
+ class B3DRange;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContactOfE3dScene : public ViewContactOfSdrObj
+ {
+ protected:
+ // 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);
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dScene(E3dScene& rScene);
+
+ // access to SdrObject
+ E3dScene& GetE3dScene() const
+ {
+ return (E3dScene&)GetSdrObject();
+ }
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // access to ViewInformation3D and ObjectTransformation
+ const drawinglayer::geometry::ViewInformation3D& getViewInformation3D(const ::basegfx::B3DRange& rContentRange) const;
+ const drawinglayer::geometry::ViewInformation3D& getViewInformation3D() const;
+ const basegfx::B2DHomMatrix& getObjectTransformation() const;
+
+ // attribute providers
+ const drawinglayer::attribute::SdrSceneAttribute& getSdrSceneAttribute() const;
+ const drawinglayer::attribute::SdrLightingAttribute& getSdrLightingAttribute() const;
+
+ // scene primitive creators. If pLayerVisibility is given, a visibility test with the LayerID and the
+ // given SetOfByte is done.
+ drawinglayer::primitive2d::Primitive2DSequence createScenePrimitive2DSequence(const SetOfByte* pLayerVisibility) const;
+
+ // helpers to get the sequence of all contained 3D primitives and it's range,
+ // regardless of layer or visibility constraints and using a neutral ViewInformation3D
+ drawinglayer::primitive3d::Primitive3DSequence getAllPrimitive3DSequence() const;
+ basegfx::B3DRange getAllContentRange3D() const;
+
+ protected:
+ // the 3d transformation stack
+ drawinglayer::geometry::ViewInformation3D maViewInformation3D;
+
+ // the object transformation
+ basegfx::B2DHomMatrix maObjectTransformation;
+
+ // attributes
+ drawinglayer::attribute::SdrSceneAttribute maSdrSceneAttribute;
+ drawinglayer::attribute::SdrLightingAttribute maSdrLightingAttribute;
+
+ // create methods for ViewInformation3D and ObjectTransformation
+ void createViewInformation3D(const ::basegfx::B3DRange& rContentRange);
+ void createObjectTransformation();
+
+ // attribute creators
+ void createSdrSceneAttribute();
+ void createSdrLightingAttribute();
+
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dsphere.hxx b/include/svx/sdr/contact/viewcontactofe3dsphere.hxx
new file mode 100644
index 000000000000..dd245d7efa06
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dsphere.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX
+
+#include <svx/sdr/contact/viewcontactofe3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class E3dSphereObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfE3dSphere : public ViewContactOfE3d
+ {
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dSphere(E3dSphereObj& rSphere);
+ virtual ~ViewContactOfE3dSphere();
+
+ // access to SdrObject
+ E3dSphereObj& GetE3dSphereObj() const
+ {
+ return (E3dSphereObj&)GetE3dObject();
+ }
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored in the local primitive list. Default creates a yellow replacement rectangle.
+ virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofgraphic.hxx b/include/svx/sdr/contact/viewcontactofgraphic.hxx
new file mode 100644
index 000000000000..303ff79bd180
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofgraphic.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrGrafObj;
+namespace drawinglayer { namespace attribute { class SdrLineFillShadowTextAttribute; }}
+class GraphicAttr;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfGraphic : public ViewContactOfTextObj
+ {
+ private:
+ // helpers for constructing various primitive visualisations in various states
+ drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForPresObj(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute,
+ const GraphicAttr& rLocalGrafInfo) const;
+ drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForDraft(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
+
+ protected:
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ public:
+ // access to SdrObject
+ SdrGrafObj& GetGrafObject() const
+ {
+ return ((SdrGrafObj&)GetSdrObject());
+ }
+
+ // basic constructor, destructor
+ explicit ViewContactOfGraphic(SdrGrafObj& rGrafObj);
+ virtual ~ViewContactOfGraphic();
+
+ // #i102380#
+ void flushGraphicObjects();
+
+ // helpers for viusualisation state
+ bool visualisationUsesPresObj() const;
+ bool visualisationUsesDraft() const;
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofgroup.hxx b/include/svx/sdr/contact/viewcontactofgroup.hxx
new file mode 100644
index 000000000000..eb1c4a2517ce
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofgroup.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFGROUP_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFGROUP_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrObjGroup;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfGroup : public ViewContactOfSdrObj
+ {
+ protected:
+ // 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);
+
+ // internal access to SdrObject
+ SdrObjGroup& GetSdrObjGroup() const
+ {
+ return (SdrObjGroup&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfGroup(SdrObjGroup& rGroup);
+ virtual ~ViewContactOfGroup();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx b/include/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx
new file mode 100644
index 000000000000..fc2df17d9e0a
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdrmasterpagedescriptor.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SfxItemSet;
+class Bitmap;
+class MapMode;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfMasterPageDescriptor : public ViewContact
+ {
+ protected:
+ // the owner of this ViewContact. Set from constructor and not
+ // to be changed in any way.
+ sdr::MasterPageDescriptor& mrMasterPageDescriptor;
+
+ // Create a Object-Specific ViewObjectContact
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ // This method is responsible for creating the graphical visualisation data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ // basic constructor
+ explicit ViewContactOfMasterPageDescriptor(sdr::MasterPageDescriptor& rDescriptor);
+
+ // The destructor.
+ virtual ~ViewContactOfMasterPageDescriptor();
+
+ // access to MasterPageDescriptor
+ sdr::MasterPageDescriptor& GetMasterPageDescriptor() const
+ {
+ return mrMasterPageDescriptor;
+ }
+
+ // Access to possible sub-hierarchy and parent
+ virtual sal_uInt32 GetObjectCount() const;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+ virtual ViewContact* GetParentContact() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofpageobj.hxx b/include/svx/sdr/contact/viewcontactofpageobj.hxx
new file mode 100644
index 000000000000..30a53e5eb9ac
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofpageobj.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include "svx/svxdllapi.h"
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrPageObj;
+class SdrPage;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContactOfPageObj : public ViewContactOfSdrObj
+ {
+ protected:
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ // create graphical visualisation data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfPageObj(SdrPageObj& rPageObj);
+ virtual ~ViewContactOfPageObj();
+
+ // #WIP# React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // access to SdrObject
+ SdrPageObj& GetPageObj() const
+ {
+ return (SdrPageObj&)GetSdrObject();
+ }
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx b/include/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx
new file mode 100644
index 000000000000..19cc9976dbdf
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrCaptionObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrCaptionObj : public ViewContactOfSdrRectObj
+ {
+ protected:
+ // internal access to SdrCaptionObj
+ SdrCaptionObj& GetCaptionObj() const
+ {
+ return (SdrCaptionObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrCaptionObj(SdrCaptionObj& rCaptionObj);
+ virtual ~ViewContactOfSdrCaptionObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrcircobj.hxx b/include/svx/sdr/contact/viewcontactofsdrcircobj.hxx
new file mode 100644
index 000000000000..27059b275437
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrcircobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrCircObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrCircObj : public ViewContactOfSdrRectObj
+ {
+ protected:
+ // internal access to SdrCircObj
+ SdrCircObj& GetCircObj() const
+ {
+ return (SdrCircObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrCircObj(SdrCircObj& rCircObj);
+ virtual ~ViewContactOfSdrCircObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdredgeobj.hxx b/include/svx/sdr/contact/viewcontactofsdredgeobj.hxx
new file mode 100644
index 000000000000..0ca7d4101b7b
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdredgeobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrEdgeObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrEdgeObj : public ViewContactOfTextObj
+ {
+ protected:
+ // internal access to SdrEdgeObj
+ SdrEdgeObj& GetEdgeObj() const
+ {
+ return (SdrEdgeObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrEdgeObj(SdrEdgeObj& rEdgeObj);
+ virtual ~ViewContactOfSdrEdgeObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx b/include/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx
new file mode 100644
index 000000000000..83a32a17a9ec
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrMeasureObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrMeasureObj : public ViewContactOfTextObj
+ {
+ protected:
+ // internal access to SdrMeasureObj
+ SdrMeasureObj& GetMeasureObj() const
+ {
+ return (SdrMeasureObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrMeasureObj(SdrMeasureObj& rMeasureObj);
+ virtual ~ViewContactOfSdrMeasureObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
new file mode 100644
index 000000000000..3ad8580cf12e
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include "svx/svxdllapi.h"
+#include <tools/gen.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrMediaObj;
+namespace avmedia { class MediaItem; }
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContactOfSdrMediaObj : public ViewContactOfSdrObj
+ {
+ friend class ViewObjectContactOfSdrMediaObj;
+
+ public:
+
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrMediaObj( SdrMediaObj& rMediaObj );
+ virtual ~ViewContactOfSdrMediaObj();
+
+ public:
+
+ // access to SdrMediaObj
+ SdrMediaObj& GetSdrMediaObj() const
+ {
+ return (SdrMediaObj&)GetSdrObject();
+ }
+
+ Size getPreferredSize() const;
+
+ void updateMediaItem( ::avmedia::MediaItem& rItem ) const;
+ void executeMediaItem( const ::avmedia::MediaItem& rItem );
+
+ protected:
+
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ // get notified if some properties have changed
+ virtual void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrobj.hxx b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
new file mode 100644
index 000000000000..b628637cb707
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdtakitm.hxx>
+#include "svx/svxdllapi.h"
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrObject;
+class GeoStat;
+class Bitmap;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContactOfSdrObj : public ViewContact
+ {
+ protected:
+ // the owner of this ViewContact. Set from constructor and not
+ // to be changed in any way.
+ SdrObject& mrObject;
+
+ // Remember AnimationKind of object. Used to find out if that kind
+ // has changed in ActionChanged()
+ SdrTextAniKind meRememberedAnimationKind;
+
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ public:
+ // access to SdrObject
+ SdrObject& GetSdrObject() const
+ {
+ return mrObject;
+ }
+
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrObj(SdrObject& rObj);
+ virtual ~ViewContactOfSdrObj();
+
+ // Access to possible sub-hierarchy
+ virtual sal_uInt32 GetObjectCount() const;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+ virtual ViewContact* GetParentContact() const;
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // overload for acessing the SdrObject
+ virtual SdrObject* TryToGetSdrObject() const;
+
+ //////////////////////////////////////////////////////////////////////////////
+ // primitive stuff
+
+ // add Gluepoints (if available)
+ virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const;
+
+ // allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
+ // is a helper normally used from getViewIndependentPrimitive2DSequence(), but there is one exception
+ // for 3D scenes
+ virtual drawinglayer::primitive2d::Primitive2DSequence embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/include/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx
new file mode 100644
index 000000000000..8b4e06100a0c
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX
+
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrObjCustomShape;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrObjCustomShape : public ViewContactOfTextObj
+ {
+ protected:
+ // internal access to SdrObjCustomShape
+ SdrObjCustomShape& GetCustomShapeObj() const
+ {
+ return (SdrObjCustomShape&)GetSdrObject();
+ }
+
+ // #i101684# internal tooling
+ basegfx::B2DRange getCorrectedTextBoundRect() const;
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape);
+ virtual ~ViewContactOfSdrObjCustomShape();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrole2obj.hxx b/include/svx/sdr/contact/viewcontactofsdrole2obj.hxx
new file mode 100644
index 000000000000..fb97f3e49884
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrOle2Obj;
+class Graphic;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrOle2Obj : public ViewContactOfSdrRectObj
+ {
+ protected:
+ // Create a Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ public:
+ // access to SdrOle2Obj
+ SdrOle2Obj& GetOle2Obj() const
+ {
+ return (SdrOle2Obj&)GetSdrObject();
+ }
+
+ /// helper to create transformation from SdrObject
+ basegfx::B2DHomMatrix createObjectTransform() const;
+
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj);
+ virtual ~ViewContactOfSdrOle2Obj();
+
+ // helper for creating a OLE sequence for this object. It takes care od attributes, needed
+ // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from
+ // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true
+ // from the VOC which knows that
+ drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters() const;
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false)
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrpage.hxx b/include/svx/sdr/contact/viewcontactofsdrpage.hxx
new file mode 100644
index 000000000000..b194108541ac
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrpage.hxx
@@ -0,0 +1,303 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/contact/viewcontact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SdrPage;
+
+namespace sdr { namespace contact {
+ class ViewContactOfSdrPage;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfPageSubObject : public ViewContact
+ {
+ protected:
+ ViewContactOfSdrPage& mrParentViewContactOfSdrPage;
+
+ public:
+ explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfPageSubObject();
+
+ virtual ViewContact* GetParentContact() const;
+ const SdrPage& getPage() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfPageBackground : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfPageBackground();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfPageShadow : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfPageShadow();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfPageFill : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfPageFill();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfMasterPage : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfMasterPage();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfOuterPageBorder();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfInnerPageBorder();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
+ {
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
+ virtual ~ViewContactOfPageHierarchy();
+
+ virtual sal_uInt32 GetObjectCount() const;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfGrid : public ViewContactOfPageSubObject
+ {
+ protected:
+ // bitfield
+ unsigned mbFront : 1;
+
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
+ virtual ~ViewContactOfGrid();
+
+ bool getFront() const { return mbFront; }
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfHelplines : public ViewContactOfPageSubObject
+ {
+ protected:
+ // bitfield
+ unsigned mbFront : 1;
+
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+
+ public:
+ ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
+ virtual ~ViewContactOfHelplines();
+
+ bool getFront() const { return mbFront; }
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+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);
+
+ 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;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // overload for acessing the SdrPage
+ virtual SdrPage* TryToGetSdrPage() const;
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrpathobj.hxx b/include/svx/sdr/contact/viewcontactofsdrpathobj.hxx
new file mode 100644
index 000000000000..19ef798b8aaf
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrpathobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrPathObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrPathObj : public ViewContactOfTextObj
+ {
+ protected:
+ // internal access to SdrPathObj
+ SdrPathObj& GetPathObj() const
+ {
+ return (SdrPathObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrPathObj(SdrPathObj& rTextObj);
+ virtual ~ViewContactOfSdrPathObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
new file mode 100644
index 000000000000..7d78befffe0e
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactoftextobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrRectObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfSdrRectObj : public ViewContactOfTextObj
+ {
+ protected:
+ // internal access to SdrRectObj
+ SdrRectObj& GetRectObj() const
+ {
+ return (SdrRectObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrRectObj(SdrRectObj& rTextObj);
+ virtual ~ViewContactOfSdrRectObj();
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactoftextobj.hxx b/include/svx/sdr/contact/viewcontactoftextobj.hxx
new file mode 100644
index 000000000000..bb302ad8f9c0
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactoftextobj.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrTextObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewContactOfTextObj : public ViewContactOfSdrObj
+ {
+ protected:
+ // internal access to SdrTextObj
+ SdrTextObj& GetTextObj() const
+ {
+ return (SdrTextObj&)GetSdrObject();
+ }
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfTextObj(SdrTextObj& rTextObj);
+ virtual ~ViewContactOfTextObj();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofunocontrol.hxx b/include/svx/sdr/contact/viewcontactofunocontrol.hxx
new file mode 100644
index 000000000000..aeeb2d6183c0
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofunocontrol.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
+#define SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
+#include <svx/svxdllapi.h>
+
+#include <memory>
+
+class OutputDevice;
+class Window;
+class SdrUnoObj;
+namespace com { namespace sun { namespace star {
+ namespace awt {
+ class XControl;
+ class XControlContainer;
+ }
+} } }
+
+//........................................................................
+namespace sdr { namespace contact {
+//........................................................................
+
+ //====================================================================
+ //= ViewContactOfUnoControl
+ //====================================================================
+ class ViewContactOfUnoControl_Impl;
+ class SVX_DLLPRIVATE ViewContactOfUnoControl : public ViewContactOfSdrObj
+ {
+ private:
+ ::std::auto_ptr< ViewContactOfUnoControl_Impl > m_pImpl;
+
+ public:
+ // access to SdrObject
+ SdrUnoObj& GetSdrUnoObj() const
+ {
+ return ((SdrUnoObj&)GetSdrObject());
+ }
+
+ explicit ViewContactOfUnoControl( SdrUnoObj& _rUnoObject );
+ virtual ~ViewContactOfUnoControl();
+
+ /** access control to selected members
+ */
+ struct SdrUnoObjAccessControl { friend class ::SdrUnoObj; private: SdrUnoObjAccessControl() { } };
+
+ /** retrieves a temporary XControl instance, whose parent is the given window
+ @seealso SdrUnoObj::GetTemporaryControlForWindow
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
+ getTemporaryControlForWindow( const Window& _rWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer ) const;
+
+ protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact );
+
+ private:
+ ViewContactOfUnoControl(); // never implemented
+ ViewContactOfUnoControl( const ViewContactOfUnoControl& ); // never implemented
+ ViewContactOfUnoControl& operator=( const ViewContactOfUnoControl& ); // never implemented
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+
+//........................................................................
+} } // namespace sdr::contact
+//........................................................................
+
+#endif // SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofvirtobj.hxx b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
new file mode 100644
index 000000000000..8e3719eae357
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+#define _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SdrVirtObj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewContactOfVirtObj : public ViewContactOfSdrObj
+ {
+ protected:
+ // internal access to SdrObject. Iplementation in *.cxx to avoid
+ // including SdrVirtObj here.
+ SdrVirtObj& GetVirtObj() const;
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfVirtObj(SdrVirtObj& rObj);
+ virtual ~ViewContactOfVirtObj();
+
+ // Access to possible sub-hierarchy
+ virtual sal_uInt32 GetObjectCount() const;
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx b/include/svx/sdr/contact/viewobjectcontact.hxx
new file mode 100644
index 000000000000..96c3918a4c42
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -0,0 +1,147 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+
+#include <sal/types.h>
+
+#include <vector>
+#include "svx/svxdllapi.h"
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class Region;
+
+namespace sdr { namespace contact {
+ class DisplayInfo;
+ class ObjectContact;
+ class ViewContact;
+ class ViewObjectContactRedirector;
+}}
+
+namespace sdr { namespace animation {
+ class PrimitiveAnimation;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContact
+ {
+ private:
+ // must-exist and constant contacts
+ ObjectContact& mrObjectContact;
+ ViewContact& mrViewContact;
+
+ // This range defines the object's BoundRect
+ basegfx::B2DRange maObjectRange;
+
+ // PrimitiveSequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive2d::Primitive2DSequence mxPrimitive2DSequence;
+
+ // the PrimitiveAnimation if Primitive2DSequence contains animations
+ sdr::animation::PrimitiveAnimation* mpPrimitiveAnimation;
+
+ // bitfield
+ // This bool gets set when the object gets invalidated by ActionChanged() and
+ // can be used from the OC to late-invalidates
+ unsigned mbLazyInvalidate : 1;
+
+ protected:
+ // make redirector a protected friend, it needs to call createPrimitives as default action
+ friend class ViewObjectContactRedirector;
+
+ // Called from getPrimitive2DSequence() when vector has changed. Evaluate object animation
+ // and setup accordingly
+ void checkForPrimitive2DAnimations();
+
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored/cached in the local primitive. Default gets view-independent Primitive
+ // from the ViewContact using ViewContact::getViewIndependentPrimitive2DSequence(), takes care of
+ // visibility, handles glue and ghosted.
+ // This method will not handle included hierarchies and not check geometric visibility.
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ // method for flushing Primitive2DSequence for VOC implementations
+ void flushPrimitive2DSequence() { mxPrimitive2DSequence.realloc(0); }
+
+ public:
+ // basic constructor.
+ ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContact();
+
+ // access to ObjectContact
+ ObjectContact& GetObjectContact() const { return mrObjectContact; }
+
+ // access to ViewContact
+ ViewContact& GetViewContact() const { return mrViewContact; }
+
+ // get the oebject's size range
+ const basegfx::B2DRange& getObjectRange() const;
+
+ // A ViewObjectContact was deleted and shall be forgotten.
+ void RemoveViewObjectContact(ViewObjectContact& rVOContact);
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // LazyInvalidate handling
+ void triggerLazyInvalidate();
+
+ // Check if this primitive is animated in any OC (View) which means it has
+ // generated a PrimitiveAnimation
+ bool isAnimated() const { return (0 != mpPrimitiveAnimation); }
+
+ // Take some action when new objects are inserted
+ virtual void ActionChildInserted(ViewContact& rChild);
+
+ // access to the local primitive. This will ensure that the local primitive is
+ // current in comparing the local one with a fresh created incarnation
+ // This method will not handle included hierarchies and not check visibility.
+ drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ // test this VOC for visibility concerning model-view stuff like e.g. Layer
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+
+ // test this VOC for ghosted mode
+ virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const;
+
+ // process this primitive: Eventually also recursively travel an existing hierarchy,
+ // e.g. for group objects, scenes or pages. This method will test geometrical visibility.
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+
+ // just process the sub-hierarchy, used as tooling from getPrimitive2DSequenceHierarchy
+ drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofe3d.hxx b/include/svx/sdr/contact/viewobjectcontactofe3d.hxx
new file mode 100644
index 000000000000..f0fa2758b7f3
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofe3d.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace sdr { namespace contact {
+ class ViewObjectContactOfE3dScene;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewObjectContactOfE3d : public ViewObjectContactOfSdrObj
+ {
+ protected:
+ // Primitive3D sequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive3d::Primitive3DSequence mxPrimitive3DSequence;
+
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored/cached in the local primitive. Default gets view-independent Primitive3D
+ // from the ViewContact using ViewContact::getViewIndependentPrimitive3DSequence(), takes care of
+ // visibility and ghosted.
+ // This method will not handle included hierarchies and not check geometric visibility.
+ drawinglayer::primitive3d::Primitive3DSequence createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ // also overload the 2d method to deliver a 2d object with embedd3d 3d and the 3d transformation which is able to
+ // answer the get2DRange question accordingly
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfE3d();
+
+ // access to the local primitive sequence. This will ensure that the list is
+ // current in comparing the local list content with a fresh created incarnation
+ // This method will not handle included hierarchies or visibility.
+ drawinglayer::primitive3d::Primitive3DSequence getPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofe3dscene.hxx b/include/svx/sdr/contact/viewobjectcontactofe3dscene.hxx
new file mode 100644
index 000000000000..d6d405f5ef95
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofe3dscene.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfE3dScene : public ViewObjectContactOfSdrObj
+ {
+ protected:
+ // 2d primitive creator
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ // basic constructor.
+ ViewObjectContactOfE3dScene(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfE3dScene();
+
+ // process this primitive: Eventually also recursively travel an existing hierarchy,
+ // e.g. for group objects, scenes or pages. This method will test geometrical visibility.
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofgraphic.hxx b/include/svx/sdr/contact/viewobjectcontactofgraphic.hxx
new file mode 100644
index 000000000000..e8200d6a429a
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofgraphic.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SdrGrafObj;
+
+namespace sdr { namespace event {
+ class AsynchGraphicLoadingEvent;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewObjectContactOfGraphic : public ViewObjectContactOfSdrObj
+ {
+ private:
+ // allow async loading event helper to call tooling methods
+ friend class sdr::event::AsynchGraphicLoadingEvent;
+
+ // Member which takes care for the asynch loading events which may be necessary
+ // for asynch graphics loading.
+ sdr::event::AsynchGraphicLoadingEvent* mpAsynchLoadEvent;
+
+ // async graphics loading helpers. Only to be used internally or from the
+ // event helper class (in .cxx file)
+ bool impPrepareGraphicWithAsynchroniousLoading();
+ bool impPrepareGraphicWithSynchroniousLoading();
+ void doAsynchGraphicLoading();
+ void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent);
+
+ protected:
+ SdrGrafObj& getSdrGrafObj();
+
+ // This method is responsible for creating the graphical visualisation data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfGraphic();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofgroup.hxx b/include/svx/sdr/contact/viewobjectcontactofgroup.hxx
new file mode 100644
index 000000000000..fda5610e0568
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofgroup.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfGroup : public ViewObjectContactOfSdrObj
+ {
+ public:
+ // basic constructor.
+ ViewObjectContactOfGroup(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfGroup();
+
+ // This method recursively paints the draw hierarchy.
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+
+ private:
+ virtual bool isPrimitiveVisibleOnAnyLayer(const SetOfByte& aLayers) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx b/include/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx
new file mode 100644
index 000000000000..f09bd03d86a9
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX
+
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace sdr {
+ class MasterPageDescriptor;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewObjectContactOfMasterPageDescriptor : public ViewObjectContact
+ {
+ public:
+ ViewObjectContactOfMasterPageDescriptor(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfMasterPageDescriptor();
+
+ // access to MasterPageDescriptor
+ sdr::MasterPageDescriptor& GetMasterPageDescriptor() const;
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx
new file mode 100644
index 000000000000..420a464319d5
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace sdr { namespace contact {
+ class PagePrimitiveExtractor;
+}}
+
+class SdrPage;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageObj : public ViewObjectContactOfSdrObj
+ {
+ private:
+ // the page painter helper
+ PagePrimitiveExtractor* mpExtractor;
+
+ protected:
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored/cached in the local primitive.
+ // This method will not handle included hierarchies and not check geometric visibility.
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageObj();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
new file mode 100644
index 000000000000..e1e24dab8442
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+#include <tools/gen.hxx>
+
+namespace avmedia { class MediaItem; }
+class Window;
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SdrMediaWindow;
+
+ class ViewObjectContactOfSdrMediaObj : public ViewObjectContactOfSdrObj
+ {
+ public:
+
+ ViewObjectContactOfSdrMediaObj( ObjectContact& rObjectContact,
+ ViewContact& rViewContact,
+ const ::avmedia::MediaItem& rMediaItem );
+ virtual ~ViewObjectContactOfSdrMediaObj();
+
+ public:
+
+ Window* getWindow() const;
+
+ Size getPreferredSize() const;
+
+ void updateMediaItem( ::avmedia::MediaItem& rItem ) const;
+ void executeMediaItem( const ::avmedia::MediaItem& rItem );
+
+ private:
+
+ ::sdr::contact::SdrMediaWindow* mpMediaWindow;
+
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx
new file mode 100644
index 000000000000..e0384426add3
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SdrObject;
+class SetOfByte;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfSdrObj : public ViewObjectContact
+ {
+ /** Test whether the primitive is visible on any layer from @c aLayers
+
+ This should be overriden by ViewObjectContacts of SDR classes
+ that have subparts which can be on different layers (that is,
+ SdrObjGroup .-)
+ */
+ virtual bool isPrimitiveVisibleOnAnyLayer(const SetOfByte& aLayers) const;
+
+ protected:
+ const SdrObject& getSdrObject() const;
+
+ public:
+ ViewObjectContactOfSdrObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfSdrObj();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx
new file mode 100644
index 000000000000..6fe19c742481
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+class SdrOle2Obj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class ViewObjectContactOfSdrOle2Obj : public ViewObjectContactOfSdrObj
+ {
+ protected:
+ const SdrOle2Obj& getSdrOle2Object() const;
+
+ // This method is responsible for creating the graphical visualisation data
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfSdrOle2Obj();
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrpage.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrpage.hxx
new file mode 100644
index 000000000000..588554b7dd92
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofsdrpage.hxx
@@ -0,0 +1,238 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX
+
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SdrPage;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageSubObject : public ViewObjectContact
+ {
+ protected:
+ const SdrPage& getPage() const;
+
+ public:
+ ViewObjectContactOfPageSubObject(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageSubObject();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageBackground : public ViewObjectContactOfPageSubObject
+ {
+ protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfPageBackground(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageBackground();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfMasterPage : public ViewObjectContactOfPageSubObject
+ {
+ protected:
+ public:
+ ViewObjectContactOfMasterPage(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfMasterPage();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageFill : public ViewObjectContactOfPageSubObject
+ {
+ protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfPageFill(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageFill();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageShadow : public ViewObjectContactOfPageSubObject
+ {
+ public:
+ ViewObjectContactOfPageShadow(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageShadow();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfOuterPageBorder : public ViewObjectContactOfPageSubObject
+ {
+ public:
+ ViewObjectContactOfOuterPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfOuterPageBorder();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfInnerPageBorder : public ViewObjectContactOfPageSubObject
+ {
+ public:
+ ViewObjectContactOfInnerPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfInnerPageBorder();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageHierarchy : public ViewObjectContactOfPageSubObject
+ {
+ public:
+ ViewObjectContactOfPageHierarchy(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageHierarchy();
+
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageGrid : public ViewObjectContactOfPageSubObject
+ {
+ protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfPageGrid(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageGrid();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfPageHelplines : public ViewObjectContactOfPageSubObject
+ {
+ protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ public:
+ ViewObjectContactOfPageHelplines(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfPageHelplines();
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ class SVX_DLLPUBLIC ViewObjectContactOfSdrPage : public ViewObjectContact
+ {
+ public:
+ ViewObjectContactOfSdrPage(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfSdrPage();
+
+ virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const;
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/include/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
new file mode 100644
index 000000000000..a0077a3aa65e
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
+#define SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ref.hxx>
+#include <svx/svxdllapi.h>
+
+class OutputDevice;
+class Window;
+class SdrUnoObj;
+namespace com { namespace sun { namespace star {
+ namespace awt {
+ class XControl;
+ class XControlContainer;
+ }
+} } }
+
+//........................................................................
+namespace sdr { namespace contact {
+//........................................................................
+
+ class ViewContactOfUnoControl;
+ class ObjectContactOfPageView;
+ //====================================================================
+ //= ViewObjectContactOfUnoControl
+ //====================================================================
+ class ViewObjectContactOfUnoControl_Impl;
+ class SVX_DLLPRIVATE ViewObjectContactOfUnoControl : public ViewObjectContactOfSdrObj
+ {
+ protected:
+ ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl;
+
+ public:
+ ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
+
+ /// returns the ->XControl instance belonging to the instance, creates it if necessary
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
+ getControl();
+
+ /** retrieves a temporary XControl instance, whose parent is the given device
+ @seealso SdrUnoObj::GetTemporaryControlForWindow
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
+ getTemporaryControlForWindow(
+ const Window& _rWindow,
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer,
+ const SdrUnoObj& _rUnoObject
+ );
+
+ /// ensures that the control belonging to this instances has a given visibility
+ void ensureControlVisibility( bool _bVisible ) const;
+
+ /** sets the design/alive mode of the control
+ */
+ void setControlDesignMode( bool _bDesignMode ) const;
+
+ /** callback from impl class to react on changes of properties form the XControlModel
+ */
+ void propertyChange();
+
+ /** React on changes of the object of this ViewContact
+ */
+ virtual void ActionChanged();
+
+ /** to be called when any aspect of the control which requires view updates changed
+ */
+ struct ImplAccess { friend class ViewObjectContactOfUnoControl_Impl; friend class ViewObjectContactOfUnoControl; private: ImplAccess() { } };
+ void onControlChangedOrModified( ImplAccess ) { impl_onControlChangedOrModified(); }
+
+ protected:
+ ~ViewObjectContactOfUnoControl();
+
+ // support for Primitive2D
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ // visibility check
+ virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const;
+ /// to be called when any aspect of the control which requires view updates changed
+ void impl_onControlChangedOrModified();
+
+ private:
+ ViewObjectContactOfUnoControl(); // never implemented
+ ViewObjectContactOfUnoControl( const ViewObjectContactOfUnoControl& ); // never implemented
+ ViewObjectContactOfUnoControl& operator=( const ViewObjectContactOfUnoControl& ); // never implemented
+ };
+
+ //====================================================================
+ //= UnoControlPrintOrPreviewContact
+ //====================================================================
+ class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl
+ {
+ public:
+ UnoControlPrintOrPreviewContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
+ ~UnoControlPrintOrPreviewContact();
+
+ private:
+ UnoControlPrintOrPreviewContact(); // never implemented
+ UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ); // never implemented
+ UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ); // never implemented
+
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
+ };
+
+//........................................................................
+} } // namespace sdr::contact
+//........................................................................
+
+#endif // SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactredirector.hxx b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
new file mode 100644
index 000000000000..d7f16e1b60bd
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+#define _SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+
+#include "svx/svxdllapi.h"
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace sdr { namespace contact {
+ class DisplayInfo;
+ class ViewObjectContact;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace contact
+ {
+ // This class provides a mechanism to redirect the paint mechanism for all or
+ // single ViewObjectContacts. An own derivation may be set at single ViewContacts
+ // or at the ObjectContact for redirecting all. If both is used, the one at single
+ // objects will have priority.
+ class SVX_DLLPUBLIC ViewObjectContactRedirector
+ {
+ public:
+ // basic constructor.
+ ViewObjectContactRedirector();
+
+ // The destructor.
+ virtual ~ViewObjectContactRedirector();
+
+ // all default implementations just call the same methods at the original. To do something
+ // different, overload the method and at least do what the method does.
+ virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo);
+ };
+ } // end of namespace contact
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */