diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-05-13 13:40:56 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-05-13 13:40:56 +0000 |
commit | f2770c36d6c5d7868f3cdbb74a539304d718e2ea (patch) | |
tree | d767b262e30c5b54d506209ae640f9b5e371a127 /sdext | |
parent | 084f9ffcd3f17fd540ed50d47c21002532f35967 (diff) |
INTEGRATION: CWS presenterscreen (1.2.4); FILE MERGED
2008/04/30 08:41:32 af 1.2.4.4: #i88853# PresenterSlideShowView() is not a service anymore.
2008/04/23 11:58:09 af 1.2.4.3: #i18486# Made caching optional, defaults to off.
2008/04/22 08:25:03 af 1.2.4.2: RESYNC: (1.2-1.3); FILE MERGED
2008/04/16 16:12:25 af 1.2.4.1: #i18486# Addes support for cachable views.
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterViewFactory.hxx | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/sdext/source/presenter/PresenterViewFactory.hxx b/sdext/source/presenter/PresenterViewFactory.hxx index 78077b2a7074..7da3ca1f1f9f 100644 --- a/sdext/source/presenter/PresenterViewFactory.hxx +++ b/sdext/source/presenter/PresenterViewFactory.hxx @@ -8,7 +8,7 @@ * * $RCSfile: PresenterViewFactory.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -56,14 +56,34 @@ namespace { > PresenterViewFactoryInterfaceBase; } +/** Base class for presenter views that allows the view factory to store + them in a cache and reuse deactivated views. +*/ +class CachablePresenterView +{ +public: + virtual void ActivatePresenterView (void); + + /** Called when the view is put into a cache. The view must not paint + itself while being deactive. + */ + virtual void DeactivatePresenterView (void); + +protected: + bool mbIsPresenterViewActive; + + CachablePresenterView (void); +}; + + + /** Factory of the presenter screen specific views. The supported set of views includes: a life view of the current slide, a static preview of the next slide, the notes of the current slide, - a tool bar, - a clock. + a tool bar */ class PresenterViewFactory : public ::cppu::BaseMutex, @@ -75,7 +95,6 @@ public: static const ::rtl::OUString msNotesViewURL; static const ::rtl::OUString msToolBarViewURL; static const ::rtl::OUString msSlideSorterURL; - static const ::rtl::OUString msClockViewURL; static const ::rtl::OUString msHelpViewURL; /** Create a new instance of this class and register it as resource @@ -118,6 +137,10 @@ private: mxConfigurationController; css::uno::WeakReference<css::frame::XController> mxControllerWeak; ::rtl::Reference<PresenterController> mpPresenterController; + typedef ::std::pair<css::uno::Reference<css::drawing::framework::XView>, + css::uno::Reference<css::drawing::framework::XPane> > ViewResourceDescriptor; + typedef ::std::map<rtl::OUString, ViewResourceDescriptor> ResourceContainer; + ::boost::scoped_ptr<ResourceContainer> mpResourceCache; PresenterViewFactory ( const css::uno::Reference<css::uno::XComponentContext>& rxContext, @@ -130,10 +153,15 @@ private: const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const; css::uno::Reference<css::drawing::framework::XView> CreateSlidePreviewView( + const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, + const css::uno::Reference<css::drawing::framework::XPane>& rxPane) const; + + css::uno::Reference<css::drawing::framework::XView> CreateToolBarView( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const; css::uno::Reference<css::drawing::framework::XView> CreateNotesView( - const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const; + const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, + const css::uno::Reference<css::drawing::framework::XPane>& rxPane) const; css::uno::Reference<css::drawing::framework::XView> CreateSlideSorterView( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const; @@ -141,7 +169,12 @@ private: css::uno::Reference<css::drawing::framework::XView> CreateHelpView( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const; - double GetSlideAspectRatio (void) const; + css::uno::Reference<css::drawing::framework::XResource> GetViewFromCache ( + const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, + const css::uno::Reference<css::drawing::framework::XPane>& rxAnchorPane) const; + css::uno::Reference<css::drawing::framework::XResource> CreateView( + const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, + const css::uno::Reference<css::drawing::framework::XPane>& rxAnchorPane); void ThrowIfDisposed (void) const throw (::com::sun::star::lang::DisposedException); }; |