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
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"
44 namespace svtools
{ class AsynchronLink
; }
46 //====================================================================
48 DBG_NAMEEX(SfxObjectShell
)
59 class SfxToolBoxConfig
;
60 class SfxBasicManagerHolder
;
62 struct SfxObjectShell_Impl
: public ::sfx2::IMacroDocumentAccess
64 ::comphelper::EmbeddedObjectContainer
* mpObjectContainer
;
65 SfxBasicManagerHolder
*
67 SfxObjectShell
& rDocShell
;
68 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
70 ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>
72 com::sun::star::uno::Sequence
< rtl::OUString
> xEventNames
;
73 ::sfx2::DocumentMacroMode
75 SfxProgress
* pProgress
;
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
89 bIsAbortingImport
:1, // Importvorgang soll abgebrochen werden.
90 bImportDone
: 1, //Import schon fertig? Fuer AutoReload von Docs.
92 bPreparedForClose
: 1,
93 bWaitingForPicklist
: 1,// Muss noch in die Pickliste
96 bIsPrintJobCancelable
:1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
100 bSignatureErrorIsShown
:1,
101 bModelInitialized
:1, // whether the related model is initialized
103 m_bMacroSignBroken
:1, // whether the macro signature was explicitly broken
104 m_bNoBasicCapabilities
:1,
105 m_bDocRecoverySupport
:1,
106 bQueryLoadTemplate
: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
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
;
122 sal_Bool bRunningMacro
;
123 sal_Bool bReloadAvailable
;
124 sal_uInt16 nAutoLoadLocks
;
126 SfxObjectShellFlags eFlags
;
127 sal_Bool bReadOnlyUI
;
128 SvRefBaseRef xHeaderAttributes
;
129 sal_Bool bHiddenLockedByAPI
;
130 ::rtl::Reference
< SfxBaseModel
>
132 sal_uInt16 nStyleFilter
;
135 sal_Bool m_bEnableSetModified
;
136 sal_Bool m_bIsModified
;
138 Rectangle m_aVisArea
;
141 sal_Bool m_bCreateTempStor
;
142 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
> m_xDocStorage
;
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;