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 $
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
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"
46 namespace svtools
{ class AsynchronLink
; }
48 //====================================================================
50 DBG_NAMEEX(SfxObjectShell
)
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
*
72 SfxObjectShell
& rDocShell
;
73 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
75 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
77 com::sun::star::uno::Sequence
< rtl::OUString
> xEventNames
;
78 ::sfx2::DocumentMacroMode
80 SfxProgress
* pProgress
;
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
96 bIsAbortingImport
:1, // Importvorgang soll abgebrochen werden.
97 bImportDone
: 1, //Import schon fertig? Fuer AutoReload von Docs.
99 bPreparedForClose
: 1,
100 bWaitingForPicklist
: 1,// Muss noch in die Pickliste
105 bSupportsEventMacros
: 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!
113 bSignatureErrorIsShown
:1,
114 bModelInitialized
:1, // whether the related model is initialized
116 m_bMacroSignBroken
:1, // whether the macro signature was explicitly broken
117 m_bNoBasicCapabilities
:1,
118 bQueryLoadTemplate
: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
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
;
138 Size aViewSize
; // wird leider vom Writer beim
139 sal_Bool bInFrame
; // HTML-Import gebraucht
141 sal_Bool bRunningMacro
;
142 sal_Bool bReloadAvailable
;
143 sal_uInt16 nAutoLoadLocks
;
146 SfxToolBoxConfig
* pTbxConfig
;
147 SfxObjectShellFlags eFlags
;
148 svtools::AsynchronLink
* pCloser
;
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
;
158 sal_Bool m_bEnableSetModified
;
159 sal_Bool m_bIsModified
;
161 Rectangle m_aVisArea
;
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
;
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;