1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_SFX2_SFXBASEMODEL_HXX
21 #define INCLUDED_SFX2_SFXBASEMODEL_HXX
23 #include <sal/config.h>
24 #include <sfx2/dllapi.h>
25 #include <sal/types.h>
26 #include <com/sun/star/frame/XModule.hpp>
27 #include <com/sun/star/frame/XTitle.hpp>
28 #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
29 #include <com/sun/star/frame/XUntitledNumbers.hpp>
30 #include <com/sun/star/container/XChild.hpp>
31 #include <com/sun/star/document/XCmisDocument.hpp>
32 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
33 #include <com/sun/star/document/XDocumentRecovery.hpp>
34 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
35 #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
36 #include <com/sun/star/document/XEventBroadcaster.hpp>
37 #include <com/sun/star/document/XShapeEventBroadcaster.hpp>
38 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
39 #include <com/sun/star/document/XEventsSupplier.hpp>
40 #include <com/sun/star/document/XEmbeddedScripts.hpp>
41 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
42 #include <com/sun/star/document/XStorageBasedDocument.hpp>
43 #include <com/sun/star/document/XScriptInvocationContext.hpp>
44 #include <com/sun/star/lang/XEventListener.hpp>
45 #include <com/sun/star/frame/XModel2.hpp>
46 #include <com/sun/star/util/XModifiable2.hpp>
47 #include <com/sun/star/util/XCloseable.hpp>
48 #include <com/sun/star/view/XPrintable.hpp>
49 #include <com/sun/star/view/XPrintJobBroadcaster.hpp>
50 #include <com/sun/star/frame/XStorable2.hpp>
51 #include <com/sun/star/frame/XLoadable.hpp>
52 #include <com/sun/star/lang/EventObject.hpp>
53 #include <com/sun/star/datatransfer/XTransferable.hpp>
54 #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
55 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
56 #include <com/sun/star/embed/XVisualObject.hpp>
57 #include <com/sun/star/uno/Sequence.hxx>
58 #include <com/sun/star/uno/Reference.hxx>
59 #include <com/sun/star/uno/Any.hxx>
60 #include <cppuhelper/basemutex.hxx>
61 #include <com/sun/star/script/XStarBasicAccess.hpp>
63 #include <com/sun/star/document/XViewDataSupplier.hpp>
64 #include <com/sun/star/lang/XUnoTunnel.hpp>
65 #include <cppuhelper/implbase.hxx>
66 #include <svl/lstner.hxx>
72 class SfxObjectShell
;
74 struct IMPL_SfxBaseModel_DataContainer
; // impl. struct to hold member of class SfxBaseModel
76 namespace sfx
{ namespace intern
{
77 class ViewCreationGuard
;
80 namespace com::sun::star::beans
{ struct PropertyValue
; }
81 namespace com::sun::star::container
{ class XNameContainer
; }
82 namespace com::sun::star::container
{ class XNameReplace
; }
83 namespace com::sun::star::document
{ class XEventListener
; }
84 namespace com::sun::star::document
{ struct CmisProperty
; }
85 namespace com::sun::star::document
{ struct CmisVersion
; }
86 namespace com::sun::star::document
{ struct EventObject
; }
87 namespace com::sun::star::frame
{ class XController2
; }
88 namespace com::sun::star::task
{ class XInteractionHandler
; }
89 namespace com::sun::star::ui
{ class XUIConfigurationManager2
; }
90 namespace com::sun::star::util
{ class XCloseListener
; }
91 namespace com::sun::star::util
{ class XModifyListener
; }
96 /**_______________________________________________________________________________________________________
99 document::XDocumentPropertiesSupplier
100 rdf::XDocumentMetadataAccess
106 document::XEventBroadcaster
107 document::XEventsSupplier
108 document::XEmbeddedScripts
109 document::XScriptInvocationContext
113 @base cppu::BaseMutex
117 typedef ::cppu::WeakImplHelper
< css::container::XChild
118 , css::document::XDocumentPropertiesSupplier
119 , css::document::XCmisDocument
120 , css::rdf::XDocumentMetadataAccess
121 , css::document::XDocumentRecovery
122 , css::document::XUndoManagerSupplier
123 , css::document::XShapeEventBroadcaster
124 , css::document::XDocumentEventBroadcaster
125 , css::lang::XEventListener
126 , css::document::XEventsSupplier
127 , css::document::XEmbeddedScripts
128 , css::document::XScriptInvocationContext
129 , css::frame::XModel2
130 , css::util::XModifiable2
131 , css::view::XPrintable
132 , css::view::XPrintJobBroadcaster
133 , css::frame::XStorable2
134 , css::frame::XLoadable
135 , css::script::XStarBasicAccess
136 , css::document::XViewDataSupplier
137 , css::util::XCloseable
// => css::util::XCloseBroadcaster
138 , css::datatransfer::XTransferable
139 , css::document::XDocumentSubStorageSupplier
140 , css::document::XStorageBasedDocument
141 , css::script::provider::XScriptProviderSupplier
142 , css::ui::XUIConfigurationManagerSupplier
143 , css::embed::XVisualObject
144 , css::lang::XUnoTunnel
145 , css::frame::XModule
147 , css::frame::XTitleChangeBroadcaster
148 , css::frame::XUntitledNumbers
151 class SFX2_DLLPUBLIC SfxBaseModel
: protected ::cppu::BaseMutex
152 , public SfxBaseModel_Base
163 // constructor/destructor
166 SfxBaseModel( SfxObjectShell
*pObjectShell
) ;
168 virtual ~SfxBaseModel() override
;
174 /**___________________________________________________________________________________________________
175 @short give answer, if interface is supported
176 @descr The interfaces are searched by type.
180 @param "rType" is the type of searched interface.
182 @return Any information about found interface
184 @onerror A RuntimeException is thrown.
187 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
189 /**___________________________________________________________________________________________________
190 @short increment refcount
193 @onerror A RuntimeException is thrown.
196 virtual void SAL_CALL
acquire() throw() override
;
198 /**___________________________________________________________________________________________________
199 @short decrement refcount
202 @onerror A RuntimeException is thrown.
205 virtual void SAL_CALL
release() throw() override
;
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
;
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
;
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
;
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
;
287 virtual void SAL_CALL
disposing( const css::lang::EventObject
& aEvent
) override
;
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
;
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
;
335 virtual sal_Bool SAL_CALL
disableSetModified( ) override
;
336 virtual sal_Bool SAL_CALL
enableSetModified( ) override
;
337 virtual sal_Bool SAL_CALL
isSetModifiedEnabled( ) override
;
339 virtual sal_Bool SAL_CALL
isModified() override
;
341 virtual void SAL_CALL
setModified( sal_Bool bModified
) override
;
343 virtual void SAL_CALL
addModifyListener( const css::uno::Reference
< css::util::XModifyListener
>& xListener
) override
;
345 virtual void SAL_CALL
removeModifyListener(const css::uno::Reference
< css::util::XModifyListener
> & xListener
) override
;
351 virtual void SAL_CALL
close( sal_Bool bDeliverOwnership
) override
;
357 virtual void SAL_CALL
addCloseListener( const css::uno::Reference
< css::util::XCloseListener
>& xListener
) override
;
358 virtual void SAL_CALL
removeCloseListener( const css::uno::Reference
< css::util::XCloseListener
>& xListener
) override
;
361 // XPrintJobBroadcaster
364 virtual void SAL_CALL
addPrintJobListener( const css::uno::Reference
< css::view::XPrintJobListener
>& xListener
) override
;
365 virtual void SAL_CALL
removePrintJobListener( const css::uno::Reference
< css::view::XPrintJobListener
>& xListener
) override
;
371 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getPrinter() override
;
373 virtual void SAL_CALL
setPrinter( const css::uno::Sequence
< css::beans::PropertyValue
>& seqPrinter
) override
;
374 virtual void SAL_CALL
print( const css::uno::Sequence
< css::beans::PropertyValue
>& seqOptions
) override
;
380 virtual void SAL_CALL
storeSelf( const css::uno::Sequence
< css::beans::PropertyValue
>& seqArguments
) override
;
386 virtual sal_Bool SAL_CALL
hasLocation() override
;
388 virtual OUString SAL_CALL
getLocation() override
;
390 virtual sal_Bool SAL_CALL
isReadonly() override
;
392 virtual void SAL_CALL
store() override
;
394 virtual void SAL_CALL
storeAsURL( const OUString
& sURL
,
395 const css::uno::Sequence
< css::beans::PropertyValue
>& seqArguments
) override
;
397 virtual void SAL_CALL
storeToURL( const OUString
& sURL
,
398 const css::uno::Sequence
< css::beans::PropertyValue
>& seqArguments
) override
;
401 impl_store(const OUString
& sURL
,
402 const css::uno::Sequence
<css::beans::PropertyValue
>& seqArguments
, bool bSaveTo
);
407 virtual void SAL_CALL
initNew() override
;
409 virtual void SAL_CALL
load( const css::uno::Sequence
< css::beans::PropertyValue
>& seqArguments
) override
;
412 // XDocumentSubStorageSupplier
415 virtual css::uno::Reference
< css::embed::XStorage
> SAL_CALL
getDocumentSubStorage( const OUString
& aStorageName
, sal_Int32 nMode
) override
;
417 virtual css::uno::Sequence
< OUString
> SAL_CALL
getDocumentSubStoragesNames() override
;
420 // XStorageBasedDocument
423 virtual void SAL_CALL
loadFromStorage( const css::uno::Reference
< css::embed::XStorage
>& xStorage
,
424 const css::uno::Sequence
< css::beans::PropertyValue
>& aMediaDescriptor
) override
;
426 virtual void SAL_CALL
storeToStorage( const css::uno::Reference
< css::embed::XStorage
>& xStorage
,
427 const css::uno::Sequence
< css::beans::PropertyValue
>& aMediaDescriptor
) override
;
429 virtual void SAL_CALL
switchToStorage( const css::uno::Reference
< css::embed::XStorage
>& xStorage
) override
;
431 virtual css::uno::Reference
< css::embed::XStorage
> SAL_CALL
getDocumentStorage() override
;
433 virtual void SAL_CALL
addStorageChangeListener(
434 const css::uno::Reference
< css::document::XStorageChangeListener
>& xListener
) override
;
436 virtual void SAL_CALL
removeStorageChangeListener(
437 const css::uno::Reference
< css::document::XStorageChangeListener
>& xListener
) override
;
443 virtual void SAL_CALL
setVisualAreaSize( sal_Int64 nAspect
, const css::awt::Size
& aSize
) override
;
445 virtual css::awt::Size SAL_CALL
getVisualAreaSize( sal_Int64 nAspect
) override
;
447 virtual css::embed::VisualRepresentation SAL_CALL
getPreferredVisualRepresentation( ::sal_Int64 nAspect
) override
;
449 virtual sal_Int32 SAL_CALL
getMapUnit( sal_Int64 nAspect
) override
;
452 // XScriptProviderSupplier
455 virtual css::uno::Reference
< css::script::provider::XScriptProvider
> SAL_CALL
getScriptProvider() override
;
458 // XUIConfigurationManagerSupplier
459 virtual css::uno::Reference
< css::ui::XUIConfigurationManager
> SAL_CALL
getUIConfigurationManager() override
;
465 virtual css::uno::Any SAL_CALL
getTransferData( const css::datatransfer::DataFlavor
& aFlavor
) override
;
467 virtual css::uno::Sequence
< css::datatransfer::DataFlavor
> SAL_CALL
getTransferDataFlavors() override
;
469 virtual sal_Bool SAL_CALL
isDataFlavorSupported( const css::datatransfer::DataFlavor
& aFlavor
) override
;
475 /**___________________________________________________________________________________________________
476 @descr - offers a list of event handlers which are be bound to events of
478 @return - an Events object.
481 virtual css::uno::Reference
< css::container::XNameReplace
> SAL_CALL
getEvents() override
;
487 virtual css::uno::Reference
< css::script::XStorageBasedLibraryContainer
> SAL_CALL
getBasicLibraries() override
;
488 virtual css::uno::Reference
< css::script::XStorageBasedLibraryContainer
> SAL_CALL
getDialogLibraries() override
;
489 virtual sal_Bool SAL_CALL
getAllowMacroExecution() override
;
492 // XScriptInvocationContext
495 virtual css::uno::Reference
< css::document::XEmbeddedScripts
> SAL_CALL
getScriptContainer() override
;
498 // document::XEventBroadcaster
500 /**___________________________________________________________________________________________________
501 @descr - registers the given XEventListener.
503 virtual void SAL_CALL
addEventListener( const css::uno::Reference
< css::document::XEventListener
>& xListener
) override
;
505 /**___________________________________________________________________________________________________
506 @descr - unregisters the given XEventListener.
508 virtual void SAL_CALL
removeEventListener( const css::uno::Reference
< css::document::XEventListener
>& xListener
) override
;
511 // document::XShapeEventBroadcaster
513 /**___________________________________________________________________________________________________
514 @descr - registers the given XEventListener.
516 virtual void SAL_CALL
addShapeEventListener( const css::uno::Reference
< css::drawing::XShape
>& xShape
, const css::uno::Reference
< css::document::XShapeEventListener
>& xListener
) override
;
518 /**___________________________________________________________________________________________________
519 @descr - unregisters the given XEventListener.
521 virtual void SAL_CALL
removeShapeEventListener( const css::uno::Reference
< css::drawing::XShape
>& xShape
, const css::uno::Reference
< css::document::XShapeEventListener
>& xListener
) override
;
524 // XDocumentEventBroadcaster
526 virtual void SAL_CALL
addDocumentEventListener( const css::uno::Reference
< css::document::XDocumentEventListener
>& Listener
) override
;
527 virtual void SAL_CALL
removeDocumentEventListener( const css::uno::Reference
< css::document::XDocumentEventListener
>& Listener
) override
;
528 virtual void SAL_CALL
notifyDocumentEvent( const OUString
& EventName
, const css::uno::Reference
< css::frame::XController2
>& ViewController
, const css::uno::Any
& Supplement
) override
;
534 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
537 virtual void SAL_CALL
setIdentifier(const OUString
& sIdentifier
) override
;
540 virtual OUString SAL_CALL
getIdentifier() override
;
543 virtual OUString SAL_CALL
getTitle() override
;
546 virtual void SAL_CALL
setTitle( const OUString
& sTitle
) override
;
548 // css.frame.XTitleChangeBroadcaster
549 virtual void SAL_CALL
addTitleChangeListener( const css::uno::Reference
< css::frame::XTitleChangeListener
>& xListener
) override
;
551 // css.frame.XTitleChangeBroadcaster
552 virtual void SAL_CALL
removeTitleChangeListener( const css::uno::Reference
< css::frame::XTitleChangeListener
>& xListener
) override
;
554 // css.frame.XUntitledNumbers
555 virtual ::sal_Int32 SAL_CALL
leaseNumber( const css::uno::Reference
< css::uno::XInterface
>& xComponent
) override
;
557 // css.frame.XUntitledNumbers
558 virtual void SAL_CALL
releaseNumber( ::sal_Int32 nNumber
) override
;
560 // css.frame.XUntitledNumbers
561 virtual void SAL_CALL
releaseNumberForComponent( const css::uno::Reference
< css::uno::XInterface
>& xComponent
) override
;
563 // css.frame.XUntitledNumbers
564 virtual OUString SAL_CALL
getUntitledPrefix() override
;
566 // css.document.XDocumentRecovery
567 virtual sal_Bool SAL_CALL
wasModifiedSinceLastSave() override
;
568 virtual void SAL_CALL
storeToRecoveryFile( const OUString
& i_TargetLocation
, const css::uno::Sequence
< css::beans::PropertyValue
>& i_MediaDescriptor
) override
;
569 virtual void SAL_CALL
recoverFromFile( const OUString
& i_SourceLocation
, const OUString
& i_SalvagedFile
, const css::uno::Sequence
< css::beans::PropertyValue
>& i_MediaDescriptor
) override
;
571 // css.document.XUndoManagerSupplier
572 virtual css::uno::Reference
< css::document::XUndoManager
> SAL_CALL
getUndoManager( ) override
;
576 virtual OUString SAL_CALL
getStringValue() override
;
579 virtual OUString SAL_CALL
getNamespace() override
;
580 virtual OUString SAL_CALL
getLocalName() override
;
582 // css::rdf::XRepositorySupplier:
583 virtual css::uno::Reference
<
584 css::rdf::XRepository
> SAL_CALL
getRDFRepository() override
;
586 // css::rdf::XDocumentMetadataAccess:
587 virtual css::uno::Reference
<
588 css::rdf::XMetadatable
> SAL_CALL
589 getElementByMetadataReference(
590 const css::beans::StringPair
& i_rReference
) override
;
591 virtual css::uno::Reference
<
592 css::rdf::XMetadatable
> SAL_CALL
593 getElementByURI(const css::uno::Reference
<
594 css::rdf::XURI
> & i_xURI
) override
;
595 virtual css::uno::Sequence
< css::uno::Reference
<
596 css::rdf::XURI
> > SAL_CALL
getMetadataGraphsWithType(
597 const css::uno::Reference
<
598 css::rdf::XURI
> & i_xType
) override
;
599 virtual css::uno::Reference
<
600 css::rdf::XURI
> SAL_CALL
601 addMetadataFile(const OUString
& i_rFileName
,
602 const css::uno::Sequence
<
603 css::uno::Reference
< css::rdf::XURI
>
604 > & i_rTypes
) override
;
605 virtual css::uno::Reference
<
606 css::rdf::XURI
> SAL_CALL
607 importMetadataFile(::sal_Int16 i_Format
,
608 const css::uno::Reference
<
609 css::io::XInputStream
> & i_xInStream
,
610 const OUString
& i_rFileName
,
611 const css::uno::Reference
<
612 css::rdf::XURI
> & i_xBaseURI
,
613 const css::uno::Sequence
<
614 css::uno::Reference
< css::rdf::XURI
>
615 > & i_rTypes
) override
;
616 virtual void SAL_CALL
removeMetadataFile(
617 const css::uno::Reference
<
618 css::rdf::XURI
> & i_xGraphName
) override
;
619 virtual void SAL_CALL
addContentOrStylesFile(
620 const OUString
& i_rFileName
) override
;
621 virtual void SAL_CALL
removeContentOrStylesFile(
622 const OUString
& i_rFileName
) override
;
624 virtual void SAL_CALL
loadMetadataFromStorage(
625 const css::uno::Reference
<
626 css::embed::XStorage
> & i_xStorage
,
627 const css::uno::Reference
<
628 css::rdf::XURI
> & i_xBaseURI
,
629 const css::uno::Reference
<
630 css::task::XInteractionHandler
> & i_xHandler
) override
;
631 virtual void SAL_CALL
storeMetadataToStorage(
632 const css::uno::Reference
<
633 css::embed::XStorage
> & i_xStorage
) override
;
634 virtual void SAL_CALL
loadMetadataFromMedium(
635 const css::uno::Sequence
<
636 css::beans::PropertyValue
> & i_rMedium
) override
;
637 virtual void SAL_CALL
storeMetadataToMedium(
638 const css::uno::Sequence
<
639 css::beans::PropertyValue
> & i_rMedium
) override
;
643 virtual css::uno::Sequence
< css::document::CmisProperty
>
644 SAL_CALL
getCmisProperties() override
;
645 virtual void SAL_CALL
setCmisProperties(
646 const css::uno::Sequence
<
647 css::document::CmisProperty
>& _cmisproperties
) override
;
649 virtual void SAL_CALL
updateCmisProperties(
650 const css::uno::Sequence
<
651 css::document::CmisProperty
>& _cmisproperties
) override
;
653 virtual css::uno::Sequence
< css::document::CmisVersion
> SAL_CALL
getAllVersions ( ) override
;
655 virtual void SAL_CALL
checkOut( ) override
;
656 virtual void SAL_CALL
cancelCheckOut( ) override
;
657 virtual void SAL_CALL
checkIn( sal_Bool bIsMajor
, const OUString
& rMessage
) override
;
659 virtual sal_Bool SAL_CALL
isVersionable( ) override
;
660 virtual sal_Bool SAL_CALL
canCheckOut( ) override
;
661 virtual sal_Bool SAL_CALL
canCancelCheckOut( ) override
;
662 virtual sal_Bool SAL_CALL
canCheckIn( ) override
;
664 /// @throws css::uno::RuntimeException
665 bool getBoolPropertyValue( const OUString
& rName
);
671 void Notify( SfxBroadcaster
& aBC
,
672 const SfxHint
& aHint
) override
;
680 SfxObjectShell
* GetObjectShell() const ;
682 SAL_DLLPRIVATE
bool impl_isDisposed() const ;
683 bool IsInitialized() const;
684 void MethodEntryCheck( const bool i_mustBeInitialized
) const;
686 css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getViewData() override
;
687 void SAL_CALL
setViewData( const css::uno::Reference
< css::container::XIndexAccess
>& aData
) override
;
689 /** calls all XEventListeners */
690 void notifyEvent( const css::document::EventObject
& aEvent
) const;
692 /** returns true if someone added a XEventListener to this XEventBroadcaster */
693 bool hasEventListeners() const;
697 /* returns a unique id for the model that is valid as long as the document
698 is loaded. The id is not saved across document close/reload. */
699 OUString
const & getRuntimeUID() const;
701 /* returns true if the document signatures are valid, otherwise false */
702 bool hasValidSignatures() const;
704 /* GrabBagItem for interim interop purposes */
705 void getGrabBagItem(css::uno::Any
& rVal
) const;
707 void setGrabBagItem(const css::uno::Any
& rVal
);
714 /// @throws css::uno::RuntimeException
715 css::uno::Reference
< css::ui::XUIConfigurationManager2
> getUIConfigurationManager2();
716 void impl_getPrintHelper();
717 SAL_DLLPRIVATE
void ListenForStorage_Impl( const css::uno::Reference
< css::embed::XStorage
>& xStorage
);
718 SAL_DLLPRIVATE OUString
GetMediumFilterName_Impl() const;
720 SAL_DLLPRIVATE
void postEvent_Impl( const OUString
& aName
, const css::uno::Reference
< css::frame::XController2
>& xController
= css::uno::Reference
< css::frame::XController2
>() );
722 SAL_DLLPRIVATE
css::uno::Reference
< css::frame::XTitle
> impl_getTitleHelper ();
723 SAL_DLLPRIVATE
css::uno::Reference
< css::frame::XUntitledNumbers
> impl_getUntitledHelper ();
725 SAL_DLLPRIVATE SfxViewFrame
* FindOrCreateViewFrame_Impl(
726 const css::uno::Reference
< css::frame::XFrame
>& i_rFrame
,
727 ::sfx::intern::ViewCreationGuard
& i_rGuard
730 SAL_DLLPRIVATE
void NotifyModifyListeners_Impl() const;
732 SAL_DLLPRIVATE
void loadCmisProperties();
734 SAL_DLLPRIVATE SfxMedium
* handleLoadError( ErrCode nError
, SfxMedium
* pMedium
);
737 // private variables and methods
742 std::shared_ptr
<IMPL_SfxBaseModel_DataContainer
> m_pData
;
743 // cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
744 const bool m_bSupportEmbeddedScripts
;
745 const bool m_bSupportDocRecovery
;
747 } ; // class SfxBaseModel
749 #endif // INCLUDED_SFX2_SFXBASEMODEL_HXX
751 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */