xref: /trunk/main/sfx2/inc/sfx2/sfxbasemodel.hxx (revision 86e1cf34)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SFX_SFXBASEMODEL_HXX_
25 #define _SFX_SFXBASEMODEL_HXX_
26 
27 #include "sal/config.h"
28 #include "sfx2/dllapi.h"
29 #include "sal/types.h"
30 #include <com/sun/star/lang/XTypeProvider.hpp>
31 #include <com/sun/star/frame/XModule.hpp>
32 #include <com/sun/star/frame/XTitle.hpp>
33 #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
34 #include <com/sun/star/frame/XUntitledNumbers.hpp>
35 #include <com/sun/star/container/XChild.hpp>
36 #include <com/sun/star/container/XNameContainer.hpp>
37 #include <com/sun/star/container/XNameReplace.hpp>
38 #include <com/sun/star/frame/XController2.hpp>
39 #include <com/sun/star/document/XDocumentInfo.hpp>
40 #include <com/sun/star/document/XDocumentInfoSupplier.hpp>
41 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
42 #include <com/sun/star/document/XDocumentRecovery.hpp>
43 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
44 
45 #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
46 
47 #include <com/sun/star/document/XEventBroadcaster.hpp>
48 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
49 #include <com/sun/star/document/XEventListener.hpp>
50 #include <com/sun/star/document/XEventsSupplier.hpp>
51 #include <com/sun/star/document/XEmbeddedScripts.hpp>
52 #include <com/sun/star/document/EventObject.hpp>
53 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
54 #include <com/sun/star/document/XStorageBasedDocument.hpp>
55 #include <com/sun/star/document/XScriptInvocationContext.hpp>
56 #include <com/sun/star/lang/XEventListener.hpp>
57 #include <com/sun/star/lang/NotInitializedException.hpp>
58 #include <com/sun/star/lang/DisposedException.hpp>
59 #include <com/sun/star/frame/XModel2.hpp>
60 #include <com/sun/star/frame/DoubleInitializationException.hpp>
61 #include <com/sun/star/util/XModifiable2.hpp>
62 #include <com/sun/star/util/XModifyListener.hpp>
63 #include <com/sun/star/util/XCloseable.hpp>
64 #include <com/sun/star/util/XCloseBroadcaster.hpp>
65 #include <com/sun/star/util/XCloseListener.hpp>
66 #include <com/sun/star/util/CloseVetoException.hpp>
67 #include <com/sun/star/view/XPrintable.hpp>
68 #include <com/sun/star/view/XPrintJobBroadcaster.hpp>
69 #include <com/sun/star/frame/XStorable.hpp>
70 #include <com/sun/star/frame/XStorable2.hpp>
71 #include <com/sun/star/frame/XLoadable.hpp>
72 #include <com/sun/star/beans/PropertyValue.hpp>
73 #include <com/sun/star/lang/EventObject.hpp>
74 #include <com/sun/star/datatransfer/XTransferable.hpp>
75 #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
76 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
77 #include <com/sun/star/embed/XVisualObject.hpp>
78 #include <com/sun/star/uno/Sequence.hxx>
79 #include <com/sun/star/uno/Reference.hxx>
80 #include <com/sun/star/uno/Any.hxx>
81 #include <cppuhelper/weak.hxx>
82 #include <cppuhelper/basemutex.hxx>
83 #include <cppuhelper/typeprovider.hxx>
84 #include <com/sun/star/script/XStarBasicAccess.hpp>
85 #include <osl/mutex.hxx>
86 #include <vos/mutex.hxx>
87 #include <vcl/svapp.hxx>
88 
89 #include <tools/link.hxx>
90 
91 #include <com/sun/star/document/XViewDataSupplier.hpp>
92 #include <com/sun/star/lang/XUnoTunnel.hpp>
93 
94 #include <com/sun/star/task/XInteractionHandler.hpp>
95 
96 //________________________________________________________________________________________________________
97 #if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_32)
98 #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_32
99 #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 32
100 #include <comphelper/implbase_var.hxx>
101 #endif
102 
103 //	include of my own project
104 //________________________________________________________________________________________________________
105 #include <svl/lstner.hxx>
106 
107 //________________________________________________________________________________________________________
108 //	defines
109 //________________________________________________________________________________________________________
110 
111 // Some defines to write better code :-)
112 #define	XCHILD					::com::sun::star::container::XChild
113 #define	XNAMECONTAINER			::com::sun::star::container::XNameContainer
114 #define	XCONTROLLER				::com::sun::star::frame::XController
115 #define	XEVENTLISTENER			::com::sun::star::lang::XEventListener
116 #define	XINTERFACE				::com::sun::star::uno::XInterface
117 #define XCOMPONENT              ::com::sun::star::lang::XComponent
118 #define	XMODEL					::com::sun::star::frame::XModel
119 #define	XMODEL2					::com::sun::star::frame::XModel2
120 #define	XMODIFIABLE				::com::sun::star::util::XModifiable
121 #define	XMODIFIABLE2			::com::sun::star::util::XModifiable2
122 #define XMODIFYBROADCASTER      ::com::sun::star::util::XModifyBroadcaster
123 #define	XMODIFYLISTENER			::com::sun::star::util::XModifyListener
124 #define XCLOSEABLE              ::com::sun::star::util::XCloseable
125 #define XCLOSEBROADCASTER       ::com::sun::star::util::XCloseBroadcaster
126 #define XCLOSELISTENER          ::com::sun::star::util::XCloseListener
127 #define	XPRINTABLE				::com::sun::star::view::XPrintable
128 #define	XPRINTJOBBROADCASTER	::com::sun::star::view::XPrintJobBroadcaster
129 #define	XSTORABLE				::com::sun::star::frame::XStorable
130 #define	XSTORABLE2				::com::sun::star::frame::XStorable2
131 #define	XLOADABLE				::com::sun::star::frame::XLoadable
132 #define	XTYPEPROVIDER			::com::sun::star::lang::XTypeProvider
133 #define	XSTARBASICACCESS		::com::sun::star::script::XStarBasicAccess
134 #define	NOSUCHELEMENTEXCEPTION	::com::sun::star::container::NoSuchElementException
135 #define	ELEMENTEXISTEXCEPTION	::com::sun::star::container::ElementExistException
136 #define XNAMEREPLACE			::com::sun::star::container::XNameReplace
137 #define XINDEXCONTAINER         ::com::sun::star::container::XIndexContainer
138 #define DISPOSEDEXCEPTION       ::com::sun::star::lang::DisposedException
139 #define	DOCEVENTOBJECT			::com::sun::star::document::EventObject
140 #define	XDOCEVENTLISTENER		::com::sun::star::document::XEventListener
141 #define	XDOCUMENTINFO			::com::sun::star::document::XDocumentInfo
142 #define	XDOCUMENTINFOSUPPLIER	::com::sun::star::document::XDocumentInfoSupplier
143 #define	XEVENTBROADCASTER		::com::sun::star::document::XEventBroadcaster
144 #define	XDOCUMENTEVENTBROADCASTER	::com::sun::star::document::XDocumentEventBroadcaster
145 #define	XEVENTSSUPPLIER			::com::sun::star::document::XEventsSupplier
146 #define XEMBEDDEDSCRIPTS        ::com::sun::star::document::XEmbeddedScripts
147 #define XSCRIPTINVOCATIONCONTEXT    ::com::sun::star::document::XScriptInvocationContext
148 
149 #define	NOSUPPORTEXCEPTION		::com::sun::star::lang::NoSupportException
150 #define	RUNTIMEEXCEPTION		::com::sun::star::uno::RuntimeException
151 #define CLOSEVETOEXCEPTION      ::com::sun::star::util::CloseVetoException
152 #define DOUBLEINITIALIZATIONEXCEPTION      ::com::sun::star::frame::DoubleInitializationException
153 #define ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException
154 #define IOEXCEPTION				::com::sun::star::io::IOException
155 #define EXCEPTION				::com::sun::star::uno::Exception
156 
157 #define	ANY						::com::sun::star::uno::Any
158 #define	EVENTOBJECT				::com::sun::star::lang::EventObject
159 #define	PROPERTYVALUE			::com::sun::star::beans::PropertyValue
160 #define	REFERENCE				::com::sun::star::uno::Reference
161 #define	MUTEX					::osl::Mutex
162 #define	OUSTRING				::rtl::OUString
163 #define	UNOTYPE					::com::sun::star::uno::Type
164 #define XVIEWDATASUPPLIER       ::com::sun::star::document::XViewDataSupplier
165 #define XINDEXACCESS		  	::com::sun::star::container::XIndexAccess
166 #define XTRANSFERABLE		  	::com::sun::star::datatransfer::XTransferable
167 #define DATAFLAVOR				::com::sun::star::datatransfer::DataFlavor
168 
169 #define	XUNOTUNNEL		 		::com::sun::star::lang::XUnoTunnel
170 
171 #define XDOCUMENTSUBSTORAGESUPPLIER  ::com::sun::star::document::XDocumentSubStorageSupplier
172 #define XSTORAGEBASEDDOCUMENT	::com::sun::star::document::XStorageBasedDocument
173 #define XSTORAGE				::com::sun::star::embed::XStorage
174 #define XVISUALOBJECT           ::com::sun::star::embed::XVisualObject
175 
176 #define XSCRIPTPROVIDERSUPPLIER	::com::sun::star::script::provider::XScriptProviderSupplier
177 #define XSCRIPTPROVIDER			::com::sun::star::script::provider::XScriptProvider
178 
179 #define XUICONFIGURATIONMANAGERSUPPLIER ::com::sun::star::ui::XUIConfigurationManagerSupplier
180 #define XUICONFIGURATIONMANAGER ::com::sun::star::ui::XUIConfigurationManager
181 #define XMODULE ::com::sun::star::frame::XModule
182 #define XTITLE ::com::sun::star::frame::XTitle
183 #define XTITLECHANGEBROADCASTER ::com::sun::star::frame::XTitleChangeBroadcaster
184 #define XUNTITLEDNUMBERS ::com::sun::star::frame::XUntitledNumbers
185 
186 //________________________________________________________________________________________________________
187 //	namespace
188 //________________________________________________________________________________________________________
189 #ifdef css
190     #error "class is using css as namespace define .-)"
191 #else
192     #define css ::com::sun::star
193 #endif
194 
195 //________________________________________________________________________________________________________
196 //	forwards
197 //________________________________________________________________________________________________________
198 class	SfxPrinter;
199 class	SfxViewShell;
200 class	SfxObjectShell						;
201 class	SfxEventHint;
202 class   SfxViewFrame;
203 struct	IMPL_SfxBaseModel_DataContainer		;	// impl. struct to hold member of class SfxBaseModel
204 
205 namespace sfx { namespace intern {
206     class ViewCreationGuard;
207 } }
208 //________________________________________________________________________________________________________
209 //	class declarations
210 //________________________________________________________________________________________________________
211 
212 /**_______________________________________________________________________________________________________
213 	@short		-
214 
215 	@descr		-
216 
217 	@implements	XChild
218 				XComponent
219 				XDocumentInfoSupplier
220 				document::XDocumentPropertiesSupplier
221 				rdf::XDocumentMetadataAccess
222 				XEventListener
223 				XModel
224 				XModifiable2
225 				XPrintable
226 				XStorable2
227 				document::XEventBroadcaster
228 				document::XEventsSupplier
229                 document::XEmbeddedScripts
230                 document::XScriptInvocationContext
231                 XCloseable
232                 XCloseBroadcaster
233 
234 	@base		cppu::BaseMutex
235  				SfxListener
236 */
237 
238 typedef ::comphelper::WeakImplHelper32  <   XCHILD
239                                         ,   XDOCUMENTINFOSUPPLIER
240                                         ,   ::com::sun::star::document::XDocumentPropertiesSupplier
241                                         ,   ::com::sun::star::rdf::XDocumentMetadataAccess
242                                         ,   ::com::sun::star::document::XDocumentRecovery
243                                         ,   ::com::sun::star::document::XUndoManagerSupplier
244                                         ,   XEVENTBROADCASTER
245                                         ,   XDOCUMENTEVENTBROADCASTER
246                                         ,   XEVENTLISTENER
247                                         ,   XEVENTSSUPPLIER
248                                         ,   XEMBEDDEDSCRIPTS
249                                         ,   XSCRIPTINVOCATIONCONTEXT
250                                         ,   XMODEL2
251                                         ,   XMODIFIABLE2
252                                         ,   XPRINTABLE
253                                         ,   XPRINTJOBBROADCASTER
254                                         ,   XSTORABLE2
255                                         ,   XLOADABLE
256                                         ,   XSTARBASICACCESS
257                                         ,   XVIEWDATASUPPLIER
258                                         ,   XCLOSEABLE           // => XCLOSEBROADCASTER
259                                         ,   XTRANSFERABLE
260                                         ,   XDOCUMENTSUBSTORAGESUPPLIER
261                                         ,   XSTORAGEBASEDDOCUMENT
262                                         ,   XSCRIPTPROVIDERSUPPLIER
263                                         ,   XUICONFIGURATIONMANAGERSUPPLIER
264                                         ,   XVISUALOBJECT
265                                         ,   XUNOTUNNEL
266                                         ,   XMODULE
267                                         ,   XTITLE
268                                         ,   XTITLECHANGEBROADCASTER
269                                         ,   XUNTITLEDNUMBERS
270                                         >   SfxBaseModel_Base;
271 
272 class SFX2_DLLPUBLIC SfxBaseModel   :   protected ::cppu::BaseMutex
273                                     ,   public SfxBaseModel_Base
274 					                ,	public SfxListener
275 {
276 
277 //________________________________________________________________________________________________________
278 //	public methods
279 //________________________________________________________________________________________________________
280 
281 public:
282 
283 	//____________________________________________________________________________________________________
284 	//	constructor/destructor
285 	//____________________________________________________________________________________________________
286 
287 	/**___________________________________________________________________________________________________
288 		@short		-
289 		@descr		-
290 
291 		@seealso	-
292 
293 		@param		-
294 
295 		@return		-
296 
297 		@onerror	-
298 	*/
299 
300 	SfxBaseModel( SfxObjectShell *pObjektShell = NULL ) ;
301 
302 	/**___________________________________________________________________________________________________
303 		@short		-
304 		@descr		-
305 
306 		@seealso	-
307 
308 		@param		-
309 
310 		@return		-
311 
312 		@onerror	-
313 	*/
314 
315 	virtual ~SfxBaseModel() ;
316 
317 	//____________________________________________________________________________________________________
318 	//	XInterface
319 	//____________________________________________________________________________________________________
320 
321 	/**___________________________________________________________________________________________________
322 		@short		give answer, if interface is supported
323 		@descr		The interfaces are searched by type.
324 
325 		@seealso	XInterface
326 
327 		@param      "rType" is the type of searched interface.
328 
329 		@return		Any		information about found interface
330 
331 		@onerror	A RuntimeException is thrown.
332 	*/
333 
334 	virtual ANY SAL_CALL queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION ) ;
335 
336 	/**___________________________________________________________________________________________________
337 		@short		increment refcount
338 		@descr		-
339 
340 		@seealso	XInterface
341 		@seealso	release()
342 
343 		@param		-
344 
345 		@return		-
346 
347 		@onerror	A RuntimeException is thrown.
348 	*/
349 
350     virtual void SAL_CALL acquire() throw() ;
351 
352 	/**___________________________________________________________________________________________________
353 		@short		decrement refcount
354 		@descr		-
355 
356 		@seealso	XInterface
357 		@seealso	acquire()
358 
359 		@param		-
360 
361 		@return		-
362 
363 		@onerror	A RuntimeException is thrown.
364 	*/
365 
366     virtual void SAL_CALL release() throw() ;
367 
368 	//____________________________________________________________________________________________________
369 	//	XTypeProvider
370 	//____________________________________________________________________________________________________
371 
372 	/**___________________________________________________________________________________________________
373 		@short		get information about supported interfaces
374 		@descr      -
375 
376 		@seealso	XTypeProvider
377 
378 		@param      -
379 
380 		@return		Sequence of types of all supported interfaces
381 
382 		@onerror	A RuntimeException is thrown.
383 	*/
384 
385 	virtual ::com::sun::star::uno::Sequence< UNOTYPE > SAL_CALL getTypes() throw( RUNTIMEEXCEPTION ) ;
386 
387 	/**___________________________________________________________________________________________________
388 		@short		get implementation id
389 		@descr      This ID is necessary for UNO-caching. If there no ID, cache is disabled.
390 					Another way, cache is enabled.
391 
392 		@seealso	XTypeProvider
393 
394 		@param		-
395 
396 		@return		ID as Sequence of byte
397 
398 		@onerror	A RuntimeException is thrown.
399 	*/
400 
401 	virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( RUNTIMEEXCEPTION ) ;
402 
403 
404 	//____________________________________________________________________________________________________
405 	//	XStarBasicAccess
406 	//____________________________________________________________________________________________________
407 
408 	/**___________________________________________________________________________________________________
409 		@seealso	XStarBasicAccess
410 	*/
411     virtual REFERENCE< XNAMECONTAINER > SAL_CALL getLibraryContainer() throw( RUNTIMEEXCEPTION );
412 
413 	/**___________________________________________________________________________________________________
414 		@seealso	XStarBasicAccess
415 	*/
416     virtual void SAL_CALL createLibrary( const OUSTRING& LibName, const OUSTRING& Password,
417 		const OUSTRING& ExternalSourceURL, const OUSTRING& LinkTargetURL )
418 			throw(ELEMENTEXISTEXCEPTION, RUNTIMEEXCEPTION);
419 
420 	/**___________________________________________________________________________________________________
421 		@seealso	XStarBasicAccess
422 	*/
423     virtual void SAL_CALL addModule( const OUSTRING& LibraryName, const OUSTRING& ModuleName,
424 		const OUSTRING& Language, const OUSTRING& Source )
425 			throw( NOSUCHELEMENTEXCEPTION, RUNTIMEEXCEPTION);
426 
427 	/**___________________________________________________________________________________________________
428 		@seealso	XStarBasicAccess
429 	*/
430     virtual void SAL_CALL addDialog( const OUSTRING& LibraryName, const OUSTRING& DialogName,
431 		const ::com::sun::star::uno::Sequence< sal_Int8 >& Data )
432 			throw(NOSUCHELEMENTEXCEPTION, RUNTIMEEXCEPTION);
433 
434 
435 	//____________________________________________________________________________________________________
436 	//	XChild
437 	//____________________________________________________________________________________________________
438 
439 	/**___________________________________________________________________________________________________
440 		@short		-
441 		@descr		-
442 
443 		@seealso	-
444 
445 		@param		-
446 
447 		@return		-
448 
449 		@onerror	-
450 	*/
451 
452     virtual REFERENCE< XINTERFACE > SAL_CALL getParent() throw( RUNTIMEEXCEPTION ) ;
453 
454 	/**___________________________________________________________________________________________________
455 		@short		-
456 		@descr		-
457 
458 		@seealso	-
459 
460 		@param		-
461 
462 		@return		-
463 
464 		@onerror	-
465 	*/
466 
467     virtual void SAL_CALL setParent( const REFERENCE< XINTERFACE >& xParent ) throw(	NOSUPPORTEXCEPTION	,
468 																						RUNTIMEEXCEPTION	) ;
469 
470 	//____________________________________________________________________________________________________
471 	//	XComponent
472 	//____________________________________________________________________________________________________
473 
474 	/**___________________________________________________________________________________________________
475 		@short		-
476 		@descr		-
477 
478 		@seealso	-
479 
480 		@param		-
481 
482 		@return		-
483 
484 		@onerror	-
485 	*/
486 
487 	virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
488 
489 	/**___________________________________________________________________________________________________
490 		@short		-
491 		@descr		-
492 
493 		@seealso	-
494 
495 		@param		-
496 
497 		@return		-
498 
499 		@onerror	-
500 	*/
501 
502 	virtual void SAL_CALL addEventListener(const REFERENCE< XEVENTLISTENER >& aListener) throw (::com::sun::star::uno::RuntimeException);
503 
504 	/**___________________________________________________________________________________________________
505 		@short		-
506 		@descr		-
507 
508 		@seealso	-
509 
510 		@param		-
511 
512 		@return		-
513 
514 		@onerror	-
515 	*/
516 
517 	virtual void SAL_CALL removeEventListener(const REFERENCE< XEVENTLISTENER >& aListener ) throw (::com::sun::star::uno::RuntimeException);
518 
519 	//____________________________________________________________________________________________________
520 	//	XDocumentInfoSupplier
521 	//____________________________________________________________________________________________________
522 
523 	/**___________________________________________________________________________________________________
524 		@short		-
525 		@descr		-
526 
527 		@seealso	-
528 
529 		@param		-
530 
531 		@return		-
532 
533 		@onerror	-
534 	*/
535 
536 	virtual REFERENCE< XDOCUMENTINFO > SAL_CALL getDocumentInfo() throw (::com::sun::star::uno::RuntimeException);
537 
538     // XDocumentPropertiesSupplier
539     virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties >
540         SAL_CALL getDocumentProperties()
541         throw (::com::sun::star::uno::RuntimeException);
542 
543 	//____________________________________________________________________________________________________
544 	//	XEventListener
545 	//____________________________________________________________________________________________________
546 
547 	/**___________________________________________________________________________________________________
548 		@short		-
549 		@descr		-
550 
551 		@seealso	-
552 
553 		@param		-
554 
555 		@return		-
556 
557 		@onerror	-
558 	*/
559 
560 	virtual void SAL_CALL disposing( const EVENTOBJECT& aEvent ) throw (::com::sun::star::uno::RuntimeException);
561 
562 	//____________________________________________________________________________________________________
563 	//	XModel
564 	//____________________________________________________________________________________________________
565 
566 	/**___________________________________________________________________________________________________
567 		@short		-
568 		@descr		-
569 
570 		@seealso	-
571 
572 		@param		-
573 
574 		@return		-
575 
576 		@onerror	-
577 	*/
578 
579 	virtual sal_Bool SAL_CALL attachResource(	const	OUSTRING&					sURL	,
580 												const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	aArgs	)
581         throw (::com::sun::star::uno::RuntimeException);
582 
583 	/**___________________________________________________________________________________________________
584 		@short		-
585 		@descr		-
586 
587 		@seealso	-
588 
589 		@param		-
590 
591 		@return		-
592 
593 		@onerror	-
594 	*/
595 
596 	virtual OUSTRING SAL_CALL getURL() throw (::com::sun::star::uno::RuntimeException);
597 
598 	/**___________________________________________________________________________________________________
599 		@short		-
600 		@descr		-
601 
602 		@seealso	-
603 
604 		@param		-
605 
606 		@return		-
607 
608 		@onerror	-
609 	*/
610 
611 	virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getArgs() throw (::com::sun::star::uno::RuntimeException);
612 
613 	/**___________________________________________________________________________________________________
614 		@short		-
615 		@descr		-
616 
617 		@seealso	-
618 
619 		@param		-
620 
621 		@return		-
622 
623 		@onerror	-
624 	*/
625 
626 	virtual void SAL_CALL connectController( const REFERENCE< XCONTROLLER >& xController ) throw (::com::sun::star::uno::RuntimeException);
627 
628 	/**___________________________________________________________________________________________________
629 		@short		-
630 		@descr		-
631 
632 		@seealso	-
633 
634 		@param		-
635 
636 		@return		-
637 
638 		@onerror	-
639 	*/
640 
641 	virtual void SAL_CALL disconnectController( const REFERENCE< XCONTROLLER >& xController ) throw (::com::sun::star::uno::RuntimeException);
642 
643 	/**___________________________________________________________________________________________________
644 		@short		-
645 		@descr		-
646 
647 		@seealso	-
648 
649 		@param		-
650 
651 		@return		-
652 
653 		@onerror	-
654 	*/
655 
656 	virtual void SAL_CALL lockControllers() throw (::com::sun::star::uno::RuntimeException);
657 
658 	/**___________________________________________________________________________________________________
659 		@short		-
660 		@descr		-
661 
662 		@seealso	-
663 
664 		@param		-
665 
666 		@return		-
667 
668 		@onerror	-
669 	*/
670 
671 	virtual void SAL_CALL unlockControllers() throw (::com::sun::star::uno::RuntimeException);
672 
673 	/**___________________________________________________________________________________________________
674 		@short		-
675 		@descr		-
676 
677 		@seealso	-
678 
679 		@param		-
680 
681 		@return		-
682 
683 		@onerror	-
684 	*/
685 
686 	virtual sal_Bool SAL_CALL hasControllersLocked() throw (::com::sun::star::uno::RuntimeException);
687 
688 	/**___________________________________________________________________________________________________
689 		@short		-
690 		@descr		-
691 
692 		@seealso	-
693 
694 		@param		-
695 
696 		@return		-
697 
698 		@onerror	-
699 	*/
700 
701 	virtual REFERENCE< XCONTROLLER > SAL_CALL getCurrentController() throw (::com::sun::star::uno::RuntimeException);
702 
703 	/**___________________________________________________________________________________________________
704 		@short		-
705 		@descr		-
706 
707 		@seealso	-
708 
709 		@param		-
710 
711 		@return		-
712 
713 		@onerror	-
714 	*/
715 
716 	virtual void SAL_CALL setCurrentController( const REFERENCE< XCONTROLLER >& xController )
717         throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
718 
719 	/**___________________________________________________________________________________________________
720 		@short		-
721 		@descr		-
722 
723 		@seealso	-
724 
725 		@param		-
726 
727 		@return		-
728 
729 		@onerror	-
730 	*/
731 
732 	virtual REFERENCE< XINTERFACE > SAL_CALL getCurrentSelection() throw (::com::sun::star::uno::RuntimeException);
733 
734 	//____________________________________________________________________________________________________
735 	//	XModel2
736 	//____________________________________________________________________________________________________
737     virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL getControllers()
738         throw (css::uno::RuntimeException);
739 
740     virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableViewControllerNames()
741         throw (css::uno::RuntimeException);
742 
743     virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createDefaultViewController(const css::uno::Reference< css::frame::XFrame >& Frame )
744         throw (css::uno::RuntimeException         ,
745                css::lang::IllegalArgumentException,
746                css::uno::Exception                );
747 
748     virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createViewController(const ::rtl::OUString&                                 ViewName       ,
749                                                                                           const css::uno::Sequence< css::beans::PropertyValue >& Arguments      ,
750                                                                                           const css::uno::Reference< css::frame::XFrame >&       Frame          )
751         throw (css::uno::RuntimeException         ,
752                css::lang::IllegalArgumentException,
753                css::uno::Exception                );
754 
755 	//____________________________________________________________________________________________________
756 	//	XModifiable2
757 	//____________________________________________________________________________________________________
758 
759     virtual ::sal_Bool SAL_CALL disableSetModified(  ) throw (::com::sun::star::uno::RuntimeException);
760     virtual ::sal_Bool SAL_CALL enableSetModified(  ) throw (::com::sun::star::uno::RuntimeException);
761     virtual ::sal_Bool SAL_CALL isSetModifiedEnabled(  ) throw (::com::sun::star::uno::RuntimeException);
762 
763 	/**___________________________________________________________________________________________________
764 		@short		-
765 		@descr		-
766 
767 		@seealso	-
768 
769 		@param		-
770 
771 		@return		-
772 
773 		@onerror	-
774 	*/
775 
776 	virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
777 
778 	/**___________________________________________________________________________________________________
779 		@short		-
780 		@descr		-
781 
782 		@seealso	-
783 
784 		@param		-
785 
786 		@return		-
787 
788 		@onerror	-
789 	*/
790 
791 	virtual void SAL_CALL setModified( sal_Bool bModified )
792         throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
793 
794 	/**___________________________________________________________________________________________________
795 		@short		-
796 		@descr		-
797 
798 		@seealso	-
799 
800 		@param		-
801 
802 		@return		-
803 
804 		@onerror	-
805 	*/
806 
807     virtual void SAL_CALL addModifyListener( const REFERENCE< XMODIFYLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ) ;
808 
809 	/**___________________________________________________________________________________________________
810 		@short		-
811 		@descr		-
812 
813 		@seealso	-
814 
815 		@param		-
816 
817 		@return		-
818 
819 		@onerror	-
820 	*/
821 
822     virtual void SAL_CALL removeModifyListener(const REFERENCE< XMODIFYLISTENER > & xListener) throw( RUNTIMEEXCEPTION ) ;
823 
824 	//____________________________________________________________________________________________________
825     //  XCloseable
826 	//____________________________________________________________________________________________________
827 
828     virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (CLOSEVETOEXCEPTION, RUNTIMEEXCEPTION);
829 
830 	//____________________________________________________________________________________________________
831     //  XCloseBroadcaster
832 	//____________________________________________________________________________________________________
833 
834     virtual void SAL_CALL addCloseListener( const REFERENCE< XCLOSELISTENER >& xListener ) throw (RUNTIMEEXCEPTION);
835     virtual void SAL_CALL removeCloseListener( const REFERENCE< XCLOSELISTENER >& xListener ) throw (RUNTIMEEXCEPTION);
836 
837 	//____________________________________________________________________________________________________
838 	//	XPrintJobBroadcaster
839 	//____________________________________________________________________________________________________
840 
841     virtual void SAL_CALL addPrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
842     virtual void SAL_CALL removePrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
843 
844 	//____________________________________________________________________________________________________
845 	//	XPrintable
846 	//____________________________________________________________________________________________________
847 
848 	/**___________________________________________________________________________________________________
849 		@short		-
850 		@descr		-
851 
852 		@seealso	-
853 
854 		@param		-
855 
856 		@return		-
857 
858 		@onerror	-
859 	*/
860 
861 	virtual ::com::sun::star::uno::Sequence< PROPERTYVALUE > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
862 
863 	/**___________________________________________________________________________________________________
864 		@short		-
865 		@descr		-
866 
867 		@seealso	-
868 
869 		@param		-
870 
871 		@return		-
872 
873 		@onerror	-
874 	*/
875 
876 	virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqPrinter )
877         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
878 	/**___________________________________________________________________________________________________
879 		@short		-
880 		@descr		-
881 
882 		@seealso	-
883 
884 		@param		-
885 
886 		@return		-
887 
888 		@onerror	-
889 	*/
890 
891 	virtual void SAL_CALL print( const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& seqOptions )
892         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
893 
894 	//____________________________________________________________________________________________________
895 	//	XStorable2
896 	//____________________________________________________________________________________________________
897 
898 	virtual void SAL_CALL storeSelf( const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	seqArguments	)
899 		throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
900 
901 	//____________________________________________________________________________________________________
902 	//	XStorable
903 	//____________________________________________________________________________________________________
904 
905 	/**___________________________________________________________________________________________________
906 		@short		-
907 		@descr		-
908 
909 		@seealso	-
910 
911 		@param		-
912 
913 		@return		-
914 
915 		@onerror	-
916 	*/
917 
918 	virtual sal_Bool SAL_CALL hasLocation() throw (::com::sun::star::uno::RuntimeException);
919 
920 	/**___________________________________________________________________________________________________
921 		@short		-
922 		@descr		-
923 
924 		@seealso	-
925 
926 		@param		-
927 
928 		@return		-
929 
930 		@onerror	-
931 	*/
932 
933 	virtual OUSTRING SAL_CALL getLocation() throw (::com::sun::star::uno::RuntimeException);
934 
935 	/**___________________________________________________________________________________________________
936 		@short		-
937 		@descr		-
938 
939 		@seealso	-
940 
941 		@param		-
942 
943 		@return		-
944 
945 		@onerror	-
946 	*/
947 
948 	virtual sal_Bool SAL_CALL isReadonly() throw (::com::sun::star::uno::RuntimeException);
949 
950 	/**___________________________________________________________________________________________________
951 		@short		-
952 		@descr		-
953 
954 		@seealso	-
955 
956 		@param		-
957 
958 		@return		-
959 
960 		@onerror	-
961 	*/
962 
963 	virtual void SAL_CALL store() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
964 
965 	/**___________________________________________________________________________________________________
966 		@short		-
967 		@descr		-
968 
969 		@seealso	-
970 
971 		@param		-
972 
973 		@return		-
974 
975 		@onerror	-
976 	*/
977 
978 	virtual void SAL_CALL storeAsURL(	const	OUSTRING&					sURL			,
979 										const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	seqArguments	)
980         throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) ;
981 
982 	/**___________________________________________________________________________________________________
983 		@short		-
984 		@descr		-
985 
986 		@seealso	-
987 
988 		@param		-
989 
990 		@return		-
991 
992 		@onerror	-
993 	*/
994 
995 	virtual void SAL_CALL storeToURL(	const	OUSTRING&					sURL			,
996 										const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	seqArguments	)
997         throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
998 
999 
1000 
1001 	//____________________________________________________________________________________________________
1002 	//	XLoadable
1003 	//____________________________________________________________________________________________________
1004 
1005 	/**___________________________________________________________________________________________________
1006 		@short		-
1007 		@descr		-
1008 
1009 		@seealso	-
1010 
1011 		@param		-
1012 
1013 		@return		-
1014 
1015 		@onerror	-
1016 	*/
1017 
1018 	virtual void SAL_CALL initNew()
1019 		throw (::com::sun::star::frame::DoubleInitializationException,
1020 			   ::com::sun::star::io::IOException,
1021 			   ::com::sun::star::uno::RuntimeException,
1022 			   ::com::sun::star::uno::Exception);
1023 
1024 	/**___________________________________________________________________________________________________
1025 		@short		-
1026 		@descr		-
1027 
1028 		@seealso	-
1029 
1030 		@param		-
1031 
1032 		@return		-
1033 
1034 		@onerror	-
1035 	*/
1036 
1037 	virtual void SAL_CALL load(	const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	seqArguments )
1038 		throw (::com::sun::star::frame::DoubleInitializationException,
1039 			   ::com::sun::star::io::IOException,
1040 			   ::com::sun::star::uno::RuntimeException,
1041 			   ::com::sun::star::uno::Exception);
1042 
1043 	//____________________________________________________________________________________________________
1044 	//	XDocumentSubStorageSupplier
1045 	//____________________________________________________________________________________________________
1046 
1047     virtual REFERENCE< XSTORAGE > SAL_CALL getDocumentSubStorage( const ::rtl::OUString& aStorageName, sal_Int32 nMode )
1048 		throw ( RUNTIMEEXCEPTION );
1049 
1050 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getDocumentSubStoragesNames()
1051 		throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
1052 
1053 	//____________________________________________________________________________________________________
1054 	//	XStorageBasedDocument
1055 	//____________________________________________________________________________________________________
1056 
1057     virtual void SAL_CALL loadFromStorage( const REFERENCE< XSTORAGE >& xStorage,
1058 											const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
1059 		throw ( ILLEGALARGUMENTEXCEPTION,
1060 				DOUBLEINITIALIZATIONEXCEPTION,
1061 				IOEXCEPTION,
1062 				EXCEPTION,
1063 				RUNTIMEEXCEPTION );
1064 
1065     virtual void SAL_CALL storeToStorage( const REFERENCE< XSTORAGE >& xStorage,
1066 											const ::com::sun::star::uno::Sequence< PROPERTYVALUE >& aMediaDescriptor )
1067 		throw ( ILLEGALARGUMENTEXCEPTION,
1068 				IOEXCEPTION,
1069 				EXCEPTION,
1070 				RUNTIMEEXCEPTION );
1071 
1072     virtual void SAL_CALL switchToStorage( const REFERENCE< XSTORAGE >& xStorage )
1073 		throw ( ILLEGALARGUMENTEXCEPTION,
1074 				IOEXCEPTION,
1075 				EXCEPTION,
1076 				RUNTIMEEXCEPTION );
1077 
1078     virtual REFERENCE< XSTORAGE > SAL_CALL getDocumentStorage()
1079 		throw ( IOEXCEPTION,
1080 				EXCEPTION,
1081 				RUNTIMEEXCEPTION );
1082 
1083     virtual void SAL_CALL addStorageChangeListener(
1084 			const REFERENCE< ::com::sun::star::document::XStorageChangeListener >& xListener )
1085 		throw ( RUNTIMEEXCEPTION );
1086 
1087     virtual void SAL_CALL removeStorageChangeListener(
1088 			const REFERENCE< ::com::sun::star::document::XStorageChangeListener >& xListener )
1089 		throw ( RUNTIMEEXCEPTION );
1090 
1091 	//____________________________________________________________________________________________________
1092 	//	XVisualObject
1093 	//____________________________________________________________________________________________________
1094 
1095     virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
1096 		throw ( ::com::sun::star::lang::IllegalArgumentException,
1097 				::com::sun::star::embed::WrongStateException,
1098 				::com::sun::star::uno::Exception,
1099 				::com::sun::star::uno::RuntimeException );
1100 
1101     virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
1102 		throw ( ::com::sun::star::lang::IllegalArgumentException,
1103 				::com::sun::star::embed::WrongStateException,
1104 				::com::sun::star::uno::Exception,
1105 				::com::sun::star::uno::RuntimeException );
1106 
1107     virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
1108 		throw ( ::com::sun::star::lang::IllegalArgumentException,
1109 				::com::sun::star::embed::WrongStateException,
1110 				::com::sun::star::uno::Exception,
1111 				::com::sun::star::uno::RuntimeException );
1112 
1113     virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
1114 		throw ( ::com::sun::star::uno::Exception,
1115 				::com::sun::star::uno::RuntimeException );
1116 
1117 	//____________________________________________________________________________________________________
1118 	//	XScriptProviderSupplier
1119 	//____________________________________________________________________________________________________
1120 
1121 	virtual REFERENCE< XSCRIPTPROVIDER > SAL_CALL getScriptProvider() throw ( RUNTIMEEXCEPTION );
1122 
1123 	//____________________________________________________________________________________________________
1124 	//	XUIConfigurationManagerSupplier
1125 	//____________________________________________________________________________________________________
1126     virtual REFERENCE< XUICONFIGURATIONMANAGER > SAL_CALL getUIConfigurationManager() throw ( RUNTIMEEXCEPTION );
1127 
1128     //____________________________________________________________________________________________________
1129 	//	XTransferable
1130 	//____________________________________________________________________________________________________
1131 
1132 	/**___________________________________________________________________________________________________
1133 		@short		-
1134 		@descr		-
1135 
1136 		@seealso	-
1137 
1138 		@param		-
1139 
1140 		@return		-
1141 
1142 		@onerror	-
1143 	*/
1144 
1145     virtual ANY SAL_CALL getTransferData( const DATAFLAVOR& aFlavor )
1146 		throw (::com::sun::star::datatransfer::UnsupportedFlavorException,
1147 			   ::com::sun::star::io::IOException,
1148 			   ::com::sun::star::uno::RuntimeException);
1149 
1150 	/**___________________________________________________________________________________________________
1151 		@short		-
1152 		@descr		-
1153 
1154 		@seealso	-
1155 
1156 		@param		-
1157 
1158 		@return		-
1159 
1160 		@onerror	-
1161 	*/
1162 
1163 
1164     virtual ::com::sun::star::uno::Sequence< DATAFLAVOR > SAL_CALL getTransferDataFlavors()
1165 		throw (::com::sun::star::uno::RuntimeException);
1166 
1167 	/**___________________________________________________________________________________________________
1168 		@short		-
1169 		@descr		-
1170 
1171 		@seealso	-
1172 
1173 		@param		-
1174 
1175 		@return		-
1176 
1177 		@onerror	-
1178 	*/
1179 
1180     virtual sal_Bool SAL_CALL isDataFlavorSupported( const DATAFLAVOR& aFlavor )
1181 		throw (::com::sun::star::uno::RuntimeException);
1182 
1183 
1184 	//____________________________________________________________________________________________________
1185 	//	XEventsSupplier
1186 	//____________________________________________________________________________________________________
1187 
1188 	/**___________________________________________________________________________________________________
1189 		@short		-
1190 		@descr		-	offers a list of event handlers which are be bound to events of
1191 						this object.
1192 		@seealso	-
1193 
1194 		@param		-
1195 
1196 		@return		-	an <type>Events</type> object.
1197 
1198 		@onerror	-
1199 	*/
1200 
1201     virtual REFERENCE< XNAMEREPLACE > SAL_CALL getEvents() throw( RUNTIMEEXCEPTION );
1202 
1203 
1204 	//____________________________________________________________________________________________________
1205 	//	XEmbeddedScripts
1206 	//____________________________________________________________________________________________________
1207 
1208     virtual ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer > SAL_CALL getBasicLibraries() throw (::com::sun::star::uno::RuntimeException);
1209     virtual ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer > SAL_CALL getDialogLibraries() throw (::com::sun::star::uno::RuntimeException);
1210     virtual ::sal_Bool SAL_CALL getAllowMacroExecution() throw (::com::sun::star::uno::RuntimeException);
1211 
1212 	//____________________________________________________________________________________________________
1213 	//	XScriptInvocationContext
1214 	//____________________________________________________________________________________________________
1215 
1216     virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
1217 
1218     //____________________________________________________________________________________________________
1219 	//	XEventBroadcaster
1220 	//____________________________________________________________________________________________________
1221 
1222 	/**___________________________________________________________________________________________________
1223 		@short		-
1224 		@descr		-	registers the given <type>XEventListener</type>.
1225 
1226 		@seealso	-
1227 
1228 		@param		-
1229 
1230 		@return		-
1231 
1232 		@onerror	-
1233 	*/
1234 
1235     virtual void SAL_CALL addEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
1236 
1237 	/**___________________________________________________________________________________________________
1238 		@short		-
1239 		@descr		-	unregisters the given <type>XEventListener</type>.
1240 
1241 		@seealso	-
1242 
1243 		@param		-
1244 
1245 		@return		-
1246 
1247 		@onerror	-
1248 	*/
1249 
1250     virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
1251 
1252     //____________________________________________________________________________________________________
1253     //	XDocumentEventBroadcaster
1254     //____________________________________________________________________________________________________
1255 
1256     virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
1257     virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
1258     virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
1259 
1260     //____________________________________________________________________________________________________
1261 	//	XUnoTunnel
1262 	//____________________________________________________________________________________________________
1263 
1264 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
1265 
1266     // css.frame.XModule
1267     virtual void SAL_CALL setIdentifier(const ::rtl::OUString& sIdentifier)
1268         throw (css::uno::RuntimeException);
1269 
1270     // css.frame.XModule
1271     virtual ::rtl::OUString SAL_CALL getIdentifier()
1272         throw (css::uno::RuntimeException);
1273 
1274     // css.frame.XTitle
1275     virtual ::rtl::OUString SAL_CALL getTitle()
1276         throw (css::uno::RuntimeException);
1277 
1278     // css.frame.XTitle
1279     virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle )
1280         throw (css::uno::RuntimeException);
1281 
1282     // css.frame.XTitleChangeBroadcaster
1283     virtual void SAL_CALL addTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
1284         throw (css::uno::RuntimeException);
1285 
1286     // css.frame.XTitleChangeBroadcaster
1287     virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
1288         throw (css::uno::RuntimeException);
1289 
1290     // css.frame.XUntitledNumbers
1291     virtual ::sal_Int32 SAL_CALL leaseNumber( const css::uno::Reference< css::uno::XInterface >& xComponent )
1292         throw (css::lang::IllegalArgumentException,
1293                css::uno::RuntimeException         );
1294 
1295     // css.frame.XUntitledNumbers
1296     virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber )
1297         throw (css::lang::IllegalArgumentException,
1298                css::uno::RuntimeException         );
1299 
1300     // css.frame.XUntitledNumbers
1301     virtual void SAL_CALL releaseNumberForComponent( const css::uno::Reference< css::uno::XInterface >& xComponent )
1302         throw (css::lang::IllegalArgumentException,
1303                css::uno::RuntimeException         );
1304 
1305     // css.frame.XUntitledNumbers
1306     virtual ::rtl::OUString SAL_CALL getUntitledPrefix()
1307         throw (css::uno::RuntimeException);
1308 
1309     // css.document.XDocumentRecovery
1310     virtual ::sal_Bool SAL_CALL wasModifiedSinceLastSave()
1311         throw ( ::com::sun::star::uno::RuntimeException );
1312     virtual void SAL_CALL storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
1313         throw ( ::com::sun::star::uno::RuntimeException,
1314                 ::com::sun::star::io::IOException,
1315                 ::com::sun::star::lang::WrappedTargetException );
1316     virtual void SAL_CALL recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_MediaDescriptor )
1317         throw ( ::com::sun::star::uno::RuntimeException,
1318                 ::com::sun::star::io::IOException,
1319                 ::com::sun::star::lang::WrappedTargetException );
1320 
1321     // css.document.XUndoManagerSupplier
1322     virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager(  ) throw (::com::sun::star::uno::RuntimeException);
1323 
1324 	//____________________________________________________________________________________________________
1325 
1326     // ::com::sun::star::rdf::XNode:
1327     virtual ::rtl::OUString SAL_CALL getStringValue()
1328         throw (::com::sun::star::uno::RuntimeException);
1329 
1330     // ::com::sun::star::rdf::XURI:
1331     virtual ::rtl::OUString SAL_CALL getNamespace()
1332         throw (::com::sun::star::uno::RuntimeException);
1333     virtual ::rtl::OUString SAL_CALL getLocalName()
1334         throw (::com::sun::star::uno::RuntimeException);
1335 
1336     // ::com::sun::star::rdf::XRepositorySupplier:
1337     virtual ::com::sun::star::uno::Reference<
1338         ::com::sun::star::rdf::XRepository > SAL_CALL getRDFRepository()
1339         throw (::com::sun::star::uno::RuntimeException);
1340 
1341     // ::com::sun::star::rdf::XDocumentMetadataAccess:
1342     virtual ::com::sun::star::uno::Reference<
1343                 ::com::sun::star::rdf::XMetadatable > SAL_CALL
1344         getElementByMetadataReference(
1345             const ::com::sun::star::beans::StringPair & i_rReference)
1346         throw (::com::sun::star::uno::RuntimeException);
1347     virtual ::com::sun::star::uno::Reference<
1348                 ::com::sun::star::rdf::XMetadatable > SAL_CALL
1349         getElementByURI(const ::com::sun::star::uno::Reference<
1350             ::com::sun::star::rdf::XURI > & i_xURI)
1351         throw (::com::sun::star::uno::RuntimeException,
1352             ::com::sun::star::lang::IllegalArgumentException);
1353     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
1354             ::com::sun::star::rdf::XURI > > SAL_CALL getMetadataGraphsWithType(
1355             const ::com::sun::star::uno::Reference<
1356                 ::com::sun::star::rdf::XURI > & i_xType)
1357         throw (::com::sun::star::uno::RuntimeException,
1358             ::com::sun::star::lang::IllegalArgumentException);
1359     virtual ::com::sun::star::uno::Reference<
1360                 ::com::sun::star::rdf::XURI> SAL_CALL
1361         addMetadataFile(const ::rtl::OUString & i_rFileName,
1362             const ::com::sun::star::uno::Sequence<
1363                 ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
1364                 > & i_rTypes)
1365         throw (::com::sun::star::uno::RuntimeException,
1366             ::com::sun::star::lang::IllegalArgumentException,
1367             ::com::sun::star::container::ElementExistException);
1368     virtual ::com::sun::star::uno::Reference<
1369                 ::com::sun::star::rdf::XURI> SAL_CALL
1370         importMetadataFile(::sal_Int16 i_Format,
1371             const ::com::sun::star::uno::Reference<
1372                 ::com::sun::star::io::XInputStream > & i_xInStream,
1373             const ::rtl::OUString & i_rFileName,
1374             const ::com::sun::star::uno::Reference<
1375                 ::com::sun::star::rdf::XURI > & i_xBaseURI,
1376             const ::com::sun::star::uno::Sequence<
1377                 ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XURI >
1378                 > & i_rTypes)
1379         throw (::com::sun::star::uno::RuntimeException,
1380             ::com::sun::star::lang::IllegalArgumentException,
1381             ::com::sun::star::datatransfer::UnsupportedFlavorException,
1382             ::com::sun::star::container::ElementExistException,
1383             ::com::sun::star::rdf::ParseException,
1384             ::com::sun::star::io::IOException);
1385     virtual void SAL_CALL removeMetadataFile(
1386             const ::com::sun::star::uno::Reference<
1387                 ::com::sun::star::rdf::XURI > & i_xGraphName)
1388         throw (::com::sun::star::uno::RuntimeException,
1389             ::com::sun::star::lang::IllegalArgumentException,
1390             ::com::sun::star::container::NoSuchElementException);
1391     virtual void SAL_CALL addContentOrStylesFile(
1392             const ::rtl::OUString & i_rFileName)
1393         throw (::com::sun::star::uno::RuntimeException,
1394             ::com::sun::star::lang::IllegalArgumentException,
1395             ::com::sun::star::container::ElementExistException);
1396     virtual void SAL_CALL removeContentOrStylesFile(
1397             const ::rtl::OUString & i_rFileName)
1398         throw (::com::sun::star::uno::RuntimeException,
1399             ::com::sun::star::lang::IllegalArgumentException,
1400             ::com::sun::star::container::NoSuchElementException);
1401 
1402     virtual void SAL_CALL loadMetadataFromStorage(
1403             const ::com::sun::star::uno::Reference<
1404                 ::com::sun::star::embed::XStorage > & i_xStorage,
1405             const ::com::sun::star::uno::Reference<
1406                 ::com::sun::star::rdf::XURI > & i_xBaseURI,
1407             const ::com::sun::star::uno::Reference<
1408                 ::com::sun::star::task::XInteractionHandler> & i_xHandler)
1409         throw (::com::sun::star::uno::RuntimeException,
1410             ::com::sun::star::lang::IllegalArgumentException,
1411             ::com::sun::star::lang::WrappedTargetException);
1412     virtual void SAL_CALL storeMetadataToStorage(
1413             const ::com::sun::star::uno::Reference<
1414                 ::com::sun::star::embed::XStorage > & i_xStorage)
1415         throw (::com::sun::star::uno::RuntimeException,
1416             ::com::sun::star::lang::IllegalArgumentException,
1417             ::com::sun::star::lang::WrappedTargetException);
1418     virtual void SAL_CALL loadMetadataFromMedium(
1419             const ::com::sun::star::uno::Sequence<
1420                 ::com::sun::star::beans::PropertyValue > & i_rMedium)
1421         throw (::com::sun::star::uno::RuntimeException,
1422             ::com::sun::star::lang::IllegalArgumentException,
1423             ::com::sun::star::lang::WrappedTargetException);
1424     virtual void SAL_CALL storeMetadataToMedium(
1425             const ::com::sun::star::uno::Sequence<
1426                 ::com::sun::star::beans::PropertyValue > & i_rMedium)
1427         throw (::com::sun::star::uno::RuntimeException,
1428             ::com::sun::star::lang::IllegalArgumentException,
1429             ::com::sun::star::lang::WrappedTargetException);
1430 
1431 
1432     //____________________________________________________________________________________________________
1433 	//	SfxListener
1434 	//____________________________________________________________________________________________________
1435 
1436 	/**___________________________________________________________________________________________________
1437 		@short		-
1438 		@descr		-
1439 
1440 		@seealso	-
1441 
1442 		@param		-
1443 
1444 		@return		-
1445 
1446 		@onerror	-
1447 	*/
1448 
1449 	void Notify(			SfxBroadcaster&	aBC		,
1450 					const	SfxHint&		aHint	) ;
1451 
1452 	//____________________________________________________________________________________________________
1453 	//	public IMPL?
1454 	//____________________________________________________________________________________________________
1455 
1456 	/**___________________________________________________________________________________________________
1457 		@short		-
1458 		@descr		-
1459 
1460 		@seealso	-
1461 
1462 		@param		-
1463 
1464 		@return		-
1465 
1466 		@onerror	-
1467 	*/
1468 
1469 	void changing() ;
1470 	SAL_DLLPRIVATE void impl_change() ;
1471 
1472 	/**___________________________________________________________________________________________________
1473 		@short		-
1474 		@descr		-
1475 
1476 		@seealso	-
1477 
1478 		@param		-
1479 
1480 		@return		-
1481 
1482 		@onerror	-
1483 	*/
1484 
1485 	SfxObjectShell* GetObjectShell() const ;
1486 	SAL_DLLPRIVATE SfxObjectShell* impl_getObjectShell() const ;
1487 
1488 	SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ;
1489     sal_Bool IsInitialized() const;
IsDisposed() const1490     sal_Bool IsDisposed() const { return impl_isDisposed(); }
1491     void MethodEntryCheck( const bool i_mustBeInitialized ) const;
getMutex() const1492     ::osl::Mutex& getMutex() const { return m_aMutex; }
1493 
1494     ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException);
1495     void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw (::com::sun::star::uno::RuntimeException);
1496 
1497 	/** calls all XEventListeners */
1498 	void notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) const;
1499 
1500 	/** returns true if someone added a XEventListener to this XEventBroadcaster */
1501 	sal_Bool hasEventListeners() const;
1502 
1503 protected:
1504 
1505     /* returns a unique id for the model that is valid as long as the document
1506        is loaded. The id is not saved across document close/reload. */
1507     rtl::OUString getRuntimeUID() const;
1508 
1509     /* returns true if the document signatures are valid, otherwise false */
1510     sal_Bool hasValidSignatures() const;
1511 
1512 //________________________________________________________________________________________________________
1513 //	private methods
1514 //________________________________________________________________________________________________________
1515 
1516 private:
1517 
1518 	/**___________________________________________________________________________________________________
1519 		@short		-
1520 		@descr		-
1521 
1522 		@seealso	-
1523 
1524 		@param		-
1525 
1526 		@return		-
1527 
1528 		@onerror	-
1529 	*/
1530 
1531     bool impl_getPrintHelper();
1532 	SAL_DLLPRIVATE void ListenForStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
1533 	SAL_DLLPRIVATE ::rtl::OUString GetMediumFilterName_Impl();
1534 
1535 	SAL_DLLPRIVATE void impl_store(	const	OUSTRING&					sURL			,
1536 						const	::com::sun::star::uno::Sequence< PROPERTYVALUE >&	seqArguments	,
1537 								sal_Bool					bSaveTo			) ;
1538 
1539 	SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() );
1540 
1541 	SAL_DLLPRIVATE String getEventName_Impl( long nID );
1542 	SAL_DLLPRIVATE void NotifyStorageListeners_Impl();
1543    	SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler );
1544 
1545     SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
1546     SAL_DLLPRIVATE css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper ();
1547 
1548     SAL_DLLPRIVATE SfxViewFrame* FindOrCreateViewFrame_Impl(
1549                         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
1550                         ::sfx::intern::ViewCreationGuard& i_rGuard
1551                     ) const;
1552 
1553     SAL_DLLPRIVATE void NotifyModifyListeners_Impl() const;
1554 
1555 //________________________________________________________________________________________________________
1556 //	private variables and methods
1557 //________________________________________________________________________________________________________
1558 
1559 private:
1560 
1561 	IMPL_SfxBaseModel_DataContainer*	m_pData	;
1562     // cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
1563     const bool                          m_bSupportEmbeddedScripts;
1564     const bool                          m_bSupportDocRecovery;
1565 
1566 } ;	// class SfxBaseModel
1567 
1568 /** base class for sub components of an SfxBaseModel, which share their ref count and lifetime with the SfxBaseModel
1569 */
1570 class SFX2_DLLPUBLIC SfxModelSubComponent
1571 {
1572 public:
1573     /** checks whether the instance is alive, i.e. properly initialized, and not yet disposed
1574     */
MethodEntryCheck()1575     void    MethodEntryCheck()
1576     {
1577         m_rModel.MethodEntryCheck( true );
1578     }
1579 
1580     // called when the SfxBaseModel which the component is superordinate of is being disposed
1581     virtual void disposing();
1582 
1583 protected:
SfxModelSubComponent(SfxBaseModel & i_model)1584     SfxModelSubComponent( SfxBaseModel& i_model )
1585         :m_rModel( i_model )
1586     {
1587     }
1588     virtual ~SfxModelSubComponent();
1589 
1590     // helpers for implementing XInterface - delegates ref counting to the SfxBaseModel
acquire()1591     void acquire()  {   m_rModel.acquire(); }
release()1592     void release()  {   m_rModel.release(); }
1593 
isDisposed() const1594     bool isDisposed() const {   return m_rModel.IsDisposed();   }
1595 
1596 protected:
getBaseModel() const1597     const SfxBaseModel& getBaseModel() const { return m_rModel; }
getBaseModel()1598           SfxBaseModel& getBaseModel()       { return m_rModel; }
1599 
getMutex()1600           ::osl::Mutex&  getMutex()          { return m_rModel.getMutex(); }
1601 
1602 private:
1603     SfxBaseModel&   m_rModel;
1604 };
1605 
1606 class SFX2_DLLPUBLIC SfxModelGuard
1607 {
1608 public:
1609     enum AllowedModelState
1610     {
1611         // not yet initialized
1612         E_INITIALIZING,
1613         // fully alive, i.e. initialized, and not yet disposed
1614         E_FULLY_ALIVE
1615     };
1616 
SfxModelGuard(SfxBaseModel & i_rModel,const AllowedModelState i_eState=E_FULLY_ALIVE)1617     SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE )
1618         :m_aGuard( Application::GetSolarMutex() )
1619     {
1620         i_rModel.MethodEntryCheck( i_eState != E_INITIALIZING );
1621     }
SfxModelGuard(SfxModelSubComponent & i_rSubComponent)1622     SfxModelGuard( SfxModelSubComponent& i_rSubComponent )
1623         :m_aGuard( Application::GetSolarMutex() )
1624     {
1625         i_rSubComponent.MethodEntryCheck();
1626     }
~SfxModelGuard()1627     ~SfxModelGuard()
1628     {
1629     }
1630 
reset()1631     void reset()
1632     {
1633         m_aGuard.reset();
1634     }
1635 
clear()1636     void clear()
1637     {
1638         m_aGuard.clear();
1639     }
1640 
1641 private:
1642     ::osl::ResettableGuard< ::vos::IMutex >  m_aGuard;
1643 };
1644 
1645 #undef css
1646 
1647 #endif // _SFX_SFXBASEMODEL_HXX_
1648