--- ooo-build-2.2.1.10110/patches/src680/apply.mrl 2007-09-04 10:11:17.000000000 -0300 +++ ooo-build-2.2.1.10110/patches/src680/apply 2007-09-04 10:10:51.000000000 -0300 @@ -747,6 +747,7 @@ mandriva-archflags.diff mandriva-java32_64.diff db42-fix-jni-includes.diff NeonUri.cxx.diff +ooo-NeonUri.diff, mrl [ MandrivaOnlyUnix ] --- ooo-build-2.2.1.10110/patches/src680/ooo-NeonUri.diff.mrl 2007-09-04 10:11:25.000000000 -0300 +++ ooo-build-2.2.1.10110/patches/src680/ooo-NeonUri.diff 2007-09-04 10:09:25.000000000 -0300 @@ -0,0 +1,256 @@ +--- ucb/source/ucp/webdav/ContentProperties.cxx 2006-09-17 11:04:00.000000000 -0300 ++++ ucb/source/ucp/webdav/ContentProperties.cxx 2007-09-04 09:22:20.000000000 -0300 +@@ -127,11 +127,21 @@ ContentProperties::ContentProperties( co + "ContentProperties ctor - Empty resource URI!" ); + + // Title ++ try ++ { + NeonUri aURI( rResource.uri ); + m_aEscapedTitle = aURI.GetPathBaseName(); + + (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + = uno::makeAny( aURI.GetPathBaseNameUnescaped() ); ++ } ++ catch ( DAVException const & ) ++ { ++ (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] ++ = uno::makeAny( ++ rtl::OUString( ++ RTL_CONSTASCII_USTRINGPARAM( "*** unknown ***" ) ) ); ++ } + + std::vector< beans::PropertyValue >::const_iterator it + = rResource.properties.begin(); +--- ucb/source/ucp/webdav/DAVResourceAccess.cxx 2007-01-29 08:47:28.000000000 -0200 ++++ ucb/source/ucp/webdav/DAVResourceAccess.cxx 2007-09-04 09:25:34.000000000 -0300 +@@ -914,6 +914,7 @@ void DAVResourceAccess::getUserRequestHe + //========================================================================= + sal_Bool DAVResourceAccess::detectRedirectCycle( + const rtl::OUString& rRedirectURL ) ++ throw ( DAVException ) + { + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + +@@ -935,6 +936,7 @@ sal_Bool DAVResourceAccess::detectRedire + + //========================================================================= + sal_Bool DAVResourceAccess::handleException( DAVException & e ) ++ throw ( DAVException ) + { + switch ( e.getError() ) + { +--- ucb/source/ucp/webdav/DAVResourceAccess.hxx 2006-12-13 13:04:16.000000000 -0200 ++++ ucb/source/ucp/webdav/DAVResourceAccess.hxx 2007-09-04 09:22:20.000000000 -0300 +@@ -258,8 +258,10 @@ public: + + private: + const rtl::OUString & getRequestURI() const; +- sal_Bool detectRedirectCycle( const rtl::OUString& rRedirectURL ); +- sal_Bool handleException( DAVException & e ); ++ sal_Bool detectRedirectCycle( const rtl::OUString& rRedirectURL ) ++ throw ( DAVException ); ++ sal_Bool handleException( DAVException & e ) ++ throw ( DAVException ); + void initialize() + throw ( DAVException ); + }; +--- ucb/source/ucp/webdav/NeonSession.cxx 2006-12-13 13:05:15.000000000 -0200 ++++ ucb/source/ucp/webdav/NeonSession.cxx 2007-09-04 09:22:20.000000000 -0300 +@@ -326,6 +326,8 @@ extern "C" int NeonSession_NeonAuth( voi + // neon does not handle username supplied with request URI (for instance + // when doing FTP over proxy - last checked: 0.23.5 ) + ++ try ++ { + NeonUri uri( theSession->getRequestEnvironment().m_aRequestURI ); + rtl::OUString aUserInfo( uri.GetUserInfo() ); + if ( aUserInfo.getLength() ) +@@ -342,6 +344,12 @@ extern "C" int NeonSession_NeonAuth( voi + } + } + } ++ catch ( DAVException const & ) ++ { ++ // abort ++ return -1; ++ } ++ } + else + { + // username buffer is prefilled with user name from last attempt. +@@ -733,12 +741,18 @@ void NeonSession::Init() + // virtual + sal_Bool NeonSession::CanUse( const rtl::OUString & inUri ) + { ++ try ++ { + NeonUri theUri( inUri ); + if ( ( theUri.GetPort() == m_nPort ) && + ( theUri.GetHost() == m_aHostName ) && + ( theUri.GetScheme() == m_aScheme ) ) + return sal_True; +- ++ } ++ catch ( DAVException const & ) ++ { ++ return sal_False; ++ } + return sal_False; + } + +--- ucb/source/ucp/webdav/webdavcontent.cxx 2006-12-13 13:05:32.000000000 -0200 ++++ ucb/source/ucp/webdav/webdavcontent.cxx 2007-09-04 10:02:21.000000000 -0300 +@@ -464,14 +464,14 @@ Content::Content( + rxSMgr, + rSessionFactory, + Identifier->getContentIdentifier() ) ); ++ ++ NeonUri aURI( Identifier->getContentIdentifier() ); ++ m_aEscapedTitle = aURI.GetPathBaseName(); + } + catch ( DAVException const & ) + { + throw star::ucb::ContentCreationException(); + } +- +- NeonUri aURI( Identifier->getContentIdentifier() ); +- m_aEscapedTitle = aURI.GetPathBaseName(); + } + + //========================================================================= +@@ -1747,6 +1747,8 @@ uno::Sequence< uno::Any > Content::setPr + // No empty titles! + if ( aNewValue.getLength() > 0 ) + { ++ try ++ { + NeonUri aURI( xIdentifier->getContentIdentifier() ); + aOldTitle = aURI.GetPathBaseNameUnescaped(); + +@@ -1764,6 +1766,15 @@ uno::Sequence< uno::Any > Content::setPr + nTitlePos = n; + } + } ++ catch ( DAVException const & ) ++ { ++ aRet[ n ] <<= lang::IllegalArgumentException( ++ rtl::OUString::createFromAscii( ++ "Invalid content identifier!" ), ++ static_cast< cppu::OWeakObject * >( this ), ++ -1 ); ++ } ++ } + else + { + aRet[ n ] <<= lang::IllegalArgumentException( +@@ -2494,9 +2505,15 @@ void Content::insert( + } + else + { ++ rtl::OUString aTitle; ++ try ++ { + NeonUri aURI( aURL ); +- const rtl::OUString aTitle +- = aURI.GetPathBaseNameUnescaped(); ++ aTitle = aURI.GetPathBaseNameUnescaped(); ++ } ++ catch ( DAVException const & ) ++ { ++ } + + ucbhelper::cancelCommandExecution( + uno::makeAny( +@@ -2572,11 +2589,13 @@ void Content::transfer( + xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); + } + ++ rtl::OUString aTargetURI; ++ try ++ { + NeonUri sourceURI( rArgs.SourceURL ); + NeonUri targetURI( xIdentifier->getContentIdentifier() ); ++ aTargetURI = targetURI.GetPathBaseNameUnescaped(); + +- try +- { + // Check source's and target's URL scheme + // + const rtl::OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase(); +@@ -2745,7 +2764,7 @@ void Content::transfer( + rtl::OUString(), + static_cast< cppu::OWeakObject * >( this ), + task::InteractionClassification_ERROR, +- targetURI.GetPathBaseNameUnescaped() ) ), ++ aTargetURI ) ), + Environment ); + // Unreachable + } +--- ucb/source/ucp/webdav/webdavdatasupplier.cxx 2006-09-17 11:08:14.000000000 -0300 ++++ ucb/source/ucp/webdav/webdavdatasupplier.cxx 2007-09-04 09:22:20.000000000 -0300 +@@ -429,9 +429,14 @@ sal_Bool DataSupplier::getData() + + if ( !m_pImpl->m_bThrowException ) + { +- NeonUri aURI( m_pImpl->m_xContent->getResourceAccess().getURL() ); ++ try ++ { ++ NeonUri aURI( ++ m_pImpl->m_xContent->getResourceAccess().getURL() ); + rtl::OUString aPath = aURI.GetPath(); +- if ( aPath.getStr()[ aPath.getLength() - 1 ] == sal_Unicode( '/' ) ) ++ ++ if ( aPath.getStr()[ aPath.getLength() - 1 ] ++ == sal_Unicode( '/' ) ) + aPath = aPath.copy( 0, aPath.getLength() - 1 ); + + aPath = NeonUri::unescape( aPath ); +@@ -441,15 +446,21 @@ sal_Bool DataSupplier::getData() + { + const DAVResource & rRes = resources[ n ]; + +- // Filter parent, which is contained somewhere(!) in the vector. ++ // Filter parent, which is contained somewhere(!) in ++ // the vector. + if ( !bFoundParent ) + { ++ try ++ { + NeonUri aCurrURI( rRes.uri ); + rtl::OUString aCurrPath = aCurrURI.GetPath(); + if ( aCurrPath.getStr()[ +- aCurrPath.getLength() - 1 ] == sal_Unicode( '/' ) ) ++ aCurrPath.getLength() - 1 ] ++ == sal_Unicode( '/' ) ) + aCurrPath +- = aCurrPath.copy( 0, aCurrPath.getLength() - 1 ); ++ = aCurrPath.copy( ++ 0, ++ aCurrPath.getLength() - 1 ); + + aCurrPath = NeonUri::unescape( aCurrPath ); + if ( aPath == aCurrPath ) +@@ -458,6 +469,11 @@ sal_Bool DataSupplier::getData() + continue; + } + } ++ catch ( DAVException const & ) ++ { ++ // do nothing, ignore error. continue. ++ } ++ } + + ContentProperties* pContentProperties + = new ContentProperties( rRes ); +@@ -508,6 +524,10 @@ sal_Bool DataSupplier::getData() + new ResultListEntry( pContentProperties ) ); + } + } ++ catch ( DAVException const & ) ++ { ++ } ++ } + + m_pImpl->m_bCountFinal = sal_True; +