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