merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / slidesorter / shell / SlideSorterService.hxx
blob390a27a57184d1b1851828ae1dc83d27f47f0564
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SlideSorterService.hxx,v $
11 * $Revision: 1.3 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SD_SLIDESORTER_SLIDE_SORTER_SERVICE_HXX
33 #define SD_SLIDESORTER_SLIDE_SORTER_SERVICE_HXX
35 #include "SlideSorter.hxx"
37 #include "tools/PropertySet.hxx"
38 #include <com/sun/star/awt/XWindowListener.hpp>
39 #include <com/sun/star/drawing/SlideSorter.hpp>
40 #include <com/sun/star/drawing/XDrawView.hpp>
41 #include <com/sun/star/drawing/framework/XView.hpp>
42 #include <com/sun/star/lang/XInitialization.hpp>
43 #include <cppuhelper/basemutex.hxx>
44 #include <cppuhelper/compbase3.hxx>
45 #include <cppuhelper/propshlp.hxx>
46 #include <boost/noncopyable.hpp>
47 #include <boost/shared_ptr.hpp>
48 #include <boost/scoped_ptr.hpp>
50 namespace css = ::com::sun::star;
52 namespace sd { namespace slidesorter {
54 namespace {
55 typedef ::cppu::WeakComponentImplHelper3 <
56 css::drawing::XSlideSorterBase,
57 css::lang::XInitialization,
58 css::awt::XWindowListener
59 > SlideSorterServiceInterfaceBase;
63 /** Implementation of the com.sun.star.drawing.SlideSorter service.
65 class SlideSorterService
66 : private ::boost::noncopyable,
67 protected ::cppu::BaseMutex,
68 public SlideSorterServiceInterfaceBase
70 public:
71 explicit SlideSorterService (
72 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
73 virtual ~SlideSorterService (void);
74 virtual void SAL_CALL disposing (void);
77 // XInitialization
79 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments)
80 throw (css::uno::Exception, css::uno::RuntimeException);
83 // XResourceId
85 css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId (void)
86 throw (css::uno::RuntimeException);
88 sal_Bool SAL_CALL isAnchorOnly (void)
89 throw (css::uno::RuntimeException);
92 // XWindowListener
94 virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent)
95 throw (css::uno::RuntimeException);
97 virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent)
98 throw (css::uno::RuntimeException);
100 virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent)
101 throw (css::uno::RuntimeException);
103 virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent)
104 throw (css::uno::RuntimeException);
107 // lang::XEventListener
108 virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent)
109 throw (css::uno::RuntimeException);
112 // XDrawView
114 virtual void SAL_CALL setCurrentPage(
115 const css::uno::Reference<css::drawing::XDrawPage>& rxSlide)
116 throw (css::uno::RuntimeException);
118 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
119 throw (css::uno::RuntimeException);
122 // Attributes
124 virtual css::uno::Reference<css::container::XIndexAccess> SAL_CALL getDocumentSlides (void)
125 throw (css::uno::RuntimeException);
127 virtual void SAL_CALL setDocumentSlides (
128 const css::uno::Reference<css::container::XIndexAccess >& rxSlides)
129 throw (css::uno::RuntimeException);
131 virtual sal_Bool SAL_CALL getIsHighlightCurrentSlide (void)
132 throw (css::uno::RuntimeException);
134 virtual void SAL_CALL setIsHighlightCurrentSlide (::sal_Bool bIsHighlightCurrentSlide)
135 throw (css::uno::RuntimeException);
137 virtual sal_Bool SAL_CALL getIsShowSelection (void)
138 throw (css::uno::RuntimeException);
140 virtual void SAL_CALL setIsShowSelection (sal_Bool bIsShowSelection)
141 throw (css::uno::RuntimeException);
143 virtual sal_Bool SAL_CALL getIsCenterSelection (void)
144 throw (css::uno::RuntimeException);
146 virtual void SAL_CALL setIsCenterSelection (sal_Bool bIsCenterSelection)
147 throw (css::uno::RuntimeException);
149 virtual sal_Bool SAL_CALL getIsSuspendPreviewUpdatesDuringFullScreenPresentation (void)
150 throw (css::uno::RuntimeException);
152 virtual void SAL_CALL setIsSuspendPreviewUpdatesDuringFullScreenPresentation (
153 sal_Bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
154 throw (css::uno::RuntimeException);
156 virtual sal_Bool SAL_CALL getIsOrientationVertical (void)
157 throw (css::uno::RuntimeException);
159 virtual void SAL_CALL setIsOrientationVertical (sal_Bool bIsOrientationVertical)
160 throw (css::uno::RuntimeException);
162 virtual sal_Bool SAL_CALL getIsSmoothScrolling (void)
163 throw (css::uno::RuntimeException);
165 virtual void SAL_CALL setIsSmoothScrolling (sal_Bool bIsOrientationVertical)
166 throw (css::uno::RuntimeException);
168 virtual css::util::Color SAL_CALL getBackgroundColor (void)
169 throw (css::uno::RuntimeException);
171 virtual void SAL_CALL setBackgroundColor (css::util::Color aBackgroundColor)
172 throw (css::uno::RuntimeException);
174 virtual css::util::Color SAL_CALL getTextColor (void)
175 throw (css::uno::RuntimeException);
177 virtual void SAL_CALL setTextColor (css::util::Color aTextColor)
178 throw (css::uno::RuntimeException);
180 virtual css::util::Color SAL_CALL getSelectionColor (void)
181 throw (css::uno::RuntimeException);
183 virtual void SAL_CALL setSelectionColor (css::util::Color aSelectionColor)
184 throw (css::uno::RuntimeException);
186 virtual css::util::Color SAL_CALL getHighlightColor (void)
187 throw (css::uno::RuntimeException);
189 virtual void SAL_CALL setHighlightColor (css::util::Color aHighlightColor)
190 throw (css::uno::RuntimeException);
192 virtual sal_Bool SAL_CALL getIsUIReadOnly (void)
193 throw (css::uno::RuntimeException);
195 virtual void SAL_CALL setIsUIReadOnly (sal_Bool bIsUIReadOnly)
196 throw (css::uno::RuntimeException);
198 virtual sal_Bool SAL_CALL getIsShowFocus (void)
199 throw (css::uno::RuntimeException);
201 virtual void SAL_CALL setIsShowFocus (sal_Bool bIsShowFocus)
202 throw (css::uno::RuntimeException);
204 private:
205 ::boost::shared_ptr<SlideSorter> mpSlideSorter;
206 css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
207 css::uno::Reference<css::awt::XWindow> mxParentWindow;
208 ::boost::scoped_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper;
210 void Resize (void);
211 void Rearrange (void);
213 /** This method throws a DisposedException when the object has already been
214 disposed.
216 void ThrowIfDisposed (void) throw (css::lang::DisposedException);
219 } } // end of namespace ::sd::slidesorter
221 #endif