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