summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-05-10 12:08:16 +0000
committerKurt Zenker <kz@openoffice.org>2007-05-10 12:08:16 +0000
commitc906c79de36c9e423d62219417bad2ecc076e581 (patch)
tree75437c6c8ee15c2f50887cf4d7fc9d172382cc77
parented9454240552ecc21f577770bf132db9243733ac (diff)
INTEGRATION: CWS ucbfixes01 (1.52.24); FILE MERGED
2007/04/25 12:02:14 kso 1.52.24.2: #i71386# - code cleanup. 2007/04/18 15:08:58 kso 1.52.24.1: #142226# - Content::insert(): Environment reference might be null!
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx34
1 files changed, 28 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 355b188cb6b5..e7b24dfa19f9 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: webdavcontent.cxx,v $
*
- * $Revision: 1.52 $
+ * $Revision: 1.53 $
*
- * last change: $Author: kz $ $Date: 2006-12-13 15:05:32 $
+ * last change: $Author: kz $ $Date: 2007-05-10 13:08:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -36,7 +36,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_ucb.hxx"
-#define BUG_110335 1
/**************************************************************************
TODO
**************************************************************************
@@ -2170,7 +2169,8 @@ uno::Any Content::open(
// throw away previously cached headers.
m_xCachedProps.reset();
}
-
+#if 1
+ // fill inpustream async; return immediately
DAVResourceAccessThread * th =
new DAVResourceAccessThread(
m_xSMgr,
@@ -2192,6 +2192,25 @@ uno::Any Content::open(
m_xCachedProps.reset(
new ContentProperties( th->getResource() ) );
}
+#else
+ // fill inputsream sync; return if all data present
+ DAVResource aResource;
+ std::vector< rtl::OUString > aHeaders;
+// // Obtain list containing all HTTP headers that can
+// // be mapped to UCB properties.
+// ContentProperties::getMappableHTTPHeaders( aHeaders );
+ uno::Reference< io::XInputStream > xIn
+ = m_xResAccess->GET( aHeaders, aResource, xEnv );
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ m_xCachedProps.reset(
+ new ContentProperties( aResource ) );
+ }
+
+ xDataSink->setInputStream( xIn );
+#endif
}
catch ( DAVException const & e )
{
@@ -2390,8 +2409,11 @@ void Content::insert(
static_cast< cppu::OWeakObject * >( this ),
star::ucb::NameClash::ERROR );
- uno::Reference< task::XInteractionHandler > xIH
- = Environment->getInteractionHandler();
+ uno::Reference< task::XInteractionHandler > xIH;
+
+ if ( Environment.is() )
+ xIH = Environment->getInteractionHandler();
+
if ( xIH.is() )
{
uno::Any aExAsAny( uno::makeAny( aEx ) );