diff options
Diffstat (limited to 'svx/inc')
-rw-r--r-- | svx/inc/svx/sdr/overlay/overlaymanager.hxx | 21 | ||||
-rw-r--r-- | svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx | 9 | ||||
-rw-r--r-- | svx/inc/svx/sdr/overlay/overlayobject.hxx | 1 | ||||
-rw-r--r-- | svx/inc/svx/sdrpagewindow.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/sdrpaintwindow.hxx | 12 |
5 files changed, 34 insertions, 12 deletions
diff --git a/svx/inc/svx/sdr/overlay/overlaymanager.hxx b/svx/inc/svx/sdr/overlay/overlaymanager.hxx index 532b481e81f9..5a525ac209c1 100644 --- a/svx/inc/svx/sdr/overlay/overlaymanager.hxx +++ b/svx/inc/svx/sdr/overlay/overlaymanager.hxx @@ -29,6 +29,8 @@ #ifndef _SDR_OVERLAY_OVERLAYMANAGER_HXX #define _SDR_OVERLAY_OVERLAYMANAGER_HXX +#include <boost/utility.hpp> +#include <rtl/ref.hxx> #include <svx/sdr/animation/scheduler.hxx> #include <svx/sdr/overlay/overlayobject.hxx> #include <vcl/mapmod.hxx> @@ -58,8 +60,13 @@ namespace sdr { namespace overlay { - class SVX_DLLPUBLIC OverlayManager : public ::sdr::animation::Scheduler + class SVX_DLLPUBLIC OverlayManager + : private boost::noncopyable + , protected ::sdr::animation::Scheduler + , public rtl::IReference { + private: + oslInterlockedCount mnRefCount; protected: // the OutputDevice to work on, set on construction and not to be changed OutputDevice& rmOutputDevice; @@ -92,15 +99,18 @@ namespace sdr // ViewTransformation and evtl. correct mfDiscreteOne double getDiscreteOne() const; - public: // when handing over another OverlayManager at construction, the OverlayObjects // will be taken over from it. The new one will have added all OverlayObjects // while the handed over one will have none OverlayManager( OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager = 0); + OverlayManager* pOldOverlayManager); virtual ~OverlayManager(); + public: + static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice, + OverlayManager* pOldOverlayManager = 0); + // access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D const drawinglayer::geometry::ViewInformation2D getCurrentViewInformation2D() const; @@ -140,6 +150,11 @@ namespace sdr // access to maDrawinglayerOpt const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; } + + void InsertEvent(sdr::animation::Event* pNew) { Scheduler::InsertEvent(pNew); } + + virtual oslInterlockedCount SAL_CALL acquire(); + virtual oslInterlockedCount SAL_CALL release(); }; } // end of namespace overlay } // end of namespace sdr diff --git a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx index d1cec1123cba..6f9c03305063 100644 --- a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx +++ b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx @@ -70,16 +70,19 @@ namespace sdr void ImpRestoreBackground(const Region& rRegionPixel) const; void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L); - public: // when handing over another OverlayManager at construction, the OverlayObjects // will be taken over from it. The new one will have added all OverlayObjects // while the handed over one will have none OverlayManagerBuffered( OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager = 0, - bool bRefreshWithPreRendering = false); + OverlayManager* pOldOverlayManager, + bool bRefreshWithPreRendering); virtual ~OverlayManagerBuffered(); + public: + static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice, + OverlayManager* pOldOverlayManager = 0, bool bRefreshWithPreRendering = false); + // complete redraw virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const; diff --git a/svx/inc/svx/sdr/overlay/overlayobject.hxx b/svx/inc/svx/sdr/overlay/overlayobject.hxx index 321190931a58..ea4c3e4a4510 100644 --- a/svx/inc/svx/sdr/overlay/overlayobject.hxx +++ b/svx/inc/svx/sdr/overlay/overlayobject.hxx @@ -32,6 +32,7 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/range/b2drange.hxx> #include <tools/color.hxx> +#include <rtl/ref.hxx> #include <svx/sdr/animation/scheduler.hxx> #include "svx/svxdllapi.h" #include <drawinglayer/primitive2d/baseprimitive2d.hxx> diff --git a/svx/inc/svx/sdrpagewindow.hxx b/svx/inc/svx/sdrpagewindow.hxx index 7464c1bfb101..88a0a20516d3 100644 --- a/svx/inc/svx/sdrpagewindow.hxx +++ b/svx/inc/svx/sdrpagewindow.hxx @@ -34,6 +34,7 @@ #include <com/sun/star/awt/XControlContainer.hpp> #include <com/sun/star/util/XModeChangeListener.hpp> #include <cppuhelper/implbase4.hxx> +#include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/svdtypes.hxx> // for SdrLayerID #include <svl/svarray.hxx> #include <tools/contnr.hxx> @@ -105,7 +106,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > GetControlContainer( bool _bCreateIfNecessary = true ) const; // OVERLAYMANAGER - ::sdr::overlay::OverlayManager* GetOverlayManager() const; + rtl::Reference< ::sdr::overlay::OverlayManager > GetOverlayManager() const; // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed void patchPaintWindow(SdrPaintWindow& rPaintWindow); diff --git a/svx/inc/svx/sdrpaintwindow.hxx b/svx/inc/svx/sdrpaintwindow.hxx index 24388ef324cc..9ecfbed65839 100644 --- a/svx/inc/svx/sdrpaintwindow.hxx +++ b/svx/inc/svx/sdrpaintwindow.hxx @@ -29,6 +29,7 @@ #ifndef _SDRPAINTWINDOW_HXX #define _SDRPAINTWINDOW_HXX +#include <rtl/ref.hxx> #include <vcl/virdev.hxx> #include "svx/svxdllapi.h" @@ -78,7 +79,7 @@ private: // the new OverlayManager for the new OverlayObjects. Test add here, will // replace the IAOManager as soon as it works. - ::sdr::overlay::OverlayManager* mpOverlayManager; + rtl::Reference< ::sdr::overlay::OverlayManager > mxOverlayManager; // The PreRenderDevice for PreRendering SdrPreRenderDevice* mpPreRenderDevice; @@ -90,14 +91,14 @@ private: // #i72889# flag if this is only a temporary target for repaint, default is false unsigned mbTemporaryTarget : 1; - /** Remember whether the mpOverlayManager supports buffering. Using - this flags expensive dynamic_casts on mpOverlayManager in order to + /** Remember whether the mxOverlayManager supports buffering. Using + this flags expensive dynamic_casts on mxOverlayManager in order to detect this. */ bool mbUseBuffer; // helpers - /** Create mpOverlayManager member on demand. + /** Create mxOverlayManager member on demand. @param bUseBuffer Specifies whether to use the buffered (OverlayManagerBuffered) or the unbuffered (OverlayManager) version of the overlay @@ -119,7 +120,8 @@ public: OutputDevice& GetOutputDevice() const { return mrOutputDevice; } // OVERLAYMANAGER - ::sdr::overlay::OverlayManager* GetOverlayManager() const; + rtl::Reference< ::sdr::overlay::OverlayManager > GetOverlayManager() const; + // #i73602# add flag if buffer shall be used void DrawOverlay(const Region& rRegion, bool bUseBuffer); |