merged tag ooo/DEV300_m102
[LibreOffice.git] / sfx2 / source / inc / objshimp.hxx
blobb5087fb462942c24a58508d39b4ffad9287dc995
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _SFX_OBJSHIMP_HXX
28 #define _SFX_OBJSHIMP_HXX
30 //#include <hash_map>
32 #include <com/sun/star/frame/XModel.hpp>
33 #include <com/sun/star/uno/Sequence.hxx>
34 #include <rtl/ustring.hxx>
35 #include <rtl/ref.hxx>
36 #include <com/sun/star/logging/XSimpleLogRing.hpp>
37 #include <tools/datetime.hxx>
39 #include <unotools/securityoptions.hxx>
40 #include <sfx2/objsh.hxx>
41 #include "sfx2/docmacromode.hxx"
42 #include "bitset.hxx"
44 namespace svtools { class AsynchronLink; }
46 //====================================================================
48 DBG_NAMEEX(SfxObjectShell)
50 class SfxViewFrame;
51 struct MarkData_Impl
53 String aMark;
54 String aUserData;
55 SfxViewFrame* pFrame;
58 class SfxFrame;
59 class SfxToolBoxConfig;
60 class SfxBasicManagerHolder;
62 struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
64 ::comphelper::EmbeddedObjectContainer* mpObjectContainer;
65 SfxBasicManagerHolder*
66 pBasicManager;
67 SfxObjectShell& rDocShell;
68 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
69 xBasicLibraries;
70 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
71 xDialogLibraries;
72 com::sun::star::uno::Sequence < rtl::OUString > xEventNames;
73 ::sfx2::DocumentMacroMode
74 aMacroMode;
75 SfxProgress* pProgress;
76 String aTitle;
77 String aTempName;
78 DateTime nTime;
79 sal_uInt16 nVisualDocumentNumber;
80 sal_Int16 nDocumentSignatureState;
81 sal_Int16 nScriptingSignatureState;
82 sal_Bool bInList:1, // ob per First/Next erreichbar
83 bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
84 bIsSaving:1,
85 bPasswd:1,
86 bIsTmp:1,
87 bIsNamedVisible:1,
88 bIsTemplate:1,
89 bIsAbortingImport:1, // Importvorgang soll abgebrochen werden.
90 bImportDone : 1, //Import schon fertig? Fuer AutoReload von Docs.
91 bInPrepareClose : 1,
92 bPreparedForClose : 1,
93 bWaitingForPicklist : 1,// Muss noch in die Pickliste
94 bForbidReload : 1,
95 bBasicInitialized :1,
96 bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
97 bOwnsStorage:1,
98 bNoBaseURL:1,
99 bInitialized:1,
100 bSignatureErrorIsShown:1,
101 bModelInitialized:1, // whether the related model is initialized
102 bPreserveVersions:1,
103 m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
104 m_bNoBasicCapabilities:1,
105 m_bDocRecoverySupport:1,
106 bQueryLoadTemplate:1,
107 bLoadReadonly:1,
108 bUseUserData:1,
109 bSaveVersionOnClose:1,
110 m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
111 m_bAllowShareControlFileClean:1; // whether the flag should be stored in xml file
113 IndexBitSet aBitSet;
114 sal_uInt32 lErr;
115 sal_uInt16 nEventId; // falls vor Activate noch ein
116 // Open/Create gesendet werden mu/s
117 AutoReloadTimer_Impl *pReloadTimer;
118 MarkData_Impl* pMarkData;
119 sal_uInt16 nLoadedFlags;
120 sal_uInt16 nFlagsInProgress;
121 sal_Bool bModalMode;
122 sal_Bool bRunningMacro;
123 sal_Bool bReloadAvailable;
124 sal_uInt16 nAutoLoadLocks;
125 SfxModule* pModule;
126 SfxObjectShellFlags eFlags;
127 sal_Bool bReadOnlyUI;
128 SvRefBaseRef xHeaderAttributes;
129 sal_Bool bHiddenLockedByAPI;
130 ::rtl::Reference< SfxBaseModel >
131 pBaseModel;
132 sal_uInt16 nStyleFilter;
133 sal_Bool bDisposing;
135 sal_Bool m_bEnableSetModified;
136 sal_Bool m_bIsModified;
138 Rectangle m_aVisArea;
139 MapUnit m_nMapUnit;
141 sal_Bool m_bCreateTempStor;
142 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
144 sal_Bool m_bIsInit;
146 ::rtl::OUString m_aSharedFileURL;
148 ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
150 sal_Bool m_bIncomplEncrWarnShown;
152 // TODO/LATER: m_aModifyPasswordInfo should completely replace m_nModifyPasswordHash in future
153 sal_uInt32 m_nModifyPasswordHash;
154 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aModifyPasswordInfo;
155 sal_Bool m_bModifyPasswordEntered;
157 SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
158 virtual ~SfxObjectShell_Impl();
160 static sal_Bool NeedsOfficeUpdateDialog();
162 // IMacroDocumentAccess overridables
163 virtual sal_Int16 getCurrentMacroExecMode() const;
164 virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode );
165 virtual ::rtl::OUString getDocumentLocation() const;
166 virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getZipStorageToSign();
167 virtual sal_Bool documentStorageHasMacros() const;
168 virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const;
169 virtual sal_Int16 getScriptingSignatureState();
171 virtual sal_Bool hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor );
172 virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const;
175 #endif