1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SD_UNO_OUTLINE_VIEW_HXX
25 #define SD_UNO_OUTLINE_VIEW_HXX
26 
27 #include "DrawSubController.hxx"
28 #include <cppuhelper/basemutex.hxx>
29 #include <com/sun/star/lang/EventObject.hpp>
30 
31 
32 class SdPage;
33 
34 namespace css = ::com::sun::star;
35 
36 namespace sd {
37 
38 class DrawController;
39 class OutlineViewShell;
40 class View;
41 
42 
43 /** This class implements the OutlineViewShell specific part of the controller.
44 */
45 class SdUnoOutlineView
46     : private cppu::BaseMutex,
47       public DrawSubControllerInterfaceBase
48 {
49 public:
50 	SdUnoOutlineView (
51         DrawController& rController,
52         OutlineViewShell& rViewShell,
53         View& rView) throw();
54 	virtual ~SdUnoOutlineView (void) throw();
55 
56     virtual void SAL_CALL disposing (void);
57 
58 
59 	// XSelectionSupplier
60 
61     virtual sal_Bool SAL_CALL select (
62         const css::uno::Any& aSelection)
63         throw(css::lang::IllegalArgumentException,
64             css::uno::RuntimeException);
65 
66     virtual css::uno::Any SAL_CALL getSelection (void)
67         throw(css::uno::RuntimeException);
68 
69     virtual void SAL_CALL addSelectionChangeListener (
70         const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
71         throw(css::uno::RuntimeException);
72 
73     virtual void SAL_CALL removeSelectionChangeListener (
74         const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
75         throw(css::uno::RuntimeException);
76 
77 
78 	// XDrawView
79 
80     virtual void SAL_CALL setCurrentPage (
81         const css::uno::Reference<css::drawing::XDrawPage >& xPage)
82         throw(css::uno::RuntimeException);
83 
84     virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
85         throw(css::uno::RuntimeException);
86 
87 
88     // XFastPropertySet
89 
90     virtual void SAL_CALL setFastPropertyValue (
91         sal_Int32 nHandle,
92         const css::uno::Any& rValue)
93         throw(css::beans::UnknownPropertyException,
94             css::beans::PropertyVetoException,
95             css::lang::IllegalArgumentException,
96             css::lang::WrappedTargetException,
97             css::uno::RuntimeException);
98 
99     virtual css::uno::Any SAL_CALL getFastPropertyValue (
100         sal_Int32 nHandle)
101         throw(css::beans::UnknownPropertyException,
102             css::lang::WrappedTargetException,
103             css::uno::RuntimeException);
104 
105     // lang::XEventListener
106     virtual void SAL_CALL
107         disposing (const ::com::sun::star::lang::EventObject& rEventObject)
108         throw (::com::sun::star::uno::RuntimeException);
109 
110 	// XServiceInfo
111 	virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
112 	virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
113 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
114 
115 private:
116     DrawController& mrController;
117     OutlineViewShell& mrOutlineViewShell;
118     sd::View& mrView;
119 };
120 
121 } // end of namespace sd
122 
123 #endif
124