diff options
40 files changed, 379 insertions, 346 deletions
diff --git a/configure.in b/configure.in index 7de56664401c..764dbc5d2e17 100644 --- a/configure.in +++ b/configure.in @@ -553,9 +553,6 @@ AC_ARG_ENABLE(Xaw, [ --disable-Xaw Disables the use of Xaw for the Netscape/Mozilla plugin ],,) -AC_ARG_WITH(system-neon, -[ --with-system-neon Use neon already on system -],,) AC_ARG_ENABLE(hunspell, [ --enable-hunspell Determines whether to enable the Hunspell library. If enabled, the library will be built unless you @@ -5134,23 +5131,6 @@ AC_SUBST(XRANDR_LIBS) AC_SUBST(ENABLE_RANDR) dnl =================================================================== -dnl Check for system neon -dnl =================================================================== -AC_MSG_CHECKING([which neon is used]) -if test -n "$with_system_neon" -o -n "$with_system_libs" && \ - test "$with_system_neon" != "no"; then - AC_MSG_RESULT([external]) - PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon])) - NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" - NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" - SYSTEM_NEON=YES -fi -AC_SUBST(SYSTEM_NEON) -AC_SUBST(NEON_VERSION) -AC_SUBST(NEON_LIBS) -AC_SUBST(NEON_CFLAGS) - -dnl =================================================================== dnl Check for system openssl dnl =================================================================== if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index b68897bcb8e7..4445df65fbd1 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -153,6 +153,7 @@ my_components = \ tvhlp1 \ ucb1 \ ucpchelp1 \ + ucpdav1 \ ucpexpand1 \ ucpext \ ucpfile1 \ @@ -215,10 +216,6 @@ my_components += wpft my_components += emboleobj .END -.IF "$(SYSTEM_NEON)" == "YES" -my_components += ucpdav1 -.END - .IF "$(ENABLE_CAIRO_CANVAS)" == "TRUE" my_components += cairocanvas .END diff --git a/sccomp/source/solver/makefile.mk b/sccomp/source/solver/makefile.mk index 1719caa63840..b8130fc44e58 100644 --- a/sccomp/source/solver/makefile.mk +++ b/sccomp/source/solver/makefile.mk @@ -59,7 +59,7 @@ SHL1STDLIBS= $(COMPHELPERLIB) \ $(CPPULIB) \ $(SALLIB) \ $(TOOLSLIB) \ - $(COINMPLIB) + $(COINMPLIBS) SHL1DEPN= makefile.mk SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 2472d89faeda..f65121829e38 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -1513,9 +1513,7 @@ File gid_File_Lib_Ucpchelp1 Styles = (PACKED); End -#ifdef SYSTEM_NEON SPECIAL_LIB_FILE(gid_File_Lib_Ucpdav1,ucpdav1) -#endif SPECIAL_LIB_FILE(gid_File_Lib_Ucpfile1,ucpfile1) @@ -2000,3 +1998,48 @@ End #endif #endif +File gid_File_Lib_Apr + #ifdef WNT + Name = SPECIAL_NAME(libapr-1); + #else + // Looks like the major version number is part of the name, not + // part of the suffix. An error? + #ifdef MACOSX + Name = STRING(CONCAT6(libapr-1,.0.,APR_MINOR,.,APR_MICRO,UNXSUFFIX)); + #else + Name = STRING(CONCAT6(libapr-1,UNXSUFFIX,.0.,APR_MINOR,.,APR_MICRO)); + #endif + #endif + PACKED_LIB_FILE_BODY; +End + +File gid_File_Lib_AprUtil + #ifdef WNT + Name = SPECIAL_NAME(apr-util); + #else + // Looks like the major version number is part of the name, not + // part of the suffix. An error? + #ifdef MACOSX + Name = STRING(CONCAT6(libaprutil-1,.0.,APR_UTIL_MINOR,.,APR_UTIL_MICRO,UNXSUFFIX)); + #else + Name = STRING(CONCAT6(libaprutil-1,UNXSUFFIX,.0.,APR_UTIL_MINOR,.,APR_UTIL_MICRO)); + #endif + #endif + PACKED_LIB_FILE_BODY; +End + +File gid_File_Lib_Serf + #ifdef WNT + Name = SPECIAL_NAME(serf); + #else + // Looks like the major version number is part of the name, not + // part of the suffix. An error? + #ifdef MACOSX + Name = STRING(CONCAT6(libserf-1,.0.,SERF_MINOR,.,SERF_MICRO,UNXSUFFIX)); + #else + Name = STRING(CONCAT6(libserf-1,UNXSUFFIX,.0.,SERF_MINOR,.,SERF_MICRO)); + #endif + #endif + PACKED_LIB_FILE_BODY; +End + diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk index e08d8201c461..8a1b9342b376 100644 --- a/scp2/source/ooo/makefile.mk +++ b/scp2/source/ooo/makefile.mk @@ -240,6 +240,21 @@ SCPDEFS+=-DOPENSSL SCPDEFS+=-DDISABLE_ATL .ENDIF +# Detect version numbers for apr, apr-util, serf. +.INCLUDE : apr_version.mk +.INCLUDE : aprutil_version.mk +.INCLUDE : serf_version.mk +SCPDEFS+=\ + -DAPR_MAJOR=$(APR_MAJOR) \ + -DAPR_MINOR=$(APR_MINOR) \ + -DAPR_MICRO=$(APR_MICRO) \ + -DAPR_UTIL_MAJOR=$(APR_UTIL_MAJOR) \ + -DAPR_UTIL_MINOR=$(APR_UTIL_MINOR) \ + -DAPR_UTIL_MICRO=$(APR_UTIL_MICRO) \ + -DSERF_MAJOR=$(SERF_MAJOR) \ + -DSERF_MINOR=$(SERF_MINOR) \ + -DSERF_MICRO=$(SERF_MICRO) + .IF "$(SYSTEM_PYTHON)" == "YES" SCPDEFS+=-DSYSTEM_PYTHON .ENDIF diff --git a/scp2/source/ooo/shortcut_ooo.scp b/scp2/source/ooo/shortcut_ooo.scp index 4bc88a7f2421..eb5717f59c00 100644 --- a/scp2/source/ooo/shortcut_ooo.scp +++ b/scp2/source/ooo/shortcut_ooo.scp @@ -90,4 +90,45 @@ End #endif +#ifdef UNX + +// Create links to the fully quantified libraries apr, apr-util, and serf. +// The major version number is handled in a non-standard way (part of the name). +// Therefore the hard-coded .0 suffix. + +Shortcut gid_Shortcut_Lib_Apr + FileID = gid_File_Lib_Apr; + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = STRING(CONCAT2(libapr-1.0,UNXSUFFIX)); + #else + Name = STRING(CONCAT3(libapr-1,UNXSUFFIX,.0)); + #endif + Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE); +End + +Shortcut gid_Shortcut_Lib_AprUtil + FileID = gid_File_Lib_AprUtil; + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = STRING(CONCAT2(libaprutil-1.0,UNXSUFFIX)); + #else + Name = STRING(CONCAT3(libaprutil-1,UNXSUFFIX,.0)); + #endif + Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE); +End + +Shortcut gid_Shortcut_Lib_Serf + FileID = gid_File_Lib_Serf; + Dir = SCP2_OOO_BIN_DIR; + #ifdef MACOSX + Name = STRING(CONCAT2(libserf-1.0,UNXSUFFIX)); + #else + Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.0)); + #endif + Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE); +End + +#endif + //i44154 -end- diff --git a/set_soenv.in b/set_soenv.in index 920c72843e25..61aa9240e8b1 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1974,16 +1974,12 @@ ToFile( "CURL_LIBS", "@CURL_LIBS@", "e" ); ToFile( "SYSTEM_BOOST", "@SYSTEM_BOOST@", "e" ); ToFile( "SYSTEM_MDDS", "@SYSTEM_MDDS@", "e" ); ToFile( "SYSTEM_VIGRA", "@SYSTEM_VIGRA@", "e" ); -ToFile( "SYSTEM_NEON", "@SYSTEM_NEON@", "e" ); ToFile( "SYSTEM_GDKPIXBUF", "@SYSTEM_GDKPIXBUF@", "e" ); ToFile( "SYSTEM_GLIB", "@SYSTEM_GLIB@", "e" ); ToFile( "SYSTEM_GETTEXT", "@SYSTEM_GETTEXT@", "e" ); ToFile( "SYSTEM_PANGO", "@SYSTEM_PANGO@", "e" ); ToFile( "SYSTEM_LIBPNG", "@SYSTEM_LIBPNG@", "e" ); ToFile( "SYSTEM_LIBJPEG", "@SYSTEM_LIBJPEG@", "e" ); -ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" ); -ToFile( "NEON_LIBS", "@NEON_LIBS@", "e" ); -ToFile( "NEON_CFLAGS", "@NEON_CFLAGS@", "e" ); ToFile( "DISABLE_XAW", "@DISABLE_XAW@", "e" ); ToFile( "DMAKE_URL", "@DMAKE_URL@", "e" ); ToFile( "DMAKE_PATH", "@DMAKE_PATH@", "e" ); diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk index f037b7f7752a..2bb9bb8b60c7 100644 --- a/solenv/inc/libs.mk +++ b/solenv/inc/libs.mk @@ -350,7 +350,8 @@ MYTHESLIB=-lmythes MYTHESLIB=-lmythes-1.2 .ENDIF PYUNOLIB=-lpyuno -COINMPLIB=-lCoinMP -lCoinUtils -lClp -lCbc -lOsi -lOsiClp -lCgl -lCbcSolver +COINMPLIBS=-lCoinMP -lCoinUtils -lClp -lCbc -lOsi -lOsiClp -lCgl -lCbcSolver +SERFLIBS=-lapr-1 -laprutil-1 -lserf-1 SOFFICELIB=-lsofficeapp UNOPKGAPPLIB=-lunopkgapp TESTLIB=-ltest @@ -524,7 +525,8 @@ HUNSPELLLIB=$(LIBPRE) libhunspell.lib .ENDIF MYTHESLIB=libmythes.lib PYUNOLIB=ipyuno.lib -COINMPLIB=CoinMP.lib +COINMPLIBS=CoinMP.lib +SERFLIBS=libapr-1.lib iapr-util.lib iserf.lib SOFFICELIB=isofficeapp.lib UNOPKGAPPLIB=iunopkgapp.lib TESTLIB=itest.lib diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index d40c96d7eb99..8043d9326efe 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -31,7 +31,7 @@ *************************************************************************/ #include <osl/diagnose.h> #include <com/sun/star/util/DateTime.hpp> -#include "NeonUri.hxx" +#include "SerfUri.hxx" #include "DAVResource.hxx" #include "DAVProperties.hxx" #include "DateTimeHelper.hxx" @@ -39,7 +39,7 @@ #include "ContentProperties.hxx" using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; /* ============================================================================= @@ -97,7 +97,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) // Title try { - NeonUri aURI( rResource.uri ); + SerfUri aURI( rResource.uri ); m_aEscapedTitle = aURI.GetPathBaseName(); (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] @@ -564,9 +564,6 @@ void ContentProperties::addProperty( const rtl::OUString & rName, ? rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ) : rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true ); } - // else if ( rName.equals( DAVProperties::SOURCE ) ) - // { - // } // else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) ) // { // } diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx index 06a1f5ecfe41..0185a127527e 100644 --- a/ucb/source/ucp/webdav/ContentProperties.hxx +++ b/ucb/source/ucp/webdav/ContentProperties.hxx @@ -35,7 +35,7 @@ namespace com { namespace sun { namespace star { namespace beans { struct Property; } } } } -namespace webdav_ucp +namespace http_dav_ucp { struct DAVResource; @@ -218,6 +218,6 @@ public: operator const ContentProperties & () const { return m_aProps; } }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif /* !_WEBDAV_UCP_CONTENTPROPERTIES_HXX */ diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index 056888471c0b..c101fb2dc413 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/uno/XReference.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> -namespace webdav_ucp +namespace http_dav_ucp { class DAVAuthListener : public salhelper::SimpleReferenceObject @@ -43,6 +43,6 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject sal_Bool bCanUseSystemCredentials ) = 0; }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVAUTHLISTENER_HXX_ diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index b4723d9cc59b..ce386994f002 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -27,7 +27,7 @@ #include "DAVAuthListener.hxx" -namespace webdav_ucp +namespace http_dav_ucp { //========================================================================= diff --git a/ucb/source/ucp/webdav/DAVException.hxx b/ucb/source/ucp/webdav/DAVException.hxx index 38acd89422ec..7111d5df5bea 100644 --- a/ucb/source/ucp/webdav/DAVException.hxx +++ b/ucb/source/ucp/webdav/DAVException.hxx @@ -26,7 +26,7 @@ #include <rtl/ustring.hxx> -namespace webdav_ucp +namespace http_dav_ucp { ///////////////////////////////////////////////////////////////////////////// @@ -139,17 +139,24 @@ class DAVException sal_uInt16 mStatusCode; public: - DAVException( ExceptionCode inExceptionCode ) : - mExceptionCode( inExceptionCode ), mStatusCode( SC_NONE ) {}; + DAVException( ExceptionCode inExceptionCode ) + : mExceptionCode( inExceptionCode ) + , mData() + , mStatusCode( SC_NONE ) + {}; DAVException( ExceptionCode inExceptionCode, - const rtl::OUString & rData ) : - mExceptionCode( inExceptionCode ), mData( rData ), - mStatusCode( SC_NONE ) {}; + const rtl::OUString & rData ) + : mExceptionCode( inExceptionCode ) + , mData( rData ) + , mStatusCode( SC_NONE ) + {}; DAVException( ExceptionCode inExceptionCode, const rtl::OUString & rData, - sal_uInt16 nStatusCode ) : - mExceptionCode( inExceptionCode ), mData( rData ), - mStatusCode( nStatusCode ) {}; + sal_uInt16 nStatusCode ) + : mExceptionCode( inExceptionCode ) + , mData( rData ) + , mStatusCode( nStatusCode ) + {}; ~DAVException( ) {}; const ExceptionCode & getError() const { return mExceptionCode; } @@ -157,6 +164,6 @@ class DAVException sal_uInt16 getStatus() const { return mStatusCode; } }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVEXCEPTION_HXX_ diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 1488042d35b6..786a363a93bf 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -27,7 +27,7 @@ #include <string.h> #include "DAVProperties.hxx" -using namespace webdav_ucp; +using namespace http_dav_ucp; const ::rtl::OUString DAVProperties::CREATIONDATE = ::rtl::OUString::createFromAscii( "DAV:creationdate" ); @@ -47,8 +47,6 @@ const ::rtl::OUString DAVProperties::LOCKDISCOVERY = ::rtl::OUString::createFromAscii( "DAV:lockdiscovery" ); const ::rtl::OUString DAVProperties::RESOURCETYPE = ::rtl::OUString::createFromAscii( "DAV:resourcetype" ); -const ::rtl::OUString DAVProperties::SOURCE = - ::rtl::OUString::createFromAscii( "DAV:source" ); const ::rtl::OUString DAVProperties::SUPPORTEDLOCK = ::rtl::OUString::createFromAscii( "DAV:supportedlock" ); @@ -58,8 +56,8 @@ const ::rtl::OUString DAVProperties::EXECUTABLE = // ------------------------------------------------------------------- // static -void DAVProperties::createNeonPropName( const rtl::OUString & rFullName, - NeonPropName & rName ) +void DAVProperties::createSerfPropName( const rtl::OUString & rFullName, + SerfPropName & rName ) { if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "DAV:" ) ) == 0 ) { @@ -145,9 +143,10 @@ void DAVProperties::createUCBPropName( const char * nspace, DAVProperties::GETCONTENTLENGTH.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::GETCONTENTTYPE.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::GETETAG.matchIgnoreAsciiCase( aName, 4 ) || - DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) || - DAVProperties::SOURCE.matchIgnoreAsciiCase( aName, 4 ) ) + DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) ) + { aNameSpace = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DAV:" ) ); + } } // Note: Concatenating strings BEFORE comparing against known namespaces @@ -186,7 +185,7 @@ void DAVProperties::createUCBPropName( const char * nspace, // ------------------------------------------------------------------- // static -bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName ) +bool DAVProperties::isUCBDeadProperty( const SerfPropName & rName ) { return ( rName.nspace && ( rtl_str_compareIgnoreAsciiCase( diff --git a/ucb/source/ucp/webdav/DAVProperties.hxx b/ucb/source/ucp/webdav/DAVProperties.hxx index cddc242b5c7d..dc9e378be361 100644 --- a/ucb/source/ucp/webdav/DAVProperties.hxx +++ b/ucb/source/ucp/webdav/DAVProperties.hxx @@ -24,9 +24,9 @@ #define _DAVPROPERTIES_HXX_ #include <rtl/ustring.hxx> -#include "NeonTypes.hxx" +#include "SerfTypes.hxx" -namespace webdav_ucp +namespace http_dav_ucp { struct DAVProperties @@ -40,19 +40,18 @@ struct DAVProperties static const ::rtl::OUString GETLASTMODIFIED; static const ::rtl::OUString LOCKDISCOVERY; static const ::rtl::OUString RESOURCETYPE; - static const ::rtl::OUString SOURCE; static const ::rtl::OUString SUPPORTEDLOCK; static const ::rtl::OUString EXECUTABLE; - static void createNeonPropName( const rtl::OUString & rFullName, - NeonPropName & rName ); + static void createSerfPropName( const rtl::OUString & rFullName, + SerfPropName & rName ); static void createUCBPropName ( const char * nspace, const char * name, rtl::OUString & rFullName ); - static bool isUCBDeadProperty( const NeonPropName & rName ); + static bool isUCBDeadProperty( const SerfPropName & rName ); }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVPROPERTIES_HXX_ diff --git a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx index 6df39f8842e1..a394dec9766c 100644 --- a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx +++ b/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx @@ -27,7 +27,7 @@ #include <rtl/ref.hxx> #include "DAVAuthListener.hxx" -namespace webdav_ucp +namespace http_dav_ucp { typedef std::pair< rtl::OUString, rtl::OUString > DAVRequestHeader; typedef std::vector< DAVRequestHeader > DAVRequestHeaders; @@ -53,6 +53,6 @@ DAVRequestEnvironment( const rtl::OUString & rRequestURI, DAVRequestEnvironment() {} }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVREQUESTENVIRONMENT_HXX_ diff --git a/ucb/source/ucp/webdav/DAVResource.hxx b/ucb/source/ucp/webdav/DAVResource.hxx index 6707b1cb5b9b..a56b76626ae8 100644 --- a/ucb/source/ucp/webdav/DAVResource.hxx +++ b/ucb/source/ucp/webdav/DAVResource.hxx @@ -29,7 +29,7 @@ #include "rtl/ustring.hxx" #include "com/sun/star/uno/Any.hxx" -namespace webdav_ucp +namespace http_dav_ucp { struct DAVPropertyValue @@ -58,6 +58,6 @@ struct DAVResourceInfo DAVResourceInfo( const ::rtl::OUString & inUri ) : uri( inUri ) {} }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVRESOURCE_HXX_ diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index f28bf4ef17a2..b3eb44baf059 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -35,7 +35,7 @@ #include "DAVAuthListenerImpl.hxx" #include "DAVResourceAccess.hxx" -using namespace webdav_ucp; +using namespace http_dav_ucp; using namespace com::sun::star; //========================================================================= @@ -169,48 +169,6 @@ DAVResourceAccess & DAVResourceAccess::operator=( return *this; } -#if 0 // currently not used, but please don't remove code -//========================================================================= -void DAVResourceAccess::OPTIONS( - DAVCapabilities & rCapabilities, - const uno::Reference< ucb::XCommandEnvironment > & xEnv ) - throw( DAVException ) -{ - initialize(); - - bool bRetry; - int errorCount = 0; - do - { - bRetry = false; - try - { - DAVRequestHeaders aHeaders; - getUserRequestHeaders( xEnv, - getRequestURI(), - rtl::OUString::createFromAscii( - "OPTIONS" ), - aHeaders ); - - m_xSession->OPTIONS( getRequestURI(), - rCapabilities, - DAVRequestEnvironment( - getRequestURI(), - new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders, xEnv) ); - } - catch ( DAVException & e ) - { - errorCount++; - bRetry = handleException( e, errorCount ); - if ( !bRetry ) - throw; - } - } - while ( bRetry ); -} -#endif - //========================================================================= void DAVResourceAccess::PROPFIND( const Depth nDepth, @@ -1056,7 +1014,7 @@ void DAVResourceAccess::initialize() osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( m_aPath.getLength() == 0 ) { - NeonUri aURI( m_aURL ); + SerfUri aURI( m_aURL ); rtl::OUString aPath( aURI.GetPath() ); /* #134089# - Check URI */ @@ -1147,10 +1105,10 @@ sal_Bool DAVResourceAccess::detectRedirectCycle( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - NeonUri aUri( rRedirectURL ); + SerfUri aUri( rRedirectURL ); - std::vector< NeonUri >::const_iterator it = m_aRedirectURIs.begin(); - std::vector< NeonUri >::const_iterator end = m_aRedirectURIs.end(); + std::vector< SerfUri >::const_iterator it = m_aRedirectURIs.begin(); + std::vector< SerfUri >::const_iterator end = m_aRedirectURIs.end(); while ( it != end ) { @@ -1169,9 +1127,9 @@ void DAVResourceAccess::resetUri() osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( m_aRedirectURIs.size() > 0 ) { - std::vector< NeonUri >::const_iterator it = m_aRedirectURIs.begin(); + std::vector< SerfUri >::const_iterator it = m_aRedirectURIs.begin(); - NeonUri aUri( (*it) ); + SerfUri aUri( (*it) ); m_aRedirectURIs.clear(); setURL ( aUri.GetURI() ); initialize(); diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 53c2218c4c16..ffad95cde367 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -37,9 +37,9 @@ #include "DAVSession.hxx" #include "DAVResource.hxx" #include "DAVTypes.hxx" -#include "NeonUri.hxx" +#include "SerfUri.hxx" -namespace webdav_ucp +namespace http_dav_ucp { class DAVSessionFactory; @@ -53,7 +53,7 @@ class DAVResourceAccess rtl::Reference< DAVSessionFactory > m_xSessionFactory; com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - std::vector< NeonUri > m_aRedirectURIs; + std::vector< SerfUri > m_aRedirectURIs; public: DAVResourceAccess() : m_xSessionFactory( 0 ) {} @@ -79,14 +79,6 @@ public: // DAV methods // -#if 0 // currently not used, but please don't remove code - void - OPTIONS( DAVCapabilities & rCapabilities, - const com::sun::star::uno::Reference< - com::sun::star::ucb::XCommandEnvironment > & xEnv ) - throw ( DAVException ); -#endif - // allprop & named void PROPFIND( const Depth nDepth, @@ -242,6 +234,6 @@ private: throw ( DAVException ); }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVRESOURCEACCESS_HXX_ diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 2929b8df9d87..579b3b241f06 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -39,7 +39,7 @@ namespace com { namespace sun { namespace star { namespace ucb { struct Lock; } } } } -namespace webdav_ucp +namespace http_dav_ucp { class DAVAuthListener; @@ -68,10 +68,13 @@ public: // DAV methods // + // NOT USED + /* virtual void OPTIONS( const ::rtl::OUString & inPath, DAVCapabilities & outCapabilities, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + */ // allprop & named virtual void PROPFIND( const ::rtl::OUString & inPath, @@ -210,6 +213,6 @@ private: #endif // WNT }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVSESSION_HXX_ diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index 1c965ac1443a..27197a39982f 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx @@ -24,11 +24,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" #include "DAVSessionFactory.hxx" -#include "NeonSession.hxx" -#include "NeonUri.hxx" +#include "SerfSession.hxx" +#include "SerfUri.hxx" #include <com/sun/star/lang/XMultiServiceFactory.hpp> -using namespace webdav_ucp; +using namespace http_dav_ucp; using namespace com::sun::star; DAVSessionFactory::~DAVSessionFactory() @@ -60,10 +60,10 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( if ( aIt == aEnd ) { - NeonUri aURI( inUri ); + SerfUri aURI( inUri ); std::auto_ptr< DAVSession > xElement( - new NeonSession( this, inUri, *m_xProxyDecider.get() ) ); + new SerfSession( this, inUri, *m_xProxyDecider.get() ) ); aIt = m_aMap.insert( Map::value_type( inUri, xElement.get() ) ).first; aIt->second->m_aContainerIt = aIt; @@ -84,9 +84,9 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( // If URL scheme is different from http or https we definitely // have to use a proxy and therefore can optimize the getProxy // call a little: - NeonUri aURI( inUri ); + SerfUri aURI( inUri ); - aIt->second = new NeonSession( this, inUri, *m_xProxyDecider.get() ); + aIt->second = new SerfSession( this, inUri, *m_xProxyDecider.get() ); aIt->second->m_aContainerIt = aIt; return aIt->second; } diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx index 3f905928e214..809686cbde4b 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx @@ -41,7 +41,7 @@ namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } -namespace webdav_ucp +namespace http_dav_ucp { class DAVSession; @@ -73,6 +73,6 @@ private: friend class DAVSession; }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVSESSIONFACTORY_HXX_ diff --git a/ucb/source/ucp/webdav/DAVTypes.hxx b/ucb/source/ucp/webdav/DAVTypes.hxx index 9c65cd6725f3..611861c71021 100644 --- a/ucb/source/ucp/webdav/DAVTypes.hxx +++ b/ucb/source/ucp/webdav/DAVTypes.hxx @@ -27,7 +27,7 @@ #include <rtl/ustring.hxx> #include <com/sun/star/uno/Any.hxx> -namespace webdav_ucp +namespace http_dav_ucp { /* RFC 2518 @@ -76,6 +76,6 @@ struct ProppatchValue : operation( o ), name( n ), value( v ) {} }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif // _DAVTYPES_HXX_ diff --git a/ucb/source/ucp/webdav/DateTimeHelper.cxx b/ucb/source/ucp/webdav/DateTimeHelper.cxx index f673dd8fc75f..912d9f81ad67 100644 --- a/ucb/source/ucp/webdav/DateTimeHelper.cxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star::util; using namespace rtl; -using namespace webdav_ucp; +using namespace http_dav_ucp; bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s, DateTime& dateTime) diff --git a/ucb/source/ucp/webdav/DateTimeHelper.hxx b/ucb/source/ucp/webdav/DateTimeHelper.hxx index b8395033ec33..b2f619337bb0 100644 --- a/ucb/source/ucp/webdav/DateTimeHelper.hxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.hxx @@ -34,7 +34,7 @@ namespace rtl { class OUString; } -namespace webdav_ucp +namespace http_dav_ucp { class DateTimeHelper @@ -53,7 +53,7 @@ public: ::com::sun::star::util::DateTime& ); }; -} // namespace webdav_ucp +} // namespace http_dav_ucp #endif diff --git a/ucb/source/ucp/webdav/PropertyMap.hxx b/ucb/source/ucp/webdav/PropertyMap.hxx index b3a5ef22b5bf..36cfe52ea041 100644 --- a/ucb/source/ucp/webdav/PropertyMap.hxx +++ b/ucb/source/ucp/webdav/PropertyMap.hxx @@ -27,7 +27,7 @@ #include <hash_set> #include <com/sun/star/beans/Property.hpp> -namespace webdav_ucp { +namespace http_dav_ucp { //========================================================================= diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 896861b4f9ac..522579b71571 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -25,12 +25,12 @@ #include "precompiled_ucb.hxx" #include <string.h> -#include <ne_xml.h> +//#include <ne_xml.h> #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include "UCBDeadPropertyValue.hxx" -using namespace webdav_ucp; +using namespace http_dav_ucp; using namespace com::sun::star; ////////////////////////////////////////////////////////////////////////// @@ -78,11 +78,12 @@ const rtl::OUString UCBDeadPropertyValue::aXMLEnd #define STATE_TYPE (STATE_TOP + 1) #define STATE_VALUE (STATE_TOP + 2) +/* ////////////////////////////////////////////////////////////////////////// extern "C" int UCBDeadPropertyValue_startelement_callback( void *, int parent, - const char * /*nspace*/, + const char * nspace, const char *name, const char ** ) { @@ -166,6 +167,7 @@ extern "C" int UCBDeadPropertyValue_endelement_callback( } return 0; // zero to continue, non-zero to abort parsing } +*/ ////////////////////////////////////////////////////////////////////////// static rtl::OUString encodeValue( const rtl::OUString & rValue ) @@ -352,11 +354,12 @@ bool UCBDeadPropertyValue::supportsType( const uno::Type & rType ) ////////////////////////////////////////////////////////////////////////// // static -bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, - uno::Any & rOutData ) +bool UCBDeadPropertyValue::createFromXML( const rtl::OString & /*rInData*/, + uno::Any & /*rOutData*/ ) { bool success = false; + /* ne_xml_parser * parser = ne_xml_create(); if ( parser ) { @@ -431,7 +434,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, success = false; } } - + */ return success; } @@ -529,11 +532,10 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData, // Encode value! It must not contain XML reserved chars! aStringValue = encodeValue( aStringValue ); - rOutData = aXMLPre; + rOutData = aXMLPre; rOutData += aStringType; rOutData += aXMLMid; rOutData += aStringValue; rOutData += aXMLEnd; - return true; } diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx index c1f9df6661bd..14263dc3a769 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx @@ -27,7 +27,7 @@ #include <rtl/string.hxx> #include <com/sun/star/uno/Any.hxx> -namespace webdav_ucp +namespace http_dav_ucp { class UCBDeadPropertyValue diff --git a/ucb/source/ucp/webdav/makefile.mk b/ucb/source/ucp/webdav/makefile.mk index 9c2bfd649db6..d4bdc6606c04 100644 --- a/ucb/source/ucp/webdav/makefile.mk +++ b/ucb/source/ucp/webdav/makefile.mk @@ -1,25 +1,29 @@ -#************************************************************** -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -#************************************************************** - - +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* # UCP Version - Increase, if UCP libraray becomes incompatible. UCP_VERSION=1 @@ -44,25 +48,45 @@ NO_BSYMBOLIC=TRUE .INCLUDE: settings.mk .IF "$(L10N_framework)"=="" -.IF "$(SYSTEM_NEON)" != "YES" - -@all: - @echo "no system neon is used...." - +APRINCDIR=apr +APRUTILINCDIR=apr-util +SERFINCDIR=serf + +#.IF "$(SYSTEM_APR)" != "YES" +#.INCLUDE: $(SOLARINCDIR)$/$(APRINCDIR)$/version.mk +#.ENDIF +#.IF "$(SYSTEM_APRUTIL)" != "YES" +#.INCLUDE: $(SOLARINCDIR)$/$(APRUTILINCDIR)$/version.mk +#.ENDIF +#.IF "$(SYSTEM_SERF)" != "YES" +#.INCLUDE: $(SOLARINCDIR)$/$(SERFINCDIR)$/version.mk +#.ENDIF + +#CFLAGS+= -DAPR_VERSION=0x$(APR_VERSION) -DAPRUTIL_VERSION=0x$(APRUTIL_VERSION) -DSERF_VERSION=0x$(SERF_VERSION) + +# +# Extend the list of include paths depending on whether we use locally built +# or system versions of libraries apr, apr-util, serf, libxml +# +# We have to use CFLAGS for this because PRJINC is too inflexible (it adds /inc to everyting.) +# + +.IF "$(SYSTEM_APR)" == "YES" +CFLAGS+= $(APR_CFLAGS) .ELSE - -NEONINCDIR=external$/neon - -.IF "$(SYSTEM_NEON)" != "YES" -.INCLUDE: $(SOLARINCDIR)$/$(NEONINCDIR)$/version.mk +CFLAGS+= -I$(SOLARINCDIR)$/$(APRINCDIR) .ENDIF -CFLAGS+= -DNEON_VERSION=0x$(NEON_VERSION) +.IF "$(SYSTEM_APRUTIL)" == "YES" +CFLAGS+= $(APRUTIL_CFLAGS) +.ELSE +CFLAGS+= -I$(SOLARINCDIR)$/$(APRUTILINCDIR) +.ENDIF -.IF "$(SYSTEM_NEON)" == "YES" -CFLAGS+= $(NEON_CFLAGS) +.IF "$(SYSTEM_SERF)" == "YES" +CFLAGS+= $(SERF_CFLAGS) .ELSE -CFLAGS+= -I$(SOLARINCDIR)$/$(NEONINCDIR) +CFLAGS+= -I$(SOLARINCDIR)$/$(SERFINCDIR) .ENDIF .IF "$(SYSTEM_LIBXML)" == "YES" @@ -73,7 +97,7 @@ CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXMLINCDIR) .ENDIF .IF "$(SYSTEM_OPENSSL)" == "YES" -CFLAGS+= $(OPENSSL_CFLAGS) +CFLAGS+= -I$(OPENSSL_CFLAGS) .ENDIF # --- General ----------------------------------------------------- @@ -89,16 +113,26 @@ SLOFILES=\ $(SLO)$/DAVProperties.obj \ $(SLO)$/DAVSessionFactory.obj \ $(SLO)$/DAVResourceAccess.obj \ - $(SLO)$/NeonUri.obj \ - $(SLO)$/NeonInputStream.obj \ - $(SLO)$/NeonPropFindRequest.obj \ - $(SLO)$/NeonHeadRequest.obj \ - $(SLO)$/NeonSession.obj \ - $(SLO)$/NeonLockStore.obj \ + $(SLO)$/AprEnv.obj \ + $(SLO)$/webdavresponseparser.obj \ + $(SLO)$/SerfUri.obj \ + $(SLO)$/SerfRequestProcessor.obj \ + $(SLO)$/SerfRequestProcessorImpl.obj \ + $(SLO)$/SerfRequestProcessorImplFac.obj \ + $(SLO)$/SerfPropFindReqProcImpl.obj \ + $(SLO)$/SerfPropPatchReqProcImpl.obj \ + $(SLO)$/SerfGetReqProcImpl.obj \ + $(SLO)$/SerfHeadReqProcImpl.obj \ + $(SLO)$/SerfPutReqProcImpl.obj \ + $(SLO)$/SerfPostReqProcImpl.obj \ + $(SLO)$/SerfDeleteReqProcImpl.obj \ + $(SLO)$/SerfMkColReqProcImpl.obj \ + $(SLO)$/SerfCopyReqProcImpl.obj \ + $(SLO)$/SerfMoveReqProcImpl.obj \ + $(SLO)$/SerfSession.obj \ + $(SLO)$/SerfCallbacks.obj \ + $(SLO)$/SerfInputStream.obj \ $(SLO)$/DateTimeHelper.obj \ - $(SLO)$/LinkSequence.obj \ - $(SLO)$/LockSequence.obj \ - $(SLO)$/LockEntrySequence.obj \ $(SLO)$/UCBDeadPropertyValue.obj LIB1TARGET=$(SLB)$/_$(TARGET).lib @@ -118,7 +152,7 @@ SHL1STDLIBS=\ $(SALHELPERLIB) \ $(UCBHELPERLIB) \ $(COMPHELPERLIB) \ - $(NEON3RDLIB) \ + $(SERFLIBS) \ $(LIBXML2LIB) .IF "$(GUI)"=="WNT" @@ -148,8 +182,6 @@ SHL1LIBS=$(LIB1TARGET) DEF1NAME=$(SHL1TARGET) -.ENDIF #"$(DISABLE_NEON)" == "TRUE" - .ENDIF # L10N_framework # --- Targets ---------------------------------------------------------- diff --git a/ucb/source/ucp/webdav/ucpdav1.component b/ucb/source/ucp/webdav/ucpdav1.component index 42796e625ed7..4e18b566e1a4 100644 --- a/ucb/source/ucp/webdav/ucpdav1.component +++ b/ucb/source/ucp/webdav/ucpdav1.component @@ -1,26 +1,30 @@ <?xml version="1.0" encoding="UTF-8"?> -<!--*********************************************************** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - ***********************************************************--> - - +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> <component loader="com.sun.star.loader.SharedLibrary" xmlns="http://openoffice.org/2010/uno-components"> diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index c9c08aa108b0..908d3188e396 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -81,11 +81,11 @@ #include "webdavprovider.hxx" #include "webdavresultset.hxx" #include "ContentProperties.hxx" -#include "NeonUri.hxx" +#include "SerfUri.hxx" #include "UCBDeadPropertyValue.hxx" using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; //========================================================================= //========================================================================= @@ -117,7 +117,7 @@ Content::Content( rSessionFactory, Identifier->getContentIdentifier() ) ); - NeonUri aURI( Identifier->getContentIdentifier() ); + SerfUri aURI( Identifier->getContentIdentifier() ); m_aEscapedTitle = aURI.GetPathBaseName(); } catch ( DAVException const & ) @@ -803,7 +803,6 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name, case DAV: throw lang::IllegalArgumentException(); - case FTP: case NON_DAV: // Store property locally. ContentImplHelper::addProperty( Name, @@ -920,7 +919,6 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name ) case DAV: throw beans::UnknownPropertyException(); - case FTP: case NON_DAV: // Try to remove property from local store. ContentImplHelper::removeProperty( Name ); @@ -1038,7 +1036,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) // create the local content try { - return new ::webdav_ucp::Content( m_xSMgr, + return new ::http_dav_ucp::Content( m_xSMgr, m_pProvider, xId, m_xResAccess->getSessionFactory(), @@ -1188,7 +1186,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aUnescapedTitle = NeonUri::unescape( m_aEscapedTitle ); + aUnescapedTitle = SerfUri::unescape( m_aEscapedTitle ); xSMgr.set( m_xSMgr ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); @@ -1381,7 +1379,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // might trigger HTTP redirect. // Therefore, title must be updated here. - NeonUri aUri( xResAccess->getURL() ); + SerfUri aUri( xResAccess->getURL() ); aUnescapedTitle = aUri.GetPathBaseNameUnescaped(); if ( rType == UNKNOWN ) @@ -1477,7 +1475,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( m_xCachedProps->addProperties( *xProps.get() ); m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) ); - m_aEscapedTitle = NeonUri::escapeSegment( aUnescapedTitle ); + m_aEscapedTitle = SerfUri::escapeSegment( aUnescapedTitle ); } return xResultRow; @@ -1590,7 +1588,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { try { - NeonUri aURI( xIdentifier->getContentIdentifier() ); + SerfUri aURI( xIdentifier->getContentIdentifier() ); aOldTitle = aURI.GetPathBaseNameUnescaped(); if ( aNewValue != aOldTitle ) @@ -1829,7 +1827,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) aNewURL += rtl::OUString::createFromAscii( "/" ); - aNewURL += NeonUri::escapeSegment( aNewTitle ); + aNewURL += SerfUri::escapeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( xSMgr, aNewURL ); @@ -1837,8 +1835,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( try { - NeonUri sourceURI( xOldId->getContentIdentifier() ); - NeonUri targetURI( xNewId->getContentIdentifier() ); + SerfUri sourceURI( xOldId->getContentIdentifier() ); + SerfUri targetURI( xNewId->getContentIdentifier() ); targetURI.SetScheme( sourceURI.GetScheme() ); xResAccess->MOVE( @@ -1892,7 +1890,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); - m_aEscapedTitle = NeonUri::escapeSegment( aNewTitle ); + m_aEscapedTitle = SerfUri::escapeSegment( aNewTitle ); aChanges.getArray()[ nChanged ] = aEvent; nChanged++; @@ -1938,17 +1936,8 @@ uno::Any Content::open( // Error: Not a folder! rtl::OUStringBuffer aMsg; - if ( getResourceType( xEnv ) == FTP ) - { - // #114653# - aMsg.appendAscii( "FTP over HTTP proxy: resource cannot " - "be opened as folder! Wrong Open Mode!" ); - } - else - { - aMsg.appendAscii( "Non-folder resource cannot be " - "opened as folder! Wrong Open Mode!" ); - } + aMsg.appendAscii( "Non-folder resource cannot be " + "opened as folder! Wrong Open Mode!" ); ucbhelper::cancelCommandExecution( uno::makeAny( @@ -2217,8 +2206,8 @@ void Content::queryChildren( ContentRefList& rChildren ) { // No further slashes / only a final slash. It's a child! rChildren.push_back( - ::webdav_ucp::Content::ContentRef( - static_cast< ::webdav_ucp::Content * >( + ::http_dav_ucp::Content::ContentRef( + static_cast< ::http_dav_ucp::Content * >( xChild.get() ) ) ); } } @@ -2283,9 +2272,9 @@ void Content::insert( // ==> Complain on PUT, continue on MKCOL. if ( !bTransient || ( bTransient && !bCollection ) ) { +#undef ERROR ucb::UnsupportedNameClashException aEx( - rtl::OUString::createFromAscii( - "Unable to write without overwrite!" ), + rtl::OUString::createFromAscii( "Unable to write without overwrite!" ), static_cast< cppu::OWeakObject * >( this ), ucb::NameClash::ERROR ); @@ -2405,7 +2394,7 @@ void Content::insert( rtl::OUString aTitle; try { - NeonUri aURI( aURL ); + SerfUri aURI( aURL ); aTitle = aURI.GetPathBaseNameUnescaped(); } catch ( DAVException const & ) @@ -2495,8 +2484,8 @@ void Content::transfer( rtl::OUString aTargetURI; try { - NeonUri sourceURI( rArgs.SourceURL ); - NeonUri targetURI( xIdentifier->getContentIdentifier() ); + SerfUri sourceURI( rArgs.SourceURL ); + SerfUri targetURI( xIdentifier->getContentIdentifier() ); aTargetURI = targetURI.GetPathBaseNameUnescaped(); // Check source's and target's URL scheme @@ -2675,7 +2664,7 @@ void Content::transfer( { switch ( rArgs.NameClash ) { - case ucb::NameClash::ERROR: + case 0/*ucb::NameClash::ERROR*/: { ucbhelper::cancelCommandExecution( uno::makeAny( @@ -2733,7 +2722,7 @@ void Content::destroy( sal_Bool bDeletePhysical ) // Process instanciated children... - ::webdav_ucp::Content::ContentRefList aChildren; + ::http_dav_ucp::Content::ContentRefList aChildren; queryChildren( aChildren ); ContentRefList::const_iterator it = aChildren.begin(); @@ -3190,58 +3179,51 @@ const Content::ResourceType & Content::getResourceType( const rtl::OUString aScheme( rURL.copy( 0, rURL.indexOf( ':' ) ).toAsciiLowerCase() ); - if ( aScheme.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( FTP_URL_SCHEME ) ) ) + try { - eResourceType = FTP; + // Try to fetch some frequently used property value, e.g. those + // used when loading documents... along with identifying whether + // this is a DAV resource. + std::vector< DAVResource > resources; + std::vector< rtl::OUString > aPropNames; + uno::Sequence< beans::Property > aProperties( 5 ); + aProperties[ 0 ].Name + = rtl::OUString::createFromAscii( "IsFolder" ); + aProperties[ 1 ].Name + = rtl::OUString::createFromAscii( "IsDocument" ); + aProperties[ 2 ].Name + = rtl::OUString::createFromAscii( "IsReadOnly" ); + aProperties[ 3 ].Name + = rtl::OUString::createFromAscii( "MediaType" ); + aProperties[ 4 ].Name + = DAVProperties::SUPPORTEDLOCK; + + ContentProperties::UCBNamesToDAVNames( + aProperties, aPropNames ); + + rResAccess->PROPFIND( + DAVZERO, aPropNames, resources, xEnv ); + + // TODO - is this really only one? + if ( resources.size() == 1 ) + { + m_xCachedProps.reset( + new CachableContentProperties( resources[ 0 ] ) ); + m_xCachedProps->containsAllNames( + aProperties, m_aFailedPropNames ); + } + + eResourceType = DAV; } - else + catch ( DAVException const & e ) { - try - { - // Try to fetch some frequently used property value, e.g. those - // used when loading documents... along with identifying whether - // this is a DAV resource. - std::vector< DAVResource > resources; - std::vector< rtl::OUString > aPropNames; - uno::Sequence< beans::Property > aProperties( 5 ); - aProperties[ 0 ].Name - = rtl::OUString::createFromAscii( "IsFolder" ); - aProperties[ 1 ].Name - = rtl::OUString::createFromAscii( "IsDocument" ); - aProperties[ 2 ].Name - = rtl::OUString::createFromAscii( "IsReadOnly" ); - aProperties[ 3 ].Name - = rtl::OUString::createFromAscii( "MediaType" ); - aProperties[ 4 ].Name - = DAVProperties::SUPPORTEDLOCK; - - ContentProperties::UCBNamesToDAVNames( - aProperties, aPropNames ); - - rResAccess->PROPFIND( - DAVZERO, aPropNames, resources, xEnv ); - - if ( resources.size() == 1 ) - { - m_xCachedProps.reset( - new CachableContentProperties( resources[ 0 ] ) ); - m_xCachedProps->containsAllNames( - aProperties, m_aFailedPropNames ); - } + rResAccess->resetUri(); - eResourceType = DAV; - } - catch ( DAVException const & e ) + if ( e.getStatus() == SC_METHOD_NOT_ALLOWED ) { - rResAccess->resetUri(); - - if ( e.getStatus() == SC_METHOD_NOT_ALLOWED ) - { - // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the - // resource is NON_DAV - eResourceType = NON_DAV; - } + // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the + // resource is NON_DAV + eResourceType = NON_DAV; } } m_eResourceType = eResourceType; diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index 602777a83513..08f33fb53be6 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star { namespace ucb { struct TransferInfo; } } } } -namespace webdav_ucp +namespace http_dav_ucp { //========================================================================= @@ -72,7 +72,6 @@ class Content : public ::ucbhelper::ContentImplHelper, enum ResourceType { UNKNOWN, - FTP, NON_DAV, DAV }; diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index d895692403cd..ea6e33997da5 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -41,7 +41,6 @@ #include <com/sun/star/ucb/TransferInfo.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/util/DateTime.hpp> -#include <com/sun/star/ucb/Link.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/ucb/LockEntry.hpp> #include "webdavcontent.hxx" @@ -50,7 +49,7 @@ #include "ContentProperties.hxx" using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; //========================================================================= // @@ -236,14 +235,6 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - DAVProperties::SOURCE, - -1, - getCppuType( static_cast< - const uno::Sequence< ucb::Link > * >( 0 ) ), - beans::PropertyAttribute::BOUND ) ); - - m_pProps->insert( - beans::Property( DAVProperties::SUPPORTEDLOCK, -1, getCppuType( static_cast< diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index e523b4f67b03..bffe351feb71 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -39,12 +39,12 @@ #ifndef _WEBDAV_SESSION_HXX #include "DAVSession.hxx" #endif -#include "NeonUri.hxx" +#include "SerfUri.hxx" using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; -namespace webdav_ucp +namespace http_dav_ucp { //========================================================================= @@ -399,7 +399,7 @@ sal_Bool DataSupplier::getData() { try { - NeonUri aURI( + SerfUri aURI( m_pImpl->m_xContent->getResourceAccess().getURL() ); rtl::OUString aPath = aURI.GetPath(); @@ -407,7 +407,7 @@ sal_Bool DataSupplier::getData() == sal_Unicode( '/' ) ) aPath = aPath.copy( 0, aPath.getLength() - 1 ); - aPath = NeonUri::unescape( aPath ); + aPath = SerfUri::unescape( aPath ); bool bFoundParent = false; for ( sal_uInt32 n = 0; n < resources.size(); ++n ) @@ -420,7 +420,7 @@ sal_Bool DataSupplier::getData() { try { - NeonUri aCurrURI( rRes.uri ); + SerfUri aCurrURI( rRes.uri ); rtl::OUString aCurrPath = aCurrURI.GetPath(); if ( aCurrPath.getStr()[ aCurrPath.getLength() - 1 ] @@ -430,7 +430,7 @@ sal_Bool DataSupplier::getData() 0, aCurrPath.getLength() - 1 ); - aCurrPath = NeonUri::unescape( aCurrPath ); + aCurrPath = SerfUri::unescape( aCurrPath ); if ( aPath == aCurrPath ) { bFoundParent = true; diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.hxx b/ucb/source/ucp/webdav/webdavdatasupplier.hxx index 6f8b9488e084..c621f7bd1f09 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.hxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.hxx @@ -28,7 +28,7 @@ #include <rtl/ref.hxx> #include <ucbhelper/resultset.hxx> -namespace webdav_ucp { +namespace http_dav_ucp { struct DataSupplier_Impl; class Content; diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index 3e2918a421a8..94d2501a22aa 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -36,7 +36,7 @@ #include "osl/mutex.hxx" using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; //========================================================================= //========================================================================= @@ -130,9 +130,7 @@ ContentProvider::queryContent( !aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) && !aScheme.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) && - !aScheme.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( FTP_URL_SCHEME ) ) ) + RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ) throw ucb::IllegalIdentifierException(); // Normalize URL and create new Id, if nessacary. @@ -211,7 +209,7 @@ ContentProvider::queryContent( try { - xContent = new ::webdav_ucp::Content( + xContent = new ::http_dav_ucp::Content( m_xSMgr, this, xCanonicId, m_xDAVSessionFactory ); registerNewContent( xContent ); } diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index bcc0a55510aa..34d00426f5a1 100644 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.hxx @@ -30,7 +30,7 @@ #include <ucbhelper/providerhelper.hxx> #include "PropertyMap.hxx" -namespace webdav_ucp { +namespace http_dav_ucp { //========================================================================= @@ -59,10 +59,6 @@ namespace webdav_ucp { #define DAVS_URL_SCHEME "davs" #define DAVS_URL_SCHEME_LENGTH 4 - - -#define FTP_URL_SCHEME "ftp" - #define HTTP_CONTENT_TYPE \ "application/" HTTP_URL_SCHEME "-content" diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx index a44673413024..727066c12436 100644 --- a/ucb/source/ucp/webdav/webdavresultset.cxx +++ b/ucb/source/ucp/webdav/webdavresultset.cxx @@ -38,7 +38,7 @@ #endif using namespace com::sun::star; -using namespace webdav_ucp; +using namespace http_dav_ucp; //========================================================================= //========================================================================= diff --git a/ucb/source/ucp/webdav/webdavresultset.hxx b/ucb/source/ucp/webdav/webdavresultset.hxx index a43fe7b98fd6..09a5ff7766f3 100644 --- a/ucb/source/ucp/webdav/webdavresultset.hxx +++ b/ucb/source/ucp/webdav/webdavresultset.hxx @@ -29,7 +29,7 @@ #include "webdavcontent.hxx" #include "webdavdatasupplier.hxx" -namespace webdav_ucp { +namespace http_dav_ucp { class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper { diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx index 2c13758776d5..d1d43e80a5d0 100644 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.cxx @@ -52,10 +52,10 @@ extern "C" void * SAL_CALL component_getFactory( // WebDAV Content Provider. ////////////////////////////////////////////////////////////////////// - if ( ::webdav_ucp::ContentProvider::getImplementationName_Static(). + if ( ::http_dav_ucp::ContentProvider::getImplementationName_Static(). compareToAscii( pImplName ) == 0 ) { - xFactory = ::webdav_ucp::ContentProvider::createServiceFactory( xSMgr ); + xFactory = ::http_dav_ucp::ContentProvider::createServiceFactory( xSMgr ); } ////////////////////////////////////////////////////////////////////// |