bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / slidesorter / shell / SlideSorterService.hxx
blob7b79b55a2dcdc66112192925cd4264ebcdfc921c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_SHELL_SLIDESORTERSERVICE_HXX
21 #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_SHELL_SLIDESORTERSERVICE_HXX
23 #include "SlideSorter.hxx"
25 #include "tools/PropertySet.hxx"
26 #include <com/sun/star/awt/XWindowListener.hpp>
27 #include <com/sun/star/drawing/SlideSorter.hpp>
28 #include <com/sun/star/drawing/XDrawView.hpp>
29 #include <com/sun/star/drawing/framework/XView.hpp>
30 #include <com/sun/star/lang/XInitialization.hpp>
31 #include <cppuhelper/basemutex.hxx>
32 #include <cppuhelper/compbase3.hxx>
33 #include <cppuhelper/propshlp.hxx>
34 #include <boost/noncopyable.hpp>
35 #include <boost/shared_ptr.hpp>
36 #include <boost/scoped_ptr.hpp>
38 namespace sd { namespace slidesorter {
40 namespace {
41 typedef ::cppu::WeakComponentImplHelper3 <
42 css::drawing::XSlideSorterBase,
43 css::lang::XInitialization,
44 css::awt::XWindowListener
45 > SlideSorterServiceInterfaceBase;
48 /** Implementation of the com.sun.star.drawing.SlideSorter service.
50 class SlideSorterService
51 : private ::boost::noncopyable,
52 protected ::cppu::BaseMutex,
53 public SlideSorterServiceInterfaceBase
55 public:
56 explicit SlideSorterService (
57 const css::uno::Reference<css::uno::XComponentContext>& rxContext);
58 virtual ~SlideSorterService();
59 virtual void SAL_CALL disposing() SAL_OVERRIDE;
61 // XInitialization
63 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments)
64 throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 // XResourceId
68 css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId()
69 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 sal_Bool SAL_CALL isAnchorOnly()
72 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 // XWindowListener
76 virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent)
77 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent)
80 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82 virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent)
83 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
85 virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent)
86 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88 // lang::XEventListener
89 virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent)
90 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 // XDrawView
94 virtual void SAL_CALL setCurrentPage(
95 const css::uno::Reference<css::drawing::XDrawPage>& rxSlide)
96 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage()
99 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 // Attributes
103 virtual css::uno::Reference<css::container::XIndexAccess> SAL_CALL getDocumentSlides()
104 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
106 virtual void SAL_CALL setDocumentSlides (
107 const css::uno::Reference<css::container::XIndexAccess >& rxSlides)
108 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 virtual sal_Bool SAL_CALL getIsHighlightCurrentSlide()
111 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
113 virtual void SAL_CALL setIsHighlightCurrentSlide (sal_Bool bIsHighlightCurrentSlide)
114 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
116 virtual sal_Bool SAL_CALL getIsShowSelection()
117 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
119 virtual void SAL_CALL setIsShowSelection (sal_Bool bIsShowSelection)
120 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
122 virtual sal_Bool SAL_CALL getIsCenterSelection()
123 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
125 virtual void SAL_CALL setIsCenterSelection (sal_Bool bIsCenterSelection)
126 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
128 virtual sal_Bool SAL_CALL getIsSuspendPreviewUpdatesDuringFullScreenPresentation()
129 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
131 virtual void SAL_CALL setIsSuspendPreviewUpdatesDuringFullScreenPresentation (
132 sal_Bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
133 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
135 virtual sal_Bool SAL_CALL getIsOrientationVertical()
136 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
138 virtual void SAL_CALL setIsOrientationVertical (sal_Bool bIsOrientationVertical)
139 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
141 virtual sal_Bool SAL_CALL getIsSmoothScrolling()
142 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
144 virtual void SAL_CALL setIsSmoothScrolling (sal_Bool bIsOrientationVertical)
145 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
147 virtual css::util::Color SAL_CALL getBackgroundColor()
148 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
150 virtual void SAL_CALL setBackgroundColor (css::util::Color aBackgroundColor)
151 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
153 virtual css::util::Color SAL_CALL getTextColor()
154 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
156 virtual void SAL_CALL setTextColor (css::util::Color aTextColor)
157 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
159 virtual css::util::Color SAL_CALL getSelectionColor()
160 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
162 virtual void SAL_CALL setSelectionColor (css::util::Color aSelectionColor)
163 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
165 virtual css::util::Color SAL_CALL getHighlightColor()
166 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
168 virtual void SAL_CALL setHighlightColor (css::util::Color aHighlightColor)
169 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
171 virtual sal_Bool SAL_CALL getIsUIReadOnly()
172 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
174 virtual void SAL_CALL setIsUIReadOnly (sal_Bool bIsUIReadOnly)
175 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
177 virtual sal_Bool SAL_CALL getIsShowFocus()
178 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
180 virtual void SAL_CALL setIsShowFocus (sal_Bool bIsShowFocus)
181 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
183 private:
184 ::boost::shared_ptr<SlideSorter> mpSlideSorter;
185 css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
186 css::uno::Reference<css::awt::XWindow> mxParentWindow;
187 ::boost::scoped_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper;
189 void Resize();
191 /** This method throws a DisposedException when the object has already been
192 disposed.
194 void ThrowIfDisposed() throw (css::lang::DisposedException);
197 } } // end of namespace ::sd::slidesorter
199 #endif
201 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */