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_OUTLINE_VIEW_HXX
29 #define SD_UNO_OUTLINE_VIEW_HXX
30 
31 #include "DrawSubController.hxx"
32 #include <cppuhelper/basemutex.hxx>
33 #include <com/sun/star/lang/EventObject.hpp>
34 
35 
36 class SdPage;
37 
38 namespace css = ::com::sun::star;
39 
40 namespace sd {
41 
42 class DrawController;
43 class OutlineViewShell;
44 class View;
45 
46 
47 /** This class implements the OutlineViewShell specific part of the controller.
48 */
49 class SdUnoOutlineView
50     : private cppu::BaseMutex,
51       public DrawSubControllerInterfaceBase
52 {
53 public:
54 	SdUnoOutlineView (
55         DrawController& rController,
56         OutlineViewShell& rViewShell,
57         View& rView) throw();
58 	virtual ~SdUnoOutlineView (void) throw();
59 
60     virtual void SAL_CALL disposing (void);
61 
62 
63 	// XSelectionSupplier
64 
65     virtual sal_Bool SAL_CALL select (
66         const css::uno::Any& aSelection)
67         throw(css::lang::IllegalArgumentException,
68             css::uno::RuntimeException);
69 
70     virtual css::uno::Any SAL_CALL getSelection (void)
71         throw(css::uno::RuntimeException);
72 
73     virtual void SAL_CALL addSelectionChangeListener (
74         const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
75         throw(css::uno::RuntimeException);
76 
77     virtual void SAL_CALL removeSelectionChangeListener (
78         const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
79         throw(css::uno::RuntimeException);
80 
81 
82 	// XDrawView
83 
84     virtual void SAL_CALL setCurrentPage (
85         const css::uno::Reference<css::drawing::XDrawPage >& xPage)
86         throw(css::uno::RuntimeException);
87 
88     virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
89         throw(css::uno::RuntimeException);
90 
91 
92     // XFastPropertySet
93 
94     virtual void SAL_CALL setFastPropertyValue (
95         sal_Int32 nHandle,
96         const css::uno::Any& rValue)
97         throw(css::beans::UnknownPropertyException,
98             css::beans::PropertyVetoException,
99             css::lang::IllegalArgumentException,
100             css::lang::WrappedTargetException,
101             css::uno::RuntimeException);
102 
103     virtual css::uno::Any SAL_CALL getFastPropertyValue (
104         sal_Int32 nHandle)
105         throw(css::beans::UnknownPropertyException,
106             css::lang::WrappedTargetException,
107             css::uno::RuntimeException);
108 
109     // lang::XEventListener
110     virtual void SAL_CALL
111         disposing (const ::com::sun::star::lang::EventObject& rEventObject)
112         throw (::com::sun::star::uno::RuntimeException);
113 
114 	// XServiceInfo
115 	virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
116 	virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
117 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
118 
119 private:
120     DrawController& mrController;
121     OutlineViewShell& mrOutlineViewShell;
122     sd::View& mrView;
123 };
124 
125 } // end of namespace sd
126 
127 #endif
128