merge the formfield patch from ooo-build
[ooovba.git] / sfx2 / source / inc / objshimp.hxx
blob8ee3b79a6f3da14dd36b01830b1d19644db78703
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: objshimp.hxx,v $
10 * $Revision: 1.46 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFX_OBJSHIMP_HXX
31 #define _SFX_OBJSHIMP_HXX
33 //#include <hash_map>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/uno/Sequence.hxx>
37 #include <rtl/ustring.hxx>
38 #include <com/sun/star/logging/XSimpleLogRing.hpp>
39 #include <tools/datetime.hxx>
41 #include <svtools/securityoptions.hxx>
42 #include <sfx2/objsh.hxx>
43 #include "sfx2/docmacromode.hxx"
44 #include "bitset.hxx"
46 namespace svtools { class AsynchronLink; }
48 //====================================================================
50 DBG_NAMEEX(SfxObjectShell)
52 class SfxViewFrame;
53 struct MarkData_Impl
55 String aMark;
56 String aUserData;
57 SfxViewFrame* pFrame;
60 class SfxFrame;
61 class SfxToolBoxConfig;
62 class SfxAcceleratorManager;
63 class SfxBasicManagerHolder;
65 struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
67 ::comphelper::EmbeddedObjectContainer* mpObjectContainer;
68 SfxAcceleratorManager* pAccMgr;
69 SfxConfigManager* pCfgMgr;
70 SfxBasicManagerHolder*
71 pBasicManager;
72 SfxObjectShell& rDocShell;
73 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
74 xBasicLibraries;
75 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >
76 xDialogLibraries;
77 com::sun::star::uno::Sequence < rtl::OUString > xEventNames;
78 ::sfx2::DocumentMacroMode
79 aMacroMode;
80 SfxProgress* pProgress;
81 String aTitle;
82 String aTempName;
83 DateTime nTime;
84 sal_uInt16 nVisualDocumentNumber;
85 sal_Int16 nDocumentSignatureState;
86 sal_Int16 nScriptingSignatureState;
87 sal_Bool bTemplateConfig:1,
88 bInList:1, // ob per First/Next erreichbar
89 bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
90 bSetInPlaceObj:1, // sal_True, falls bereits versucht wurde pInPlaceObject zu casten
91 bIsSaving:1,
92 bPasswd:1,
93 bIsTmp:1,
94 bIsNamedVisible:1,
95 bIsTemplate:1,
96 bIsAbortingImport:1, // Importvorgang soll abgebrochen werden.
97 bImportDone : 1, //Import schon fertig? Fuer AutoReload von Docs.
98 bInPrepareClose : 1,
99 bPreparedForClose : 1,
100 bWaitingForPicklist : 1,// Muss noch in die Pickliste
101 bModuleSearched : 1,
102 bIsHelpObjSh : 1,
103 bForbidCaching : 1,
104 bForbidReload : 1,
105 bSupportsEventMacros: 1,
106 bLoadingWindows: 1,
107 bBasicInitialized :1,
108 //bHidden :1, // indicates a hidden view shell
109 bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
110 bOwnsStorage:1,
111 bNoBaseURL:1,
112 bInitialized:1,
113 bSignatureErrorIsShown:1,
114 bModelInitialized:1, // whether the related model is initialized
115 bPreserveVersions:1,
116 m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
117 m_bNoBasicCapabilities:1,
118 bQueryLoadTemplate:1,
119 bLoadReadonly:1,
120 bUseUserData:1,
121 bSaveVersionOnClose:1,
122 m_bSharedXMLFlag:1, // whether the flag should be stored in xml file
123 m_bAllowShareControlFileClean:1; // whether the flag should be stored in xml file
125 String aNewName; // Der Name, unter dem das Doc gespeichert
126 // werden soll
127 IndexBitSet aBitSet;
128 sal_uInt32 lErr;
129 sal_uInt16 nEventId; // falls vor Activate noch ein
130 // Open/Create gesendet werden mu/s
131 sal_Bool bDoNotTouchDocInfo;
133 AutoReloadTimer_Impl *pReloadTimer;
134 MarkData_Impl* pMarkData;
135 sal_uInt16 nLoadedFlags;
136 sal_uInt16 nFlagsInProgress;
137 String aMark;
138 Size aViewSize; // wird leider vom Writer beim
139 sal_Bool bInFrame; // HTML-Import gebraucht
140 sal_Bool bModalMode;
141 sal_Bool bRunningMacro;
142 sal_Bool bReloadAvailable;
143 sal_uInt16 nAutoLoadLocks;
144 SfxModule* pModule;
145 SfxFrame* pFrame;
146 SfxToolBoxConfig* pTbxConfig;
147 SfxObjectShellFlags eFlags;
148 svtools::AsynchronLink* pCloser;
149 String aBaseURL;
150 sal_Bool bReadOnlyUI;
151 SvRefBaseRef xHeaderAttributes;
152 sal_Bool bHiddenLockedByAPI;
153 sal_Bool bInCloseEvent;
154 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel;
155 sal_uInt16 nStyleFilter;
156 sal_Bool bDisposing;
158 sal_Bool m_bEnableSetModified;
159 sal_Bool m_bIsModified;
161 Rectangle m_aVisArea;
162 MapUnit m_nMapUnit;
164 sal_Bool m_bCreateTempStor;
165 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
167 ::com::sun::star::uno::Reference<
168 ::com::sun::star::util::XModifyListener > m_xDocInfoListener;
170 sal_Bool m_bIsInit;
172 ::rtl::OUString m_aSharedFileURL;
174 ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
176 sal_Bool m_bIncomplEncrWarnShown;
179 SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
180 virtual ~SfxObjectShell_Impl();
182 static sal_Bool NeedsOfficeUpdateDialog();
184 // IMacroDocumentAccess overridables
185 virtual sal_Int16 getCurrentMacroExecMode() const;
186 virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode );
187 virtual ::rtl::OUString getDocumentLocation() const;
188 virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getZipStorageToSign();
189 virtual sal_Bool documentStorageHasMacros() const;
190 virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const;
191 virtual sal_Int16 getScriptingSignatureState();
193 virtual sal_Bool hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor );
194 virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const;
197 #endif