tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / include / sfx2 / sfxbasemodel.hxx
blob9a07c16c0c23490269aed4244d3301d163f79f47
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <sal/config.h>
23 #include <sfx2/dllapi.h>
24 #include <sal/types.h>
25 #include <com/sun/star/frame/XModule.hpp>
26 #include <com/sun/star/frame/XTitle.hpp>
27 #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
28 #include <com/sun/star/frame/XUntitledNumbers.hpp>
29 #include <com/sun/star/container/XChild.hpp>
30 #include <com/sun/star/document/XCmisDocument.hpp>
31 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
32 #include <com/sun/star/document/XDocumentRecovery2.hpp>
33 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
34 #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
35 #include <com/sun/star/document/XShapeEventBroadcaster.hpp>
36 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
37 #include <com/sun/star/document/XEventsSupplier.hpp>
38 #include <com/sun/star/document/XEmbeddedScripts.hpp>
39 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
40 #include <com/sun/star/document/XStorageBasedDocument.hpp>
41 #include <com/sun/star/document/XScriptInvocationContext.hpp>
42 #include <com/sun/star/lang/XEventListener.hpp>
43 #include <com/sun/star/frame/XModel3.hpp>
44 #include <com/sun/star/util/XModifiable2.hpp>
45 #include <com/sun/star/util/XCloseable.hpp>
46 #include <com/sun/star/view/XPrintable.hpp>
47 #include <com/sun/star/view/XPrintJobBroadcaster.hpp>
48 #include <com/sun/star/frame/XStorable2.hpp>
49 #include <com/sun/star/frame/XLoadable.hpp>
50 #include <com/sun/star/lang/EventObject.hpp>
51 #include <com/sun/star/datatransfer/XTransferable.hpp>
52 #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
53 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
54 #include <com/sun/star/embed/XVisualObject.hpp>
55 #include <com/sun/star/uno/Sequence.hxx>
56 #include <com/sun/star/uno/Reference.hxx>
57 #include <com/sun/star/uno/Any.hxx>
58 #include <cppuhelper/basemutex.hxx>
59 #include <com/sun/star/script/XStarBasicAccess.hpp>
61 #include <com/sun/star/document/XViewDataSupplier.hpp>
62 #include <com/sun/star/lang/XUnoTunnel.hpp>
63 #include <cppuhelper/implbase.hxx>
64 #include <svl/lstner.hxx>
66 #include <memory>
68 class ErrCode;
69 class ErrCodeMsg;
70 class SfxMedium;
71 class SfxObjectShell ;
72 class SfxViewFrame;
73 struct IMPL_SfxBaseModel_DataContainer ; // impl. struct to hold member of class SfxBaseModel
75 namespace sfx::intern {
76 class ViewCreationGuard;
79 namespace com::sun::star::beans { struct PropertyValue; }
80 namespace com::sun::star::container { class XNameContainer; }
81 namespace com::sun::star::container { class XNameReplace; }
82 namespace com::sun::star::document { class XEventListener; }
83 namespace com::sun::star::document { struct CmisProperty; }
84 namespace com::sun::star::document { struct CmisVersion; }
85 namespace com::sun::star::document { struct EventObject; }
86 namespace com::sun::star::frame { class XController2; }
87 namespace com::sun::star::task { class XInteractionHandler; }
88 namespace com::sun::star::ui { class XUIConfigurationManager2; }
89 namespace com::sun::star::util { class XCloseListener; }
90 namespace com::sun::star::util { class XModifyListener; }
94 /**_______________________________________________________________________________________________________
95 @implements XChild
96 XComponent
97 document::XDocumentPropertiesSupplier
98 rdf::XDocumentMetadataAccess
99 XEventListener
100 XModel
101 XModifiable2
102 XPrintable
103 XStorable2
104 document::XEventBroadcaster
105 document::XEventsSupplier
106 document::XEmbeddedScripts
107 document::XScriptInvocationContext
108 XCloseable
109 XCloseBroadcaster
111 @base cppu::BaseMutex
112 SfxListener
115 typedef ::cppu::WeakImplHelper < css::container::XChild
116 , css::document::XDocumentPropertiesSupplier
117 , css::document::XCmisDocument
118 , css::rdf::XDocumentMetadataAccess
119 , css::document::XDocumentRecovery2
120 , css::document::XUndoManagerSupplier
121 , css::document::XShapeEventBroadcaster
122 , css::document::XDocumentEventBroadcaster
123 , css::lang::XEventListener
124 , css::document::XEventsSupplier
125 , css::document::XEmbeddedScripts
126 , css::document::XScriptInvocationContext
127 , css::frame::XModel3
128 , css::util::XModifiable2
129 , css::view::XPrintable
130 , css::view::XPrintJobBroadcaster
131 , css::frame::XStorable2
132 , css::frame::XLoadable
133 , css::script::XStarBasicAccess
134 , css::document::XViewDataSupplier
135 , css::util::XCloseable // => css::util::XCloseBroadcaster
136 , css::datatransfer::XTransferable
137 , css::document::XDocumentSubStorageSupplier
138 , css::document::XStorageBasedDocument
139 , css::script::provider::XScriptProviderSupplier
140 , css::ui::XUIConfigurationManagerSupplier
141 , css::embed::XVisualObject
142 , css::lang::XUnoTunnel
143 , css::frame::XModule
144 , css::frame::XTitle
145 , css::frame::XTitleChangeBroadcaster
146 , css::frame::XUntitledNumbers
147 > SfxBaseModel_Base;
149 class SFX2_DLLPUBLIC SfxBaseModel : protected ::cppu::BaseMutex
150 , public SfxBaseModel_Base
151 , public SfxListener
155 // public methods
158 public:
161 // constructor/destructor
164 SfxBaseModel( SfxObjectShell *pObjectShell ) ;
166 virtual ~SfxBaseModel() override ;
169 // XInterface
172 /**___________________________________________________________________________________________________
173 @short give answer, if interface is supported
174 @descr The interfaces are searched by type.
176 @seealso XInterface
178 @param "rType" is the type of searched interface.
180 @return Any information about found interface
182 @onerror A RuntimeException is thrown.
185 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override ;
187 /**___________________________________________________________________________________________________
188 @short increment refcount
189 @seealso XInterface
190 @seealso release()
191 @onerror A RuntimeException is thrown.
194 virtual void SAL_CALL acquire() noexcept override
195 { OWeakObject::acquire(); }
197 /**___________________________________________________________________________________________________
198 @short decrement refcount
199 @seealso XInterface
200 @seealso acquire()
201 @onerror A RuntimeException is thrown.
204 virtual void SAL_CALL release() noexcept override
205 { OWeakObject::release(); }
208 // XTypeProvider
211 /**___________________________________________________________________________________________________
212 @short get information about supported interfaces
213 @seealso XTypeProvider
214 @return Sequence of types of all supported interfaces
216 @onerror A RuntimeException is thrown.
219 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override ;
221 /**___________________________________________________________________________________________________
222 @short get implementation id
223 @descr This ID is necessary for UNO-caching. If there no ID, cache is disabled.
224 Another way, cache is enabled.
226 @seealso XTypeProvider
227 @return ID as Sequence of byte
229 @onerror A RuntimeException is thrown.
232 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override ;
235 // XStarBasicAccess
238 /**___________________________________________________________________________________________________
239 @seealso XStarBasicAccess
241 virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getLibraryContainer() override;
243 /**___________________________________________________________________________________________________
244 @seealso XStarBasicAccess
246 virtual void SAL_CALL createLibrary( const OUString& LibName, const OUString& Password,
247 const OUString& ExternalSourceURL, const OUString& LinkTargetURL ) override;
249 /**___________________________________________________________________________________________________
250 @seealso XStarBasicAccess
252 virtual void SAL_CALL addModule( const OUString& LibraryName, const OUString& ModuleName,
253 const OUString& Language, const OUString& Source ) override;
255 /**___________________________________________________________________________________________________
256 @seealso XStarBasicAccess
258 virtual void SAL_CALL addDialog( const OUString& LibraryName, const OUString& DialogName,
259 const css::uno::Sequence< sal_Int8 >& Data ) override;
262 // XChild
265 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override ;
267 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& xParent ) override;
270 // XComponent
273 virtual void SAL_CALL dispose() override;
275 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener) override;
277 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
279 // XDocumentPropertiesSupplier
280 virtual css::uno::Reference< css::document::XDocumentProperties >
281 SAL_CALL getDocumentProperties() override;
284 // XEventListener
287 virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) override;
290 // XModel
293 virtual sal_Bool SAL_CALL attachResource(const OUString& sURL,
294 const css::uno::Sequence< css::beans::PropertyValue >& aArgs) override;
296 virtual OUString SAL_CALL getURL() override;
298 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs() override;
300 virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) override;
302 virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) override;
304 virtual void SAL_CALL lockControllers() override;
306 virtual void SAL_CALL unlockControllers() override;
308 virtual sal_Bool SAL_CALL hasControllersLocked() override;
310 virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController() override;
312 virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) override;
314 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection() override;
317 // XModel2
319 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL getControllers() override;
321 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableViewControllerNames() override;
323 virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createDefaultViewController(const css::uno::Reference< css::frame::XFrame >& Frame ) override;
325 virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createViewController(const OUString& ViewName ,
326 const css::uno::Sequence< css::beans::PropertyValue >& Arguments ,
327 const css::uno::Reference< css::frame::XFrame >& Frame ) override;
329 virtual void SAL_CALL setArgs(const css::uno::Sequence<css::beans::PropertyValue>& aArgs) override;
332 // XModel3
334 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs2( const css::uno::Sequence< OUString > & requestedArgs ) override;
336 // XModifiable2
339 virtual sal_Bool SAL_CALL disableSetModified( ) override;
340 virtual sal_Bool SAL_CALL enableSetModified( ) override;
341 virtual sal_Bool SAL_CALL isSetModifiedEnabled( ) override;
343 virtual sal_Bool SAL_CALL isModified() override;
345 virtual void SAL_CALL setModified( sal_Bool bModified ) override;
347 virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& xListener ) override ;
349 virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > & xListener) override ;
352 // XCloseable
355 virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) override;
358 // XCloseBroadcaster
361 virtual void SAL_CALL addCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) override;
362 virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) override;
365 // XPrintJobBroadcaster
368 virtual void SAL_CALL addPrintJobListener( const css::uno::Reference< css::view::XPrintJobListener >& xListener ) override;
369 virtual void SAL_CALL removePrintJobListener( const css::uno::Reference< css::view::XPrintJobListener >& xListener ) override;
372 // XPrintable
375 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPrinter() override;
377 virtual void SAL_CALL setPrinter( const css::uno::Sequence< css::beans::PropertyValue >& seqPrinter ) override;
378 virtual void SAL_CALL print( const css::uno::Sequence< css::beans::PropertyValue >& seqOptions ) override;
381 // XStorable2
384 virtual void SAL_CALL storeSelf( const css::uno::Sequence< css::beans::PropertyValue >& seqArguments ) override;
387 // XStorable
390 virtual sal_Bool SAL_CALL hasLocation() override;
392 virtual OUString SAL_CALL getLocation() override;
394 virtual sal_Bool SAL_CALL isReadonly() override;
396 virtual void SAL_CALL store() override;
398 virtual void SAL_CALL storeAsURL( const OUString& sURL,
399 const css::uno::Sequence< css::beans::PropertyValue >& seqArguments ) override ;
401 virtual void SAL_CALL storeToURL( const OUString& sURL,
402 const css::uno::Sequence< css::beans::PropertyValue >& seqArguments ) override;
404 SAL_DLLPRIVATE void
405 impl_store(const OUString& sURL,
406 const css::uno::Sequence<css::beans::PropertyValue>& seqArguments, bool bSaveTo);
408 // XLoadable
411 virtual void SAL_CALL initNew() override;
413 virtual void SAL_CALL load( const css::uno::Sequence< css::beans::PropertyValue >& seqArguments ) override;
416 // XDocumentSubStorageSupplier
419 virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentSubStorage( const OUString& aStorageName, sal_Int32 nMode ) override;
421 virtual css::uno::Sequence< OUString > SAL_CALL getDocumentSubStoragesNames() override;
424 // XStorageBasedDocument
427 virtual void SAL_CALL loadFromStorage( const css::uno::Reference< css::embed::XStorage >& xStorage,
428 const css::uno::Sequence< css::beans::PropertyValue >& aMediaDescriptor ) override;
430 virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage >& xStorage,
431 const css::uno::Sequence< css::beans::PropertyValue >& aMediaDescriptor ) override;
433 virtual void SAL_CALL switchToStorage( const css::uno::Reference< css::embed::XStorage >& xStorage ) override;
435 virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentStorage() override;
437 virtual void SAL_CALL addStorageChangeListener(
438 const css::uno::Reference< css::document::XStorageChangeListener >& xListener ) override;
440 virtual void SAL_CALL removeStorageChangeListener(
441 const css::uno::Reference< css::document::XStorageChangeListener >& xListener ) override;
444 // XVisualObject
447 virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const css::awt::Size& aSize ) override;
449 virtual css::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect ) override;
451 virtual css::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect ) override;
453 virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect ) override;
456 // XScriptProviderSupplier
459 virtual css::uno::Reference< css::script::provider::XScriptProvider > SAL_CALL getScriptProvider() override;
462 // XUIConfigurationManagerSupplier
463 virtual css::uno::Reference< css::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager() override;
466 // XTransferable
469 virtual css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& aFlavor ) override;
471 virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override;
473 virtual sal_Bool SAL_CALL isDataFlavorSupported( const css::datatransfer::DataFlavor& aFlavor ) override;
476 // XEventsSupplier
479 /**___________________________________________________________________________________________________
480 @descr - offers a list of event handlers which are be bound to events of
481 this object.
482 @return - an Events object.
485 virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override;
488 // XEmbeddedScripts
491 virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getBasicLibraries() override;
492 virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getDialogLibraries() override;
493 virtual sal_Bool SAL_CALL getAllowMacroExecution() override;
496 // XScriptInvocationContext
499 virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() override;
502 // document::XEventBroadcaster
504 /**___________________________________________________________________________________________________
505 @descr - registers the given XEventListener.
507 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::document::XEventListener >& xListener ) override;
509 /**___________________________________________________________________________________________________
510 @descr - unregisters the given XEventListener.
512 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::document::XEventListener >& xListener ) override;
515 // document::XShapeEventBroadcaster
517 /**___________________________________________________________________________________________________
518 @descr - registers the given XEventListener.
520 virtual void SAL_CALL addShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::document::XShapeEventListener >& xListener ) override;
522 /**___________________________________________________________________________________________________
523 @descr - unregisters the given XEventListener.
525 virtual void SAL_CALL removeShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::document::XShapeEventListener >& xListener ) override;
528 // XDocumentEventBroadcaster
530 virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) override;
531 virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) override;
532 virtual void SAL_CALL notifyDocumentEvent( const OUString& EventName, const css::uno::Reference< css::frame::XController2 >& ViewController, const css::uno::Any& Supplement ) override;
535 // XUnoTunnel
538 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
540 // css.frame.XModule
541 virtual void SAL_CALL setIdentifier(const OUString& sIdentifier) override;
543 // css.frame.XModule
544 virtual OUString SAL_CALL getIdentifier() override;
546 // css.frame.XTitle
547 virtual OUString SAL_CALL getTitle() override;
549 // css.frame.XTitle
550 virtual void SAL_CALL setTitle( const OUString& sTitle ) override;
552 // css.frame.XTitleChangeBroadcaster
553 virtual void SAL_CALL addTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) override;
555 // css.frame.XTitleChangeBroadcaster
556 virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) override;
558 // css.frame.XUntitledNumbers
559 virtual ::sal_Int32 SAL_CALL leaseNumber( const css::uno::Reference< css::uno::XInterface >& xComponent ) override;
561 // css.frame.XUntitledNumbers
562 virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber ) override;
564 // css.frame.XUntitledNumbers
565 virtual void SAL_CALL releaseNumberForComponent( const css::uno::Reference< css::uno::XInterface >& xComponent ) override;
567 // css.frame.XUntitledNumbers
568 virtual OUString SAL_CALL getUntitledPrefix() override;
570 // css.document.XDocumentRecovery
571 virtual sal_Bool SAL_CALL wasModifiedSinceLastSave() override;
572 virtual void SAL_CALL storeToRecoveryFile( const OUString& i_TargetLocation, const css::uno::Sequence< css::beans::PropertyValue >& i_MediaDescriptor ) override;
573 virtual void SAL_CALL recoverFromFile( const OUString& i_SourceLocation, const OUString& i_SalvagedFile, const css::uno::Sequence< css::beans::PropertyValue >& i_MediaDescriptor ) override;
575 // css.document.XDocumentRecovery2
576 virtual sal_Int64 SAL_CALL getModifiedStateDuration() override;
578 // css.document.XUndoManagerSupplier
579 virtual css::uno::Reference< css::document::XUndoManager > SAL_CALL getUndoManager( ) override;
582 // css::rdf::XNode:
583 virtual OUString SAL_CALL getStringValue() override;
585 // css::rdf::XURI:
586 virtual OUString SAL_CALL getNamespace() override;
587 virtual OUString SAL_CALL getLocalName() override;
589 // css::rdf::XRepositorySupplier:
590 virtual css::uno::Reference<
591 css::rdf::XRepository > SAL_CALL getRDFRepository() override;
593 // css::rdf::XDocumentMetadataAccess:
594 virtual css::uno::Reference<
595 css::rdf::XMetadatable > SAL_CALL
596 getElementByMetadataReference(
597 const css::beans::StringPair & i_rReference) override;
598 virtual css::uno::Reference<
599 css::rdf::XMetadatable > SAL_CALL
600 getElementByURI(const css::uno::Reference<
601 css::rdf::XURI > & i_xURI) override;
602 virtual css::uno::Sequence< css::uno::Reference<
603 css::rdf::XURI > > SAL_CALL getMetadataGraphsWithType(
604 const css::uno::Reference<
605 css::rdf::XURI > & i_xType) override;
606 virtual css::uno::Reference<
607 css::rdf::XURI> SAL_CALL
608 addMetadataFile(const OUString & i_rFileName,
609 const css::uno::Sequence<
610 css::uno::Reference< css::rdf::XURI >
611 > & i_rTypes) override;
612 virtual css::uno::Reference<
613 css::rdf::XURI> SAL_CALL
614 importMetadataFile(::sal_Int16 i_Format,
615 const css::uno::Reference<
616 css::io::XInputStream > & i_xInStream,
617 const OUString & i_rFileName,
618 const css::uno::Reference<
619 css::rdf::XURI > & i_xBaseURI,
620 const css::uno::Sequence<
621 css::uno::Reference< css::rdf::XURI >
622 > & i_rTypes) override;
623 virtual void SAL_CALL removeMetadataFile(
624 const css::uno::Reference<
625 css::rdf::XURI > & i_xGraphName) override;
626 virtual void SAL_CALL addContentOrStylesFile(
627 const OUString & i_rFileName) override;
628 virtual void SAL_CALL removeContentOrStylesFile(
629 const OUString & i_rFileName) override;
631 virtual void SAL_CALL loadMetadataFromStorage(
632 const css::uno::Reference<
633 css::embed::XStorage > & i_xStorage,
634 const css::uno::Reference<
635 css::rdf::XURI > & i_xBaseURI,
636 const css::uno::Reference<
637 css::task::XInteractionHandler> & i_xHandler) override;
638 virtual void SAL_CALL storeMetadataToStorage(
639 const css::uno::Reference<
640 css::embed::XStorage > & i_xStorage) override;
641 virtual void SAL_CALL loadMetadataFromMedium(
642 const css::uno::Sequence<
643 css::beans::PropertyValue > & i_rMedium) override;
644 virtual void SAL_CALL storeMetadataToMedium(
645 const css::uno::Sequence<
646 css::beans::PropertyValue > & i_rMedium) override;
648 // XCmisDocument
650 virtual css::uno::Sequence< css::document::CmisProperty >
651 SAL_CALL getCmisProperties() override;
652 virtual void SAL_CALL setCmisProperties(
653 const css::uno::Sequence<
654 css::document::CmisProperty >& _cmisproperties ) override;
656 virtual void SAL_CALL updateCmisProperties(
657 const css::uno::Sequence<
658 css::document::CmisProperty >& _cmisproperties ) override;
660 virtual css::uno::Sequence< css::document::CmisVersion > SAL_CALL getAllVersions ( ) override;
662 virtual void SAL_CALL checkOut( ) override;
663 virtual void SAL_CALL cancelCheckOut( ) override;
664 virtual void SAL_CALL checkIn( sal_Bool bIsMajor, const OUString & rMessage ) override;
666 virtual sal_Bool SAL_CALL isVersionable( ) override;
667 virtual sal_Bool SAL_CALL canCheckOut( ) override;
668 virtual sal_Bool SAL_CALL canCancelCheckOut( ) override;
669 virtual sal_Bool SAL_CALL canCheckIn( ) override;
671 /// @throws css::uno::RuntimeException
672 bool getBoolPropertyValue( const OUString& rName );
675 // SfxListener
678 void Notify( SfxBroadcaster& aBC ,
679 const SfxHint& aHint ) override ;
682 // public IMPL?
685 void changing() ;
687 SfxObjectShell* GetObjectShell() const ;
689 SAL_DLLPRIVATE bool impl_isDisposed() const ;
690 bool IsInitialized() const;
691 void MethodEntryCheck( const bool i_mustBeInitialized ) const;
693 css::uno::Reference < css::container::XIndexAccess > SAL_CALL getViewData() override;
694 void SAL_CALL setViewData( const css::uno::Reference < css::container::XIndexAccess >& aData ) override;
696 /** calls all XEventListeners */
697 void notifyEvent( const css::document::EventObject& aEvent ) const;
699 /** returns true if someone added a XEventListener to this XEventBroadcaster */
700 bool hasEventListeners() const;
702 protected:
704 /* returns a unique id for the model that is valid as long as the document
705 is loaded. The id is not saved across document close/reload. */
706 OUString const & getRuntimeUID() const;
708 /* returns true if the document signatures are valid, otherwise false */
709 bool hasValidSignatures() const;
711 /* GrabBagItem for interim interop purposes */
712 void getGrabBagItem(css::uno::Any& rVal) const;
714 void setGrabBagItem(const css::uno::Any& rVal);
717 // private methods
720 private:
721 /// @throws css::uno::RuntimeException
722 css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2();
723 void impl_getPrintHelper();
724 SAL_DLLPRIVATE void ListenForStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage );
725 SAL_DLLPRIVATE OUString GetMediumFilterName_Impl() const;
727 SAL_DLLPRIVATE void postEvent_Impl( const OUString& aName, const css::uno::Reference< css::frame::XController2 >& xController = css::uno::Reference< css::frame::XController2 >(), const css::uno::Any& aSupplement = css::uno::Any());
729 SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
730 SAL_DLLPRIVATE css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper ();
732 SAL_DLLPRIVATE SfxViewFrame* FindOrCreateViewFrame_Impl(
733 const css::uno::Reference< css::frame::XFrame >& i_rFrame,
734 ::sfx::intern::ViewCreationGuard& i_rGuard
735 ) const;
737 SAL_DLLPRIVATE void NotifyModifyListeners_Impl() const;
739 SAL_DLLPRIVATE void loadCmisProperties();
741 SAL_DLLPRIVATE SfxMedium* handleLoadError( const ErrCodeMsg& nError, SfxMedium* pMedium );
744 // private variables and methods
747 private:
749 std::shared_ptr<IMPL_SfxBaseModel_DataContainer> m_pData;
750 // cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
751 const bool m_bSupportEmbeddedScripts;
752 const bool m_bSupportDocRecovery;
754 } ; // class SfxBaseModel
756 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */