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