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