1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SD_UNO_SLIDE_VIEW_HXX 29 #define SD_UNO_SLIDE_VIEW_HXX 30 31 #include "DrawSubController.hxx" 32 #include <cppuhelper/basemutex.hxx> 33 #include <com/sun/star/drawing/XDrawPage.hpp> 34 35 namespace css = ::com::sun::star; 36 37 namespace sd { namespace slidesorter { 38 class SlideSorter; 39 } } 40 41 namespace sd { namespace slidesorter { namespace controller { 42 class PageSelector; 43 } } } 44 45 namespace sd { 46 47 class DrawController; 48 class SlideViewShell; 49 class View; 50 51 52 /** This class implements the SlideSorter specific part of the 53 controller. 54 */ 55 class SdUnoSlideView 56 : private cppu::BaseMutex, 57 public DrawSubControllerInterfaceBase 58 { 59 public: 60 SdUnoSlideView ( 61 DrawController& rController, 62 slidesorter::SlideSorter& rSlideSorter, 63 View& rView) throw(); 64 virtual ~SdUnoSlideView (void) throw(); 65 66 // XSelectionSupplier 67 68 virtual sal_Bool SAL_CALL select (const ::com::sun::star::uno::Any& aSelection) 69 throw(::com::sun::star::lang::IllegalArgumentException, 70 ::com::sun::star::uno::RuntimeException); 71 72 virtual ::com::sun::star::uno::Any SAL_CALL getSelection (void) 73 throw(::com::sun::star::uno::RuntimeException); 74 75 virtual void SAL_CALL addSelectionChangeListener ( 76 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) 77 throw(css::uno::RuntimeException); 78 79 virtual void SAL_CALL removeSelectionChangeListener ( 80 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) 81 throw(css::uno::RuntimeException); 82 83 84 // XDrawView 85 86 virtual void SAL_CALL setCurrentPage ( 87 const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage) 88 throw(::com::sun::star::uno::RuntimeException); 89 90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL 91 getCurrentPage (void) 92 throw(::com::sun::star::uno::RuntimeException); 93 94 95 // XFastPropertySet 96 97 virtual void SAL_CALL setFastPropertyValue ( 98 sal_Int32 nHandle, 99 const css::uno::Any& rValue) 100 throw(css::beans::UnknownPropertyException, 101 css::beans::PropertyVetoException, 102 css::lang::IllegalArgumentException, 103 css::lang::WrappedTargetException, 104 css::uno::RuntimeException); 105 106 virtual css::uno::Any SAL_CALL getFastPropertyValue ( 107 sal_Int32 nHandle) 108 throw(css::beans::UnknownPropertyException, 109 css::lang::WrappedTargetException, 110 css::uno::RuntimeException); 111 112 // XServiceInfo 113 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); 114 virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 115 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); 116 117 private: 118 DrawController& mrController; 119 slidesorter::SlideSorter& mrSlideSorter; 120 sd::View& mrView; 121 /* 122 virtual void FillPropertyTable ( 123 ::std::vector< ::com::sun::star::beans::Property>& rProperties); 124 virtual sal_Bool SAL_CALL convertFastPropertyValue( 125 ::com::sun::star::uno::Any & rConvertedValue, 126 ::com::sun::star::uno::Any & rOldValue, 127 sal_Int32 nHandle, 128 const ::com::sun::star::uno::Any& rValue ) 129 throw (::com::sun::star::lang::IllegalArgumentException); 130 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( 131 sal_Int32 nHandle, 132 const ::com::sun::star::uno::Any& rValue ) 133 throw (::com::sun::star::uno::Exception); 134 virtual void SAL_CALL getFastPropertyValue( 135 ::com::sun::star::uno::Any& rValue, 136 sal_Int32 nHandle ) const; 137 */ 138 }; 139 140 } // end of namespace sd 141 142 #endif 143