[ooo-build-commit] Branch 'ooo/OOO320' - 3 commits -

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Nov 19 17:31:29 PST 2009


 0 files changed

New commits:
commit 1d0b0fe8bf1085177978a88426f652398bce5c29
Author: Mikhail Voitenko <mav at openoffice.org>
Date:   Thu Nov 19 16:23:29 2009 +0000

    #i107035# remove wrongly commited files

diff --git a/package/source/xstor/makefile.mk b/package/source/xstor/makefile.mk
index 703873f..a0e49f2 100644
--- a/package/source/xstor/makefile.mk
+++ b/package/source/xstor/makefile.mk
@@ -52,7 +52,6 @@ SLOFILES =  \
         $(SLO)$/xstorage.obj\
         $(SLO)$/xfactory.obj\
         $(SLO)$/disposelistener.obj\
-        $(SLO)$/selfterminatefilestream.obj\
         $(SLO)$/switchpersistencestream.obj\
         $(SLO)$/register.obj
 
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index eba38e2..d1b5487 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -48,7 +48,6 @@
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/ofopxmlhelper.hxx>
 
-#include "selfterminatefilestream.hxx"
 #include "owriteablestream.hxx"
 #include "oseekinstream.hxx"
 #include "mutexholder.hxx"
@@ -864,10 +863,18 @@ void OWriteStream_Impl::Commit()
     }
     else if ( m_aTempURL.getLength() )
     {
+        uno::Reference < ucb::XSimpleFileAccess > xTempAccess( 
+                        GetServiceFactory()->createInstance ( 
+                                ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ),
+                        uno::UNO_QUERY );
+
+        if ( !xTempAccess.is() )
+            throw uno::RuntimeException(); // TODO:
+
         uno::Reference< io::XInputStream > xInStream;
         try
         {
-            xInStream.set( static_cast< io::XInputStream* >( new OSelfTerminateFileStream( GetServiceFactory(), m_aTempURL ) ), uno::UNO_QUERY );
+            xInStream = xTempAccess->openFileRead( m_aTempURL );
         }
         catch( uno::Exception& )
         {
@@ -2617,8 +2624,6 @@ void SAL_CALL OWriteStream::dispose()
             m_xInStream = uno::Reference< io::XInputStream >();
         }
 
-        m_xSeekable = uno::Reference< io::XSeekable >();
-
         m_pImpl->m_pAntiImpl = NULL;
 
         if ( !m_bInitOnDemand )
commit ac2c824987438c9dd898af5e30bf3bc1d63c08a6
Author: Mikhail Voitenko <mav at openoffice.org>
Date:   Thu Nov 19 16:22:17 2009 +0000

    #i107035# remove wrongly commited files

diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx
deleted file mode 100644
index dd41edb..0000000
--- a/package/source/xstor/selfterminatefilestream.cxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ocompinstream.cxx,v $
- * $Revision: 1.12 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-
-#include "selfterminatefilestream.hxx"
-#include <comphelper/processfactory.hxx>
-
-using namespace ::com::sun::star;
-
-//-----------------------------------------------
-OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< lang::XMultiServiceFactory > xFactory, const ::rtl::OUString& aURL )
-: m_aURL( aURL )
-{
-    uno::Reference< lang::XMultiServiceFactory > xOwnFactory = xFactory;
-    if ( !xOwnFactory.is() )
-        xOwnFactory.set( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
-
-    // IMPORTANT: The implementation is based on idea that m_xFileAccess, m_xInputStream and m_xSeekable are always set
-    // otherwise an exception is thrown in constructor
-
-    m_xFileAccess.set( xOwnFactory->createInstance (
-                            ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ),
-                       uno::UNO_QUERY_THROW );
-
-    m_xInputStream.set( m_xFileAccess->openFileRead( aURL ), uno::UNO_SET_THROW );
-    m_xSeekable.set( m_xInputStream, uno::UNO_QUERY_THROW );
-}
-
-//-----------------------------------------------
-OSelfTerminateFileStream::~OSelfTerminateFileStream()
-{
-    CloseStreamDeleteFile();
-}
-
-//-----------------------------------------------
-void OSelfTerminateFileStream::CloseStreamDeleteFile()
-{
-    try
-    {
-        m_xInputStream->closeInput();
-    }
-    catch( uno::Exception& )
-    {}
-
-    try
-    {
-        m_xFileAccess->kill( m_aURL );
-    }
-    catch( uno::Exception& )
-    {}
-}
-
-//-----------------------------------------------
-sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) 
-        throw ( io::NotConnectedException,
-                io::BufferSizeExceededException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    return m_xInputStream->readBytes( aData, nBytesToRead );
-}
-
-//-----------------------------------------------
-sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) 
-        throw ( io::NotConnectedException,
-                io::BufferSizeExceededException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    return m_xInputStream->readSomeBytes( aData, nMaxBytesToRead );
-}
-
-//-----------------------------------------------
-void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) 
-        throw ( io::NotConnectedException,
-                io::BufferSizeExceededException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    return m_xInputStream->skipBytes( nBytesToSkip );
-}
-
-//-----------------------------------------------
-sal_Int32 SAL_CALL OSelfTerminateFileStream::available(  ) 
-        throw ( io::NotConnectedException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    return m_xInputStream->available();
-}
-
-//-----------------------------------------------
-void SAL_CALL OSelfTerminateFileStream::closeInput(  ) 
-        throw ( io::NotConnectedException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    CloseStreamDeleteFile();
-}
-
-//-----------------------------------------------
-void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location )
-        throw ( lang::IllegalArgumentException,
-                io::IOException,
-                uno::RuntimeException )
-{
-    m_xSeekable->seek( location );
-}
-
-//-----------------------------------------------
-sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition()
-        throw ( io::IOException, 
-                uno::RuntimeException)
-{
-    return m_xSeekable->getPosition();
-}
-
-//-----------------------------------------------
-sal_Int64 SAL_CALL OSelfTerminateFileStream::getLength()
-        throw ( io::IOException,
-                uno::RuntimeException )
-{
-    return m_xSeekable->getLength();
-}
-
diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx
deleted file mode 100644
index 273674d..0000000
--- a/package/source/xstor/selfterminatefilestream.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: ocompinstream.hxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SELFTERMINATEFILESTREAM_HXX_
-#define _SELFTERMINATEFILESTREAM_HXX_
-
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-struct OWriteStream_Impl;
-
-class OSelfTerminateFileStream : public cppu::WeakImplHelper2< ::com::sun::star::io::XInputStream,
-                                                               ::com::sun::star::io::XSeekable >
-{
-protected:
-    ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > m_xFileAccess;
-
-    ::rtl::OUString m_aURL;
-
-    ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream;
-    ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeekable;
-
-public:
-    OSelfTerminateFileStream( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, const ::rtl::OUString& aURL );
-
-    virtual ~OSelfTerminateFileStream();
-
-    void CloseStreamDeleteFile();
-
-    // XInputStream
-    virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) 
-        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) 
-        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) 
-        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual sal_Int32 SAL_CALL available() 
-        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL closeInput() 
-        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-
-    //XSeekable
-    virtual void SAL_CALL seek( sal_Int64 location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual sal_Int64 SAL_CALL getPosition() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-    virtual sal_Int64 SAL_CALL getLength() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-
-};
-
-#endif
-
commit ed05ef3aa47f43bb598d3cc136d26eca6b395ae8
Author: Mikhail Voitenko <mav at openoffice.org>
Date:   Thu Nov 19 16:18:15 2009 +0000

    #i107035# let the temporary file be removed after stream closing

