1*40df464eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*40df464eSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*40df464eSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*40df464eSAndrew Rist * distributed with this work for additional information
6*40df464eSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*40df464eSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*40df464eSAndrew Rist * "License"); you may not use this file except in compliance
9*40df464eSAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*40df464eSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*40df464eSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*40df464eSAndrew Rist * software distributed under the License is distributed on an
15*40df464eSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*40df464eSAndrew Rist * KIND, either express or implied. See the License for the
17*40df464eSAndrew Rist * specific language governing permissions and limitations
18*40df464eSAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*40df464eSAndrew Rist *************************************************************/
21*40df464eSAndrew Rist
22*40df464eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svl.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include <stdio.h>
28cdf0e10cSrcweir
29cdf0e10cSrcweir #include <com/sun/star/ucb/XSimpleFileAccess.hpp>
30cdf0e10cSrcweir #include <com/sun/star/ucb/XCommandEnvironment.hpp>
31cdf0e10cSrcweir #include <com/sun/star/ucb/XContent.hpp>
32cdf0e10cSrcweir #include <com/sun/star/ucb/InsertCommandArgument.hpp>
33cdf0e10cSrcweir #include <com/sun/star/ucb/InteractiveIOException.hpp>
34cdf0e10cSrcweir #include <com/sun/star/io/WrongFormatException.hpp>
35cdf0e10cSrcweir
36cdf0e10cSrcweir #include <osl/time.h>
37cdf0e10cSrcweir #include <osl/security.hxx>
38cdf0e10cSrcweir #include <osl/socket.hxx>
39cdf0e10cSrcweir
40cdf0e10cSrcweir #include <rtl/string.hxx>
41cdf0e10cSrcweir #include <rtl/ustring.hxx>
42cdf0e10cSrcweir #include <rtl/strbuf.hxx>
43cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
44cdf0e10cSrcweir
45cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
46cdf0e10cSrcweir #include <ucbhelper/content.hxx>
47cdf0e10cSrcweir
48cdf0e10cSrcweir #include <tools/urlobj.hxx>
49cdf0e10cSrcweir #include <tools/stream.hxx>
50cdf0e10cSrcweir #include <unotools/bootstrap.hxx>
51cdf0e10cSrcweir #include <unotools/streamwrap.hxx>
52cdf0e10cSrcweir
53cdf0e10cSrcweir #include <unotools/useroptions.hxx>
54cdf0e10cSrcweir
55cdf0e10cSrcweir #include <svl/sharecontrolfile.hxx>
56cdf0e10cSrcweir
57cdf0e10cSrcweir using namespace ::com::sun::star;
58cdf0e10cSrcweir
59cdf0e10cSrcweir namespace svt {
60cdf0e10cSrcweir
61cdf0e10cSrcweir // ----------------------------------------------------------------------
ShareControlFile(const::rtl::OUString & aOrigURL,const uno::Reference<lang::XMultiServiceFactory> & xFactory)62cdf0e10cSrcweir ShareControlFile::ShareControlFile( const ::rtl::OUString& aOrigURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
63cdf0e10cSrcweir : LockFileCommon( aOrigURL, xFactory, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".~sharing." ) ) )
64cdf0e10cSrcweir {
65cdf0e10cSrcweir OpenStream();
66cdf0e10cSrcweir
67cdf0e10cSrcweir if ( !IsValid() )
68cdf0e10cSrcweir throw io::NotConnectedException();
69cdf0e10cSrcweir }
70cdf0e10cSrcweir
71cdf0e10cSrcweir // ----------------------------------------------------------------------
~ShareControlFile()72cdf0e10cSrcweir ShareControlFile::~ShareControlFile()
73cdf0e10cSrcweir {
74cdf0e10cSrcweir try
75cdf0e10cSrcweir {
76cdf0e10cSrcweir Close();
77cdf0e10cSrcweir }
78cdf0e10cSrcweir catch( uno::Exception& )
79cdf0e10cSrcweir {}
80cdf0e10cSrcweir }
81cdf0e10cSrcweir
82cdf0e10cSrcweir // ----------------------------------------------------------------------
OpenStream()83cdf0e10cSrcweir void ShareControlFile::OpenStream()
84cdf0e10cSrcweir {
85cdf0e10cSrcweir // if it is called outside of constructor the mutex must be locked already
86cdf0e10cSrcweir
87cdf0e10cSrcweir if ( !m_xStream.is() && m_aURL.getLength() )
88cdf0e10cSrcweir {
89cdf0e10cSrcweir uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
90cdf0e10cSrcweir ::ucbhelper::Content aContent = ::ucbhelper::Content( m_aURL, xDummyEnv );
91cdf0e10cSrcweir
92cdf0e10cSrcweir uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : 0 );
93cdf0e10cSrcweir if ( !xContId.is() || !xContId->getContentProviderScheme().equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "file" ) ) ) )
94cdf0e10cSrcweir throw io::IOException(); // the implementation supports only local files for now
95cdf0e10cSrcweir
96cdf0e10cSrcweir uno::Reference< io::XStream > xStream;
97cdf0e10cSrcweir
98cdf0e10cSrcweir // Currently the locking of the original document is intended to be used.
99cdf0e10cSrcweir // That means that the shared file should be accessed only when the original document is locked and only by user who has locked the document.
100cdf0e10cSrcweir // TODO/LATER: should the own file locking be used?
101cdf0e10cSrcweir
102cdf0e10cSrcweir try
103cdf0e10cSrcweir {
104cdf0e10cSrcweir xStream = aContent.openWriteableStreamNoLock();
105cdf0e10cSrcweir }
106cdf0e10cSrcweir catch ( ucb::InteractiveIOException const & e )
107cdf0e10cSrcweir {
108cdf0e10cSrcweir if ( e.Code == ucb::IOErrorCode_NOT_EXISTING )
109cdf0e10cSrcweir {
110cdf0e10cSrcweir // Create file...
111cdf0e10cSrcweir SvMemoryStream aStream(0,0);
112cdf0e10cSrcweir uno::Reference< io::XInputStream > xInput( new ::utl::OInputStreamWrapper( aStream ) );
113cdf0e10cSrcweir ucb::InsertCommandArgument aInsertArg;
114cdf0e10cSrcweir aInsertArg.Data = xInput;
115cdf0e10cSrcweir aInsertArg.ReplaceExisting = sal_False;
116cdf0e10cSrcweir aContent.executeCommand( rtl::OUString::createFromAscii( "insert" ), uno::makeAny( aInsertArg ) );
117cdf0e10cSrcweir
118cdf0e10cSrcweir // try to let the file be hidden if possible
119cdf0e10cSrcweir try {
120cdf0e10cSrcweir aContent.setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsHidden" ) ), uno::makeAny( sal_True ) );
121cdf0e10cSrcweir } catch( uno::Exception& ) {}
122cdf0e10cSrcweir
123cdf0e10cSrcweir // Try to open one more time
124cdf0e10cSrcweir xStream = aContent.openWriteableStreamNoLock();
125cdf0e10cSrcweir }
126cdf0e10cSrcweir else
127cdf0e10cSrcweir throw;
128cdf0e10cSrcweir }
129cdf0e10cSrcweir
130cdf0e10cSrcweir m_xSeekable.set( xStream, uno::UNO_QUERY_THROW );
131cdf0e10cSrcweir m_xInputStream.set( xStream->getInputStream(), uno::UNO_QUERY_THROW );
132cdf0e10cSrcweir m_xOutputStream.set( xStream->getOutputStream(), uno::UNO_QUERY_THROW );
133cdf0e10cSrcweir m_xTruncate.set( m_xOutputStream, uno::UNO_QUERY_THROW );
134cdf0e10cSrcweir m_xStream = xStream;
135cdf0e10cSrcweir }
136cdf0e10cSrcweir }
137cdf0e10cSrcweir
138cdf0e10cSrcweir // ----------------------------------------------------------------------
Close()139cdf0e10cSrcweir void ShareControlFile::Close()
140cdf0e10cSrcweir {
141cdf0e10cSrcweir // if it is called outside of destructor the mutex must be locked
142cdf0e10cSrcweir
143cdf0e10cSrcweir if ( m_xStream.is() )
144cdf0e10cSrcweir {
145cdf0e10cSrcweir try
146cdf0e10cSrcweir {
147cdf0e10cSrcweir if ( m_xInputStream.is() )
148cdf0e10cSrcweir m_xInputStream->closeInput();
149cdf0e10cSrcweir if ( m_xOutputStream.is() )
150cdf0e10cSrcweir m_xOutputStream->closeOutput();
151cdf0e10cSrcweir }
152cdf0e10cSrcweir catch( uno::Exception& )
153cdf0e10cSrcweir {}
154cdf0e10cSrcweir
155cdf0e10cSrcweir m_xStream = uno::Reference< io::XStream >();
156cdf0e10cSrcweir m_xInputStream = uno::Reference< io::XInputStream >();
157cdf0e10cSrcweir m_xOutputStream = uno::Reference< io::XOutputStream >();
158cdf0e10cSrcweir m_xSeekable = uno::Reference< io::XSeekable >();
159cdf0e10cSrcweir m_xTruncate = uno::Reference< io::XTruncate >();
160cdf0e10cSrcweir m_aUsersData.realloc( 0 );
161cdf0e10cSrcweir }
162cdf0e10cSrcweir }
163cdf0e10cSrcweir
164cdf0e10cSrcweir // ----------------------------------------------------------------------
GetUsersData()165cdf0e10cSrcweir uno::Sequence< uno::Sequence< ::rtl::OUString > > ShareControlFile::GetUsersData()
166cdf0e10cSrcweir {
167cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
168cdf0e10cSrcweir
169cdf0e10cSrcweir if ( !IsValid() )
170cdf0e10cSrcweir throw io::NotConnectedException();
171cdf0e10cSrcweir
172cdf0e10cSrcweir if ( !m_aUsersData.getLength() )
173cdf0e10cSrcweir {
174cdf0e10cSrcweir sal_Int64 nLength = m_xSeekable->getLength();
175cdf0e10cSrcweir if ( nLength > SAL_MAX_INT32 )
176cdf0e10cSrcweir throw uno::RuntimeException();
177cdf0e10cSrcweir
178cdf0e10cSrcweir uno::Sequence< sal_Int8 > aBuffer( (sal_Int32)nLength );
179cdf0e10cSrcweir m_xSeekable->seek( 0 );
180cdf0e10cSrcweir
181cdf0e10cSrcweir sal_Int32 nRead = m_xInputStream->readBytes( aBuffer, (sal_Int32)nLength );
182cdf0e10cSrcweir nLength -= nRead;
183cdf0e10cSrcweir while ( nLength > 0 )
184cdf0e10cSrcweir {
185cdf0e10cSrcweir uno::Sequence< sal_Int8 > aTmpBuf( (sal_Int32)nLength );
186cdf0e10cSrcweir nRead = m_xInputStream->readBytes( aTmpBuf, (sal_Int32)nLength );
187cdf0e10cSrcweir if ( nRead > nLength )
188cdf0e10cSrcweir throw uno::RuntimeException();
189cdf0e10cSrcweir
190cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < nRead; nInd++ )
191cdf0e10cSrcweir aBuffer[aBuffer.getLength() - (sal_Int32)nLength + nInd] = aTmpBuf[nInd];
192cdf0e10cSrcweir nLength -= nRead;
193cdf0e10cSrcweir }
194cdf0e10cSrcweir
195cdf0e10cSrcweir m_aUsersData = ParseList( aBuffer );
196cdf0e10cSrcweir }
197cdf0e10cSrcweir
198cdf0e10cSrcweir return m_aUsersData;
199cdf0e10cSrcweir }
200cdf0e10cSrcweir
201cdf0e10cSrcweir // ----------------------------------------------------------------------
SetUsersDataAndStore(const uno::Sequence<uno::Sequence<::rtl::OUString>> & aUsersData)202cdf0e10cSrcweir void ShareControlFile::SetUsersDataAndStore( const uno::Sequence< uno::Sequence< ::rtl::OUString > >& aUsersData )
203cdf0e10cSrcweir {
204cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
205cdf0e10cSrcweir
206cdf0e10cSrcweir if ( !IsValid() )
207cdf0e10cSrcweir throw io::NotConnectedException();
208cdf0e10cSrcweir
209cdf0e10cSrcweir if ( !m_xTruncate.is() || !m_xOutputStream.is() || !m_xSeekable.is() )
210cdf0e10cSrcweir throw uno::RuntimeException();
211cdf0e10cSrcweir
212cdf0e10cSrcweir m_xTruncate->truncate();
213cdf0e10cSrcweir m_xSeekable->seek( 0 );
214cdf0e10cSrcweir
215cdf0e10cSrcweir ::rtl::OUStringBuffer aBuffer;
216cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < aUsersData.getLength(); nInd++ )
217cdf0e10cSrcweir {
218cdf0e10cSrcweir if ( aUsersData[nInd].getLength() != SHARED_ENTRYSIZE )
219cdf0e10cSrcweir throw lang::IllegalArgumentException();
220cdf0e10cSrcweir
221cdf0e10cSrcweir for ( sal_Int32 nEntryInd = 0; nEntryInd < SHARED_ENTRYSIZE; nEntryInd++ )
222cdf0e10cSrcweir {
223cdf0e10cSrcweir aBuffer.append( EscapeCharacters( aUsersData[nInd][nEntryInd] ) );
224cdf0e10cSrcweir if ( nEntryInd < SHARED_ENTRYSIZE - 1 )
225cdf0e10cSrcweir aBuffer.append( (sal_Unicode)',' );
226cdf0e10cSrcweir else
227cdf0e10cSrcweir aBuffer.append( (sal_Unicode)';' );
228cdf0e10cSrcweir }
229cdf0e10cSrcweir }
230cdf0e10cSrcweir
231cdf0e10cSrcweir ::rtl::OString aStringData( ::rtl::OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) );
232cdf0e10cSrcweir uno::Sequence< sal_Int8 > aData( (sal_Int8*)aStringData.getStr(), aStringData.getLength() );
233cdf0e10cSrcweir m_xOutputStream->writeBytes( aData );
234cdf0e10cSrcweir m_aUsersData = aUsersData;
235cdf0e10cSrcweir }
236cdf0e10cSrcweir
237cdf0e10cSrcweir // ----------------------------------------------------------------------
InsertOwnEntry()238cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > ShareControlFile::InsertOwnEntry()
239cdf0e10cSrcweir {
240cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
241cdf0e10cSrcweir
242cdf0e10cSrcweir if ( !IsValid() )
243cdf0e10cSrcweir throw io::NotConnectedException();
244cdf0e10cSrcweir
245cdf0e10cSrcweir GetUsersData();
246cdf0e10cSrcweir uno::Sequence< ::uno::Sequence< ::rtl::OUString > > aNewData( m_aUsersData.getLength() + 1 );
247cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aNewEntry = GenerateOwnEntry();
248cdf0e10cSrcweir
249cdf0e10cSrcweir sal_Bool bExists = sal_False;
250cdf0e10cSrcweir sal_Int32 nNewInd = 0;
251cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < m_aUsersData.getLength(); nInd++ )
252cdf0e10cSrcweir {
253cdf0e10cSrcweir if ( m_aUsersData[nInd].getLength() == SHARED_ENTRYSIZE )
254cdf0e10cSrcweir {
255cdf0e10cSrcweir if ( m_aUsersData[nInd][SHARED_LOCALHOST_ID] == aNewEntry[SHARED_LOCALHOST_ID]
256cdf0e10cSrcweir && m_aUsersData[nInd][SHARED_SYSUSERNAME_ID] == aNewEntry[SHARED_SYSUSERNAME_ID]
257cdf0e10cSrcweir && m_aUsersData[nInd][SHARED_USERURL_ID] == aNewEntry[SHARED_USERURL_ID] )
258cdf0e10cSrcweir {
259cdf0e10cSrcweir if ( !bExists )
260cdf0e10cSrcweir {
261cdf0e10cSrcweir aNewData[nNewInd] = aNewEntry;
262cdf0e10cSrcweir bExists = sal_True;
263cdf0e10cSrcweir }
264cdf0e10cSrcweir }
265cdf0e10cSrcweir else
266cdf0e10cSrcweir {
267cdf0e10cSrcweir aNewData[nNewInd] = m_aUsersData[nInd];
268cdf0e10cSrcweir }
269cdf0e10cSrcweir
270cdf0e10cSrcweir nNewInd++;
271cdf0e10cSrcweir }
272cdf0e10cSrcweir }
273cdf0e10cSrcweir
274cdf0e10cSrcweir if ( !bExists )
275cdf0e10cSrcweir aNewData[nNewInd++] = aNewEntry;
276cdf0e10cSrcweir
277cdf0e10cSrcweir aNewData.realloc( nNewInd );
278cdf0e10cSrcweir SetUsersDataAndStore( aNewData );
279cdf0e10cSrcweir
280cdf0e10cSrcweir return aNewEntry;
281cdf0e10cSrcweir }
282cdf0e10cSrcweir
283cdf0e10cSrcweir // ----------------------------------------------------------------------
HasOwnEntry()284cdf0e10cSrcweir bool ShareControlFile::HasOwnEntry()
285cdf0e10cSrcweir {
286cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
287cdf0e10cSrcweir
288cdf0e10cSrcweir if ( !IsValid() )
289cdf0e10cSrcweir {
290cdf0e10cSrcweir throw io::NotConnectedException();
291cdf0e10cSrcweir }
292cdf0e10cSrcweir
293cdf0e10cSrcweir GetUsersData();
294cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aEntry = GenerateOwnEntry();
295cdf0e10cSrcweir
296cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < m_aUsersData.getLength(); ++nInd )
297cdf0e10cSrcweir {
298cdf0e10cSrcweir if ( m_aUsersData[nInd].getLength() == SHARED_ENTRYSIZE &&
299cdf0e10cSrcweir m_aUsersData[nInd][SHARED_LOCALHOST_ID] == aEntry[SHARED_LOCALHOST_ID] &&
300cdf0e10cSrcweir m_aUsersData[nInd][SHARED_SYSUSERNAME_ID] == aEntry[SHARED_SYSUSERNAME_ID] &&
301cdf0e10cSrcweir m_aUsersData[nInd][SHARED_USERURL_ID] == aEntry[SHARED_USERURL_ID] )
302cdf0e10cSrcweir {
303cdf0e10cSrcweir return true;
304cdf0e10cSrcweir }
305cdf0e10cSrcweir }
306cdf0e10cSrcweir
307cdf0e10cSrcweir return false;
308cdf0e10cSrcweir }
309cdf0e10cSrcweir
310cdf0e10cSrcweir // ----------------------------------------------------------------------
RemoveEntry(const uno::Sequence<::rtl::OUString> & aArgEntry)311cdf0e10cSrcweir void ShareControlFile::RemoveEntry( const uno::Sequence< ::rtl::OUString >& aArgEntry )
312cdf0e10cSrcweir {
313cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
314cdf0e10cSrcweir
315cdf0e10cSrcweir if ( !IsValid() )
316cdf0e10cSrcweir throw io::NotConnectedException();
317cdf0e10cSrcweir
318cdf0e10cSrcweir GetUsersData();
319cdf0e10cSrcweir
320cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aEntry = aArgEntry;
321cdf0e10cSrcweir if ( aEntry.getLength() != SHARED_ENTRYSIZE )
322cdf0e10cSrcweir aEntry = GenerateOwnEntry();
323cdf0e10cSrcweir
324cdf0e10cSrcweir uno::Sequence< ::uno::Sequence< ::rtl::OUString > > aNewData( m_aUsersData.getLength() + 1 );
325cdf0e10cSrcweir
326cdf0e10cSrcweir sal_Int32 nNewInd = 0;
327cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < m_aUsersData.getLength(); nInd++ )
328cdf0e10cSrcweir {
329cdf0e10cSrcweir if ( m_aUsersData[nInd].getLength() == SHARED_ENTRYSIZE )
330cdf0e10cSrcweir {
331cdf0e10cSrcweir if ( m_aUsersData[nInd][SHARED_LOCALHOST_ID] != aEntry[SHARED_LOCALHOST_ID]
332cdf0e10cSrcweir || m_aUsersData[nInd][SHARED_SYSUSERNAME_ID] != aEntry[SHARED_SYSUSERNAME_ID]
333cdf0e10cSrcweir || m_aUsersData[nInd][SHARED_USERURL_ID] != aEntry[SHARED_USERURL_ID] )
334cdf0e10cSrcweir {
335cdf0e10cSrcweir aNewData[nNewInd] = m_aUsersData[nInd];
336cdf0e10cSrcweir nNewInd++;
337cdf0e10cSrcweir }
338cdf0e10cSrcweir }
339cdf0e10cSrcweir }
340cdf0e10cSrcweir
341cdf0e10cSrcweir aNewData.realloc( nNewInd );
342cdf0e10cSrcweir SetUsersDataAndStore( aNewData );
343cdf0e10cSrcweir
344cdf0e10cSrcweir if ( !nNewInd )
345cdf0e10cSrcweir {
346cdf0e10cSrcweir // try to remove the file if it is empty
347cdf0e10cSrcweir RemoveFile();
348cdf0e10cSrcweir }
349cdf0e10cSrcweir }
350cdf0e10cSrcweir
351cdf0e10cSrcweir // ----------------------------------------------------------------------
RemoveFile()352cdf0e10cSrcweir void ShareControlFile::RemoveFile()
353cdf0e10cSrcweir {
354cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex );
355cdf0e10cSrcweir
356cdf0e10cSrcweir if ( !IsValid() )
357cdf0e10cSrcweir throw io::NotConnectedException();
358cdf0e10cSrcweir
359cdf0e10cSrcweir Close();
360cdf0e10cSrcweir
361cdf0e10cSrcweir uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
362cdf0e10cSrcweir uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess(
363cdf0e10cSrcweir xFactory->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SimpleFileAccess") ),
364cdf0e10cSrcweir uno::UNO_QUERY_THROW );
365cdf0e10cSrcweir xSimpleFileAccess->kill( m_aURL );
366cdf0e10cSrcweir }
367cdf0e10cSrcweir
368cdf0e10cSrcweir } // namespace svt
369cdf0e10cSrcweir
370