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 .
19 #ifndef INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
20 #define INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
22 #include <com/sun/star/frame/XModel.hpp>
23 #include <com/sun/star/uno/Sequence.hxx>
24 #include <rtl/ustring.hxx>
25 #include <rtl/ref.hxx>
26 #include <com/sun/star/logging/XSimpleLogRing.hpp>
27 #include <tools/datetime.hxx>
29 #include <unotools/securityoptions.hxx>
30 #include <sfx2/objsh.hxx>
31 #include <sfx2/docmacromode.hxx>
34 #include <appbaslib.hxx>
36 namespace svtools
{ class AsynchronLink
; }
46 class SfxBasicManagerHolder
;
48 struct SfxObjectShell_Impl
: public ::sfx2::IMacroDocumentAccess
50 ::comphelper::EmbeddedObjectContainer
* mpObjectContainer
;
51 SfxBasicManagerHolder aBasicManager
;
52 SfxObjectShell
& rDocShell
;
53 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
55 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
57 com::sun::star::uno::Sequence
< OUString
> xEventNames
;
58 ::sfx2::DocumentMacroMode
60 SfxProgress
* pProgress
;
64 sal_uInt16 nVisualDocumentNumber
;
65 SignatureState nDocumentSignatureState
;
66 SignatureState nScriptingSignatureState
;
67 bool bInList
:1, // if reachable by First/Next
68 bClosing
:1, // sal_True while Close(), to prevent recurrences Notification
73 bIsAbortingImport
:1, // Import operation should be canceled.
74 bImportDone
: 1, // Import finished already? For auto reload of Docs.
76 bPreparedForClose
: 1,
79 bIsPrintJobCancelable
:1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
83 bSignatureErrorIsShown
:1,
84 bModelInitialized
:1, // whether the related model is initialized
86 m_bMacroSignBroken
:1, // whether the macro signature was explicitly broken
87 m_bNoBasicCapabilities
:1,
88 m_bDocRecoverySupport
:1,
92 bSaveVersionOnClose
:1,
93 m_bSharedXMLFlag
:1, // whether the flag should be stored in xml file
94 m_bAllowShareControlFileClean
:1, // whether the flag should be stored in xml file
95 m_bConfigOptionsChecked
:1; // whether or not the user options are checked after the Options dialog is closed.
99 sal_uInt16 nEventId
; // If Open/Create as to be sent
101 AutoReloadTimer_Impl
*pReloadTimer
;
102 MarkData_Impl
* pMarkData
;
103 SfxLoadedFlags nLoadedFlags
;
104 SfxLoadedFlags nFlagsInProgress
;
107 bool bReloadAvailable
;
108 sal_uInt16 nAutoLoadLocks
;
110 SfxObjectShellFlags eFlags
;
112 tools::SvRef
<SvRefBase
> xHeaderAttributes
;
113 ::rtl::Reference
< SfxBaseModel
>
115 sal_uInt16 nStyleFilter
;
118 bool m_bEnableSetModified
;
121 Rectangle m_aVisArea
;
124 bool m_bCreateTempStor
;
125 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> m_xDocStorage
;
129 OUString m_aSharedFileURL
;
131 ::com::sun::star::uno::Reference
< ::com::sun::star::logging::XSimpleLogRing
> m_xLogRing
;
133 bool m_bIncomplEncrWarnShown
;
135 // TODO/LATER: m_aModifyPasswordInfo should completely replace m_nModifyPasswordHash in future
136 sal_uInt32 m_nModifyPasswordHash
;
137 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> m_aModifyPasswordInfo
;
138 bool m_bModifyPasswordEntered
;
140 SfxObjectShell_Impl( SfxObjectShell
& _rDocShell
);
141 virtual ~SfxObjectShell_Impl();
143 // IMacroDocumentAccess overridables
144 virtual sal_Int16
getCurrentMacroExecMode() const SAL_OVERRIDE
;
145 virtual bool setCurrentMacroExecMode( sal_uInt16 nMacroMode
) SAL_OVERRIDE
;
146 virtual OUString
getDocumentLocation() const SAL_OVERRIDE
;
147 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> getZipStorageToSign() SAL_OVERRIDE
;
148 virtual bool documentStorageHasMacros() const SAL_OVERRIDE
;
149 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::document::XEmbeddedScripts
> getEmbeddedDocumentScripts() const SAL_OVERRIDE
;
150 virtual SignatureState
getScriptingSignatureState() SAL_OVERRIDE
;
152 virtual bool hasTrustedScriptingSignature( bool bAllowUIToAddAuthor
) SAL_OVERRIDE
;
153 virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference
< ::com::sun::star::task::XInteractionHandler
>& _rxInteraction
) const SAL_OVERRIDE
;
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */