Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SD_SOURCE_UI_INC_UNOMODEL_HXX
20 : #define INCLUDED_SD_SOURCE_UI_INC_UNOMODEL_HXX
21 :
22 : #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
23 : #include <com/sun/star/document/XLinkTargetSupplier.hpp>
24 : #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
25 : #include <com/sun/star/drawing/XDrawPageSummarizer.hpp>
26 : #include <com/sun/star/drawing/XDrawPageDuplicator.hpp>
27 : #include <com/sun/star/drawing/XLayerSupplier.hpp>
28 : #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
29 : #include <com/sun/star/presentation/XPresentationSupplier.hpp>
30 : #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
31 : #include <com/sun/star/drawing/XLayerManager.hpp>
32 : #include <com/sun/star/container/XNameContainer.hpp>
33 : #include <com/sun/star/presentation/XPresentation.hpp>
34 : #include <com/sun/star/lang/XServiceInfo.hpp>
35 : #include <com/sun/star/drawing/XDrawPages.hpp>
36 : #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
37 : #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
38 : #include <com/sun/star/presentation/XHandoutMasterSupplier.hpp>
39 : #include <com/sun/star/view/XRenderable.hpp>
40 : #include <com/sun/star/util/MeasureUnit.hpp>
41 :
42 : #include <rtl/ref.hxx>
43 :
44 : #include <svl/lstner.hxx>
45 : #include <sfx2/sfxbasemodel.hxx>
46 : #include <svx/fmdmod.hxx>
47 :
48 : #include <vcl/ITiledRenderable.hxx>
49 :
50 : #include <editeng/unoipset.hxx>
51 :
52 : #include <comphelper/servicehelper.hxx>
53 : #include <sddllapi.h>
54 :
55 : class SdDrawDocument;
56 : class SdPage;
57 :
58 : namespace sd {
59 : class DrawDocShell;
60 : class DrawViewShell;
61 : }
62 :
63 : extern OUString getPageApiName( SdPage* pPage );
64 : extern OUString getPageApiNameFromUiName( const OUString& rUIName );
65 :
66 : /***********************************************************************
67 : * *
68 : ***********************************************************************/
69 : class SD_DLLPUBLIC SdXImpressDocument : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
70 : public SvxFmMSFactory,
71 : public ::com::sun::star::drawing::XDrawPageDuplicator,
72 : public ::com::sun::star::drawing::XLayerSupplier,
73 : public ::com::sun::star::drawing::XMasterPagesSupplier,
74 : public ::com::sun::star::drawing::XDrawPagesSupplier,
75 : public ::com::sun::star::presentation::XPresentationSupplier,
76 : public ::com::sun::star::presentation::XCustomPresentationSupplier,
77 : public ::com::sun::star::document::XLinkTargetSupplier,
78 : public ::com::sun::star::beans::XPropertySet,
79 : public ::com::sun::star::style::XStyleFamiliesSupplier,
80 : public ::com::sun::star::lang::XServiceInfo,
81 : public ::com::sun::star::ucb::XAnyCompareFactory,
82 : public ::com::sun::star::presentation::XHandoutMasterSupplier,
83 : public ::com::sun::star::view::XRenderable,
84 : public vcl::ITiledRenderable
85 : {
86 : friend class SdDrawPagesAccess;
87 : friend class SdMasterPagesAccess;
88 : friend class SdLayerManager;
89 :
90 : private:
91 : ::sd::DrawDocShell* mpDocShell;
92 : SdDrawDocument* mpDoc;
93 : bool mbDisposed;
94 :
95 : css::uno::Reference<css::uno::XInterface> create(
96 : OUString const & aServiceSpecifier, OUString const & referer);
97 :
98 : SdPage* InsertSdPage( sal_uInt16 nPage, bool bDuplicate = false )
99 : throw (css::uno::RuntimeException, std::exception);
100 :
101 : const bool mbImpressDoc;
102 : bool mbClipBoard;
103 :
104 : ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxDrawPagesAccess;
105 : ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxMasterPagesAccess;
106 : ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > mxLayerManager;
107 : ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameContainer > mxCustomPresentationAccess;
108 : ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > mxStyleFamilies;
109 : ::com::sun::star::uno::WeakReference< ::com::sun::star::presentation::XPresentation > mxPresentation;
110 : ::com::sun::star::uno::WeakReference< ::com::sun::star::i18n::XForbiddenCharacters > mxForbidenCharacters;
111 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxLinks;
112 :
113 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDashTable;
114 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxGradientTable;
115 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxHatchTable;
116 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxBitmapTable;
117 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxTransGradientTable;
118 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxMarkerTable;
119 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDrawingPool;
120 :
121 : const SvxItemPropertySet* mpPropSet;
122 :
123 : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence;
124 :
125 : OUString maBuildId;
126 :
127 : void initializeDocument();
128 :
129 : sd::DrawViewShell* GetViewShell();
130 :
131 : public:
132 : SdXImpressDocument( ::sd::DrawDocShell* pShell, bool bClipBoard = false ) throw();
133 : SdXImpressDocument( SdDrawDocument* pDoc, bool bClipBoard = false ) throw();
134 : virtual ~SdXImpressDocument() throw();
135 :
136 : static rtl::Reference< SdXImpressDocument > GetModel( SdDrawDocument* pDoc );
137 :
138 : // intern
139 : bool operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; }
140 0 : bool operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; }
141 :
142 2193 : ::sd::DrawDocShell* GetDocShell() const { return mpDocShell; }
143 3948 : SdDrawDocument* GetDoc() const { return mpDoc; }
144 205975 : bool IsImpressDocument() const { return mbImpressDoc; }
145 :
146 : void SetModified( bool bModified = true ) throw();
147 :
148 : ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XForbiddenCharacters > getForbiddenCharsTable();
149 :
150 : // SfxListener
151 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
152 :
153 : UNO3_GETIMPLEMENTATION_DECL(SdXImpressDocument)
154 :
155 : // XInterface
156 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
157 : virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
158 : virtual void SAL_CALL release() throw() SAL_OVERRIDE;
159 :
160 : // XModel
161 : virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
162 : virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
163 : virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
164 : virtual ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
165 : virtual void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
166 :
167 : // XTypeProvider
168 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
169 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
170 :
171 : // XDrawPageDuplicator
172 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL duplicate( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
173 :
174 : // XDrawPagesSupplier
175 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getDrawPages( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
176 :
177 : // XMasterPagesSupplier
178 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getMasterPages( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
179 :
180 : // XLayerManagerSupplier
181 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLayerManager( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
182 :
183 : // XCustomPresentationSupplier
184 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getCustomPresentations( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
185 :
186 : // XHandoutMasterSupplier
187 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL getHandoutMasterPage( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
188 :
189 : // XPresentationSupplier
190 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation > SAL_CALL getPresentation( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
191 :
192 : // XMultiServiceFactory ( SvxFmMSFactory )
193 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
194 : virtual css::uno::Reference<css::uno::XInterface> SAL_CALL
195 : createInstanceWithArguments(
196 : OUString const & ServiceSpecifier,
197 : css::uno::Sequence<css::uno::Any> const & Arguments)
198 : throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
199 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
200 :
201 : // XServiceInfo
202 : virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
203 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
204 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
205 :
206 : // XPropertySet
207 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
208 : virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
209 : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
210 : virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
211 : virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
212 : virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
213 : virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
214 :
215 : // XLinkTargetSupplier
216 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
217 :
218 : // XStyleFamiliesSupplier
219 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getStyleFamilies( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
220 :
221 : // XAnyCompareFactory
222 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
223 :
224 : // XRenderable
225 : virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
226 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
227 : virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
228 :
229 : // ITiledRenderable
230 : virtual void paintTile( VirtualDevice& rDevice,
231 : int nOutputWidth,
232 : int nOutputHeight,
233 : int nTilePosX,
234 : int nTilePosY,
235 : long nTileWidth,
236 : long nTileHeight ) SAL_OVERRIDE;
237 : virtual Size getDocumentSize() SAL_OVERRIDE;
238 : virtual void setPart( int nPart ) SAL_OVERRIDE;
239 : virtual int getPart() SAL_OVERRIDE;
240 : virtual int getParts() SAL_OVERRIDE;
241 : virtual OUString getPartName( int nPart ) SAL_OVERRIDE;
242 : virtual void setPartMode( int nPartMode ) SAL_OVERRIDE;
243 :
244 : /// @see vcl::ITiledRenderable::initializeForTiledRendering().
245 : virtual void initializeForTiledRendering() SAL_OVERRIDE;
246 : /// @see vcl::ITiledRenderable::registerCallback().
247 : virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) SAL_OVERRIDE;
248 : /// @see vcl::ITiledRenderable::postKeyEvent().
249 : virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE;
250 : /// @see vcl::ITiledRenderable::postMouseEvent().
251 : virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
252 : /// @see vcl::ITiledRenderable::setTextSelection().
253 : virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
254 : /// @see vcl::ITiledRenderable::setGraphicSelection().
255 : virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE;
256 : /// @see lok::Document::resetSelection().
257 : virtual void resetSelection() SAL_OVERRIDE;
258 :
259 : // XComponent
260 :
261 : /** This dispose implementation releases the resources held by the
262 : called object and forwards the call to its base class.
263 : When close() has not yet been called then this is done first. As a
264 : consequence the implementation has to cope with being called twice
265 : and still has to forward the second call to the base class.
266 : See also comments of issue 27847.
267 : */
268 : virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
269 : };
270 :
271 : /***********************************************************************
272 : * *
273 : ***********************************************************************/
274 :
275 : #include <cppuhelper/implbase4.hxx>
276 :
277 : class SdDrawPagesAccess : public ::cppu::WeakImplHelper4< ::com::sun::star::drawing::XDrawPages, ::com::sun::star::container::XNameAccess, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::lang::XComponent >
278 : {
279 : private:
280 : SdXImpressDocument* mpModel;
281 :
282 : public:
283 : SdDrawPagesAccess( SdXImpressDocument& rMyModel ) throw();
284 : virtual ~SdDrawPagesAccess() throw();
285 :
286 : // XDrawPages
287 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
288 : virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
289 :
290 : // XNameAccess
291 : virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
292 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
293 : virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
294 :
295 : // XIndexAccess
296 : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
297 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
298 :
299 : // XElementAccess
300 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
301 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
302 :
303 : // XServiceInfo
304 : virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
305 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
306 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
307 :
308 : // XComponent
309 : virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
310 : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
311 : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
312 : };
313 :
314 : /***********************************************************************
315 : * *
316 : ***********************************************************************/
317 :
318 : #include <cppuhelper/implbase3.hxx>
319 :
320 : class SdMasterPagesAccess : public ::cppu::WeakImplHelper3< ::com::sun::star::drawing::XDrawPages, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::lang::XComponent >
321 : {
322 : private:
323 : SdXImpressDocument* mpModel;
324 :
325 : public:
326 : SdMasterPagesAccess( SdXImpressDocument& rMyModel ) throw();
327 : virtual ~SdMasterPagesAccess() throw();
328 :
329 : // XDrawPages
330 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex )
331 : throw (::com::sun::star::uno::RuntimeException,
332 : std::exception) SAL_OVERRIDE;
333 : virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
334 :
335 : // XIndexAccess
336 : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
337 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
338 :
339 : // XElementAccess
340 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
341 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
342 :
343 : // XServiceInfo
344 : virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
345 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
346 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
347 :
348 : // XComponent
349 : virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
350 : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
351 : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
352 : };
353 :
354 : /***********************************************************************
355 : * *
356 : ***********************************************************************/
357 :
358 : class SdDocLinkTargets : public ::cppu::WeakImplHelper3< ::com::sun::star::container::XNameAccess,
359 : ::com::sun::star::lang::XServiceInfo , ::com::sun::star::lang::XComponent >
360 : {
361 : private:
362 : SdXImpressDocument* mpModel;
363 :
364 : public:
365 : SdDocLinkTargets( SdXImpressDocument& rMyModel ) throw();
366 : virtual ~SdDocLinkTargets() throw();
367 :
368 : // XNameAccess
369 : virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
370 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
371 : virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
372 :
373 : // XElementAccess
374 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
375 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
376 :
377 : // XServiceInfo
378 : virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
379 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
380 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
381 :
382 : // XComponent
383 : virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
384 : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
385 : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
386 :
387 : // intern
388 : SdPage* FindPage( const OUString& rName ) const throw();
389 : };
390 :
391 : #endif
392 :
393 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|