1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PresenterScreen.cxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 // MARKER(update_precomp.py): autogen include statement, do not remove
33 #include "precompiled_sdext.hxx"
35 #include "PresenterScreen.hxx"
36 #include "PresenterConfigurationAccess.hxx"
37 #include "PresenterController.hxx"
38 #include "PresenterFrameworkObserver.hxx"
39 #include "PresenterHelper.hxx"
40 #include "PresenterPaneContainer.hxx"
41 #include "PresenterPaneFactory.hxx"
42 #include "PresenterViewFactory.hxx"
43 #include "PresenterWindowManager.hxx"
44 #include <com/sun/star/frame/XController.hpp>
45 #include <com/sun/star/lang/XServiceInfo.hpp>
46 #include <com/sun/star/drawing/framework/Configuration.hpp>
47 #include <com/sun/star/drawing/framework/XControllerManager.hpp>
48 #include <com/sun/star/drawing/framework/ResourceId.hpp>
49 #include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
50 #include <com/sun/star/presentation/XSlideShow.hpp>
51 #include <com/sun/star/presentation/XPresentation2.hpp>
52 #include <com/sun/star/presentation/XPresentationSupplier.hpp>
53 #include <com/sun/star/document/XEventBroadcaster.hpp>
54 #include <boost/bind.hpp>
55 #include <tools/debug.hxx>
57 #include <com/sun/star/view/XSelectionSupplier.hpp>
59 using namespace ::com::sun::star
;
60 using namespace ::com::sun::star::uno
;
61 using namespace ::com::sun::star::lang
;
62 using namespace ::com::sun::star::presentation
;
63 using namespace ::com::sun::star::drawing::framework
;
64 using ::rtl::OUString
;
66 #define A2S(s) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)))
68 namespace sdext
{ namespace presenter
{
71 typedef ::cppu::WeakComponentImplHelper1
<
72 css::document::XEventListener
73 > PresenterScreenListenerInterfaceBase
;
75 /** One instance of a PresenterScreenListener is registered per Impress
76 document and waits for the full screen slide show to start and to
79 class PresenterScreenListener
80 : private ::boost::noncopyable
,
81 private ::cppu::BaseMutex
,
82 public PresenterScreenListenerInterfaceBase
85 PresenterScreenListener (
86 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
,
87 const css::uno::Reference
<css::frame::XModel2
>& rxModel
);
88 virtual ~PresenterScreenListener (void);
90 void Initialize (void);
91 virtual void SAL_CALL
disposing (void);
93 // document::XEventListener
95 virtual void SAL_CALL
notifyEvent( const css::document::EventObject
& Event
) throw (css::uno::RuntimeException
);
99 virtual void SAL_CALL
disposing ( const css::lang::EventObject
& rEvent
) throw (css::uno::RuntimeException
);
102 css::uno::Reference
<css::frame::XModel2
> mxModel
;
103 css::uno::Reference
<css::uno::XComponentContext
> mxComponentContext
;
104 rtl::Reference
<PresenterScreen
> mpPresenterScreen
;
106 void ThrowIfDisposed (void) const throw (::com::sun::star::lang::DisposedException
);
111 //----- Service ---------------------------------------------------------------
113 OUString
PresenterScreenJob::getImplementationName_static (void)
115 return A2S("com.sun.star.comp.Draw.framework.PresenterScreenJob");
121 Sequence
<OUString
> PresenterScreenJob::getSupportedServiceNames_static (void)
123 static const ::rtl::OUString
sServiceName(
124 A2S("com.sun.star.drawing.framework.PresenterScreenJob"));
125 return Sequence
<rtl::OUString
>(&sServiceName
, 1);
131 Reference
<XInterface
> PresenterScreenJob::Create (const Reference
<uno::XComponentContext
>& rxContext
)
132 SAL_THROW((css::uno::Exception
))
134 return Reference
<XInterface
>(static_cast<XWeak
*>(new PresenterScreenJob(rxContext
)));
140 //===== PresenterScreenJob ====================================================
142 PresenterScreenJob::PresenterScreenJob (const Reference
<XComponentContext
>& rxContext
)
143 : PresenterScreenJobInterfaceBase(m_aMutex
),
144 mxComponentContext(rxContext
)
151 PresenterScreenJob::~PresenterScreenJob (void)
158 void SAL_CALL
PresenterScreenJob::disposing (void)
160 mxComponentContext
= NULL
;
166 //----- XJob -----------------------------------------------------------
168 Any SAL_CALL
PresenterScreenJob::execute(
169 const Sequence
< beans::NamedValue
>& Arguments
)
170 throw (lang::IllegalArgumentException
, Exception
, RuntimeException
)
172 Sequence
< beans::NamedValue
> lEnv
;
175 sal_Int32 c
= Arguments
.getLength();
176 const beans::NamedValue
* p
= Arguments
.getConstArray();
179 if (p
[i
].Name
.equalsAscii("Environment"))
186 Reference
<frame::XModel2
> xModel
;
187 c
= lEnv
.getLength();
188 p
= lEnv
.getConstArray();
191 if (p
[i
].Name
.equalsAscii("Model"))
193 p
[i
].Value
>>= xModel
;
198 Reference
< XServiceInfo
> xInfo( xModel
, UNO_QUERY
);
199 if( xInfo
.is() && xInfo
->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) )
201 // Create a new listener that waits for the full screen presentation
202 // to start and to end. It takes care of its own lifetime.
203 ::rtl::Reference
<PresenterScreenListener
> pListener (
204 new PresenterScreenListener(mxComponentContext
, xModel
));
205 pListener
->Initialize();
214 //===== PresenterScreenListener ===============================================
218 PresenterScreenListener::PresenterScreenListener (
219 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
,
220 const css::uno::Reference
<css::frame::XModel2
>& rxModel
)
221 : PresenterScreenListenerInterfaceBase(m_aMutex
),
223 mxComponentContext(rxContext
),
231 void PresenterScreenListener::Initialize (void)
233 Reference
< document::XEventListener
> xDocListener(
234 static_cast< document::XEventListener
* >(this), UNO_QUERY
);
235 Reference
< document::XEventBroadcaster
> xDocBroadcaster( mxModel
, UNO_QUERY
);
236 if( xDocBroadcaster
.is() )
237 xDocBroadcaster
->addEventListener(xDocListener
);
243 PresenterScreenListener::~PresenterScreenListener (void)
250 void SAL_CALL
PresenterScreenListener::disposing (void)
252 Reference
< document::XEventBroadcaster
> xDocBroadcaster( mxModel
, UNO_QUERY
);
253 if( xDocBroadcaster
.is() )
254 xDocBroadcaster
->removeEventListener(
255 Reference
<document::XEventListener
>(
256 static_cast<document::XEventListener
*>(this), UNO_QUERY
));
258 if (mpPresenterScreen
.is())
260 mpPresenterScreen
->RequestShutdownPresenterScreen();
261 mpPresenterScreen
= NULL
;
268 // document::XEventListener
270 void SAL_CALL
PresenterScreenListener::notifyEvent( const css::document::EventObject
& Event
) throw (css::uno::RuntimeException
)
274 if( Event
.EventName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnStartPresentation" ) ) )
276 mpPresenterScreen
= new PresenterScreen(mxComponentContext
, mxModel
);
277 mpPresenterScreen
->InitializePresenterScreen();
279 else if( Event
.EventName
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnEndPresentation" ) ) )
281 if (mpPresenterScreen
.is())
283 mpPresenterScreen
->RequestShutdownPresenterScreen();
284 mpPresenterScreen
= NULL
;
294 void SAL_CALL
PresenterScreenListener::disposing (const css::lang::EventObject
& rEvent
)
295 throw (css::uno::RuntimeException
)
299 if (mpPresenterScreen
.is())
301 mpPresenterScreen
->RequestShutdownPresenterScreen();
302 mpPresenterScreen
= NULL
;
309 void PresenterScreenListener::ThrowIfDisposed (void) const throw (
310 ::com::sun::star::lang::DisposedException
)
312 if (rBHelper
.bDisposed
|| rBHelper
.bInDispose
)
314 throw lang::DisposedException (
315 OUString(RTL_CONSTASCII_USTRINGPARAM(
316 "PresenterScreenListener object has already been disposed")),
317 const_cast<uno::XWeak
*>(static_cast<const uno::XWeak
*>(this)));
321 } // end of anonymous namespace
326 //===== PresenterScreen =======================================================
328 PresenterScreen::PresenterScreen (
329 const Reference
<XComponentContext
>& rxContext
,
330 const css::uno::Reference
<css::frame::XModel2
>& rxModel
)
331 : PresenterScreenInterfaceBase(m_aMutex
),
334 mxConfigurationControllerWeak(),
335 mxContextWeak(rxContext
),
336 mxSlideShowControllerWeak(),
337 mpPresenterController(),
339 mxSavedConfiguration(),
351 PresenterScreen::~PresenterScreen (void)
358 void SAL_CALL
PresenterScreen::disposing (void)
360 Reference
<XConfigurationController
> xCC (mxConfigurationControllerWeak
);
361 if (xCC
.is() && mxSavedConfiguration
.is())
363 xCC
->restoreConfiguration(mxSavedConfiguration
);
365 mxConfigurationControllerWeak
= Reference
<XConfigurationController
>(NULL
);
367 Reference
<lang::XComponent
> xViewFactoryComponent (mxViewFactory
, UNO_QUERY
);
368 if (xViewFactoryComponent
.is())
369 xViewFactoryComponent
->dispose();
370 Reference
<lang::XComponent
> xPaneFactoryComponent (mxPaneFactory
, UNO_QUERY
);
371 if (xPaneFactoryComponent
.is())
372 xPaneFactoryComponent
->dispose();
380 //----- XEventListener --------------------------------------------------------
382 void SAL_CALL
PresenterScreen::disposing (const lang::EventObject
& /*rEvent*/)
383 throw (RuntimeException
)
385 mxSlideShowControllerWeak
= WeakReference
<presentation::XSlideShowController
>();
386 RequestShutdownPresenterScreen();
392 //-----------------------------------------------------------------------------
394 void PresenterScreen::InitializePresenterScreen (void)
398 Reference
<XComponentContext
> xContext (mxContextWeak
);
400 new PresenterPaneContainer(Reference
<XComponentContext
>(xContext
));
402 Reference
<XPresentationSupplier
> xPS ( mxModel
, UNO_QUERY_THROW
);
403 Reference
<XPresentation2
> xPresentation(xPS
->getPresentation(), UNO_QUERY_THROW
);
404 Reference
<presentation::XSlideShowController
> xSlideShowController( xPresentation
->getController() );
405 mxSlideShowControllerWeak
= xSlideShowController
;
407 if( !xSlideShowController
.is() || !xSlideShowController
->isFullScreen() )
410 // find first controller that is not the current controller (the one with the slideshow
411 mxController
= mxModel
->getCurrentController();
412 Reference
< container::XEnumeration
> xEnum( mxModel
->getControllers() );
415 while( xEnum
->hasMoreElements() )
417 Reference
< frame::XController
> xC( xEnum
->nextElement(), UNO_QUERY
);
418 if( xC
.is() && (xC
!= mxController
) )
425 // Get the XController from the first argument.
426 Reference
<XControllerManager
> xCM(mxController
, UNO_QUERY_THROW
);
428 Reference
<XConfigurationController
> xCC( xCM
->getConfigurationController());
429 mxConfigurationControllerWeak
= xCC
;
431 Reference
<drawing::framework::XResourceId
> xMainPaneId(
432 GetMainPaneId(xPresentation
));
433 // An empty reference means that the presenter screen can
434 // not or must not be displayed.
435 if ( ! xMainPaneId
.is())
438 if (xCC
.is() && xContext
.is())
440 // Store the current configuration so that we can restore it when
441 // the presenter view is deactivated.
442 mxSavedConfiguration
= xCC
->getRequestedConfiguration();
447 // At the moment the presenter controller is displayed in its
448 // own full screen window that is controlled by the same
449 // configuration controller as the Impress document from
450 // which the presentation was started. Therefore the main
451 // pane is actived additionally to the already existing
452 // panes and does not replace them.
453 xCC
->requestResourceActivation(
455 ResourceActivationMode_ADD
);
456 SetupConfiguration(xContext
, xMainPaneId
);
458 mpPresenterController
= new PresenterController(
461 xSlideShowController
,
465 // Create pane and view factories and integrate them into the
466 // drawing framework.
467 SetupPaneFactory(xContext
);
468 SetupViewFactory(xContext
);
470 mpPresenterController
->GetWindowManager()->SetSlideSorterState(false);
471 mpPresenterController
->GetWindowManager()->SetLayoutMode(
472 PresenterWindowManager::Standard
);
474 catch (RuntimeException
&)
476 xCC
->restoreConfiguration(mxSavedConfiguration
);
489 sal_Int32
PresenterScreen::GetScreenNumber (
490 const Reference
<presentation::XPresentation2
>& rxPresentation
) const
492 // Determine the screen on which the full screen presentation is being
494 sal_Int32
nScreenNumber (0);
495 sal_Int32
nScreenCount (1);
498 Reference
<beans::XPropertySet
> xProperties (rxPresentation
, UNO_QUERY
);
499 if ( ! xProperties
.is())
502 sal_Int32
nDisplayNumber (-1);
503 if ( ! (xProperties
->getPropertyValue(A2S("Display")) >>= nDisplayNumber
))
506 Reference
<XComponentContext
> xContext (mxContextWeak
);
507 if ( ! xContext
.is())
509 Reference
<lang::XMultiComponentFactory
> xFactory (
510 xContext
->getServiceManager(), UNO_QUERY
);
511 if ( ! xFactory
.is())
513 Reference
<beans::XPropertySet
> xDisplayProperties (
514 xFactory
->createInstanceWithContext(A2S("com.sun.star.awt.DisplayAccess"),xContext
),
516 if ( ! xDisplayProperties
.is())
519 if (nDisplayNumber
> 0)
521 nScreenNumber
= nDisplayNumber
- 1;
523 else if (nDisplayNumber
== 0)
525 // A display number value of 0 indicates the primary screen.
526 // Instantiate the DisplayAccess service to find out which
527 // screen number that is.
528 if (nDisplayNumber
<= 0 && xDisplayProperties
.is())
529 xDisplayProperties
->getPropertyValue(A2S("DefaultDisplay")) >>= nScreenNumber
;
532 // We still have to determine the number of screens to decide
533 // whether the presenter screen may be shown at all.
534 Reference
<container::XIndexAccess
> xIndexAccess (xDisplayProperties
, UNO_QUERY
);
535 if ( ! xIndexAccess
.is())
537 nScreenCount
= xIndexAccess
->getCount();
539 if (nScreenCount
< 2 || nDisplayNumber
> nScreenCount
)
541 // There is either only one screen or the full screen
542 // presentation spans all available screens. The presenter
543 // screen is shown only when a special flag in the configuration
545 PresenterConfigurationAccess
aConfiguration (
547 OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"),
548 PresenterConfigurationAccess::READ_ONLY
);
549 bool bStartAlways (false);
550 if (aConfiguration
.GetConfigurationNode(
551 OUString::createFromAscii("Presenter/StartAlways")) >>= bStartAlways
)
554 return nScreenNumber
;
559 catch (beans::UnknownPropertyException
&)
562 // For some reason we can not access the screen number. Use
563 // the default instead.
566 return nScreenNumber
;
572 Reference
<drawing::framework::XResourceId
> PresenterScreen::GetMainPaneId (
573 const Reference
<presentation::XPresentation2
>& rxPresentation
) const
575 // A negative value means that the presentation spans all available
576 // displays. That leaves no room for the presenter.
577 const sal_Int32
nScreenNumber(GetScreenNumber(rxPresentation
));
578 if (nScreenNumber
< 0)
581 // Setup the resource id of the full screen background pane so that
582 // it is displayed on another screen than the presentation.
583 sal_Int32
nPresenterScreenNumber (1);
584 switch (nScreenNumber
)
587 nPresenterScreenNumber
= 1;
591 nPresenterScreenNumber
= 0;
595 // When the full screen presentation is displayed on a screen
596 // other than 0 or 1 then place the presenter on the first
598 nPresenterScreenNumber
= 0;
602 return ResourceId::create(
603 Reference
<XComponentContext
>(mxContextWeak
),
604 PresenterHelper::msFullScreenPaneURL
605 +A2S("?FullScreen=true&ScreenNumber=")
606 + OUString::valueOf(nPresenterScreenNumber
));
612 void PresenterScreen::RequestShutdownPresenterScreen (void)
614 // Restore the configuration that was active before the presenter screen
615 // has been activated. Now, that the presenter screen is displayed in
616 // its own top level window this probably not necessary, but one never knows.
617 Reference
<XConfigurationController
> xCC (mxConfigurationControllerWeak
);
618 if (xCC
.is() && mxSavedConfiguration
.is())
620 xCC
->restoreConfiguration(mxSavedConfiguration
);
621 mxSavedConfiguration
= NULL
;
626 // The actual restoration of the configuration takes place
627 // asynchronously. The view and pane factories can only by disposed
628 // after that. Therefore, set up a listener and wait for the
630 rtl::Reference
<PresenterScreen
> pSelf (this);
631 PresenterFrameworkObserver::RunOnUpdateEnd(
633 ::boost::bind(&PresenterScreen::ShutdownPresenterScreen
, pSelf
));
641 void PresenterScreen::ShutdownPresenterScreen (void)
643 Reference
<lang::XComponent
> xViewFactoryComponent (mxViewFactory
, UNO_QUERY
);
644 if (xViewFactoryComponent
.is())
645 xViewFactoryComponent
->dispose();
646 mxViewFactory
= NULL
;
648 Reference
<lang::XComponent
> xPaneFactoryComponent (mxPaneFactory
, UNO_QUERY
);
649 if (xPaneFactoryComponent
.is())
650 xPaneFactoryComponent
->dispose();
651 mxPaneFactory
= NULL
;
653 if (mpPresenterController
.get() != NULL
)
655 mpPresenterController
->dispose();
656 mpPresenterController
= rtl::Reference
<PresenterController
>();
658 mpPaneContainer
= new PresenterPaneContainer(Reference
<XComponentContext
>(mxContextWeak
));
664 void PresenterScreen::SetupPaneFactory (const Reference
<XComponentContext
>& rxContext
)
668 if ( ! mxPaneFactory
.is())
669 mxPaneFactory
= PresenterPaneFactory::Create(
672 mpPresenterController
);
674 catch (RuntimeException
&)
683 void PresenterScreen::SetupViewFactory (const Reference
<XComponentContext
>& rxContext
)
687 if ( ! mxViewFactory
.is())
688 mxViewFactory
= PresenterViewFactory::Create(
691 mpPresenterController
);
693 catch (RuntimeException
&)
702 void PresenterScreen::SetupConfiguration (
703 const Reference
<XComponentContext
>& rxContext
,
704 const Reference
<XResourceId
>& rxAnchorId
)
708 PresenterConfigurationAccess
aConfiguration (
710 OUString::createFromAscii("org.openoffice.Office.extension.PresenterScreen"),
711 PresenterConfigurationAccess::READ_ONLY
);
712 maViewDescriptors
.clear();
713 ProcessViewDescriptions(aConfiguration
);
714 OUString
sLayoutName (OUString::createFromAscii("DefaultLayout"));
715 aConfiguration
.GetConfigurationNode(
716 OUString::createFromAscii("Presenter/CurrentLayout")) >>= sLayoutName
;
717 ProcessLayout(aConfiguration
, sLayoutName
, rxContext
, rxAnchorId
);
719 catch (RuntimeException
&)
727 void PresenterScreen::ProcessLayout (
728 PresenterConfigurationAccess
& rConfiguration
,
729 const OUString
& rsLayoutName
,
730 const Reference
<XComponentContext
>& rxContext
,
731 const Reference
<XResourceId
>& rxAnchorId
)
735 Reference
<container::XHierarchicalNameAccess
> xLayoutNode (
736 rConfiguration
.GetConfigurationNode(
737 OUString::createFromAscii("Presenter/Layouts/")+rsLayoutName
),
740 // Read the parent layout first, if one is referenced.
741 OUString sParentLayout
;
742 rConfiguration
.GetConfigurationNode(
744 OUString::createFromAscii("ParentLayout")) >>= sParentLayout
;
745 if (sParentLayout
.getLength() > 0)
747 // Prevent infinite recursion.
748 if (rsLayoutName
!= sParentLayout
)
749 ProcessLayout(rConfiguration
, sParentLayout
, rxContext
, rxAnchorId
);
752 // Process the actual layout list.
753 Reference
<container::XNameAccess
> xList (
754 rConfiguration
.GetConfigurationNode(
756 OUString::createFromAscii("Layout")),
759 ::std::vector
<rtl::OUString
> aProperties (6);
760 aProperties
[0] = OUString::createFromAscii("PaneURL");
761 aProperties
[1] = OUString::createFromAscii("ViewURL");
762 aProperties
[2] = OUString::createFromAscii("RelativeX");
763 aProperties
[3] = OUString::createFromAscii("RelativeY");
764 aProperties
[4] = OUString::createFromAscii("RelativeWidth");
765 aProperties
[5] = OUString::createFromAscii("RelativeHeight");
766 mnComponentIndex
= 1;
767 PresenterConfigurationAccess::ForAll(
770 ::boost::bind(&PresenterScreen::ProcessComponent
, this,
776 catch (RuntimeException
&)
784 void PresenterScreen::ProcessViewDescriptions (
785 PresenterConfigurationAccess
& rConfiguration
)
789 Reference
<container::XNameAccess
> xViewDescriptionsNode (
790 rConfiguration
.GetConfigurationNode(A2S("Presenter/Views")),
793 ::std::vector
<rtl::OUString
> aProperties (3);
794 aProperties
[0] = OUString::createFromAscii("ViewURL");
795 aProperties
[1] = OUString::createFromAscii("Title");
796 aProperties
[2] = OUString::createFromAscii("IsOpaque");
797 mnComponentIndex
= 1;
798 PresenterConfigurationAccess::ForAll(
799 xViewDescriptionsNode
,
801 ::boost::bind(&PresenterScreen::ProcessViewDescription
, this, _1
, _2
));
803 catch (RuntimeException
&)
812 void PresenterScreen::ProcessComponent (
813 const OUString
& rsKey
,
814 const ::std::vector
<Any
>& rValues
,
815 const Reference
<XComponentContext
>& rxContext
,
816 const Reference
<XResourceId
>& rxAnchorId
)
820 if (rValues
.size() != 6)
831 rValues
[0] >>= sPaneURL
;
832 rValues
[1] >>= sViewURL
;
835 rValues
[4] >>= nWidth
;
836 rValues
[5] >>= nHeight
;
838 if (nX
>=0 && nY
>=0 && nWidth
>0 && nHeight
>0)
845 PresenterPaneContainer::ViewInitializationFunction(),
862 void PresenterScreen::ProcessViewDescription (
863 const OUString
& rsKey
,
864 const ::std::vector
<Any
>& rValues
)
868 if (rValues
.size() != 3)
873 ViewDescriptor aViewDescriptor
;
875 rValues
[0] >>= sViewURL
;
876 rValues
[1] >>= aViewDescriptor
.msTitle
;
877 rValues
[2] >>= aViewDescriptor
.mbIsOpaque
;
878 maViewDescriptors
[sViewURL
] = aViewDescriptor
;
889 void PresenterScreen::SetupView(
890 const Reference
<XComponentContext
>& rxContext
,
891 const Reference
<XResourceId
>& rxAnchorId
,
892 const OUString
& rsPaneURL
,
893 const OUString
& rsViewURL
,
894 const PresenterPaneContainer::ViewInitializationFunction
& rViewInitialization
,
898 const double nBottom
)
900 Reference
<XConfigurationController
> xCC (mxConfigurationControllerWeak
);
903 Reference
<XResourceId
> xPaneId (ResourceId::createWithAnchor(rxContext
,rsPaneURL
,rxAnchorId
));
904 // Look up the view descriptor.
905 ViewDescriptor aViewDescriptor
;
906 ViewDescriptorContainer::const_iterator
iDescriptor (maViewDescriptors
.find(rsViewURL
));
907 if (iDescriptor
!= maViewDescriptors
.end())
908 aViewDescriptor
= iDescriptor
->second
;
911 OSL_ASSERT(mpPaneContainer
.get() != NULL
);
912 mpPaneContainer
->PreparePane(
915 aViewDescriptor
.msTitle
,
916 aViewDescriptor
.mbIsOpaque
,
928 } } // end of namespace ::sdext::presenter