Kaydet (Commit) 84b08beb authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS presenterscreen (1.2.4); FILE MERGED

2008/04/28 09:18:11 af 1.2.4.4: #i18486# Added GetScreenNumber() method.
2008/04/22 08:40:38 af 1.2.4.3: #i18486# Changed startup details.
2008/04/22 08:24:56 af 1.2.4.2: RESYNC: (1.2-1.3); FILE MERGED
2008/04/16 15:57:30 af 1.2.4.1: #i18486# Added detection of correct display for the presenter screen.
üst ef6cb209
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* $RCSfile: PresenterScreen.hxx,v $ * $RCSfile: PresenterScreen.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "PresenterConfigurationAccess.hxx" #include "PresenterConfigurationAccess.hxx"
#include "PresenterPaneContainer.hxx" #include "PresenterPaneContainer.hxx"
#include <cppuhelper/compbase2.hxx> #include <cppuhelper/compbase1.hxx>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XController.hpp>
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
#include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/presentation/XSlideShowController.hpp> #include <com/sun/star/presentation/XSlideShowController.hpp>
#include <com/sun/star/presentation/XPresentation2.hpp>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
...@@ -57,37 +58,35 @@ class PresenterWindowManager; ...@@ -57,37 +58,35 @@ class PresenterWindowManager;
class PresenterController; class PresenterController;
namespace { namespace {
typedef ::cppu::WeakComponentImplHelper2 < typedef ::cppu::WeakComponentImplHelper1 <
css::task::XJob, css::task::XJob
css::document::XEventListener > PresenterScreenInterfaceBase; > PresenterScreenJobInterfaceBase;
typedef ::cppu::WeakComponentImplHelper1 <
css::lang::XEventListener
> PresenterScreenInterfaceBase;
} }
/** This is the bootstrap class of the presenter screen. It is registered
as drawing framework startup service. That means that every drawing
framework instance creates an instance of this class.
<p>A PresenterScreen object registers itself as listener for drawing
framework configuration changes. It waits for the full screen marker (a /** The PresenterScreenJob service is instantiated every time a document is
top level resource) to appear in the current configuration. When that created or loaded. In its execute() method it then filters out all
happens the actual presenter screen is initialized. A new non-Impress documents and creates and registers a new PresenterScreen
PresenterController is created and takes over the task of controlling object.
the presenter screen.</p>
*/ */
class PresenterScreen class PresenterScreenJob
: private ::boost::noncopyable, : private ::boost::noncopyable,
private ::cppu::BaseMutex, private ::cppu::BaseMutex,
public PresenterScreenInterfaceBase public PresenterScreenJobInterfaceBase
{ {
public: public:
void SAL_CALL disposing (void);
static ::rtl::OUString getImplementationName_static (void); static ::rtl::OUString getImplementationName_static (void);
static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static (void); static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static (void);
static css::uno::Reference<css::uno::XInterface> Create( static css::uno::Reference<css::uno::XInterface> Create(
const css::uno::Reference<css::uno::XComponentContext>& rxContext) const css::uno::Reference<css::uno::XComponentContext>& rxContext)
SAL_THROW((css::uno::Exception)); SAL_THROW((css::uno::Exception));
virtual void SAL_CALL disposing (void);
// XJob // XJob
...@@ -97,9 +96,50 @@ public: ...@@ -97,9 +96,50 @@ public:
css::uno::Exception, css::uno::Exception,
css::uno::RuntimeException); css::uno::RuntimeException);
// document::XEventListener private:
PresenterScreenJob (const css::uno::Reference<css::uno::XComponentContext>& rxContext);
virtual ~PresenterScreenJob (void);
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
};
/** This is the bootstrap class of the presenter screen. It is registered
as drawing framework startup service. That means that every drawing
framework instance creates an instance of this class.
<p>A PresenterScreen object registers itself as listener for drawing
framework configuration changes. It waits for the full screen marker (a
top level resource) to appear in the current configuration. When that
happens the actual presenter screen is initialized. A new
PresenterController is created and takes over the task of controlling
the presenter screen.</p>
*/
class PresenterScreen
: private ::boost::noncopyable,
private ::cppu::BaseMutex,
public PresenterScreenInterfaceBase
{
public:
PresenterScreen (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::frame::XModel2>& rxModel);
virtual ~PresenterScreen (void);
virtual void SAL_CALL disposing (void);
/** Make the presenter screen visible.
*/
void InitializePresenterScreen (void);
/** Do not call ShutdownPresenterScreen() directly. Call
RequestShutdownPresenterScreen() instead. It will issue an
asynchronous call to ShutdownPresenterScreen() when that is safe.
*/
void RequestShutdownPresenterScreen (void);
virtual void SAL_CALL notifyEvent( const css::document::EventObject& Event ) throw (css::uno::RuntimeException);
// XEventListener // XEventListener
...@@ -120,12 +160,15 @@ private: ...@@ -120,12 +160,15 @@ private:
css::uno::Reference<css::drawing::framework::XResourceFactory> mxPaneFactory; css::uno::Reference<css::drawing::framework::XResourceFactory> mxPaneFactory;
css::uno::Reference<css::drawing::framework::XResourceFactory> mxViewFactory; css::uno::Reference<css::drawing::framework::XResourceFactory> mxViewFactory;
PresenterScreen (const css::uno::Reference<css::uno::XComponentContext>& rxContext); class ViewDescriptor
virtual ~PresenterScreen (void); {
public:
::rtl::OUString msTitle;
bool mbIsOpaque;
};
typedef ::std::map<rtl::OUString,ViewDescriptor> ViewDescriptorContainer;
ViewDescriptorContainer maViewDescriptors;
/** Make the presenter screen visible.
*/
void InitializePresenterScreen (void);
/** Deactivate the currently active panes to make room for the full /** Deactivate the currently active panes to make room for the full
screen pane and the presenter panes. screen pane and the presenter panes.
...@@ -171,18 +214,42 @@ private: ...@@ -171,18 +214,42 @@ private:
const css::uno::Reference<css::uno::XComponentContext>& rxContext, const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId); const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId);
css::uno::Reference<css::drawing::framework::XResourceId> SetupView ( /** Read the view descriptions from the configuration.
*/
void ProcessViewDescriptions (
PresenterConfigurationAccess& rConfiguration);
/** Called by ProcessViewDescriptions for a single entry.
*/
void ProcessViewDescription (
const ::rtl::OUString& rsKey,
const ::std::vector<css::uno::Any>& rValues);
void SetupView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext, const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId, const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId,
const ::rtl::OUString& rsPaneURL, const ::rtl::OUString& rsPaneURL,
const ::rtl::OUString& rsViewURL, const ::rtl::OUString& rsViewURL,
const ::rtl::OUString& rsTitle,
const PresenterPaneContainer::ViewInitializationFunction& rViewInitialization, const PresenterPaneContainer::ViewInitializationFunction& rViewInitialization,
const double nLeft, const double nLeft,
const double nTop, const double nTop,
const double nRight, const double nRight,
const double nBottom); const double nBottom);
/** Return the screen number on which to display the presenter screen.
@return
Returns -1 when the presenter screen can or shall not be
displayed.
*/
sal_Int32 GetScreenNumber (
const css::uno::Reference<css::presentation::XPresentation2>& rxPresentation) const;
/** Create a resource id for the full screen background pane so that it
is displayed on another screen than the full screen presentation.
*/
css::uno::Reference<css::drawing::framework::XResourceId> GetMainPaneId (
const css::uno::Reference<css::presentation::XPresentation2>& rxPresentation) const;
void ThrowIfDisposed (void) const throw (::com::sun::star::lang::DisposedException); void ThrowIfDisposed (void) const throw (::com::sun::star::lang::DisposedException);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment