Bump version to 4.1-6
[LibreOffice.git] / sfx2 / source / inc / objshimp.hxx
blob251d24222c24d7da6ed0ac40ab52c2221d5b7e58
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 .
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"
32 #include "bitset.hxx"
34 namespace svtools { class AsynchronLink; }
36 //====================================================================
38 DBG_NAMEEX(SfxObjectShell)
40 class SfxViewFrame;
41 struct MarkData_Impl
43 String aMark;
44 String aUserData;
45 SfxViewFrame* pFrame;
48 class SfxBasicManagerHolder;
50 struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
52 ::comphelper::EmbeddedObjectContainer* mpObjectContainer;
53 SfxBasicManagerHolder*
54 pBasicManager;
55 SfxObjectShell& rDocShell;
56 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
57 xBasicLibraries;
58 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
59 xDialogLibraries;
60 com::sun::star::uno::Sequence < OUString > xEventNames;
61 ::sfx2::DocumentMacroMode
62 aMacroMode;
63 SfxProgress* pProgress;
64 String aTitle;
65 String aTempName;
66 DateTime nTime;
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
72 bIsSaving:1,
73 bPasswd:1,
74 bIsTmp:1,
75 bIsNamedVisible:1,
76 bIsTemplate:1,
77 bIsAbortingImport:1, // Import operation should be canceled.
78 bImportDone : 1, // Import finished already? For auto reload of Docs.
79 bInPrepareClose : 1,
80 bPreparedForClose : 1,
81 bForbidReload : 1,
82 bBasicInitialized :1,
83 bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
84 bOwnsStorage:1,
85 bNoBaseURL:1,
86 bInitialized:1,
87 bSignatureErrorIsShown:1,
88 bModelInitialized:1, // whether the related model is initialized
89 bPreserveVersions:1,
90 m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
91 m_bNoBasicCapabilities:1,
92 m_bDocRecoverySupport:1,
93 bQueryLoadTemplate:1,
94 bLoadReadonly:1,
95 bUseUserData: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.
101 IndexBitSet aBitSet;
102 sal_uInt32 lErr;
103 sal_uInt16 nEventId; // If Open/Create as to be sent
104 // before Activate
105 AutoReloadTimer_Impl *pReloadTimer;
106 MarkData_Impl* pMarkData;
107 sal_uInt16 nLoadedFlags;
108 sal_uInt16 nFlagsInProgress;
109 sal_Bool bModalMode;
110 sal_Bool bRunningMacro;
111 sal_Bool bReloadAvailable;
112 sal_uInt16 nAutoLoadLocks;
113 SfxModule* pModule;
114 SfxObjectShellFlags eFlags;
115 sal_Bool bReadOnlyUI;
116 SvRefBaseRef xHeaderAttributes;
117 ::rtl::Reference< SfxBaseModel >
118 pBaseModel;
119 sal_uInt16 nStyleFilter;
120 sal_Bool bDisposing;
122 sal_Bool m_bEnableSetModified;
123 sal_Bool m_bIsModified;
125 Rectangle m_aVisArea;
126 MapUnit m_nMapUnit;
128 sal_Bool m_bCreateTempStor;
129 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
131 sal_Bool m_bIsInit;
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;
160 #endif
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */