summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 16:58:27 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 16:58:27 +0000
commit0e2ed83d4fc48197ebb7e4c877284a060f53b095 (patch)
tree84f00f9d22ff529c4a327200bf9e2a397b1a1a68 /package
parentf17c7e04be85e666622a6bfe469fff22261c7dfa (diff)
INTEGRATION: CWS readstorage (1.2.20); FILE MERGED
2004/01/09 09:04:48 mav 1.2.20.1: #114521# cloning of storage's subelements
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/ocompinstream.hxx10
-rw-r--r--package/source/xstor/oseekinstream.cxx39
2 files changed, 42 insertions, 7 deletions
diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx
index 7be9eb3dbb90..b56f912917c7 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ocompinstream.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2003-09-11 10:14:51 $
+ * last change: $Author: hr $ $Date: 2004-02-03 17:58:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -111,6 +111,9 @@ protected:
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > m_aProperties;
+ sal_Bool m_bDisposed;
+
+ OInputCompStream();
OInputCompStream( OWriteStream_Impl& pImpl );
public:
@@ -118,6 +121,9 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xStream,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps );
+ OInputCompStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xStream,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps );
+
virtual ~OInputCompStream();
void InternalDispose();
diff --git a/package/source/xstor/oseekinstream.cxx b/package/source/xstor/oseekinstream.cxx
index bf3293827ba7..6e89919ae9f8 100644
--- a/package/source/xstor/oseekinstream.cxx
+++ b/package/source/xstor/oseekinstream.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: oseekinstream.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2003-09-11 10:15:03 $
+ * last change: $Author: hr $ $Date: 2004-02-03 17:58:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,6 +107,35 @@ OInputSeekStream::OInputSeekStream( OWriteStream_Impl& pImpl,
}
}
+OInputSeekStream::OInputSeekStream( uno::Reference < io::XStream > xStream,
+ const uno::Sequence< beans::PropertyValue >& aProps )
+: OInputCompStream()
+{
+ OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
+
+ if ( xStream.is() )
+ {
+ m_xStream = xStream->getInputStream();
+ m_xSeekable = uno::Reference< io::XSeekable >( xStream, uno::UNO_QUERY );
+
+ OSL_ENSURE( m_xStream.is(), "No input stream is provided!\n" );
+ OSL_ENSURE( m_xSeekable.is(), "No seeking support!\n" );
+ }
+
+ m_aProperties = aProps;
+}
+
+OInputSeekStream::OInputSeekStream( uno::Reference < io::XInputStream > xStream,
+ const uno::Sequence< beans::PropertyValue >& aProps )
+: OInputCompStream( xStream, aProps )
+{
+ if ( m_xStream.is() )
+ {
+ m_xSeekable = uno::Reference< io::XSeekable >( m_xStream, uno::UNO_QUERY );
+ OSL_ENSURE( m_xSeekable.is(), "No seeking support!\n" );
+ }
+}
+
OInputSeekStream::~OInputSeekStream()
{
}
@@ -170,7 +199,7 @@ void SAL_CALL OInputSeekStream::seek( sal_Int64 location )
uno::RuntimeException )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- if ( !m_pImpl )
+ if ( m_bDisposed )
throw lang::DisposedException();
if ( !m_xSeekable.is() )
@@ -184,7 +213,7 @@ sal_Int64 SAL_CALL OInputSeekStream::getPosition()
uno::RuntimeException)
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- if ( !m_pImpl )
+ if ( m_bDisposed )
throw lang::DisposedException();
if ( !m_xSeekable.is() )
@@ -198,7 +227,7 @@ sal_Int64 SAL_CALL OInputSeekStream::getLength()
uno::RuntimeException )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- if ( !m_pImpl )
+ if ( m_bDisposed )
throw lang::DisposedException();
if ( !m_xSeekable.is() )