1c142477cSAndrew Rist /************************************************************** 2*6d8c2cf3Smseidel * 3c142477cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4c142477cSAndrew Rist * or more contributor license agreements. See the NOTICE file 5c142477cSAndrew Rist * distributed with this work for additional information 6c142477cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7c142477cSAndrew Rist * to you under the Apache License, Version 2.0 (the 8c142477cSAndrew Rist * "License"); you may not use this file except in compliance 9c142477cSAndrew Rist * with the License. You may obtain a copy of the License at 10*6d8c2cf3Smseidel * 11c142477cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*6d8c2cf3Smseidel * 13c142477cSAndrew Rist * Unless required by applicable law or agreed to in writing, 14c142477cSAndrew Rist * software distributed under the License is distributed on an 15c142477cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16c142477cSAndrew Rist * KIND, either express or implied. See the License for the 17c142477cSAndrew Rist * specific language governing permissions and limitations 18c142477cSAndrew Rist * under the License. 19*6d8c2cf3Smseidel * 20c142477cSAndrew Rist *************************************************************/ 21c142477cSAndrew Rist 22c142477cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sdext.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "PresenterHelper.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <com/sun/star/graphic/XGraphicProvider.hpp> 30cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 31cdf0e10cSrcweir #include <com/sun/star/presentation/XPresentationSupplier.hpp> 32cdf0e10cSrcweir #include <com/sun/star/presentation/XPresentation2.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir using namespace ::com::sun::star; 35cdf0e10cSrcweir using namespace ::com::sun::star::uno; 36cdf0e10cSrcweir using namespace ::com::sun::star::presentation; 37cdf0e10cSrcweir using ::rtl::OUString; 38cdf0e10cSrcweir 39cdf0e10cSrcweir namespace sdext { namespace presenter { 40cdf0e10cSrcweir 41cdf0e10cSrcweir const OUString PresenterHelper::msPaneURLPrefix( 42*6d8c2cf3Smseidel OUString::createFromAscii("private:resource/pane/")); 43cdf0e10cSrcweir const OUString PresenterHelper::msCenterPaneURL( 44*6d8c2cf3Smseidel msPaneURLPrefix + OUString::createFromAscii("CenterPane")); 45cdf0e10cSrcweir const OUString PresenterHelper::msFullScreenPaneURL( 46*6d8c2cf3Smseidel msPaneURLPrefix + OUString::createFromAscii("FullScreenPane")); 47cdf0e10cSrcweir 48cdf0e10cSrcweir const OUString PresenterHelper::msViewURLPrefix( 49*6d8c2cf3Smseidel OUString::createFromAscii("private:resource/view/")); 50cdf0e10cSrcweir const OUString PresenterHelper::msPresenterScreenURL( 51*6d8c2cf3Smseidel msViewURLPrefix + OUString::createFromAscii("PresenterScreen")); 52cdf0e10cSrcweir const OUString PresenterHelper::msSlideSorterURL( 53*6d8c2cf3Smseidel msViewURLPrefix + OUString::createFromAscii("SlideSorter")); 54cdf0e10cSrcweir 55cdf0e10cSrcweir const OUString PresenterHelper::msResourceActivationEvent( 56*6d8c2cf3Smseidel OUString::createFromAscii("ResourceActivation")); 57cdf0e10cSrcweir const OUString PresenterHelper::msResourceDeactivationEvent( 58*6d8c2cf3Smseidel OUString::createFromAscii("ResourceDeactivation")); 59cdf0e10cSrcweir 60cdf0e10cSrcweir const OUString PresenterHelper::msDefaultPaneStyle ( 61*6d8c2cf3Smseidel OUString::createFromAscii("DefaultPaneStyle")); 62cdf0e10cSrcweir const OUString PresenterHelper::msDefaultViewStyle ( 63*6d8c2cf3Smseidel OUString::createFromAscii("DefaultViewStyle")); 64cdf0e10cSrcweir 65cdf0e10cSrcweir GetSlideShowController(const Reference<frame::XController> & rxController)66cdf0e10cSrcweirReference<presentation::XSlideShowController> PresenterHelper::GetSlideShowController ( 67*6d8c2cf3Smseidel const Reference<frame::XController>& rxController) 68cdf0e10cSrcweir { 69*6d8c2cf3Smseidel Reference<presentation::XSlideShowController> xSlideShowController; 70*6d8c2cf3Smseidel 71*6d8c2cf3Smseidel if( rxController.is() ) try 72*6d8c2cf3Smseidel { 73cdf0e10cSrcweir Reference<XPresentationSupplier> xPS ( rxController->getModel(), UNO_QUERY_THROW); 74cdf0e10cSrcweir 75cdf0e10cSrcweir Reference<XPresentation2> xPresentation(xPS->getPresentation(), UNO_QUERY_THROW); 76cdf0e10cSrcweir 77cdf0e10cSrcweir xSlideShowController = xPresentation->getController(); 78*6d8c2cf3Smseidel } 79*6d8c2cf3Smseidel catch(RuntimeException&) 80*6d8c2cf3Smseidel { 81*6d8c2cf3Smseidel } 82cdf0e10cSrcweir 83*6d8c2cf3Smseidel return xSlideShowController; 84cdf0e10cSrcweir } 85cdf0e10cSrcweir 86cdf0e10cSrcweir 87cdf0e10cSrcweir } } // end of namespace ::sdext::presenter 88