summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/filstr.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-27 11:11:40 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-27 11:11:40 +0000
commit4062491a338dda316aab97ecd119ecaa6dc399a1 (patch)
tree672bb8c9cc2702ba4670efbcc602140fdd89224f /ucb/source/ucp/file/filstr.cxx
parent29f569a326e38b4264e4c42ffe4eb8dd36468869 (diff)
INTEGRATION: CWS kso13 (1.18.6); FILE MERGED
2004/12/17 11:08:42 sb 1.18.6.1: #i38313# Replaced the i38298 XJob hack with the proper new XAsyncOutputMonitor.
Diffstat (limited to 'ucb/source/ucp/file/filstr.cxx')
-rw-r--r--ucb/source/ucp/file/filstr.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index b3a0c511ba..b22164fa96 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.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: rt $ $Date: 2004-12-07 10:52:36 $
+ * last change: $Author: obo $ $Date: 2005-01-27 12:11:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,7 +105,7 @@ XStream_impl::queryInterface(
SAL_STATIC_CAST( io::XOutputStream*,this ),
SAL_STATIC_CAST( io::XSeekable*,this ),
SAL_STATIC_CAST( io::XTruncate*,this ),
- SAL_STATIC_CAST( task::XJob*,this ) ); //HACK see #i38298#
+ SAL_STATIC_CAST( io::XAsyncOutputMonitor*,this ) );
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
}
@@ -172,7 +172,7 @@ XTYPEPROVIDER_IMPL_8( XStream_impl,
io::XInputStream,
io::XOutputStream,
io::XTruncate,
- task::XJob ) //HACK see #i38298#
+ io::XAsyncOutputMonitor )
@@ -460,11 +460,12 @@ XStream_impl::flush()
uno::RuntimeException )
{}
-//HACK see #i38298#
-uno::Any XStream_impl::execute(uno::Sequence< beans::NamedValue > const &)
- throw (
- lang::IllegalArgumentException, uno::Exception, uno::RuntimeException)
+void XStream_impl::waitForCompletion()
+ throw (io::IOException, uno::RuntimeException)
{
+ // At least on UNIX, to reliably learn about any errors encountered by
+ // asynchronous NFS write operations, without closing the file directly
+ // afterwards, there appears to be no cheaper way than to call fsync:
if (m_nIsOpen && m_aFile.sync() != osl::FileBase::E_None) {
throw io::IOException(
rtl::OUString(
@@ -472,5 +473,4 @@ uno::Any XStream_impl::execute(uno::Sequence< beans::NamedValue > const &)
"could not synchronize file to disc")),
static_cast< OWeakObject * >(this));
}
- return uno::Any();
}