comphelper: Use appropriate OUString functions on string constants

Change-Id: Ia09f122d4d968318fc0208b64b9bf7a0bc131f8a
This commit is contained in:
Stephan Bergmann
2014-12-12 10:22:13 +01:00
parent 898c414700
commit 85bcf06160
2 changed files with 2 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ namespace comphelper {
// work around a problem with embedded objects, which sometimes return // work around a problem with embedded objects, which sometimes return
// private:object as URL // private:object as URL
sDocURL = _rxDocument->getURL(); sDocURL = _rxDocument->getURL();
if ( sDocURL.matchAsciiL( "private:", 8 ) ) if ( sDocURL.startsWithIgnoreAsciiCase( "private:" ) )
sDocURL.clear(); sDocURL.clear();
// 2. if the document is not saved, yet, check the frame title // 2. if the document is not saved, yet, check the frame title

View File

@@ -46,8 +46,7 @@ using namespace comphelper;
static bool makeCanonicalFileURL( OUString & rURL ) static bool makeCanonicalFileURL( OUString & rURL )
{ {
OSL_ENSURE( rURL.matchAsciiL( "file:", sizeof( "file:" ) - 1 , 0 ) , OSL_ENSURE(rURL.startsWithIgnoreAsciiCase("file:"), "File URL expected!");
"File URL expected!" );
OUString aNormalizedURL; OUString aNormalizedURL;
if ( osl::FileBase::getAbsoluteFileURL( OUString(), if ( osl::FileBase::getAbsoluteFileURL( OUString(),