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