diff options
Diffstat (limited to 'unotools/source/config/configpathes.cxx')
-rw-r--r-- | unotools/source/config/configpathes.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/unotools/source/config/configpathes.cxx b/unotools/source/config/configpathes.cxx index fd813d4c7a9a..83ecdf271b22 100644 --- a/unotools/source/config/configpathes.cxx +++ b/unotools/source/config/configpathes.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -69,7 +69,7 @@ void lcl_resolveCharEntities(OUString & aLocalString) if (ch) { aResult.append(aLocalString.copy(nStart,nEscapePos-nStart)).append(ch); - + sal_Int32 nEscapeEnd=aLocalString.indexOf(';',nEscapePos); nStart = nEscapeEnd+1; nEscapePos=aLocalString.indexOf('&',nStart); @@ -82,12 +82,12 @@ void lcl_resolveCharEntities(OUString & aLocalString) while ( nEscapePos > 0); aResult.append(aLocalString.copy(nStart)); - + aLocalString = aResult.makeStringAndClear(); } //---------------------------------------------------------------------------- -sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath, +sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath, OUString& _rsOutPath, OUString& _rsLocalName) { @@ -139,8 +139,8 @@ sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath, nPos = _sInPath.lastIndexOf('/',nEnd); nStart = nPos + 1; } - OSL_ASSERT( -1 <= nPos && - nPos < nStart && + OSL_ASSERT( -1 <= nPos && + nPos < nStart && nStart < nEnd && nEnd <= _sInPath.getLength() ); @@ -208,7 +208,7 @@ sal_Int32 lcl_findPrefixEnd(OUString const& _sNestedPath, OUString const& _sPref OSL_ENSURE(nPrefixLength == 0 || _sPrefixPath[nPrefixLength-1] != '/', "Cannot handle slash-terminated prefix pathes"); - + sal_Bool bIsPrefix; if (_sNestedPath.getLength() > nPrefixLength) { @@ -224,19 +224,19 @@ sal_Int32 lcl_findPrefixEnd(OUString const& _sNestedPath, OUString const& _sPref { bIsPrefix = false; } - + return bIsPrefix ? nPrefixLength : 0; } //---------------------------------------------------------------------------- -sal_Bool isPrefixOfConfigurationPath(OUString const& _sNestedPath, +sal_Bool isPrefixOfConfigurationPath(OUString const& _sNestedPath, OUString const& _sPrefixPath) { return _sPrefixPath.getLength() == 0 || lcl_findPrefixEnd(_sNestedPath,_sPrefixPath) != 0; } //---------------------------------------------------------------------------- -OUString dropPrefixFromConfigurationPath(OUString const& _sNestedPath, +OUString dropPrefixFromConfigurationPath(OUString const& _sNestedPath, OUString const& _sPrefixPath) { if ( sal_Int32 nPrefixEnd = lcl_findPrefixEnd(_sNestedPath,_sPrefixPath) ) @@ -280,7 +280,7 @@ OUString lcl_wrapName(const OUString& _sContent, const OUString& _sType) case sal_Unicode('\"'): aNormalized.appendAscii( RTL_CONSTASCII_STRINGPARAM(""") ); break; default: aNormalized.append( *pCur ); - } + } } // suffix: closing quote and bracket |