xref: /aoo42x/main/sfx2/inc/sfx2/docfile.hxx (revision 30acf5e8)
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 _SFXDOCFILE_HXX
24cdf0e10cSrcweir #define _SFXDOCFILE_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/io/XSeekable.hpp>
27cdf0e10cSrcweir #include "sal/config.h"
28cdf0e10cSrcweir #include "sfx2/dllapi.h"
29cdf0e10cSrcweir #include "sal/types.h"
30cdf0e10cSrcweir #include <com/sun/star/util/RevisionTag.hpp>
31cdf0e10cSrcweir #include <com/sun/star/util/DateTime.hpp>
32cdf0e10cSrcweir #include <com/sun/star/io/XOutputStream.hpp>
33cdf0e10cSrcweir #include <com/sun/star/io/XInputStream.hpp>
34cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
36cdf0e10cSrcweir #include <com/sun/star/ucb/XContent.hpp>
37cdf0e10cSrcweir #include <com/sun/star/ucb/XCommandEnvironment.hpp>
38cdf0e10cSrcweir #include <com/sun/star/task/XInteractionHandler.hpp>
39cdf0e10cSrcweir #include <com/sun/star/embed/XStorage.hpp>
40cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
41cdf0e10cSrcweir #include <tools/stream.hxx>
42cdf0e10cSrcweir #include <tools/string.hxx>
43cdf0e10cSrcweir #include <tools/list.hxx>
44cdf0e10cSrcweir #include <svl/lstner.hxx>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir #include <tools/globname.hxx>
47cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
48cdf0e10cSrcweir #include <ucbhelper/content.hxx>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir class SvKeyValueIterator;
51cdf0e10cSrcweir class SfxObjectFactory;
52cdf0e10cSrcweir class SfxFilter;
53cdf0e10cSrcweir class SfxMedium_Impl;
54cdf0e10cSrcweir class INetURLObject;
55cdf0e10cSrcweir class SfxObjectShell;
56cdf0e10cSrcweir class SfxFrame;
57cdf0e10cSrcweir class Timer;
58cdf0e10cSrcweir class SfxItemSet;
59cdf0e10cSrcweir class DateTime;
60cdf0e10cSrcweir class SvStringsDtor;
61cdf0e10cSrcweir 
62cdf0e10cSrcweir #define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
63cdf0e10cSrcweir 
64cdf0e10cSrcweir //____________________________________________________________________________________________________________________________________
65cdf0e10cSrcweir //	defines for namespaces
66cdf0e10cSrcweir //____________________________________________________________________________________________________________________________________
67cdf0e10cSrcweir 
68cdf0e10cSrcweir #define	OUSTRING					::rtl::OUString
69cdf0e10cSrcweir #define	XMULTISERVICEFACTORY		::com::sun::star::lang::XMultiServiceFactory
70cdf0e10cSrcweir #define	XSERVICEINFO				::com::sun::star::lang::XServiceInfo
71cdf0e10cSrcweir #define	OWEAKOBJECT					::cppu::OWeakObject
72cdf0e10cSrcweir #define	REFERENCE					::com::sun::star::uno::Reference
73cdf0e10cSrcweir #define	XINTERFACE					::com::sun::star::uno::XInterface
74cdf0e10cSrcweir #define	EXCEPTION					::com::sun::star::uno::Exception
75cdf0e10cSrcweir #define	RUNTIMEEXCEPTION			::com::sun::star::uno::RuntimeException
76cdf0e10cSrcweir #define	ANY							::com::sun::star::uno::Any
77cdf0e10cSrcweir 
78cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
79cdf0e10cSrcweir {
80cdf0e10cSrcweir 	sal_uInt32          eError;
81cdf0e10cSrcweir 	sal_Bool            bDirect:1,
82cdf0e10cSrcweir 						bRoot:1,
83cdf0e10cSrcweir 						bSetFilter:1,
84cdf0e10cSrcweir 						bTriedStorage;
85cdf0e10cSrcweir 	StreamMode          nStorOpenMode;
86cdf0e10cSrcweir 	INetURLObject*      pURLObj;
87cdf0e10cSrcweir 	String              aName;
88cdf0e10cSrcweir 	SvGlobalName        aFilterClass;
89cdf0e10cSrcweir 	SvStream*			pInStream;
90cdf0e10cSrcweir     SvStream*           pOutStream;
91cdf0e10cSrcweir //REMOVE		SvStorageRef        aStorage;
92cdf0e10cSrcweir 	const SfxFilter*	pFilter;
93cdf0e10cSrcweir 	SfxItemSet*			pSet;
94cdf0e10cSrcweir 	SfxMedium_Impl*		pImp;
95cdf0e10cSrcweir 	String           	aLogicName;
96cdf0e10cSrcweir 	String           	aLongName;
97cdf0e10cSrcweir 	sal_Bool            bRemote;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     sal_Bool            m_bIsReadOnly;
100cdf0e10cSrcweir     com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
101cdf0e10cSrcweir     m_xInputStreamToLoadFrom;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir #if _SOLAR__PRIVATE
104cdf0e10cSrcweir     SAL_DLLPRIVATE void SetIsRemote_Impl();
105cdf0e10cSrcweir     SAL_DLLPRIVATE void CloseInStream_Impl();
106cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool CloseOutStream_Impl();
107cdf0e10cSrcweir 	SAL_DLLPRIVATE void CloseStreams_Impl();
108cdf0e10cSrcweir 	DECL_DLLPRIVATE_STATIC_LINK( SfxMedium, UCBHdl_Impl, sal_uInt32 * );
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl();
111cdf0e10cSrcweir #endif
112cdf0e10cSrcweir 
113cdf0e10cSrcweir public:
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	SvCompatWeakHdl*    GetHdl();
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 						SfxMedium();
118cdf0e10cSrcweir 						SfxMedium( const String &rName,
119cdf0e10cSrcweir 								   StreamMode nOpenMode,
120cdf0e10cSrcweir                                    sal_Bool bDirect=sal_False,
121cdf0e10cSrcweir 								   const SfxFilter *pFilter = 0,
122cdf0e10cSrcweir 								   SfxItemSet *pSet = 0 );
123cdf0e10cSrcweir 
124cdf0e10cSrcweir                         SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
125cdf0e10cSrcweir                                     const String& rBaseURL,
126cdf0e10cSrcweir                                     const SfxItemSet* pSet=0,
127cdf0e10cSrcweir                                     sal_Bool bRoot = sal_False );
128cdf0e10cSrcweir 
129b45043c5SMathias Bauer                         SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
130b45043c5SMathias Bauer                                     const String& rBaseURL,
131b45043c5SMathias Bauer 									const String& rTypeName,
132b45043c5SMathias Bauer                                     const SfxItemSet* pSet=0,
133b45043c5SMathias Bauer                                     sal_Bool bRoot = sal_False );
134b45043c5SMathias Bauer 
135b45043c5SMathias Bauer 									SfxMedium( const SfxMedium &rMedium, sal_Bool bCreateTemporary = sal_False );
136cdf0e10cSrcweir                         SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
137cdf0e10cSrcweir 
138cdf0e10cSrcweir 						~SfxMedium();
139cdf0e10cSrcweir 
140cdf0e10cSrcweir     void                UseInteractionHandler( sal_Bool );
141cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
142cdf0e10cSrcweir 						GetInteractionHandler();
1439c0c1533SAndrea Pescetti     ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
1449c0c1533SAndrea Pescetti                         GetAuthenticationInteractionHandler();
145cdf0e10cSrcweir 
setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream> & xInputStream,sal_Bool bIsReadOnly)146cdf0e10cSrcweir     void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
147cdf0e10cSrcweir     { m_xInputStreamToLoadFrom = xInputStream; m_bIsReadOnly = bIsReadOnly; }
148cdf0e10cSrcweir 
149cdf0e10cSrcweir     void                SetLoadTargetFrame(SfxFrame* pFrame );
150cdf0e10cSrcweir 	SfxFrame*           GetLoadTargetFrame() const;
151cdf0e10cSrcweir 
152cdf0e10cSrcweir 	void                SetReferer( const String& rRefer );
153cdf0e10cSrcweir 	const String&       GetReferer( ) const;
154cdf0e10cSrcweir 	sal_Bool            Exists( sal_Bool bForceSession = sal_True );
155cdf0e10cSrcweir 	void			    SetFilter(const SfxFilter *pFlt, sal_Bool bResetOrig = sal_False);
GetFilter() const156cdf0e10cSrcweir 	const SfxFilter *   GetFilter() const { return pFilter; }
157cdf0e10cSrcweir 	const SfxFilter *   GetOrigFilter( sal_Bool bNotCurrent = sal_False ) const;
158cdf0e10cSrcweir 	const String&       GetOrigURL() const;
159cdf0e10cSrcweir 
160cdf0e10cSrcweir 	SfxItemSet	*		GetItemSet() const;
161cdf0e10cSrcweir 	void				SetItemSet(SfxItemSet *pSet);
162cdf0e10cSrcweir 	void                Close();
163cdf0e10cSrcweir     void                CloseAndRelease();
164cdf0e10cSrcweir 	void                ReOpen();
165cdf0e10cSrcweir 	void                CompleteReOpen();
GetName() const166cdf0e10cSrcweir 	const String&       GetName() const {return aLogicName;}
167cdf0e10cSrcweir #if defined SINIX && defined GCC && defined C272
168cdf0e10cSrcweir 	const INetURLObject& GetURLObject();
169cdf0e10cSrcweir #else
170cdf0e10cSrcweir 	const INetURLObject& GetURLObject() const;
171cdf0e10cSrcweir #endif
172cdf0e10cSrcweir 
173cdf0e10cSrcweir     void                CheckFileDate( const ::com::sun::star::util::DateTime& aInitDate );
174cdf0e10cSrcweir     sal_Bool            DocNeedsFileDateCheck();
175cdf0e10cSrcweir     ::com::sun::star::util::DateTime GetInitFileDate( sal_Bool bIgnoreOldValue );
176cdf0e10cSrcweir 
177cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > GetContent() const;
178cdf0e10cSrcweir 	const String&       GetPhysicalName() const;
179cdf0e10cSrcweir 	void                SetTemporary( sal_Bool bTemp );
180cdf0e10cSrcweir     sal_Bool            IsTemporary() const;
181cdf0e10cSrcweir     sal_Bool            IsRemote();
182cdf0e10cSrcweir 	sal_Bool            IsOpen() const; // { return aStorage.Is() || pInStream; }
183cdf0e10cSrcweir 	void                StartDownload();
184cdf0e10cSrcweir 	void                DownLoad( const Link& aLink = Link());
185cdf0e10cSrcweir 	void                SetDoneLink( const Link& rLink );
186cdf0e10cSrcweir 	Link                GetDoneLink( ) const;
187cdf0e10cSrcweir 	void                SetDataAvailableLink( const Link& rLink );
188cdf0e10cSrcweir 	Link                GetDataAvailableLink( ) const;
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 	sal_uInt32          GetMIMEAndRedirect( String& );
191cdf0e10cSrcweir 	sal_uInt32          GetErrorCode() const;
GetError() const192cdf0e10cSrcweir 	sal_uInt32          GetError() const
193cdf0e10cSrcweir 						{ return ERRCODE_TOERROR(GetErrorCode()); }
194cdf0e10cSrcweir 	sal_uInt32			GetLastStorageCreationState();
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 	void                SetError( sal_uInt32 nError, const ::rtl::OUString& aLogMessage );
197cdf0e10cSrcweir 
198cdf0e10cSrcweir     void                AddLog( const ::rtl::OUString& aMessage );
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 	void                CloseInStream();
201cdf0e10cSrcweir 	sal_Bool            CloseOutStream();
202cdf0e10cSrcweir 
IsRoot() const203cdf0e10cSrcweir 	sal_Bool            IsRoot() const { return bRoot; }
204cdf0e10cSrcweir 	void				CloseStorage();
205cdf0e10cSrcweir 
GetOpenMode() const206cdf0e10cSrcweir 	StreamMode			GetOpenMode() const { return nStorOpenMode; }
207cdf0e10cSrcweir     void                SetOpenMode( StreamMode nStorOpen, sal_Bool bDirect, sal_Bool bDontClose = sal_False );
IsDirect() const208cdf0e10cSrcweir 	sal_Bool			IsDirect() const { return bDirect? sal_True: sal_False; }
209cdf0e10cSrcweir 
210cdf0e10cSrcweir 	SvStream*           GetInStream();
211cdf0e10cSrcweir 	SvStream*           GetOutStream();
212cdf0e10cSrcweir 
213cdf0e10cSrcweir 	sal_Bool            Commit();
214cdf0e10cSrcweir     sal_Bool            IsStorage();
215cdf0e10cSrcweir 
2169c0c1533SAndrea Pescetti     //->i126305
2179c0c1533SAndrea Pescetti     sal_Int8            ShowLockedWebDAVDocumentDialog( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aData, sal_Bool bIsLoading );
2189c0c1533SAndrea Pescetti     //<-i126305
219cdf0e10cSrcweir     sal_Int8            ShowLockedDocumentDialog( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aData, sal_Bool bIsLoading, sal_Bool bOwnLock );
220cdf0e10cSrcweir     sal_Bool            LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI );
221cdf0e10cSrcweir     void                UnlockFile( sal_Bool bReleaseLockStream );
222cdf0e10cSrcweir 
223cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage( sal_Bool bCreateTempIfNo = sal_True );
224cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetOutputStorage();
225cdf0e10cSrcweir 	void				ResetError();
226cdf0e10cSrcweir 	sal_Bool            UsesCache() const;
227cdf0e10cSrcweir 	void                SetUsesCache( sal_Bool );
228cdf0e10cSrcweir 	sal_Bool            IsExpired() const;
229cdf0e10cSrcweir 	void                SetName( const String& rName, sal_Bool bSetOrigURL = sal_False );
230cdf0e10cSrcweir 	sal_Bool			IsAllowedForExternalBrowser() const;
231cdf0e10cSrcweir 	long				GetFileVersion() const;
232cdf0e10cSrcweir 
233cdf0e10cSrcweir     const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >&
234cdf0e10cSrcweir                         GetVersionList( bool _bNoReload = false );
235cdf0e10cSrcweir 	sal_Bool			IsReadOnly();
236cdf0e10cSrcweir 
237cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >  GetInputStream();
238cdf0e10cSrcweir 
239cdf0e10cSrcweir 	void				CreateTempFile( sal_Bool bReplace = sal_True );
240cdf0e10cSrcweir 	void				CreateTempFileNoCopy();
241cdf0e10cSrcweir     ::rtl::OUString     SwitchDocumentToTempFile();
242cdf0e10cSrcweir     sal_Bool            SwitchDocumentToFile( ::rtl::OUString aURL );
243cdf0e10cSrcweir 
244cdf0e10cSrcweir 	::rtl::OUString		GetCharset();
245cdf0e10cSrcweir 	void				SetCharset( ::rtl::OUString );
246cdf0e10cSrcweir     ::rtl::OUString     GetBaseURL( bool bForSaving=false );
247cdf0e10cSrcweir 
248cdf0e10cSrcweir #if _SOLAR__PRIVATE
249cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool HasStorage_Impl() const;
250cdf0e10cSrcweir 
251cdf0e10cSrcweir 	SAL_DLLPRIVATE void StorageBackup_Impl();
252cdf0e10cSrcweir 	SAL_DLLPRIVATE ::rtl::OUString GetBackup_Impl();
253cdf0e10cSrcweir 
254cdf0e10cSrcweir 	SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetZipStorageToSign_Impl( sal_Bool bReadOnly = sal_True );
255cdf0e10cSrcweir 	SAL_DLLPRIVATE void CloseZipStorage_Impl();
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 	// the storage that will be returned by the medium on GetStorage request
258cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetStorage_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewStorage );
259cdf0e10cSrcweir 
260cdf0e10cSrcweir     SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetInputStream_Impl();
261cdf0e10cSrcweir 	SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
262cdf0e10cSrcweir 	SAL_DLLPRIVATE void RefreshName_Impl();
263cdf0e10cSrcweir     SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( com::sun::star::util::RevisionTag& rVersion );
264cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool TransferVersionList_Impl( SfxMedium& rMedium );
265cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool SaveVersionList_Impl( sal_Bool bUseXML );
266cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool RemoveVersion_Impl( const ::rtl::OUString& rVersion );
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
269cdf0e10cSrcweir 	SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
270cdf0e10cSrcweir 	SAL_DLLPRIVATE const String& GetPreRedirectedURL() const;
271cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetOrigFilter_Impl( const SfxFilter* pFilter );
272cdf0e10cSrcweir 
273cdf0e10cSrcweir 	// Diese Protokolle liefern MIME Typen
274cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool SupportsMIME_Impl() const;
275cdf0e10cSrcweir 
276cdf0e10cSrcweir 	SAL_DLLPRIVATE void Init_Impl();
277cdf0e10cSrcweir 	SAL_DLLPRIVATE void ForceSynchronStream_Impl( sal_Bool bSynchron );
278cdf0e10cSrcweir 
279cdf0e10cSrcweir     SAL_DLLPRIVATE void GetLockingStream_Impl();
280cdf0e10cSrcweir 	SAL_DLLPRIVATE void GetMedium_Impl();
281cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool TryDirectTransfer( const ::rtl::OUString& aURL, SfxItemSet& aTargetSet );
282cdf0e10cSrcweir 	SAL_DLLPRIVATE void Transfer_Impl();
283cdf0e10cSrcweir 	SAL_DLLPRIVATE void CreateFileStream();
284cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetUpdatePickList(sal_Bool);
285cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool IsUpdatePickList() const;
286cdf0e10cSrcweir 
287cdf0e10cSrcweir //REMOVE		void                SetStorage_Impl( SvStorage* pStor );
SetLongName(const String & rName)288cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetLongName(const String &rName)
289cdf0e10cSrcweir 						{ aLongName = rName; }
GetLongName() const290cdf0e10cSrcweir 	SAL_DLLPRIVATE const String & GetLongName() const { return aLongName; }
291cdf0e10cSrcweir 	SAL_DLLPRIVATE ErrCode CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowRO = sal_True );
292cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool IsDownloadDone_Impl();
293cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool IsPreview_Impl();
294cdf0e10cSrcweir 	SAL_DLLPRIVATE void ClearBackup_Impl();
295cdf0e10cSrcweir     SAL_DLLPRIVATE void Done_Impl( ErrCode );
296cdf0e10cSrcweir     SAL_DLLPRIVATE void DataAvailable_Impl();
297cdf0e10cSrcweir     SAL_DLLPRIVATE void Cancel_Impl();
298cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetPhysicalName_Impl(const String& rName);
299cdf0e10cSrcweir     SAL_DLLPRIVATE void CanDisposeStorage_Impl( sal_Bool bDisposeStorage );
300cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool WillDisposeStorageOnClose_Impl();
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	SAL_DLLPRIVATE void DoBackup_Impl();
303cdf0e10cSrcweir 	SAL_DLLPRIVATE void DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalContent );
304cdf0e10cSrcweir 	SAL_DLLPRIVATE void DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalContent,
305cdf0e10cSrcweir 												const String& aPrefix,
306cdf0e10cSrcweir 												const String& aExtension,
307cdf0e10cSrcweir 												const String& aDestDir );
308cdf0e10cSrcweir 
309cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool UseBackupToRestore_Impl( ::ucbhelper::Content& aOriginalContent,
310cdf0e10cSrcweir 					 		const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv );
311cdf0e10cSrcweir 
312cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool StorageCommit_Impl();
313cdf0e10cSrcweir 
314cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool TransactedTransferForFS_Impl( const INetURLObject& aSource,
315cdf0e10cSrcweir 					 		const INetURLObject& aDest,
316cdf0e10cSrcweir 					 		const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv );
317cdf0e10cSrcweir 
318cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::OUString& aODFVersion, sal_Bool bHasValidDocumentSignature );
319cdf0e10cSrcweir 
320*30acf5e8Spfg 	// the following two methods must be used and make sense only during saving currently
321cdf0e10cSrcweir 	// TODO/LATER: in future the signature state should be controlled by the medium not by the document
322cdf0e10cSrcweir 	//             in this case the methods will be used generally, and might need to be renamed
323cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_uInt16 GetCachedSignatureState_Impl();
324cdf0e10cSrcweir 	SAL_DLLPRIVATE void       SetCachedSignatureState_Impl( sal_uInt16 nState );
325cdf0e10cSrcweir #endif
326cdf0e10cSrcweir 
327cdf0e10cSrcweir     static com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag > GetVersionList(
328cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
329cdf0e10cSrcweir 	static ::rtl::OUString CreateTempCopyWithExt( const ::rtl::OUString& aURL );
330cdf0e10cSrcweir     static sal_Bool CallApproveHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, ::com::sun::star::uno::Any aRequest, sal_Bool bAllowAbort );
331cdf0e10cSrcweir 
332cdf0e10cSrcweir     static sal_Bool     SetWritableForUserOnly( const ::rtl::OUString& aURL );
333cdf0e10cSrcweir     static sal_uInt32   CreatePasswordToModifyHash( const ::rtl::OUString& aPasswd, sal_Bool bWriter );
334cdf0e10cSrcweir };
335cdf0e10cSrcweir 
336cdf0e10cSrcweir SV_DECL_IMPL_REF( SfxMedium )
337cdf0e10cSrcweir SV_DECL_COMPAT_WEAK( SfxMedium )
338cdf0e10cSrcweir 
339cdf0e10cSrcweir #ifndef SFXMEDIUM_LIST
340cdf0e10cSrcweir #define SFXMEDIUM_LIST
341cdf0e10cSrcweir DECLARE_LIST( SfxMediumList, SfxMedium* )
342cdf0e10cSrcweir #endif
343cdf0e10cSrcweir 
344cdf0e10cSrcweir #endif
345cdf0e10cSrcweir 
346