Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
20 : #define INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
21 :
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>
28 :
29 : #include <unotools/securityoptions.hxx>
30 : #include <sfx2/objsh.hxx>
31 : #include <sfx2/docmacromode.hxx>
32 : #include "bitset.hxx"
33 :
34 : namespace svtools { class AsynchronLink; }
35 :
36 : class SfxViewFrame;
37 0 : struct MarkData_Impl
38 : {
39 : OUString aMark;
40 : OUString aUserData;
41 : SfxViewFrame* pFrame;
42 : };
43 :
44 : class SfxBasicManagerHolder;
45 :
46 : struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
47 : {
48 : ::comphelper::EmbeddedObjectContainer* mpObjectContainer;
49 : SfxBasicManagerHolder*
50 : pBasicManager;
51 : SfxObjectShell& rDocShell;
52 : ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
53 : xBasicLibraries;
54 : ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
55 : xDialogLibraries;
56 : com::sun::star::uno::Sequence < OUString > xEventNames;
57 : ::sfx2::DocumentMacroMode
58 : aMacroMode;
59 : SfxProgress* pProgress;
60 : OUString aTitle;
61 : OUString aTempName;
62 : DateTime nTime;
63 : sal_uInt16 nVisualDocumentNumber;
64 : sal_Int16 nDocumentSignatureState;
65 : sal_Int16 nScriptingSignatureState;
66 : bool bInList:1, // if reachable by First/Next
67 : bClosing:1, // sal_True while Close(), to prevent recurrences Notification
68 : bIsSaving:1,
69 : bPasswd:1,
70 : bIsNamedVisible:1,
71 : bIsTemplate:1,
72 : bIsAbortingImport:1, // Import operation should be canceled.
73 : bImportDone : 1, // Import finished already? For auto reload of Docs.
74 : bInPrepareClose : 1,
75 : bPreparedForClose : 1,
76 : bForbidReload : 1,
77 : bBasicInitialized :1,
78 : bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
79 : bOwnsStorage:1,
80 : bNoBaseURL:1,
81 : bInitialized:1,
82 : bSignatureErrorIsShown:1,
83 : bModelInitialized:1, // whether the related model is initialized
84 : bPreserveVersions:1,
85 : m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
86 : m_bNoBasicCapabilities:1,
87 : m_bDocRecoverySupport:1,
88 : bQueryLoadTemplate:1,
89 : bLoadReadonly:1,
90 : bUseUserData:1,
91 : bSaveVersionOnClose:1,
92 : m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
93 : m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file
94 : m_bConfigOptionsChecked:1; // whether or not the user options are checked after the Options dialog is closed.
95 :
96 : IndexBitSet aBitSet;
97 : sal_uInt32 lErr;
98 : sal_uInt16 nEventId; // If Open/Create as to be sent
99 : // before Activate
100 : AutoReloadTimer_Impl *pReloadTimer;
101 : MarkData_Impl* pMarkData;
102 : sal_uInt16 nLoadedFlags;
103 : sal_uInt16 nFlagsInProgress;
104 : bool bModalMode;
105 : bool bRunningMacro;
106 : bool bReloadAvailable;
107 : sal_uInt16 nAutoLoadLocks;
108 : SfxModule* pModule;
109 : SfxObjectShellFlags eFlags;
110 : bool bReadOnlyUI;
111 : SvRefBaseRef xHeaderAttributes;
112 : ::rtl::Reference< SfxBaseModel >
113 : pBaseModel;
114 : sal_uInt16 nStyleFilter;
115 : bool bDisposing;
116 :
117 : bool m_bEnableSetModified;
118 : bool m_bIsModified;
119 :
120 : Rectangle m_aVisArea;
121 : MapUnit m_nMapUnit;
122 :
123 : bool m_bCreateTempStor;
124 : ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
125 :
126 : bool m_bIsInit;
127 :
128 : OUString m_aSharedFileURL;
129 :
130 : ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
131 :
132 : bool m_bIncomplEncrWarnShown;
133 :
134 : // TODO/LATER: m_aModifyPasswordInfo should completely replace m_nModifyPasswordHash in future
135 : sal_uInt32 m_nModifyPasswordHash;
136 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aModifyPasswordInfo;
137 : bool m_bModifyPasswordEntered;
138 :
139 : SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
140 : virtual ~SfxObjectShell_Impl();
141 :
142 : // IMacroDocumentAccess overridables
143 : virtual sal_Int16 getCurrentMacroExecMode() const SAL_OVERRIDE;
144 : virtual bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ) SAL_OVERRIDE;
145 : virtual OUString getDocumentLocation() const SAL_OVERRIDE;
146 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getZipStorageToSign() SAL_OVERRIDE;
147 : virtual bool documentStorageHasMacros() const SAL_OVERRIDE;
148 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const SAL_OVERRIDE;
149 : virtual sal_Int16 getScriptingSignatureState() SAL_OVERRIDE;
150 :
151 : virtual bool hasTrustedScriptingSignature( bool bAllowUIToAddAuthor ) SAL_OVERRIDE;
152 : virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const SAL_OVERRIDE;
153 : };
154 :
155 : #endif
156 :
157 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|