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 _SFX_OBJSHIMP_HXX
20 #define _SFX_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 namespace svtools
{ class AsynchronLink
; }
36 //====================================================================
38 DBG_NAMEEX(SfxObjectShell
)
48 class SfxBasicManagerHolder
;
50 struct SfxObjectShell_Impl
: public ::sfx2::IMacroDocumentAccess
52 ::comphelper::EmbeddedObjectContainer
* mpObjectContainer
;
53 SfxBasicManagerHolder
*
55 SfxObjectShell
& rDocShell
;
56 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
58 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
60 com::sun::star::uno::Sequence
< OUString
> xEventNames
;
61 ::sfx2::DocumentMacroMode
63 SfxProgress
* pProgress
;
67 sal_uInt16 nVisualDocumentNumber
;
68 sal_Int16 nDocumentSignatureState
;
69 sal_Int16 nScriptingSignatureState
;
70 sal_Bool bInList
:1, // if reachable by First/Next
71 bClosing
:1, // sal_True while Close(), to prevent recurrences Notification
77 bIsAbortingImport
:1, // Import operation should be canceled.
78 bImportDone
: 1, // Import finished already? For auto reload of Docs.
80 bPreparedForClose
: 1,
83 bIsPrintJobCancelable
:1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
87 bSignatureErrorIsShown
:1,
88 bModelInitialized
:1, // whether the related model is initialized
90 m_bMacroSignBroken
:1, // whether the macro signature was explicitly broken
91 m_bNoBasicCapabilities
:1,
92 m_bDocRecoverySupport
:1,
96 bSaveVersionOnClose
:1,
97 m_bSharedXMLFlag
:1, // whether the flag should be stored in xml file
98 m_bAllowShareControlFileClean
:1, // whether the flag should be stored in xml file
99 m_bConfigOptionsChecked
:1; // whether or not the user options are checked after the Options dialog is closed.
103 sal_uInt16 nEventId
; // If Open/Create as to be sent
105 AutoReloadTimer_Impl
*pReloadTimer
;
106 MarkData_Impl
* pMarkData
;
107 sal_uInt16 nLoadedFlags
;
108 sal_uInt16 nFlagsInProgress
;
110 sal_Bool bRunningMacro
;
111 sal_Bool bReloadAvailable
;
112 sal_uInt16 nAutoLoadLocks
;
114 SfxObjectShellFlags eFlags
;
115 sal_Bool bReadOnlyUI
;
116 SvRefBaseRef xHeaderAttributes
;
117 ::rtl::Reference
< SfxBaseModel
>
119 sal_uInt16 nStyleFilter
;
122 sal_Bool m_bEnableSetModified
;
123 sal_Bool m_bIsModified
;
125 Rectangle m_aVisArea
;
128 sal_Bool m_bCreateTempStor
;
129 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> m_xDocStorage
;
133 OUString m_aSharedFileURL
;
135 ::com::sun::star::uno::Reference
< ::com::sun::star::logging::XSimpleLogRing
> m_xLogRing
;
137 sal_Bool m_bIncomplEncrWarnShown
;
139 // TODO/LATER: m_aModifyPasswordInfo should completely replace m_nModifyPasswordHash in future
140 sal_uInt32 m_nModifyPasswordHash
;
141 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> m_aModifyPasswordInfo
;
142 sal_Bool m_bModifyPasswordEntered
;
144 SfxObjectShell_Impl( SfxObjectShell
& _rDocShell
);
145 virtual ~SfxObjectShell_Impl();
147 // IMacroDocumentAccess overridables
148 virtual sal_Int16
getCurrentMacroExecMode() const;
149 virtual sal_Bool
setCurrentMacroExecMode( sal_uInt16 nMacroMode
);
150 virtual OUString
getDocumentLocation() const;
151 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> getZipStorageToSign();
152 virtual sal_Bool
documentStorageHasMacros() const;
153 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::document::XEmbeddedScripts
> getEmbeddedDocumentScripts() const;
154 virtual sal_Int16
getScriptingSignatureState();
156 virtual sal_Bool
hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor
);
157 virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference
< ::com::sun::star::task::XInteractionHandler
>& _rxInteraction
) const;
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */