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/XEventBroadcaster.hpp>
36#include <com/sun/star/document/XShapeEventBroadcaster.hpp>
37#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
38#include <com/sun/star/document/XEventsSupplier.hpp>
39#include <com/sun/star/document/XEmbeddedScripts.hpp>
40#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
41#include <com/sun/star/document/XStorageBasedDocument.hpp>
42#include <com/sun/star/document/XScriptInvocationContext.hpp>
43#include <com/sun/star/lang/XEventListener.hpp>
44#include <com/sun/star/frame/XModel3.hpp>
45#include <com/sun/star/util/XModifiable2.hpp>
46#include <com/sun/star/util/XCloseable.hpp>
47#include <com/sun/star/view/XPrintable.hpp>
48#include <com/sun/star/view/XPrintJobBroadcaster.hpp>
49#include <com/sun/star/frame/XStorable2.hpp>
50#include <com/sun/star/frame/XLoadable.hpp>
51#include <com/sun/star/lang/EventObject.hpp>
52#include <com/sun/star/datatransfer/XTransferable.hpp>
53#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
54#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
55#include <com/sun/star/embed/XVisualObject.hpp>
56#include <com/sun/star/uno/Sequence.hxx>
57#include <com/sun/star/uno/Reference.hxx>
58#include <com/sun/star/uno/Any.hxx>
60#include <com/sun/star/script/XStarBasicAccess.hpp>
62#include <com/sun/star/document/XViewDataSupplier.hpp>
63#include <com/sun/star/lang/XUnoTunnel.hpp>
76 class ViewCreationGuard;
115typedef ::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
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
145 , css::frame::XTitleChangeBroadcaster
146 , css::frame::XUntitledNumbers
185 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& rType )
override ;
194 virtual void SAL_CALL
acquire() noexcept
override
204 virtual void SAL_CALL
release() noexcept
override
219 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
override ;
232 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
override ;
241 virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getLibraryContainer()
override;
246 virtual void SAL_CALL createLibrary(
const OUString& LibName,
const OUString& Password,
247 const OUString& ExternalSourceURL,
const OUString& LinkTargetURL )
override;
252 virtual void SAL_CALL addModule(
const OUString& LibraryName,
const OUString& ModuleName,
253 const OUString& Language,
const OUString& Source )
override;
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;
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;
334 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs2(
const css::uno::Sequence< OUString > & requestedArgs )
override;
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 ;
355 virtual void SAL_CALL
close(
sal_Bool bDeliverOwnership )
override;
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;
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;
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;
384 virtual void SAL_CALL storeSelf(
const css::uno::Sequence< css::beans::PropertyValue >& seqArguments )
override;
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;
405 impl_store(
const OUString& sURL,
406 const css::uno::Sequence<css::beans::PropertyValue>& seqArguments,
bool bSaveTo);
411 virtual void SAL_CALL initNew()
override;
413 virtual void SAL_CALL load(
const css::uno::Sequence< css::beans::PropertyValue >& seqArguments )
override;
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;
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;
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;
459 virtual css::uno::Reference< css::script::provider::XScriptProvider > SAL_CALL getScriptProvider()
override;
463 virtual css::uno::Reference< css::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager()
override;
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;
485 virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents()
override;
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;
499 virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer()
override;
507 virtual void SAL_CALL
addEventListener(
const css::uno::Reference< css::document::XEventListener >& xListener )
override;
512 virtual void SAL_CALL
removeEventListener(
const css::uno::Reference< css::document::XEventListener >& xListener )
override;
520 virtual void SAL_CALL addShapeEventListener(
const css::uno::Reference< css::drawing::XShape >& xShape,
const css::uno::Reference< css::document::XShapeEventListener >& xListener )
override;
525 virtual void SAL_CALL removeShapeEventListener(
const css::uno::Reference< css::drawing::XShape >& xShape,
const css::uno::Reference< css::document::XShapeEventListener >& xListener )
override;
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;
538 virtual sal_Int64 SAL_CALL getSomething(
const css::uno::Sequence< sal_Int8 >& aIdentifier )
override;
541 virtual void SAL_CALL setIdentifier(
const OUString& sIdentifier)
override;
547 virtual OUString SAL_CALL
getTitle()
override;
550 virtual void SAL_CALL setTitle(
const OUString& sTitle )
override;
553 virtual void SAL_CALL addTitleChangeListener(
const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
override;
556 virtual void SAL_CALL removeTitleChangeListener(
const css::uno::Reference< css::frame::XTitleChangeListener >& xListener )
override;
559 virtual ::sal_Int32 SAL_CALL leaseNumber(
const css::uno::Reference< css::uno::XInterface >& xComponent )
override;
562 virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber )
override;
565 virtual void SAL_CALL releaseNumberForComponent(
const css::uno::Reference< css::uno::XInterface >& xComponent )
override;
568 virtual OUString SAL_CALL getUntitledPrefix()
override;
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;
576 virtual sal_Int64 SAL_CALL getModifiedStateDuration()
override;
579 virtual css::uno::Reference< css::document::XUndoManager > SAL_CALL getUndoManager( )
override;
583 virtual OUString SAL_CALL getStringValue()
override;
586 virtual OUString SAL_CALL getNamespace()
override;
587 virtual OUString SAL_CALL getLocalName()
override;
590 virtual css::uno::Reference<
591 css::rdf::XRepository > SAL_CALL getRDFRepository()
override;
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;
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;
672 bool getBoolPropertyValue(
const OUString& rName );
679 const SfxHint& aHint )
override ;
689 SAL_DLLPRIVATE
bool impl_isDisposed()
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;
697 void notifyEvent(
const css::document::EventObject& aEvent )
const;
700 bool hasEventListeners()
const;
706 OUString
const & getRuntimeUID()
const;
709 bool hasValidSignatures()
const;
712 void getGrabBagItem(css::uno::Any& rVal)
const;
714 void setGrabBagItem(
const css::uno::Any& rVal);
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,
737 SAL_DLLPRIVATE
void NotifyModifyListeners_Impl()
const;
739 SAL_DLLPRIVATE
void loadCmisProperties();
749 std::shared_ptr<IMPL_SfxBaseModel_DataContainer>
m_pData;
std::shared_ptr< IMPL_SfxBaseModel_DataContainer > m_pData
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::document::XEventListener > &xListener) override
const bool m_bSupportEmbeddedScripts
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::document::XEventListener > &xListener) override
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
const bool m_bSupportDocRecovery
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
a class which, in its dtor, cleans up various objects (well, at the moment only the frame) collected ...
SVT_DLLPUBLIC bool IsInitialized()
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString getIdentifier(css::uno::Reference< css::deployment::XPackage > const &package)
std::u16string_view getTitle(std::u16string_view aPath)
::cppu::WeakImplHelper< css::container::XChild, css::document::XDocumentPropertiesSupplier, css::document::XCmisDocument, css::rdf::XDocumentMetadataAccess, css::document::XDocumentRecovery2, css::document::XUndoManagerSupplier, css::document::XShapeEventBroadcaster, css::document::XDocumentEventBroadcaster, css::lang::XEventListener, css::document::XEventsSupplier, css::document::XEmbeddedScripts, css::document::XScriptInvocationContext, css::frame::XModel3, css::util::XModifiable2, css::view::XPrintable, css::view::XPrintJobBroadcaster, css::frame::XStorable2, css::frame::XLoadable, css::script::XStarBasicAccess, css::document::XViewDataSupplier, css::util::XCloseable, css::datatransfer::XTransferable, css::document::XDocumentSubStorageSupplier, css::document::XStorageBasedDocument, css::script::provider::XScriptProviderSupplier, css::ui::XUIConfigurationManagerSupplier, css::embed::XVisualObject, css::lang::XUnoTunnel, css::frame::XModule, css::frame::XTitle, css::frame::XTitleChangeBroadcaster, css::frame::XUntitledNumbers > SfxBaseModel_Base