1353d8f4dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3353d8f4dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4353d8f4dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5353d8f4dSAndrew Rist * distributed with this work for additional information 6353d8f4dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7353d8f4dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8353d8f4dSAndrew Rist * "License"); you may not use this file except in compliance 9353d8f4dSAndrew Rist * with the License. You may obtain a copy of the License at 10353d8f4dSAndrew Rist * 11353d8f4dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12353d8f4dSAndrew Rist * 13353d8f4dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14353d8f4dSAndrew Rist * software distributed under the License is distributed on an 15353d8f4dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16353d8f4dSAndrew Rist * KIND, either express or implied. See the License for the 17353d8f4dSAndrew Rist * specific language governing permissions and limitations 18353d8f4dSAndrew Rist * under the License. 19353d8f4dSAndrew Rist * 20353d8f4dSAndrew Rist *************************************************************/ 21353d8f4dSAndrew Rist 22353d8f4dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SFX_OBJSH_HXX 24cdf0e10cSrcweir #define _SFX_OBJSH_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "sal/config.h" 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "tools/solar.h" 29cdf0e10cSrcweir #include "sfx2/dllapi.h" 30cdf0e10cSrcweir #include "sal/types.h" 31cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp> 32cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h> 33cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 34cdf0e10cSrcweir #include <com/sun/star/script/XLibraryContainer.hpp> 35cdf0e10cSrcweir #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> 36cdf0e10cSrcweir #include <com/sun/star/embed/XStorage.hpp> 37cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp> 38cdf0e10cSrcweir #include <com/sun/star/security/DocumentSignatureInformation.hpp> 39cdf0e10cSrcweir #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> 40cdf0e10cSrcweir #include <com/sun/star/task/XInteractionHandler.hpp> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 43cdf0e10cSrcweir 44cdf0e10cSrcweir #include <boost/shared_ptr.hpp> 45cdf0e10cSrcweir 46cdf0e10cSrcweir 47cdf0e10cSrcweir //________________________________________________________________________________________________________________ 48cdf0e10cSrcweir // include something else 49cdf0e10cSrcweir //________________________________________________________________________________________________________________ 50cdf0e10cSrcweir 51cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 52cdf0e10cSrcweir #include <vcl/timer.hxx> 53cdf0e10cSrcweir //#endif 54cdf0e10cSrcweir #include <svl/poolitem.hxx> 55cdf0e10cSrcweir #include <vcl/timer.hxx> 56cdf0e10cSrcweir #include <vcl/bitmap.hxx> 57cdf0e10cSrcweir #include <sot/storage.hxx> 58cdf0e10cSrcweir #include <rsc/rscsfx.hxx> 59cdf0e10cSrcweir 60cdf0e10cSrcweir #include <sfx2/XmlIdRegistry.hxx> 61cdf0e10cSrcweir #include <sfx2/shell.hxx> 62cdf0e10cSrcweir #include <comphelper/embeddedobjectcontainer.hxx> 63cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp> 64cdf0e10cSrcweir 65cdf0e10cSrcweir class SbxValue; 66cdf0e10cSrcweir class SvxMacro; 67cdf0e10cSrcweir class SbxArray; 68cdf0e10cSrcweir class BasicManager; 69cdf0e10cSrcweir class SfxMedium; 70cdf0e10cSrcweir class SfxObjectFactory; 71cdf0e10cSrcweir class SfxDocumentInfoDialog; 72cdf0e10cSrcweir class SfxStyleSheetBasePool; 73cdf0e10cSrcweir class INote; 74cdf0e10cSrcweir class SfxStyleSheetPool; 75cdf0e10cSrcweir class SfxFrame; 76cdf0e10cSrcweir class SbMethod; 77cdf0e10cSrcweir class SfxConfigManager; 78cdf0e10cSrcweir class StarBASIC; 79cdf0e10cSrcweir class Printer; 80cdf0e10cSrcweir class SvKeyValueIterator; 81cdf0e10cSrcweir class SfxBaseModel; 82cdf0e10cSrcweir class SfxModule; 83cdf0e10cSrcweir class SvPseudoObject; 84cdf0e10cSrcweir class SvData; 85cdf0e10cSrcweir class SfxProgress; 86cdf0e10cSrcweir class GDIMetaFile; 87cdf0e10cSrcweir class Bitmap; 88cdf0e10cSrcweir class INetURLObject; 89cdf0e10cSrcweir class IndexBitSet; 90cdf0e10cSrcweir class JobSetup; 91cdf0e10cSrcweir class Size; 92cdf0e10cSrcweir class Point; 93cdf0e10cSrcweir 94cdf0e10cSrcweir // From embobj.hxx 95cdf0e10cSrcweir #define ASPECT_CONTENT 1 96cdf0e10cSrcweir #define ASPECT_THUMBNAIL 2 /* 120 * 120, 6 Farben DIB in MetaFile */ 97cdf0e10cSrcweir #define ASPECT_ICON 4 98cdf0e10cSrcweir #define ASPECT_DOCPRINT 8 99cdf0e10cSrcweir #define ASPECT_ALL (ASPECT_CONTENT | ASPECT_THUMBNAIL | ASPECT_ICON | ASPECT_DOCPRINT) 100cdf0e10cSrcweir 101cdf0e10cSrcweir // from pseudo.hxx; must be the same as in OLE2 102cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_SERVERRESIZE 1 103cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_NOTREPLACE 4 104cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_CANTLINKINSIDE 16 105cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_LINK 64 106cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_INSIDEOUT 128 107cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE 256 108cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_NOTRESIZEABLE 512 109cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_ALWAYSACTIVATE 1024 110cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE 2048 111cdf0e10cSrcweir #define SVOBJ_MISCSTATUS_SPECIALOBJECT 4096 112cdf0e10cSrcweir 113cdf0e10cSrcweir 114cdf0e10cSrcweir namespace sfx2 115cdf0e10cSrcweir { 116cdf0e10cSrcweir class SvLinkSource; 117cdf0e10cSrcweir } 118cdf0e10cSrcweir 119cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; } } } } 120cdf0e10cSrcweir 121cdf0e10cSrcweir namespace com { namespace sun { namespace star { 122cdf0e10cSrcweir namespace document { 123cdf0e10cSrcweir class XDocumentProperties; 124cdf0e10cSrcweir } 125cdf0e10cSrcweir } } } 126cdf0e10cSrcweir 127cdf0e10cSrcweir typedef sal_uInt32 SfxObjectShellFlags; 128cdf0e10cSrcweir #define SFXOBJECTSHELL_HASOPENDOC 0x01L 129cdf0e10cSrcweir #define SFXOBJECTSHELL_DONTREPLACE 0x02L 130cdf0e10cSrcweir #define SFXOBJECTSHELL_HASMENU 0x04L 131cdf0e10cSrcweir #define SFXOBJECTSHELL_DONTLOADFILTERS 0x08L 132cdf0e10cSrcweir #define SFXOBJECTSHELL_DONTCLOSE 0x10L 133cdf0e10cSrcweir #define SFXOBJECTSHELL_NODOCINFO 0x20L 134cdf0e10cSrcweir #define SFXOBJECTSHELL_STD_NORMAL ( SFXOBJECTSHELL_HASOPENDOC ) 135cdf0e10cSrcweir #define SFXOBJECTSHELL_STD_SPECIAL ( SFXOBJECTSHELL_DONTLOADFILTERS ) 136cdf0e10cSrcweir #define SFXOBJECTSHELL_UNDEFINED 0xf000000 137cdf0e10cSrcweir 138cdf0e10cSrcweir //-------------------------------------------------------------------- 139cdf0e10cSrcweir 140cdf0e10cSrcweir #define SFX_TITLE_TITLE 0 141cdf0e10cSrcweir #define SFX_TITLE_FILENAME 1 142cdf0e10cSrcweir #define SFX_TITLE_FULLNAME 2 143cdf0e10cSrcweir #define SFX_TITLE_APINAME 3 144cdf0e10cSrcweir #define SFX_TITLE_DETECT 4 145cdf0e10cSrcweir #define SFX_TITLE_CAPTION 5 146cdf0e10cSrcweir #define SFX_TITLE_PICKLIST 6 147cdf0e10cSrcweir #define SFX_TITLE_HISTORY 7 148cdf0e10cSrcweir #define SFX_TITLE_MAXLEN 10 // ab hier sind das L"angenbegrenzungen 149cdf0e10cSrcweir 150cdf0e10cSrcweir #define SFX_LOADED_MAINDOCUMENT 1 151cdf0e10cSrcweir #define SFX_LOADED_IMAGES 2 152cdf0e10cSrcweir #define SFX_LOADED_ALL 3 153cdf0e10cSrcweir 154cdf0e10cSrcweir //-------------------------------------------------------------------- 155cdf0e10cSrcweir 156cdf0e10cSrcweir #define HIDDENINFORMATION_RECORDEDCHANGES 0x0001 157cdf0e10cSrcweir #define HIDDENINFORMATION_NOTES 0x0002 158cdf0e10cSrcweir #define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004 159cdf0e10cSrcweir 160cdf0e10cSrcweir enum HiddenWarningFact 161cdf0e10cSrcweir { 162cdf0e10cSrcweir WhenSaving = 0, 163cdf0e10cSrcweir WhenPrinting, 164cdf0e10cSrcweir WhenSigning, 165cdf0e10cSrcweir WhenCreatingPDF 166cdf0e10cSrcweir }; 167cdf0e10cSrcweir 168cdf0e10cSrcweir //-------------------------------------------------------------------- 169cdf0e10cSrcweir 170cdf0e10cSrcweir enum SfxObjectCreateMode 171cdf0e10cSrcweir { 172cdf0e10cSrcweir SFX_CREATE_MODE_EMBEDDED, 173cdf0e10cSrcweir SFX_CREATE_MODE_STANDARD, 174cdf0e10cSrcweir SFX_CREATE_MODE_PREVIEW, 175cdf0e10cSrcweir SFX_CREATE_MODE_ORGANIZER, 176cdf0e10cSrcweir SFX_CREATE_MODE_PLUGIN, 177cdf0e10cSrcweir SFX_CREATE_MODE_INTERNAL 178cdf0e10cSrcweir }; 179cdf0e10cSrcweir 180cdf0e10cSrcweir /*==================================================================== 181cdf0e10cSrcweir 182cdf0e10cSrcweir Die Klasse SfxObjectShell ist die Basisklasse f"ur SFx-Objekte, also 183cdf0e10cSrcweir f"ur Dokumente und Teile von Dokumenten, die als selbst"andige Objekte 184cdf0e10cSrcweir in fremde Objekte integriert werden k"onnen. 185cdf0e10cSrcweir 186cdf0e10cSrcweir ----------------------------------------------------------------------*/ 187cdf0e10cSrcweir 188cdf0e10cSrcweir class SfxToolBoxConfig; 189cdf0e10cSrcweir struct TransferableObjectDescriptor; 190cdf0e10cSrcweir 191cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxObjectShell : 192cdf0e10cSrcweir public SfxShell, virtual public SotObject, 193cdf0e10cSrcweir public ::comphelper::IEmbeddedHelper, public ::sfx2::IXmlIdRegistrySupplier 194cdf0e10cSrcweir { 195cdf0e10cSrcweir friend struct ModifyBlocker_Impl; 196cdf0e10cSrcweir friend class SfxObjectShellLock; 197cdf0e10cSrcweir 198cdf0e10cSrcweir private: 199cdf0e10cSrcweir struct SfxObjectShell_Impl* pImp; // interne Daten 200cdf0e10cSrcweir 201cdf0e10cSrcweir SfxMedium * pMedium; // Beschreibung der Datei bzw. des Storage, in dem sich das Objekt befindet 202cdf0e10cSrcweir SfxStyleSheetBasePool* pStyleSheetPool; // StyleSheets 203cdf0e10cSrcweir SfxObjectCreateMode eCreateMode; // Zweck des Objekts 204cdf0e10cSrcweir sal_Bool bHasName :1, // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt 205cdf0e10cSrcweir bIsTmp :1; // temp. Storage 206cb65df5dSJürgen Schmidt sal_Bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030 20786104fa7SOliver-Rainer Wittmann 20886104fa7SOliver-Rainer Wittmann protected: 20986104fa7SOliver-Rainer Wittmann // methods called in implementation of <ImportFrom(..)> BeforeLoading(SfxMedium &,const::rtl::OUString &,const::rtl::OUString &)21086104fa7SOliver-Rainer Wittmann virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ) 21186104fa7SOliver-Rainer Wittmann { 21286104fa7SOliver-Rainer Wittmann }; 21386104fa7SOliver-Rainer Wittmann AfterLoading(SfxMedium &,const::rtl::OUString &,const::rtl::OUString &)21486104fa7SOliver-Rainer Wittmann virtual void AfterLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ) 21586104fa7SOliver-Rainer Wittmann { 21686104fa7SOliver-Rainer Wittmann }; 217cdf0e10cSrcweir 218cdf0e10cSrcweir private: 219cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 220cdf0e10cSrcweir SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference< 221cdf0e10cSrcweir ::com::sun::star::document::XDocumentProperties> & i_xDocProps); 222cdf0e10cSrcweir 223cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet ); 224cdf0e10cSrcweir 225cdf0e10cSrcweir //REMOVE sal_Bool SaveInfoAndConfig_Impl( SvStorageRef pNewStg ); 226cdf0e10cSrcweir 227cdf0e10cSrcweir //#endif 228cdf0e10cSrcweir 229cdf0e10cSrcweir protected: 230cdf0e10cSrcweir SfxObjectShell(SfxObjectCreateMode); 231cdf0e10cSrcweir SfxObjectShell( const sal_uInt64 i_nCreationFlags ); // see sfxmodelfactory.hxx 232cdf0e10cSrcweir virtual ~SfxObjectShell(); 233cdf0e10cSrcweir 234cdf0e10cSrcweir virtual void ModifyChanged(); 235cdf0e10cSrcweir virtual sal_Bool Close(); 236cdf0e10cSrcweir 237cdf0e10cSrcweir /** declares the document to have capabilities to contain basic/dialog libraries 238cdf0e10cSrcweir */ 239cdf0e10cSrcweir void SetHasNoBasic(); 240cdf0e10cSrcweir 241cdf0e10cSrcweir /// template method, called by FlushDocInfo; this implementation is empty 242cdf0e10cSrcweir virtual void DoFlushDocInfo(); 243cdf0e10cSrcweir 244cdf0e10cSrcweir public: 245cdf0e10cSrcweir TYPEINFO(); 246cdf0e10cSrcweir SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH) 247cdf0e10cSrcweir 248cdf0e10cSrcweir static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 249cdf0e10cSrcweir /* Stampit disable/enable cancel button for print jobs 250cdf0e10cSrcweir default = true = enable! */ 251cdf0e10cSrcweir void Stamp_SetPrintCancelState(sal_Bool bState); 252cdf0e10cSrcweir sal_Bool Stamp_GetPrintCancelState() const; 253cdf0e10cSrcweir 254cdf0e10cSrcweir using SotObject::GetInterface; 255cdf0e10cSrcweir 256cdf0e10cSrcweir // Document-Shell Iterator 257cdf0e10cSrcweir static SfxObjectShell* GetFirst( const TypeId* pType = 0, 258cdf0e10cSrcweir sal_Bool bOnlyVisible = sal_True ); 259cdf0e10cSrcweir static SfxObjectShell* GetNext( const SfxObjectShell& rPrev, 260cdf0e10cSrcweir const TypeId* pType = 0, 261cdf0e10cSrcweir sal_Bool bOnlyVisible = sal_True ); 262cdf0e10cSrcweir static SfxObjectShell* Current(); 263cdf0e10cSrcweir static sal_uInt16 Count(); 264cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 265cdf0e10cSrcweir GetCurrentComponent(); 266cdf0e10cSrcweir static void SetCurrentComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent ); 267cdf0e10cSrcweir 268cdf0e10cSrcweir virtual void Invalidate(sal_uInt16 nId = 0); 269cdf0e10cSrcweir 270cdf0e10cSrcweir void SetFlags( SfxObjectShellFlags eFlags ); 271cdf0e10cSrcweir SfxObjectShellFlags GetFlags( ) const ; 272cdf0e10cSrcweir 273cdf0e10cSrcweir SfxModule* GetModule() const; 274cdf0e10cSrcweir 275cdf0e10cSrcweir virtual SfxObjectFactory& GetFactory() const=0; GetMedium() const276cdf0e10cSrcweir SfxMedium * GetMedium() const { return pMedium; } ForgetMedium()277cdf0e10cSrcweir void ForgetMedium() { pMedium = 0; } 278cdf0e10cSrcweir ::com::sun::star::uno::Reference< 279cdf0e10cSrcweir ::com::sun::star::document::XDocumentProperties > getDocProperties(); 280cdf0e10cSrcweir void UpdateDocInfoForSave( ); 281cdf0e10cSrcweir void FlushDocInfo(); HasName() const282cdf0e10cSrcweir sal_Bool HasName() const { return bHasName; } 283cdf0e10cSrcweir virtual String GetAPIName() const; SetHasName(sal_Bool bSet=sal_True)284cdf0e10cSrcweir void SetHasName( sal_Bool bSet = sal_True ) { bHasName = bSet; } 285cdf0e10cSrcweir void SetReadOnly(); 286cdf0e10cSrcweir sal_Bool IsReadOnly() const; 287cdf0e10cSrcweir sal_Bool IsReadOnlyMedium() const; 288cdf0e10cSrcweir void SetReadOnlyUI( sal_Bool bReadOnly = sal_True ); 289cdf0e10cSrcweir sal_Bool IsReadOnlyUI() const; 290cdf0e10cSrcweir void SetNoName(); 291cdf0e10cSrcweir sal_Bool IsInModalMode() const; 292cdf0e10cSrcweir sal_Bool IsInPrepareClose() const; 293cdf0e10cSrcweir //<!--Added by PengYunQuan for Validity Cell Range Picker 294cdf0e10cSrcweir virtual sal_Bool AcceptStateUpdate() const; 295cdf0e10cSrcweir //-->Added by PengYunQuan for Validity Cell Range Picker 296cdf0e10cSrcweir sal_Bool HasModalViews() const; 297cdf0e10cSrcweir sal_Bool IsHelpDocument() const; 298cdf0e10cSrcweir 299cdf0e10cSrcweir sal_Bool IsDocShared() const; 300cdf0e10cSrcweir ::rtl::OUString GetSharedFileURL() const; 301cdf0e10cSrcweir sal_Bool SwitchToShared( sal_Bool bShared, sal_Bool bSave ); 302cdf0e10cSrcweir void DisconnectFromShared(); 303cdf0e10cSrcweir SAL_DLLPRIVATE void FreeSharedFile(); 304cdf0e10cSrcweir SAL_DLLPRIVATE void FreeSharedFile( const ::rtl::OUString& aTempFileURL ); 305cdf0e10cSrcweir SAL_DLLPRIVATE void DoNotCleanShareControlFile(); 306cdf0e10cSrcweir 307cdf0e10cSrcweir void SetSharedXMLFlag( sal_Bool bFlag ) const; 308cdf0e10cSrcweir sal_Bool HasSharedXMLFlagSet() const; 309cdf0e10cSrcweir 310cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 311cdf0e10cSrcweir SAL_DLLPRIVATE void SetModalMode_Impl(sal_Bool bModal=sal_True); 312cdf0e10cSrcweir SAL_DLLPRIVATE void SetMacroMode_Impl(sal_Bool bModal=sal_True); 313cdf0e10cSrcweir //#endif 314cdf0e10cSrcweir 315cdf0e10cSrcweir void ResetError(); 316cdf0e10cSrcweir sal_uInt32 GetError() const; 317cdf0e10cSrcweir sal_uInt32 GetErrorCode() const; 318cdf0e10cSrcweir void SetError( sal_uInt32 rErr, const ::rtl::OUString& aLogMessage ); 319cdf0e10cSrcweir 320cdf0e10cSrcweir void AddLog( const ::rtl::OUString& aMessage ); 321cdf0e10cSrcweir void StoreLog(); 322cdf0e10cSrcweir 323cdf0e10cSrcweir sal_Bool DoInitNew( SfxMedium* pMedium=0 ); 324cdf0e10cSrcweir sal_Bool DoLoad( SfxMedium* pMedium ); 325cdf0e10cSrcweir sal_Bool DoSave(); 326cdf0e10cSrcweir sal_Bool DoSaveAs( SfxMedium &rNewStor ); 327cdf0e10cSrcweir sal_Bool DoSaveObjectAs( SfxMedium &rNewStor, sal_Bool bCommit ); 328cdf0e10cSrcweir 329cdf0e10cSrcweir // TODO/LATER: currently only overloaded in Calc, should be made non-virtual 330cdf0e10cSrcweir virtual sal_Bool DoSaveCompleted( SfxMedium* pNewStor=0 ); 331cdf0e10cSrcweir 332cdf0e10cSrcweir virtual sal_Bool LoadOwnFormat( SfxMedium& pMedium ); 333cdf0e10cSrcweir virtual sal_Bool SaveAsOwnFormat( SfxMedium& pMedium ); 334cdf0e10cSrcweir virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); 335cdf0e10cSrcweir virtual sal_Bool ConvertTo( SfxMedium &rMedium ); 336cdf0e10cSrcweir virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); 337cdf0e10cSrcweir virtual sal_Bool Load( SfxMedium &rMedium ); 338cdf0e10cSrcweir virtual sal_Bool LoadFrom( SfxMedium& rMedium ); 339cdf0e10cSrcweir virtual sal_Bool Save(); 340cdf0e10cSrcweir virtual sal_Bool SaveAs( SfxMedium &rMedium ); 341cdf0e10cSrcweir virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); 342cdf0e10cSrcweir virtual sal_Bool SwitchPersistance( 343cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); 344cdf0e10cSrcweir virtual void UpdateLinks(); 345cdf0e10cSrcweir 346cdf0e10cSrcweir // called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action 347cdf0e10cSrcweir virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId ); 348cdf0e10cSrcweir 349cdf0e10cSrcweir sal_Bool SaveChildren(sal_Bool bObjectsOnly=sal_False); 350cdf0e10cSrcweir sal_Bool SaveAsChildren( SfxMedium &rMedium ); 351cdf0e10cSrcweir sal_Bool SwitchChildrenPersistance( 352cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, 353cdf0e10cSrcweir sal_Bool bForceNonModified = sal_False ); 354cdf0e10cSrcweir sal_Bool SaveCompletedChildren( sal_Bool bSuccess ); 355cdf0e10cSrcweir 356cdf0e10cSrcweir sal_Bool InsertFrom( SfxMedium &rMedium ); 357cdf0e10cSrcweir sal_Bool ImportFrom( SfxMedium &rMedium ); 358cdf0e10cSrcweir sal_Bool ExportTo( SfxMedium &rMedium ); 359cdf0e10cSrcweir 360cdf0e10cSrcweir // xmlsec05, check with SFX team 361cdf0e10cSrcweir sal_uInt16 GetDocumentSignatureState(); 362cdf0e10cSrcweir void SignDocumentContent(); 363cdf0e10cSrcweir sal_uInt16 GetScriptingSignatureState(); 364cdf0e10cSrcweir void SignScriptingContent(); 365cdf0e10cSrcweir 366cdf0e10cSrcweir virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( 367cdf0e10cSrcweir Window *pParent, const SfxItemSet& ); 368cdf0e10cSrcweir 369cdf0e10cSrcweir ErrCode CallBasic( const String& rMacro, const String& rBasicName, 370cdf0e10cSrcweir SbxArray* pArgs = 0, SbxValue* pRet = 0 ); 371cdf0e10cSrcweir 372*e2d7a903SArrigo Marchiori /** Execute a script URL. 373*e2d7a903SArrigo Marchiori * 374*e2d7a903SArrigo Marchiori * @param rScriptURL URL of the script. 375*e2d7a903SArrigo Marchiori * @param aParams parameters for the macro. 376*e2d7a903SArrigo Marchiori * @param aRet variable that will hold the return value. 377*e2d7a903SArrigo Marchiori * @param aOutParamIndex index of output parameters. 378*e2d7a903SArrigo Marchiori * @param aOutParam output parameters. 379*e2d7a903SArrigo Marchiori * @param aReferer "Referer" calling the script. 380*e2d7a903SArrigo Marchiori * @param bRaiseError true to show a dialog in case of error. 381*e2d7a903SArrigo Marchiori */ 382cdf0e10cSrcweir ErrCode CallXScript( 383cdf0e10cSrcweir const String& rScriptURL, 384cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, 385cdf0e10cSrcweir ::com::sun::star::uno::Any& aRet, 386cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, 387cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam, 388*e2d7a903SArrigo Marchiori const ::rtl::OUString& aReferer = ::rtl::OUString(), 389cdf0e10cSrcweir bool bRaiseError = true 390cdf0e10cSrcweir ); 391cdf0e10cSrcweir 392*e2d7a903SArrigo Marchiori /** Execute a script URL. 393*e2d7a903SArrigo Marchiori * 394*e2d7a903SArrigo Marchiori * @param _rxScriptContext script context. 395*e2d7a903SArrigo Marchiori * @param rScriptURL URL of the script. 396*e2d7a903SArrigo Marchiori * @param aParams parameters for the macro. 397*e2d7a903SArrigo Marchiori * @param aRet variable that will hold the return value. 398*e2d7a903SArrigo Marchiori * @param aOutParamIndex index of output parameters. 399*e2d7a903SArrigo Marchiori * @param aOutParam output parameters. 400*e2d7a903SArrigo Marchiori * @param aReferer "Referer" calling the script. 401*e2d7a903SArrigo Marchiori * @param bRaiseError true to show a dialog in case of error. 402*e2d7a903SArrigo Marchiori */ 403cdf0e10cSrcweir static ErrCode CallXScript( 404cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxScriptContext, 405cdf0e10cSrcweir const ::rtl::OUString& rScriptURL, 406cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, 407cdf0e10cSrcweir ::com::sun::star::uno::Any& aRet, 408cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, 409cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam, 410*e2d7a903SArrigo Marchiori const ::rtl::OUString& aReferer = ::rtl::OUString(), 411cdf0e10cSrcweir bool bRaiseError = true 412cdf0e10cSrcweir ); 413cdf0e10cSrcweir 414cdf0e10cSrcweir /** adjusts the internal macro mode, according to the current security settings 415cdf0e10cSrcweir 416cdf0e10cSrcweir Finally, the macro mode is either NEVER_EXECUTE or ALWAYS_EXECUTE_NO_WARN. 417cdf0e10cSrcweir 418cdf0e10cSrcweir @return 419cdf0e10cSrcweir whether macros from this document should be executed 420cdf0e10cSrcweir */ 421cdf0e10cSrcweir bool AdjustMacroMode( const String& rScriptType, bool _bSuppressUI = false ); 422cdf0e10cSrcweir 423cdf0e10cSrcweir SvKeyValueIterator* GetHeaderAttributes(); 424cdf0e10cSrcweir void ClearHeaderAttributesForSourceViewHack(); 425cdf0e10cSrcweir void SetHeaderAttributesForSourceViewHack(); 426cdf0e10cSrcweir 427cdf0e10cSrcweir sal_Bool IsTemplate() const; 428cdf0e10cSrcweir void SetTemplate(sal_Bool bIs); 429cdf0e10cSrcweir 430cdf0e10cSrcweir sal_Bool IsQueryLoadTemplate() const; 431cdf0e10cSrcweir sal_Bool IsUseUserData() const; 432cdf0e10cSrcweir sal_Bool IsLoadReadonly() const; 433cdf0e10cSrcweir sal_Bool IsSaveVersionOnClose() const; 434cdf0e10cSrcweir void SetQueryLoadTemplate( sal_Bool b ); 435cdf0e10cSrcweir void SetUseUserData( sal_Bool bNew ); 436cdf0e10cSrcweir void SetLoadReadonly( sal_Bool _bReadonly ); 437cdf0e10cSrcweir void SetSaveVersionOnClose( sal_Bool bSet ); 438cdf0e10cSrcweir void ResetFromTemplate( const String& rTemplateName, const String& rFileName ); 439cdf0e10cSrcweir 440cdf0e10cSrcweir // TODO/LATER: the following two methods should be replaced by Get/SetModifPasswordInfo in future 441cdf0e10cSrcweir sal_uInt32 GetModifyPasswordHash() const; 442cdf0e10cSrcweir sal_Bool SetModifyPasswordHash( sal_uInt32 nHash ); 443cdf0e10cSrcweir 444cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetModifyPasswordInfo() const; 445cdf0e10cSrcweir sal_Bool SetModifyPasswordInfo( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aInfo ); 446cdf0e10cSrcweir 447cdf0e10cSrcweir static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ); 448cdf0e10cSrcweir 449cdf0e10cSrcweir virtual void ViewAssigned(); 450cdf0e10cSrcweir virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); 451cdf0e10cSrcweir virtual sal_Bool IsInformationLost(); 452cdf0e10cSrcweir virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ); 453cdf0e10cSrcweir sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent ); 454cdf0e10cSrcweir virtual sal_Bool HasSecurityOptOpenReadOnly() const; 455cdf0e10cSrcweir sal_Bool IsSecurityOptOpenReadOnly() const; 456cdf0e10cSrcweir void SetSecurityOptOpenReadOnly( sal_Bool bOpenReadOnly = sal_True ); 457cdf0e10cSrcweir 458cdf0e10cSrcweir virtual Size GetFirstPageSize(); 459cdf0e10cSrcweir virtual sal_Bool DoClose(); 460cdf0e10cSrcweir virtual void PrepareReload(); 461cdf0e10cSrcweir virtual ::boost::shared_ptr<GDIMetaFile> GetPreviewMetaFile( sal_Bool bFullContent = sal_False ) const; 462cdf0e10cSrcweir virtual void CancelTransfers(); 463cdf0e10cSrcweir 464cdf0e10cSrcweir sal_Bool GenerateAndStoreThumbnail( 465cdf0e10cSrcweir sal_Bool bEncrypted, 466cdf0e10cSrcweir sal_Bool bSigned, 467cdf0e10cSrcweir sal_Bool bIsTemplate, 468cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ); 469cdf0e10cSrcweir 470cdf0e10cSrcweir sal_Bool WriteThumbnail( 471cdf0e10cSrcweir sal_Bool bEncrypted, 472cdf0e10cSrcweir sal_Bool bSigned, 473cdf0e10cSrcweir sal_Bool bIsTemplate, 474cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream ); 475cdf0e10cSrcweir IsInGenerateAndStoreThumbnail() const476cb65df5dSJürgen Schmidt sal_Bool IsInGenerateAndStoreThumbnail() const {return bIsInGenerateThumbnail;}//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 477cb65df5dSJürgen Schmidt 478cdf0e10cSrcweir // Transfer IFace 479cdf0e10cSrcweir void AbortImport(); 480cdf0e10cSrcweir sal_Bool IsAbortingImport() const; 481cdf0e10cSrcweir void RegisterTransfer( SfxMedium& rMedium ); 482cdf0e10cSrcweir sal_Bool IsReloading() const; 483cdf0e10cSrcweir void FinishedLoading( sal_uInt16 nWhich = SFX_LOADED_ALL ); 484cdf0e10cSrcweir void TemplateDisconnectionAfterLoad(); 485cdf0e10cSrcweir sal_Bool IsLoading() const; 486cdf0e10cSrcweir sal_Bool IsLoadingFinished() const; 487cdf0e10cSrcweir void SetAutoLoad( const INetURLObject&, sal_uInt32 nTime, sal_Bool bReload = sal_True ); 488cdf0e10cSrcweir void LockAutoLoad( sal_Bool bLock ); 489cdf0e10cSrcweir sal_Bool IsAutoLoadLocked() const; 490cdf0e10cSrcweir void NotifyReloadAvailable(); 491cdf0e10cSrcweir sal_Bool IsSecure(); 492cdf0e10cSrcweir 493cdf0e10cSrcweir // Misc 494cdf0e10cSrcweir sal_Bool IsPreview() const; GetCreateMode() const495cdf0e10cSrcweir SfxObjectCreateMode GetCreateMode() const { return eCreateMode; } 496cdf0e10cSrcweir virtual void MemoryError(); 497cdf0e10cSrcweir SfxProgress* GetProgress() const; 498cdf0e10cSrcweir void SetWaitCursor( sal_Bool bSet ) const; 499cdf0e10cSrcweir 500cdf0e10cSrcweir //(mba) virtual SotObjectRef CreateAggObj( const SotFactory* pFact ); 501cdf0e10cSrcweir 502cdf0e10cSrcweir // Naming Interface 503cdf0e10cSrcweir void SetTitle( const String& rTitle ); 504cdf0e10cSrcweir String GetTitle( sal_uInt16 nMaxLen = 0 ) const; 505cdf0e10cSrcweir void InvalidateName(); // Zuruecksetzen auf unbenannt 506cdf0e10cSrcweir 507cdf0e10cSrcweir // DDE-Interface 508cdf0e10cSrcweir virtual long DdeExecute( const String& rCmd ); 509cdf0e10cSrcweir virtual long DdeGetData( const String& rItem, 510cdf0e10cSrcweir const String& rMimeType, 511cdf0e10cSrcweir ::com::sun::star::uno::Any & rValue ); 512cdf0e10cSrcweir virtual long DdeSetData( const String& rItem, 513cdf0e10cSrcweir const String& rMimeType, 514cdf0e10cSrcweir const ::com::sun::star::uno::Any & rValue ); 515cdf0e10cSrcweir virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem ); 516cdf0e10cSrcweir 517cdf0e10cSrcweir // Contents 518cdf0e10cSrcweir virtual SfxStyleSheetBasePool* GetStyleSheetPool(); SetStyleSheetPool(SfxStyleSheetBasePool * pBasePool)519cdf0e10cSrcweir void SetStyleSheetPool( SfxStyleSheetBasePool *pBasePool ) { 520cdf0e10cSrcweir pStyleSheetPool = pBasePool; } 521cdf0e10cSrcweir 522cdf0e10cSrcweir //determine the position of the "Automatic" filter in the stylist 523cdf0e10cSrcweir void SetAutoStyleFilterIndex(sal_uInt16 nSet); 524cdf0e10cSrcweir sal_uInt16 GetAutoStyleFilterIndex(); 525cdf0e10cSrcweir virtual sal_Bool HasBasic() const; 526cdf0e10cSrcweir BasicManager* GetBasicManager() const; 527cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > 528cdf0e10cSrcweir GetBasicContainer(); 529cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > 530cdf0e10cSrcweir GetDialogContainer(); 531cdf0e10cSrcweir StarBASIC* GetBasic() const; 532cdf0e10cSrcweir 533cdf0e10cSrcweir // Interface Dok-Inhalte, Organizer 534cdf0e10cSrcweir #define INDEX_IGNORE USHRT_MAX 535cdf0e10cSrcweir 536cdf0e10cSrcweir #define CONTENT_STYLE 0 537cdf0e10cSrcweir #define CONTENT_CONFIG 1 538cdf0e10cSrcweir #define CONTENT_MACRO 2 539cdf0e10cSrcweir #define DEF_CONTENT_COUNT 1 540cdf0e10cSrcweir 541cdf0e10cSrcweir 542cdf0e10cSrcweir virtual void SetOrganizerSearchMask( 543cdf0e10cSrcweir SfxStyleSheetBasePool* ) const; 544cdf0e10cSrcweir 545cdf0e10cSrcweir 546cdf0e10cSrcweir virtual sal_uInt16 GetContentCount( 547cdf0e10cSrcweir sal_uInt16 nIdx1 = INDEX_IGNORE, 548cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE ); 549cdf0e10cSrcweir virtual sal_Bool CanHaveChilds( 550cdf0e10cSrcweir sal_uInt16 nIdx1, 551cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE ); 552cdf0e10cSrcweir virtual void GetContent( String &, 553cdf0e10cSrcweir Bitmap &rClosedBitmap, 554cdf0e10cSrcweir Bitmap &rOpenedBitmap, 555cdf0e10cSrcweir sal_Bool &bCanDelete, 556cdf0e10cSrcweir sal_uInt16 nPos, 557cdf0e10cSrcweir sal_uInt16 nIdx1, 558cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE ); 559cdf0e10cSrcweir 560cdf0e10cSrcweir virtual void GetContent( String &, 561cdf0e10cSrcweir Bitmap &rClosedBitmap, 562cdf0e10cSrcweir Bitmap &rOpenedBitmap, 563cdf0e10cSrcweir BmpColorMode eColorMode, 564cdf0e10cSrcweir sal_Bool &bCanDelete, 565cdf0e10cSrcweir sal_uInt16 nPos, 566cdf0e10cSrcweir sal_uInt16 nIdx1, 567cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE ); 568cdf0e10cSrcweir 569cdf0e10cSrcweir virtual void TriggerHelpPI( 570cdf0e10cSrcweir sal_uInt16 nIdx1, sal_uInt16 nIdx2, sal_uInt16 nIdx3); 571cdf0e10cSrcweir 572cdf0e10cSrcweir virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily ); 573cdf0e10cSrcweir 574cdf0e10cSrcweir virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily, BmpColorMode eColorMode ); 575cdf0e10cSrcweir 576cdf0e10cSrcweir virtual sal_Bool Insert( SfxObjectShell &rSource, 577cdf0e10cSrcweir sal_uInt16 nSourceIdx1, 578cdf0e10cSrcweir sal_uInt16 nSourceIdx2, 579cdf0e10cSrcweir sal_uInt16 nSourceIdx3, 580cdf0e10cSrcweir sal_uInt16 &nIdx1, 581cdf0e10cSrcweir sal_uInt16 &nIdx2, 582cdf0e10cSrcweir sal_uInt16 &nIdx3, 583cdf0e10cSrcweir sal_uInt16 &rIdxDeleted); 584cdf0e10cSrcweir 585cdf0e10cSrcweir virtual sal_Bool Remove( sal_uInt16 nIdx1, 586cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE, 587cdf0e10cSrcweir sal_uInt16 nIdx3 = INDEX_IGNORE); 588cdf0e10cSrcweir 589cdf0e10cSrcweir sal_Bool Print( Printer &rPrt, 590cdf0e10cSrcweir sal_uInt16 nIdx1, 591cdf0e10cSrcweir sal_uInt16 nIdx2 = INDEX_IGNORE, 592cdf0e10cSrcweir sal_uInt16 nIdx3 = INDEX_IGNORE, 593cdf0e10cSrcweir const String *pObjectName = 0 ); 594cdf0e10cSrcweir 595cdf0e10cSrcweir virtual void LoadStyles( SfxObjectShell &rSource ); 596cdf0e10cSrcweir void ReadNote( INote * ); 597cdf0e10cSrcweir void UpdateNote( INote * ); 598cdf0e10cSrcweir 599cdf0e10cSrcweir // F"ur Docs, die zum Formatieren die Viewgr"o\se 600cdf0e10cSrcweir // ben"otigen 601cdf0e10cSrcweir virtual SfxObjectShell* GetObjectShell(); 602cdf0e10cSrcweir //void SetBaseURL( const String& rURL ); 603cdf0e10cSrcweir //const String& GetBaseURL() const; 604cdf0e10cSrcweir //const String& GetBaseURLForSaving() const; 605cdf0e10cSrcweir //void SetEmptyBaseURL(); 606cdf0e10cSrcweir 607cdf0e10cSrcweir virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium ); 608cdf0e10cSrcweir 609cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > 610cdf0e10cSrcweir GetModel() const; 611cdf0e10cSrcweir // Nur uebergangsweise fuer die Applikationen !!! 612cdf0e10cSrcweir void SetBaseModel( SfxBaseModel* pModel ); 613cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetBaseModel() const; 614cdf0e10cSrcweir // Nur uebergangsweise fuer die Applikationen !!! 615cdf0e10cSrcweir 616cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames(); 617cdf0e10cSrcweir 618cdf0e10cSrcweir Window* GetDialogParent( SfxMedium* pMedium=0 ); 619cdf0e10cSrcweir String UpdateTitle( SfxMedium* pMed=NULL, sal_uInt16 nDocViewNo=0 ); 620cdf0e10cSrcweir static SfxObjectShell* CreateObject( const String& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); 621cdf0e10cSrcweir static SfxObjectShell* CreateObjectByFactoryName( const String& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); 622cdf0e10cSrcweir static SfxObjectShell* CreateAndLoadObject( const SfxItemSet& rSet, SfxFrame* pFrame=0 ); 623cdf0e10cSrcweir static String GetServiceNameFromFactory( const String& rFact ); 624cdf0e10cSrcweir sal_Bool IsInPlaceActive(); 625cdf0e10cSrcweir sal_Bool IsUIActive(); 626cdf0e10cSrcweir virtual void InPlaceActivate( sal_Bool ); 627cdf0e10cSrcweir virtual void UIActivate( sal_Bool ); 628cdf0e10cSrcweir 629cdf0e10cSrcweir static sal_Bool CopyStoragesOfUnknownMediaType( 630cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xSource, 631cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xTarget ); 632cdf0e10cSrcweir 633cdf0e10cSrcweir // ==== The functions from SvPersist 634cdf0e10cSrcweir void EnableSetModified( sal_Bool bEnable = sal_True ); 635cdf0e10cSrcweir sal_Bool IsEnableSetModified() const; 636cdf0e10cSrcweir virtual void SetModified( sal_Bool bModified = sal_True ); 637cdf0e10cSrcweir sal_Bool IsModified(); 638cdf0e10cSrcweir 639cdf0e10cSrcweir void SetupStorage( 640cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, 641cdf0e10cSrcweir sal_Int32 nVersion, 642cdf0e10cSrcweir sal_Bool bTemplate ) const; 643cdf0e10cSrcweir 644cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage(); 645cdf0e10cSrcweir 646cdf0e10cSrcweir //REMOVE void SetFileName( const ::rtl::OUString& ); 647cdf0e10cSrcweir SvGlobalName GetClassName() const; 648cdf0e10cSrcweir 649cdf0e10cSrcweir // comphelper::IEmbeddedHelper 650cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const; getStorage() const651cdf0e10cSrcweir virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const 652cdf0e10cSrcweir { 653cdf0e10cSrcweir return const_cast<SfxObjectShell*>(this)->GetStorage(); 654cdf0e10cSrcweir } getEmbeddedObjectContainer() const655cdf0e10cSrcweir virtual comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const 656cdf0e10cSrcweir { 657cdf0e10cSrcweir return GetEmbeddedObjectContainer(); 658cdf0e10cSrcweir } isEnableSetModified() const659cdf0e10cSrcweir bool isEnableSetModified() const 660cdf0e10cSrcweir { 661cdf0e10cSrcweir return IsEnableSetModified(); 662cdf0e10cSrcweir } 663cdf0e10cSrcweir comphelper::EmbeddedObjectContainer& GetEmbeddedObjectContainer() const; 664cdf0e10cSrcweir void ClearEmbeddedObjects(); 665cdf0e10cSrcweir 666cdf0e10cSrcweir // ==== The functions from SvEmbeddedObject 667cdf0e10cSrcweir virtual Printer * GetDocumentPrinter(); 668cdf0e10cSrcweir virtual OutputDevice* GetDocumentRefDev(); 669cdf0e10cSrcweir virtual void OnDocumentPrinterChanged( Printer * pNewPrinter ); 670cdf0e10cSrcweir virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const; 671cdf0e10cSrcweir virtual void SetVisArea( const Rectangle & rVisArea ); 672cdf0e10cSrcweir const Rectangle & GetVisArea() const; 673cdf0e10cSrcweir void SetVisAreaSize( const Size & rVisSize ); 674cdf0e10cSrcweir virtual sal_uIntPtr GetMiscStatus() const; 675cdf0e10cSrcweir 676cdf0e10cSrcweir MapUnit GetMapUnit() const; 677cdf0e10cSrcweir void SetMapUnit( MapUnit nMUnit ); 678cdf0e10cSrcweir 679cdf0e10cSrcweir void FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc ) const; 680cdf0e10cSrcweir void DoDraw( OutputDevice *, const Point & rObjPos, 681cdf0e10cSrcweir const Size & rSize, 682cdf0e10cSrcweir const JobSetup & rSetup, 683cdf0e10cSrcweir sal_uInt16 nAspect = ASPECT_CONTENT ); 684cdf0e10cSrcweir virtual void Draw( OutputDevice *, const JobSetup & rSetup, 685cdf0e10cSrcweir sal_uInt16 nAspect = ASPECT_CONTENT ) = 0; 686cdf0e10cSrcweir 687cdf0e10cSrcweir 688cdf0e10cSrcweir virtual void FillClass( SvGlobalName * pClassName, 689cdf0e10cSrcweir sal_uInt32 * pFormat, 690cdf0e10cSrcweir String * pAppName, 691cdf0e10cSrcweir String * pFullTypeName, 692cdf0e10cSrcweir String * pShortTypeName, 693cdf0e10cSrcweir sal_Int32 nVersion, 694cdf0e10cSrcweir sal_Bool bTemplate = sal_False) const = 0; 695cdf0e10cSrcweir 696cdf0e10cSrcweir // change recording and respective passwword protection for Writer and Calc 697cdf0e10cSrcweir // slots available for Writer: FN_REDLINE_ON, FN_REDLINE_ON 698cdf0e10cSrcweir // slots used for Calc: FID_CHG_RECORD, SID_CHG_PROTECT 699cdf0e10cSrcweir virtual bool IsChangeRecording() const; 700cdf0e10cSrcweir virtual bool HasChangeRecordProtection() const; 701cdf0e10cSrcweir virtual void SetChangeRecording( bool bActivate ); 702cdf0e10cSrcweir virtual bool SetProtectionPassword( const String &rPassword ); 703cdf0e10cSrcweir virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); 704cdf0e10cSrcweir 705cdf0e10cSrcweir // ================================= 706cdf0e10cSrcweir 707cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 708cdf0e10cSrcweir 709cdf0e10cSrcweir SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHighContrast ) const; 710cdf0e10cSrcweir 711cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool IsOwnStorageFormat_Impl(const SfxMedium &) const; 712cdf0e10cSrcweir 713cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool IsPackageStorageFormat_Impl(const SfxMedium &) const; 714cdf0e10cSrcweir 715cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ConnectTmpStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, SfxMedium* pMedium ); 716cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ); 717cdf0e10cSrcweir 718cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool PutURLContentsToVersionStream_Impl( 719cdf0e10cSrcweir ::rtl::OUString aURL, 720cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDocStorage, 721cdf0e10cSrcweir ::rtl::OUString aStreamName ); 722cdf0e10cSrcweir 723cdf0e10cSrcweir SAL_DLLPRIVATE ::rtl::OUString CreateTempCopyOfStorage_Impl( 724cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); 725cdf0e10cSrcweir 726cdf0e10cSrcweir SAL_DLLPRIVATE void InitOwnModel_Impl(); 727cdf0e10cSrcweir SAL_DLLPRIVATE void BreakMacroSign_Impl( sal_Bool bBreakMacroSing ); 728cdf0e10cSrcweir SAL_DLLPRIVATE void CheckSecurityOnLoading_Impl(); 729cdf0e10cSrcweir SAL_DLLPRIVATE void CheckForBrokenDocSignatures_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); 730cdf0e10cSrcweir SAL_DLLPRIVATE sal_uInt16 ImplCheckSignaturesInformation( 731cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation >& aInfos ); 732cdf0e10cSrcweir SAL_DLLPRIVATE void CheckEncryption_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); 733cdf0e10cSrcweir SAL_DLLPRIVATE void SetModifyPasswordEntered( sal_Bool bEntered = sal_True ); 734cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool IsModifyPasswordEntered(); 735cdf0e10cSrcweir 736cdf0e10cSrcweir SAL_DLLPRIVATE void InitBasicManager_Impl(); Get_Impl()737cdf0e10cSrcweir SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImp; } 738cdf0e10cSrcweir 739cdf0e10cSrcweir SAL_DLLPRIVATE static sal_Bool UseInteractionToHandleError( 740cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, 741cdf0e10cSrcweir sal_uInt32 nError ); Get_Impl() const742cdf0e10cSrcweir SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImp; } 743cdf0e10cSrcweir 744cdf0e10cSrcweir SAL_DLLPRIVATE void SetCreateMode_Impl( SfxObjectCreateMode nMode ); 745cdf0e10cSrcweir 746cdf0e10cSrcweir SAL_DLLPRIVATE void DoDraw_Impl( OutputDevice* pDev, 747cdf0e10cSrcweir const Point & rViewPos, 748cdf0e10cSrcweir const Fraction & rScaleX, 749cdf0e10cSrcweir const Fraction & rScaleY, 750cdf0e10cSrcweir const JobSetup & rSetup, 751cdf0e10cSrcweir sal_uInt16 nAspect ); 752cdf0e10cSrcweir 753cdf0e10cSrcweir // Shell Interface 754cdf0e10cSrcweir SAL_DLLPRIVATE void ExecFile_Impl(SfxRequest &); 755cdf0e10cSrcweir SAL_DLLPRIVATE void GetState_Impl(SfxItemSet&); 756cdf0e10cSrcweir SAL_DLLPRIVATE void PrintExec_Impl(SfxRequest &); 757cdf0e10cSrcweir SAL_DLLPRIVATE void PrintState_Impl(SfxItemSet&); 758cdf0e10cSrcweir SAL_DLLPRIVATE void ExecProps_Impl(SfxRequest &); 759cdf0e10cSrcweir SAL_DLLPRIVATE void StateProps_Impl(SfxItemSet &); 760cdf0e10cSrcweir SAL_DLLPRIVATE void ExecView_Impl(SfxRequest &); 761cdf0e10cSrcweir SAL_DLLPRIVATE void StateView_Impl(SfxItemSet &); 762cdf0e10cSrcweir 763cdf0e10cSrcweir // Laden-speichern public internals 764cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImportFromGeneratedStream_Impl( 765cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream, 766cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr ); 767cdf0e10cSrcweir SAL_DLLPRIVATE void PositionView_Impl(); 768cdf0e10cSrcweir SAL_DLLPRIVATE void UpdateFromTemplate_Impl(); 769cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool CanReload_Impl(); 770cdf0e10cSrcweir SAL_DLLPRIVATE void SetNamedVisibility_Impl(); 771cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool DoSave_Impl( const SfxItemSet* pSet=0 ); 772cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool Save_Impl( const SfxItemSet* pSet=0 ); 773cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const String &rFileName, const String &rFiltName, SfxItemSet *); 774cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const String& aFileName, SfxItemSet* aParams ); 775cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const String& aFilterName, SfxItemSet* aParams ); 776cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool GeneralInit_Impl( 777cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, 778cdf0e10cSrcweir sal_Bool bTypeMustBeSetAlready ); 779cdf0e10cSrcweir SAL_DLLPRIVATE void PrepareSecondTryLoad_Impl(); 780cdf0e10cSrcweir SAL_DLLPRIVATE void SetInitialized_Impl( const bool i_fromInitNew ); 781cdf0e10cSrcweir 782cdf0e10cSrcweir // public-internals 783cdf0e10cSrcweir SAL_DLLPRIVATE IndexBitSet& GetNoSet_Impl(); 784cdf0e10cSrcweir SAL_DLLPRIVATE void SetProgress_Impl( SfxProgress *pProgress ); 785cdf0e10cSrcweir SAL_DLLPRIVATE void PostActivateEvent_Impl( SfxViewFrame* ); 786cdf0e10cSrcweir SAL_DLLPRIVATE void SetActivateEvent_Impl(sal_uInt16 ); 787cdf0e10cSrcweir SAL_DLLPRIVATE SfxObjectShell* GetParentShellByModel_Impl(); 788cdf0e10cSrcweir 789cdf0e10cSrcweir // configuration items 790cdf0e10cSrcweir SAL_DLLPRIVATE SfxToolBoxConfig* GetToolBoxConfig_Impl(); 791cdf0e10cSrcweir SAL_DLLPRIVATE sal_uInt16 ImplGetSignatureState( sal_Bool bScriptingContent = sal_False ); 792cdf0e10cSrcweir 793cdf0e10cSrcweir SAL_DLLPRIVATE ::com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation > 794cdf0e10cSrcweir ImplAnalyzeSignature( 795cdf0e10cSrcweir sal_Bool bScriptingContent, 796cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >& xSigner 797cdf0e10cSrcweir = ::com::sun::star::uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >() ); 798cdf0e10cSrcweir 799cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSign( sal_Bool bScriptingContent = sal_False ); 800cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool QuerySaveSizeExceededModules_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); 801cdf0e10cSrcweir //#endif 802cdf0e10cSrcweir }; 803cdf0e10cSrcweir 804cdf0e10cSrcweir #define SFX_GLOBAL_CLASSID \ 805cdf0e10cSrcweir 0x9eaba5c3, 0xb232, 0x4309, \ 806cdf0e10cSrcweir 0x84, 0x5f, 0x5f, 0x15, 0xea, 0x50, 0xd0, 0x74 807cdf0e10cSrcweir 808cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 809cdf0e10cSrcweir 810cdf0e10cSrcweir struct ModifyBlocker_Impl 811cdf0e10cSrcweir { 812cdf0e10cSrcweir SfxObjectShell* pPersist; 813cdf0e10cSrcweir sal_Bool bWasEnabled; ModifyBlocker_ImplModifyBlocker_Impl814cdf0e10cSrcweir ModifyBlocker_Impl( SfxObjectShell* pPersistP ) : pPersist( pPersistP ) 815cdf0e10cSrcweir { 816cdf0e10cSrcweir bWasEnabled = pPersistP->IsEnableSetModified(); 817cdf0e10cSrcweir if ( bWasEnabled ) 818cdf0e10cSrcweir pPersistP->EnableSetModified( sal_False ); 819cdf0e10cSrcweir } ~ModifyBlocker_ImplModifyBlocker_Impl820cdf0e10cSrcweir ~ModifyBlocker_Impl() 821cdf0e10cSrcweir { 822cdf0e10cSrcweir if ( bWasEnabled ) 823cdf0e10cSrcweir pPersist->EnableSetModified( bWasEnabled ); 824cdf0e10cSrcweir } 825cdf0e10cSrcweir }; 826cdf0e10cSrcweir //#endif 827cdf0e10cSrcweir 828cdf0e10cSrcweir //-------------------------------------------------------------------- 829cdf0e10cSrcweir #ifndef SFX_DECL_OBJECTSHELL_DEFINED 830cdf0e10cSrcweir #define SFX_DECL_OBJECTSHELL_DEFINED 831cdf0e10cSrcweir SV_DECL_REF(SfxObjectShell) 832cdf0e10cSrcweir #endif 833cdf0e10cSrcweir SV_DECL_LOCK(SfxObjectShell) 834cdf0e10cSrcweir SV_IMPL_LOCK(SfxObjectShell) 835cdf0e10cSrcweir SV_IMPL_REF(SfxObjectShell) 836cdf0e10cSrcweir 837cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 838cdf0e10cSrcweir //-------------------------------------------------------------------- 839cdf0e10cSrcweir class AutoReloadTimer_Impl : public Timer 840cdf0e10cSrcweir { 841cdf0e10cSrcweir String aUrl; 842cdf0e10cSrcweir sal_Bool bReload; 843cdf0e10cSrcweir SfxObjectShell* pObjSh; 844cdf0e10cSrcweir 845cdf0e10cSrcweir public: 846cdf0e10cSrcweir AutoReloadTimer_Impl( const String& rURL, sal_uInt32 nTime, sal_Bool bReloadP, 847cdf0e10cSrcweir SfxObjectShell* pSh ); 848cdf0e10cSrcweir virtual void Timeout(); 849cdf0e10cSrcweir }; 850cdf0e10cSrcweir //#endif 851cdf0e10cSrcweir 852cdf0e10cSrcweir //------------------------------------------------------------------------- 853cdf0e10cSrcweir 854cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem 855cdf0e10cSrcweir { 856cdf0e10cSrcweir SfxObjectShell* pObjSh; 857cdf0e10cSrcweir 858cdf0e10cSrcweir public: 859cdf0e10cSrcweir TYPEINFO(); SfxObjectShellItem()860cdf0e10cSrcweir SfxObjectShellItem() : 861cdf0e10cSrcweir SfxPoolItem( 0 ), 862cdf0e10cSrcweir pObjSh( 0 ) 863cdf0e10cSrcweir {} SfxObjectShellItem(SfxObjectShell * pObjShell)864cdf0e10cSrcweir SfxObjectShellItem( SfxObjectShell *pObjShell ): 865cdf0e10cSrcweir SfxPoolItem( 0 ), 866cdf0e10cSrcweir pObjSh( pObjShell ) 867cdf0e10cSrcweir {} SfxObjectShellItem(sal_uInt16 nWhichId,SfxObjectShell * pObjShell)868cdf0e10cSrcweir SfxObjectShellItem( sal_uInt16 nWhichId, 869cdf0e10cSrcweir SfxObjectShell *pObjShell ): 870cdf0e10cSrcweir SfxPoolItem( nWhichId ), 871cdf0e10cSrcweir pObjSh( pObjShell ) 872cdf0e10cSrcweir {} 873cdf0e10cSrcweir 874cdf0e10cSrcweir virtual int operator==( const SfxPoolItem& ) const; 875cdf0e10cSrcweir virtual String GetValueText() const; 876cdf0e10cSrcweir virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 877cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 878cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); GetObjectShell() const879cdf0e10cSrcweir SfxObjectShell* GetObjectShell() const 880cdf0e10cSrcweir { return pObjSh; } 881cdf0e10cSrcweir 882cdf0e10cSrcweir }; 883cdf0e10cSrcweir 884cdf0e10cSrcweir #endif 885cdf0e10cSrcweir 886