xref: /AOO42X/main/sd/source/ui/inc/unomodel.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c45d927aSAndrew Rist  * distributed with this work for additional information
6c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17c45d927aSAndrew Rist  * specific language governing permissions and limitations
18c45d927aSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20c45d927aSAndrew Rist  *************************************************************/
21c45d927aSAndrew Rist 
22c45d927aSAndrew Rist 
23cdf0e10cSrcweir #ifndef SD_UNO_MODEL_HXX
24cdf0e10cSrcweir #define SD_UNO_MODEL_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
27*5ce73266SArrigo Marchiori #include <com/sun/star/document/XLinkAuthorizer.hpp>
28cdf0e10cSrcweir #include <com/sun/star/document/XLinkTargetSupplier.hpp>
29cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
30cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPageSummarizer.hpp>
31cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPageDuplicator.hpp>
32cdf0e10cSrcweir #include <com/sun/star/drawing/XLayerSupplier.hpp>
33cdf0e10cSrcweir #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
34cdf0e10cSrcweir #include <com/sun/star/presentation/XPresentationSupplier.hpp>
35cdf0e10cSrcweir #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
36cdf0e10cSrcweir #include <com/sun/star/drawing/XLayerManager.hpp>
37cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
38cdf0e10cSrcweir #include <com/sun/star/presentation/XPresentation.hpp>
39cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
40cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPages.hpp>
41cdf0e10cSrcweir #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
42cdf0e10cSrcweir #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
43cdf0e10cSrcweir #include <com/sun/star/presentation/XHandoutMasterSupplier.hpp>
44cdf0e10cSrcweir #include <com/sun/star/view/XRenderable.hpp>
45cdf0e10cSrcweir #include <com/sun/star/util/MeasureUnit.hpp>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #include <rtl/ref.hxx>
48cdf0e10cSrcweir 
49cdf0e10cSrcweir #include <svl/lstner.hxx>
50cdf0e10cSrcweir #include <sfx2/sfxbasemodel.hxx>
51cdf0e10cSrcweir #include <svx/fmdmod.hxx>
52cdf0e10cSrcweir 
53cdf0e10cSrcweir #include <editeng/unoipset.hxx>
54cdf0e10cSrcweir 
55cdf0e10cSrcweir #include <comphelper/servicehelper.hxx>
56cdf0e10cSrcweir 
57cdf0e10cSrcweir class SdDrawDocument;
58cdf0e10cSrcweir class SdPage;
59cdf0e10cSrcweir class List;
60cdf0e10cSrcweir class SdXCustomPresentations;
61cdf0e10cSrcweir 
62cdf0e10cSrcweir namespace sd {
63cdf0e10cSrcweir class DrawDocShell;
64cdf0e10cSrcweir }
65cdf0e10cSrcweir 
66cdf0e10cSrcweir extern ::rtl::OUString getPageApiName( SdPage* pPage );
67cdf0e10cSrcweir extern ::rtl::OUString getPageApiNameFromUiName( const String& rUIName );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir /***********************************************************************
70cdf0e10cSrcweir *                                                                      *
71cdf0e10cSrcweir ***********************************************************************/
72cdf0e10cSrcweir class SdXImpressDocument : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
73cdf0e10cSrcweir                            public SvxFmMSFactory,
74cdf0e10cSrcweir                            public ::com::sun::star::drawing::XDrawPageDuplicator,
75cdf0e10cSrcweir                            public ::com::sun::star::drawing::XLayerSupplier,
76cdf0e10cSrcweir                            public ::com::sun::star::drawing::XMasterPagesSupplier,
77cdf0e10cSrcweir                            public ::com::sun::star::drawing::XDrawPagesSupplier,
78cdf0e10cSrcweir                            public ::com::sun::star::presentation::XPresentationSupplier,
79cdf0e10cSrcweir                            public ::com::sun::star::presentation::XCustomPresentationSupplier,
80*5ce73266SArrigo Marchiori                            public ::com::sun::star::document::XLinkAuthorizer,
81cdf0e10cSrcweir                            public ::com::sun::star::document::XLinkTargetSupplier,
82cdf0e10cSrcweir                            public ::com::sun::star::beans::XPropertySet,
83cdf0e10cSrcweir                            public ::com::sun::star::style::XStyleFamiliesSupplier,
84cdf0e10cSrcweir                            public ::com::sun::star::lang::XServiceInfo,
85cdf0e10cSrcweir                            public ::com::sun::star::ucb::XAnyCompareFactory,
86cdf0e10cSrcweir                            public ::com::sun::star::presentation::XHandoutMasterSupplier,
87cdf0e10cSrcweir                            public ::com::sun::star::view::XRenderable
88cdf0e10cSrcweir {
89cdf0e10cSrcweir     friend class SdDrawPagesAccess;
90cdf0e10cSrcweir     friend class SdMasterPagesAccess;
91cdf0e10cSrcweir     friend class SdLayerManager;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir private:
94cdf0e10cSrcweir     ::sd::DrawDocShell* mpDocShell;
95cdf0e10cSrcweir     SdDrawDocument* mpDoc;
96cdf0e10cSrcweir     bool mbDisposed;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir     SdPage* InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate = sal_False ) throw();
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     const sal_Bool mbImpressDoc;
101cdf0e10cSrcweir     bool mbClipBoard;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxDrawPagesAccess;
104cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxMasterPagesAccess;
105cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > mxLayerManager;
106cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameContainer > mxCustomPresentationAccess;
107cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > mxStyleFamilies;
108cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::presentation::XPresentation > mxPresentation;
109cdf0e10cSrcweir     ::com::sun::star::uno::WeakReference< ::com::sun::star::i18n::XForbiddenCharacters > mxForbidenCharacters;
110cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxLinks;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDashTable;
113cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxGradientTable;
114cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxHatchTable;
115cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxBitmapTable;
116cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxTransGradientTable;
117cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxMarkerTable;
118cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDrawingPool;
119cdf0e10cSrcweir 
120cdf0e10cSrcweir     const SvxItemPropertySet*   mpPropSet;
121cdf0e10cSrcweir 
122cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence;
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     rtl::OUString   maBuildId;
125cdf0e10cSrcweir 
126cdf0e10cSrcweir     void initializeDocument();
127cdf0e10cSrcweir public:
128cdf0e10cSrcweir     SdXImpressDocument( ::sd::DrawDocShell* pShell, bool bClipBoard = false ) throw();
129cdf0e10cSrcweir     SdXImpressDocument( SdDrawDocument* pDoc, bool bClipBoard = false ) throw();
130cdf0e10cSrcweir     virtual ~SdXImpressDocument() throw();
131cdf0e10cSrcweir 
132cdf0e10cSrcweir     static rtl::Reference< SdXImpressDocument > GetModel( SdDrawDocument* pDoc );
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     // intern
operator ==(const SdXImpressDocument & rModel) const135cdf0e10cSrcweir     virtual int operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; }
operator !=(const SdXImpressDocument & rModel) const136cdf0e10cSrcweir     virtual int operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; }
137cdf0e10cSrcweir 
GetDocShell() const138cdf0e10cSrcweir     ::sd::DrawDocShell* GetDocShell() const { return mpDocShell; }
GetDoc() const139cdf0e10cSrcweir     SdDrawDocument* GetDoc() const { return mpDoc; }
IsImpressDocument() const140cdf0e10cSrcweir     sal_Bool IsImpressDocument() const { return mbImpressDoc; }
141cdf0e10cSrcweir 
142cdf0e10cSrcweir     void SetModified( sal_Bool bModified = sal_True ) throw();
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XForbiddenCharacters > getForbiddenCharsTable();
145cdf0e10cSrcweir 
146cdf0e10cSrcweir     // SfxListener
147cdf0e10cSrcweir     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
148cdf0e10cSrcweir 
149cdf0e10cSrcweir     UNO3_GETIMPLEMENTATION_DECL(SdXImpressDocument)
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     // XInterface
152cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
153cdf0e10cSrcweir     virtual void SAL_CALL acquire() throw();
154cdf0e10cSrcweir     virtual void SAL_CALL release() throw();
155cdf0e10cSrcweir 
156cdf0e10cSrcweir     // XModel
157cdf0e10cSrcweir     virtual void SAL_CALL lockControllers(  ) throw(::com::sun::star::uno::RuntimeException);
158cdf0e10cSrcweir     virtual void SAL_CALL unlockControllers(  ) throw(::com::sun::star::uno::RuntimeException);
159cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasControllersLocked(  ) throw(::com::sun::star::uno::RuntimeException);
160cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw(::com::sun::star::uno::RuntimeException);
161cdf0e10cSrcweir     virtual void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw(::com::sun::star::uno::RuntimeException);
162cdf0e10cSrcweir 
163cdf0e10cSrcweir     // XTypeProvider
164cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
165cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
166cdf0e10cSrcweir 
167cdf0e10cSrcweir     // XDrawPageDuplicator
168cdf0e10cSrcweir     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);
169cdf0e10cSrcweir 
170cdf0e10cSrcweir     // XDrawPagesSupplier
171cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getDrawPages(  ) throw(::com::sun::star::uno::RuntimeException);
172cdf0e10cSrcweir 
173cdf0e10cSrcweir     // XMasterPagesSupplier
174cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getMasterPages(  ) throw(::com::sun::star::uno::RuntimeException);
175cdf0e10cSrcweir 
176cdf0e10cSrcweir     // XLayerManagerSupplier
177cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLayerManager(  ) throw(::com::sun::star::uno::RuntimeException);
178cdf0e10cSrcweir 
179cdf0e10cSrcweir     // XCustomPresentationSupplier
180cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getCustomPresentations(  ) throw(::com::sun::star::uno::RuntimeException);
181cdf0e10cSrcweir 
182cdf0e10cSrcweir     // XHandoutMasterSupplier
183cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL getHandoutMasterPage(  ) throw (::com::sun::star::uno::RuntimeException);
184cdf0e10cSrcweir 
185cdf0e10cSrcweir     // XPresentationSupplier
186cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation > SAL_CALL getPresentation(  ) throw(::com::sun::star::uno::RuntimeException);
187cdf0e10cSrcweir 
188cdf0e10cSrcweir     // XMultiServiceFactory ( SvxFmMSFactory )
189cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
190cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
191cdf0e10cSrcweir 
192cdf0e10cSrcweir     // XServiceInfo
193cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
194cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
195cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
196cdf0e10cSrcweir 
197cdf0e10cSrcweir     // XPropertySet
198cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
199cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue( const ::rtl::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);
200cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
201cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::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);
202cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::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);
203cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::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);
204cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::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);
205cdf0e10cSrcweir 
206*5ce73266SArrigo Marchiori     // XLinkAuthorizer
207*5ce73266SArrigo Marchiori     virtual sal_Bool SAL_CALL authorizeLinks( const ::rtl::OUString &url ) throw(::com::sun::star::uno::RuntimeException);
208*5ce73266SArrigo Marchiori 
209cdf0e10cSrcweir     // XLinkTargetSupplier
210cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(  ) throw(::com::sun::star::uno::RuntimeException);
211cdf0e10cSrcweir 
212cdf0e10cSrcweir     // XStyleFamiliesSupplier
213cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getStyleFamilies(  ) throw(::com::sun::star::uno::RuntimeException);
214cdf0e10cSrcweir 
215cdf0e10cSrcweir     // XAnyCompareFactory
216cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
217cdf0e10cSrcweir 
218cdf0e10cSrcweir     // XRenderable
219cdf0e10cSrcweir     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);
220cdf0e10cSrcweir     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);
221cdf0e10cSrcweir     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);
222cdf0e10cSrcweir 
223cdf0e10cSrcweir     // XComponent
224cdf0e10cSrcweir 
225cdf0e10cSrcweir     /** This dispose implementation releases the resources held by the
226cdf0e10cSrcweir         called object and forwards the call to its base class.
227cdf0e10cSrcweir         When close() has not yet been called then this is done first.  As a
228cdf0e10cSrcweir         consequence the implementation has to cope with being called twice
229cdf0e10cSrcweir         and still has to forward the second call to the base class.
230cdf0e10cSrcweir         See also comments of issue 27847.
231cdf0e10cSrcweir     */
232cdf0e10cSrcweir     virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
233cdf0e10cSrcweir };
234cdf0e10cSrcweir 
235cdf0e10cSrcweir /***********************************************************************
236cdf0e10cSrcweir *                                                                      *
237cdf0e10cSrcweir ***********************************************************************/
238cdf0e10cSrcweir 
239cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
240cdf0e10cSrcweir 
241cdf0e10cSrcweir 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 >
242cdf0e10cSrcweir {
243cdf0e10cSrcweir private:
244cdf0e10cSrcweir     SdXImpressDocument* mpModel;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir public:
247cdf0e10cSrcweir     SdDrawPagesAccess( SdXImpressDocument&  rMyModel ) throw();
248cdf0e10cSrcweir     virtual ~SdDrawPagesAccess() throw();
249cdf0e10cSrcweir 
250cdf0e10cSrcweir     // XDrawPages
251cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex ) throw(::com::sun::star::uno::RuntimeException);
252cdf0e10cSrcweir     virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::com::sun::star::uno::RuntimeException);
253cdf0e10cSrcweir 
254cdf0e10cSrcweir     // XNameAccess
255cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
256cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw(::com::sun::star::uno::RuntimeException);
257cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
258cdf0e10cSrcweir 
259cdf0e10cSrcweir     // XIndexAccess
260cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
261cdf0e10cSrcweir     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);
262cdf0e10cSrcweir 
263cdf0e10cSrcweir     // XElementAccess
264cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
265cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
266cdf0e10cSrcweir 
267cdf0e10cSrcweir     // XServiceInfo
268cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
269cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
270cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
271cdf0e10cSrcweir 
272cdf0e10cSrcweir     // XComponent
273cdf0e10cSrcweir     virtual void SAL_CALL dispose(  ) throw (::com::sun::star::uno::RuntimeException);
274cdf0e10cSrcweir     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
275cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
276cdf0e10cSrcweir };
277cdf0e10cSrcweir 
278cdf0e10cSrcweir /***********************************************************************
279cdf0e10cSrcweir *                                                                      *
280cdf0e10cSrcweir ***********************************************************************/
281cdf0e10cSrcweir 
282cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
283cdf0e10cSrcweir 
284cdf0e10cSrcweir class SdMasterPagesAccess : public ::cppu::WeakImplHelper3< ::com::sun::star::drawing::XDrawPages, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::lang::XComponent >
285cdf0e10cSrcweir {
286cdf0e10cSrcweir private:
287cdf0e10cSrcweir     SdXImpressDocument* mpModel;
288cdf0e10cSrcweir 
289cdf0e10cSrcweir public:
290cdf0e10cSrcweir     SdMasterPagesAccess( SdXImpressDocument& rMyModel ) throw();
291cdf0e10cSrcweir     virtual ~SdMasterPagesAccess() throw();
292cdf0e10cSrcweir 
293cdf0e10cSrcweir     // XDrawPages
294cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex ) throw(::com::sun::star::uno::RuntimeException);
295cdf0e10cSrcweir     virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::com::sun::star::uno::RuntimeException);
296cdf0e10cSrcweir 
297cdf0e10cSrcweir     // XIndexAccess
298cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
299cdf0e10cSrcweir     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);
300cdf0e10cSrcweir 
301cdf0e10cSrcweir     // XElementAccess
302cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
303cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
304cdf0e10cSrcweir 
305cdf0e10cSrcweir     // XServiceInfo
306cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
307cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
308cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
309cdf0e10cSrcweir 
310cdf0e10cSrcweir     // XComponent
311cdf0e10cSrcweir     virtual void SAL_CALL dispose(  ) throw (::com::sun::star::uno::RuntimeException);
312cdf0e10cSrcweir     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
313cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
314cdf0e10cSrcweir };
315cdf0e10cSrcweir 
316cdf0e10cSrcweir /***********************************************************************
317cdf0e10cSrcweir *                                                                      *
318cdf0e10cSrcweir ***********************************************************************/
319cdf0e10cSrcweir 
320cdf0e10cSrcweir class SdDocLinkTargets : public ::cppu::WeakImplHelper3< ::com::sun::star::container::XNameAccess,
321cdf0e10cSrcweir                                                          ::com::sun::star::lang::XServiceInfo , ::com::sun::star::lang::XComponent >
322cdf0e10cSrcweir {
323cdf0e10cSrcweir private:
324cdf0e10cSrcweir     SdXImpressDocument* mpModel;
325cdf0e10cSrcweir 
326cdf0e10cSrcweir public:
327cdf0e10cSrcweir     SdDocLinkTargets( SdXImpressDocument&   rMyModel ) throw();
328cdf0e10cSrcweir     virtual ~SdDocLinkTargets() throw();
329cdf0e10cSrcweir 
330cdf0e10cSrcweir     // XNameAccess
331cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
332cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw(::com::sun::star::uno::RuntimeException);
333cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
334cdf0e10cSrcweir 
335cdf0e10cSrcweir     // XElementAccess
336cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
337cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
338cdf0e10cSrcweir 
339cdf0e10cSrcweir     // XServiceInfo
340cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
341cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
342cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
343cdf0e10cSrcweir 
344cdf0e10cSrcweir     // XComponent
345cdf0e10cSrcweir     virtual void SAL_CALL dispose(  ) throw (::com::sun::star::uno::RuntimeException);
346cdf0e10cSrcweir     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
347cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
348cdf0e10cSrcweir 
349cdf0e10cSrcweir     // intern
350cdf0e10cSrcweir     SdPage* FindPage( const ::rtl::OUString& rName ) const throw();
351cdf0e10cSrcweir };
352cdf0e10cSrcweir 
353cdf0e10cSrcweir #endif
354