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