diff --git a/package/source/xstor/makefile.mk b/package/source/xstor/makefile.mk
index a0e49f2..703873f 100644
--- a/package/source/xstor/makefile.mk
+++ b/package/source/xstor/makefile.mk
@@ -52,6 +52,7 @@ SLOFILES =  \
         $(SLO)$/xstorage.obj\
         $(SLO)$/xfactory.obj\
         $(SLO)$/disposelistener.obj\
+        $(SLO)$/selfterminatefilestream.obj\
         $(SLO)$/switchpersistencestream.obj\
         $(SLO)$/register.obj
 
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index d1b5487..eba38e2 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -48,6 +48,7 @@
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/ofopxmlhelper.hxx>
 
+#include "selfterminatefilestream.hxx"
 #include "owriteablestream.hxx"
 #include "oseekinstream.hxx"
 #include "mutexholder.hxx"
@@ -863,18 +864,10 @@ void OWriteStream_Impl::Commit()
     }
     else if ( m_aTempURL.getLength() )
     {
-        uno::Reference < ucb::XSimpleFileAccess > xTempAccess( 
-                        GetServiceFactory()->createInstance ( 
-                                ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ),
-                        uno::UNO_QUERY );
-
-        if ( !xTempAccess.is() )
-            throw uno::RuntimeException(); // TODO:
-
         uno::Reference< io::XInputStream > xInStream;
         try
         {
-            xInStream = xTempAccess->openFileRead( m_aTempURL );
+            xInStream.set( static_cast< io::XInputStream* >( new OSelfTerminateFileStream( GetServiceFactory(), m_aTempURL ) ), uno::UNO_QUERY );
         }
         catch( uno::Exception& )
         {
@@ -2624,6 +2617,8 @@ void SAL_CALL OWriteStream::dispose()
             m_xInStream = uno::Reference< io::XInputStream >();
         }
 
+        m_xSeekable = uno::Reference< io::XSeekable >();
+
         m_pImpl->m_pAntiImpl = NULL;
 
         if ( !m_bInitOnDemand )
diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx
new file mode 100644
index 0000000..dd41edb
--- /dev/null
+++ b/package/source/xstor/selfterminatefilestream.cxx
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ocompinstream.cxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_package.hxx"
+
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+
+#include "selfterminatefilestream.hxx"
+#include <comphelper/processfactory.hxx>
+
+using namespace ::com::sun::star;
+
+//-----------------------------------------------
+OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< lang::XMultiServiceFactory > xFactory, const ::rtl::OUString& aURL )
+: m_aURL( aURL )
+{
+    uno::Reference< lang::XMultiServiceFactory > xOwnFactory = xFactory;
+    if ( !xOwnFactory.is() )
+        xOwnFactory.set( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
+
+    // IMPORTANT: The implementation is based on idea that m_xFileAccess, m_xInputStream and m_xSeekable are always set
+    // otherwise an exception is thrown in constructor
+
+    m_xFileAccess.set( xOwnFactory->createInstance (
+                            ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ),
+                       uno::UNO_QUERY_THROW );
+
+    m_xInputStream.set( m_xFileAccess->openFileRead( aURL ), uno::UNO_SET_THROW );
+    m_xSeekable.set( m_xInputStream, uno::UNO_QUERY_THROW );
+}
+
+//-----------------------------------------------
+OSelfTerminateFileStream::~OSelfTerminateFileStream()
+{
+    CloseStreamDeleteFile();
+}
+
+//-----------------------------------------------
+void OSelfTerminateFileStream::CloseStreamDeleteFile()
+{
+    try
+    {
+        m_xInputStream->closeInput();
+    }
+    catch( uno::Exception& )
+    {}
+
+    try
+    {
+        m_xFileAccess->kill( m_aURL );
+    }
+    catch( uno::Exception& )
+    {}
+}
+
+//-----------------------------------------------
+sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) 
+        throw ( io::NotConnectedException,
+                io::BufferSizeExceededException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    return m_xInputStream->readBytes( aData, nBytesToRead );
+}
+
+//-----------------------------------------------
+sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) 
+        throw ( io::NotConnectedException,
+                io::BufferSizeExceededException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    return m_xInputStream->readSomeBytes( aData, nMaxBytesToRead );
+}
+
+//-----------------------------------------------
+void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) 
+        throw ( io::NotConnectedException,
+                io::BufferSizeExceededException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    return m_xInputStream->skipBytes( nBytesToSkip );
+}
+
+//-----------------------------------------------
+sal_Int32 SAL_CALL OSelfTerminateFileStream::available(  ) 
+        throw ( io::NotConnectedException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    return m_xInputStream->available();
+}
+
+//-----------------------------------------------
+void SAL_CALL OSelfTerminateFileStream::closeInput(  ) 
+        throw ( io::NotConnectedException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    CloseStreamDeleteFile();
+}
+
+//-----------------------------------------------
+void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location )
+        throw ( lang::IllegalArgumentException,
+                io::IOException,
+                uno::RuntimeException )
+{
+    m_xSeekable->seek( location );
+}
+
+//-----------------------------------------------
+sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition()
+        throw ( io::IOException, 
+                uno::RuntimeException)
+{
+    return m_xSeekable->getPosition();
+}
+
+//-----------------------------------------------
+sal_Int64 SAL_CALL OSelfTerminateFileStream::getLength()
+        throw ( io::IOException,
+                uno::RuntimeException )
+{
+    return m_xSeekable->getLength();
+}
+
diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx
new file mode 100644
index 0000000..273674d
--- /dev/null
+++ b/package/source/xstor/selfterminatefilestream.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ocompinstream.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SELFTERMINATEFILESTREAM_HXX_
+#define _SELFTERMINATEFILESTREAM_HXX_
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <cppuhelper/implbase2.hxx>
+
+struct OWriteStream_Impl;
+
+class OSelfTerminateFileStream : public cppu::WeakImplHelper2< ::com::sun::star::io::XInputStream,
+                                                               ::com::sun::star::io::XSeekable >
+{
+protected:
+    ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > m_xFileAccess;
+
+    ::rtl::OUString m_aURL;
+
+    ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream;
+    ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeekable;
+
+public:
+    OSelfTerminateFileStream( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, const ::rtl::OUString& aURL );
+
+    virtual ~OSelfTerminateFileStream();
+
+    void CloseStreamDeleteFile();
+
+    // XInputStream
+    virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) 
+        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) 
+        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) 
+        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL available() 
+        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL closeInput() 
+        throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+    //XSeekable
+    virtual void SAL_CALL seek( sal_Int64 location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int64 SAL_CALL getPosition() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int64 SAL_CALL getLength() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif
+


More information about the ooo-build-commit mailing list