summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-12-07 09:52:36 +0000
committerRüdiger Timm <rt@openoffice.org>2004-12-07 09:52:36 +0000
commit492993c6c1d9608261205eb2c80c7e1fda0cdb5b (patch)
tree1d46c230af4117c0517f9ff2efff0f242dd41ca5 /ucb
parent1296372c523e9b7a047ba86aec71aa93d93bf256 (diff)
INTEGRATION: CWS sb27 (1.17.4); FILE MERGED
2004/12/03 15:17:23 sb 1.17.4.1: #i38298# Use XJob.execute as a hack replacement for the expensive, recent implementation of fileaccess::XStream_impl::flush.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/filstr.cxx32
1 files changed, 20 insertions, 12 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 14d5a3df573c..104d75c20165 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filstr.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: rt $ $Date: 2004-11-26 14:42:31 $
+ * last change: $Author: rt $ $Date: 2004-12-07 10:52:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,7 +104,8 @@ XStream_impl::queryInterface(
SAL_STATIC_CAST( io::XInputStream*,this ),
SAL_STATIC_CAST( io::XOutputStream*,this ),
SAL_STATIC_CAST( io::XSeekable*,this ),
- SAL_STATIC_CAST( io::XTruncate*,this ) );
+ SAL_STATIC_CAST( io::XTruncate*,this ),
+ SAL_STATIC_CAST( task::XJob*,this ) ); //HACK see #i38298#
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
}
@@ -163,14 +164,15 @@ XStream_impl::getSupportedServiceNames()
//////////////////////////////////////////////////////////////////////////////////////////
-XTYPEPROVIDER_IMPL_7( XStream_impl,
+XTYPEPROVIDER_IMPL_8( XStream_impl,
lang::XTypeProvider,
lang::XServiceInfo,
io::XStream,
io::XSeekable,
io::XInputStream,
io::XOutputStream,
- io::XTruncate )
+ io::XTruncate,
+ task::XJob ) //HACK see #i38298#
@@ -456,13 +458,19 @@ XStream_impl::flush()
io::BufferSizeExceededException,
io::IOException,
uno::RuntimeException )
-{
- if( ! m_nIsOpen ) return;
+{}
- if( m_aFile.sync() != osl::FileBase::E_None ) {
- io::IOException ex;
- ex.Message = rtl::OUString::createFromAscii(
- "could not synchronize file to disc");
- throw ex;
+//HACK see #i38298#
+uno::Any XStream_impl::execute(uno::Sequence< beans::NamedValue > const &)
+ throw (
+ lang::IllegalArgumentException, uno::Exception, uno::RuntimeException)
+{
+ if (m_nIsOpen && m_aFile.sync() != osl::FileBase::E_None) {
+ throw io::IOException(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "could not synchronize file to disc")),
+ static_cast< OWeakObject * >(this));
}
+ return uno::Any();
}