summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-01-17 11:41:14 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-01-17 12:12:19 +0100
commit2fe402cefb5d06bc33b4e0794b7da0b62be68432 (patch)
tree5c63aaaa245a94a44390763c327d9a1a363a8397
parent1c7a5c1fd7d2aa65d7daea25bd2375a04c8a43d0 (diff)
Switch flag sequence of OpenCommandArg3 to NamedValue.
Based on feedback for 09954fc863c8ee900f157cab4458e1dcf51493d3, using the less-bulky NamedValue type instead of PropertyValue. Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
-rw-r--r--comphelper/inc/comphelper/stl_types.hxx12
-rw-r--r--extensions/source/update/feed/updatefeed.cxx7
-rw-r--r--offapi/com/sun/star/ucb/OpenCommandArgument3.idl4
-rw-r--r--ucb/source/ucp/webdav/DAVResourceAccess.cxx2
-rw-r--r--ucb/source/ucp/webdav/DAVResourceAccess.hxx6
-rw-r--r--ucb/source/ucp/webdav/DAVSession.hxx4
-rw-r--r--ucb/source/ucp/webdav/DAVSessionFactory.cxx2
-rw-r--r--ucb/source/ucp/webdav/DAVSessionFactory.hxx4
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx16
-rw-r--r--ucb/source/ucp/webdav/NeonSession.hxx6
10 files changed, 37 insertions, 26 deletions
diff --git a/comphelper/inc/comphelper/stl_types.hxx b/comphelper/inc/comphelper/stl_types.hxx
index 79c4a17de291..477ee67c5204 100644
--- a/comphelper/inc/comphelper/stl_types.hxx
+++ b/comphelper/inc/comphelper/stl_types.hxx
@@ -48,6 +48,7 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
//... namespace comphelper ................................................
namespace comphelper
@@ -130,6 +131,17 @@ public:
}
};
//------------------------------------------------------------------------
+class TNamedValueEqualFunctor : public ::std::binary_function< ::com::sun::star::beans::NamedValue,::rtl::OUString,bool>
+{
+public:
+ TNamedValueEqualFunctor()
+ {}
+ bool operator() (const ::com::sun::star::beans::NamedValue& lhs, const ::rtl::OUString& rhs) const
+ {
+ return !!(lhs.Name == rhs);
+ }
+};
+//------------------------------------------------------------------------
class UStringMixHash
{
sal_Bool m_bCaseSensitive;
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index e3adf43a1219..8d2c9dc2fa5b 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -484,10 +484,9 @@ UpdateInformationProvider::load(const rtl::OUString& rURL)
// Disable KeepAlive in webdav - don't want millions of office
// instances phone home & clog up servers
- uno::Sequence< beans::PropertyValue > aProps( 1 );
- aProps[ 0 ] = beans::PropertyValue(
- UNISTRING("KeepAlive"), -1,
- uno::makeAny(sal_False), beans::PropertyState_DIRECT_VALUE);
+ uno::Sequence< beans::NamedValue > aProps( 1 );
+ aProps[ 0 ] = beans::NamedValue(
+ UNISTRING("KeepAlive"), uno::makeAny(sal_False));
ucb::OpenCommandArgument3 aOpenArgument;
aOpenArgument.Mode = ucb::OpenMode::DOCUMENT;
diff --git a/offapi/com/sun/star/ucb/OpenCommandArgument3.idl b/offapi/com/sun/star/ucb/OpenCommandArgument3.idl
index 0c6925adcce8..39554a6b33a3 100644
--- a/offapi/com/sun/star/ucb/OpenCommandArgument3.idl
+++ b/offapi/com/sun/star/ucb/OpenCommandArgument3.idl
@@ -29,7 +29,7 @@
#define __com_sun_star_ucb_OpenCommandArgument3_idl__
#include <com/sun/star/ucb/OpenCommandArgument2.idl>
-#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/beans/NamedValue.idl>
module com { module sun { module star { module ucb {
@@ -46,7 +46,7 @@ published struct OpenCommandArgument3 : OpenCommandArgument2
<p>WebDav e.g. uses "KeepAlive" to enable/disable the respective http feature.
*/
- sequence< com::sun::star::beans::PropertyValue > OpeningFlags;
+ sequence< com::sun::star::beans::NamedValue > OpeningFlags;
};
}; }; }; };
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index dd537dd39e9c..11b52518638e 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1045,7 +1045,7 @@ void DAVResourceAccess::UNLOCK(
}
//=========================================================================
-void DAVResourceAccess::setFlags( const uno::Sequence< beans::PropertyValue >& rFlags )
+void DAVResourceAccess::setFlags( const uno::Sequence< beans::NamedValue >& rFlags )
throw ( DAVException )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
index d7af79ecb29c..d7335b7d0ec2 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
@@ -35,7 +35,7 @@
#include <osl/mutex.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/ucb/Lock.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include "DAVAuthListener.hxx"
@@ -55,7 +55,7 @@ class DAVResourceAccess
osl::Mutex m_aMutex;
rtl::OUString m_aURL;
rtl::OUString m_aPath;
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aFlags;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > m_aFlags;
rtl::Reference< DAVSession > m_xSession;
rtl::Reference< DAVSessionFactory > m_xSessionFactory;
com::sun::star::uno::Reference<
@@ -73,7 +73,7 @@ public:
DAVResourceAccess & operator=( const DAVResourceAccess & rOther );
- void setFlags( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFlags )
+ void setFlags( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags )
throw ( DAVException );
void setURL( const rtl::OUString & rNewURL )
diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx
index 74db5a526afc..b353d33e644e 100644
--- a/ucb/source/ucp/webdav/DAVSession.hxx
+++ b/ucb/source/ucp/webdav/DAVSession.hxx
@@ -41,7 +41,7 @@
#include "DAVRequestEnvironment.hxx"
namespace com { namespace sun { namespace star { namespace beans {
- struct PropertyValue;
+ struct NamedValue;
} } } }
namespace com { namespace sun { namespace star { namespace ucb {
@@ -71,7 +71,7 @@ public:
}
virtual sal_Bool CanUse( const ::rtl::OUString & inPath,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFlags ) = 0;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags ) = 0;
virtual sal_Bool UsesProxy() = 0;
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
index 8fbdbaae85c9..41e19ae1b22f 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
@@ -40,7 +40,7 @@ DAVSessionFactory::~DAVSessionFactory()
rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
const ::rtl::OUString & inUri,
- const uno::Sequence< beans::PropertyValue >& rFlags,
+ const uno::Sequence< beans::NamedValue >& rFlags,
const uno::Reference< lang::XMultiServiceFactory > & rxSMgr )
throw( DAVException )
{
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
index 9847aec5f3c1..4e642c42af86 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
@@ -43,7 +43,7 @@
using namespace com::sun::star;
namespace com { namespace sun { namespace star { namespace beans {
- struct PropertyValue;
+ struct NamedValue;
} } } }
namespace com { namespace sun { namespace star { namespace lang {
@@ -62,7 +62,7 @@ public:
rtl::Reference< DAVSession >
createDAVSession( const ::rtl::OUString & inUri,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFlags,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags,
const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >&
rxSMgr )
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index ec421ad2b9b4..2ed00dcf047a 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -70,7 +70,7 @@ extern "C" {
#include <com/sun/star/security/CertificateContainer.hpp>
#include <com/sun/star/security/XCertificateContainer.hpp>
#include <com/sun/star/ucb/Lock.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <boost/bind.hpp>
@@ -155,17 +155,17 @@ static sal_uInt16 makeStatusCode( const rtl::OUString & rStatusText )
}
// -------------------------------------------------------------------
-static bool noKeepAlive( const uno::Sequence< beans::PropertyValue >& rFlags )
+static bool noKeepAlive( const uno::Sequence< beans::NamedValue >& rFlags )
{
if ( !rFlags.hasElements() )
return false;
// find "KeepAlive" property
- const beans::PropertyValue* pAry(rFlags.getConstArray());
- const sal_Int32 nLen(rFlags.getLength());
- const beans::PropertyValue* pValue(
+ const beans::NamedValue* pAry(rFlags.getConstArray());
+ const sal_Int32 nLen(rFlags.getLength());
+ const beans::NamedValue* pValue(
std::find_if(pAry,pAry+nLen,
- boost::bind(comphelper::TPropertyValueEqualFunctor(),
+ boost::bind(comphelper::TNamedValueEqualFunctor(),
_1,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KeepAlive")))));
if ( pValue != pAry+nLen && !pValue->Value.get<sal_Bool>() )
@@ -643,7 +643,7 @@ NeonLockStore NeonSession::m_aNeonLockStore;
NeonSession::NeonSession(
const rtl::Reference< DAVSessionFactory > & rSessionFactory,
const rtl::OUString& inUri,
- const uno::Sequence< beans::PropertyValue >& rFlags,
+ const uno::Sequence< beans::NamedValue >& rFlags,
const ucbhelper::InternetProxyDecider & rProxyDecider )
throw ( DAVException )
: DAVSession( rSessionFactory ),
@@ -855,7 +855,7 @@ void NeonSession::Init()
// -------------------------------------------------------------------
// virtual
sal_Bool NeonSession::CanUse( const rtl::OUString & inUri,
- const uno::Sequence< beans::PropertyValue >& rFlags )
+ const uno::Sequence< beans::NamedValue >& rFlags )
{
try
{
diff --git a/ucb/source/ucp/webdav/NeonSession.hxx b/ucb/source/ucp/webdav/NeonSession.hxx
index 4ed7603b0220..f15eac408c4e 100644
--- a/ucb/source/ucp/webdav/NeonSession.hxx
+++ b/ucb/source/ucp/webdav/NeonSession.hxx
@@ -55,7 +55,7 @@ private:
rtl::OUString m_aProxyName;
sal_Int32 m_nPort;
sal_Int32 m_nProxyPort;
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aFlags;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > m_aFlags;
HttpSession * m_pHttpSession;
void * m_pRequestData;
const ucbhelper::InternetProxyDecider & m_rProxyDecider;
@@ -76,13 +76,13 @@ protected:
public:
NeonSession( const rtl::Reference< DAVSessionFactory > & rSessionFactory,
const rtl::OUString& inUri,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFlags,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags,
const ucbhelper::InternetProxyDecider & rProxyDecider )
throw ( DAVException );
// DAVSession methods
virtual sal_Bool CanUse( const ::rtl::OUString & inPath,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFlags );
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags );
virtual sal_Bool UsesProxy();