diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-20 13:02:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-20 13:05:35 +0100 |
commit | 2d9ce9191da681e4fd9f1d08933ca5117c56601b (patch) | |
tree | eecfa2690dcaffca064cc5712d7a5c9662a32b87 /filter | |
parent | dc06576d8809760b79f771831bed3122878e0505 (diff) |
Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength)
...which is a confusing overload with unexpectedly different semantics from the
one-parameter form. In preparation of marking it as deprecated.
Change-Id: I4f176995546ae583fc570d770647ffc315eecc75
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltdialog/typedetectionexport.cxx | 8 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 8 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx index 9fa3b3dc223e..4a66506c96c6 100644 --- a/filter/source/xsltdialog/typedetectionexport.cxx +++ b/filter/source/xsltdialog/typedetectionexport.cxx @@ -45,10 +45,10 @@ TypeDetectionExporter::TypeDetectionExporter( Reference< XComponentContext >& xC static OUString createRelativeURL( const OUString& rFilterName, const OUString& rURL ) { if( !rURL.isEmpty() && - (rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("http:") ) != 0) && - (rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("https:") ) != 0) && - (rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("jar:") ) != 0) && - (rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("ftp:") ) != 0)) + !rURL.startsWith("http:") && + !rURL.startsWith("https:") && + !rURL.startsWith("jar:") && + !rURL.startsWith("ftp:") ) { INetURLObject aURL( rURL ); OUString aName( aURL.GetName() ); diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index f99bd73938b1..66f7198a5fdb 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -128,10 +128,10 @@ static void _addFile( Reference< XInterface >& xRootFolder, Reference< XSingleSe void XMLFilterJarHelper::addFile( Reference< XInterface > xRootFolder, Reference< XSingleServiceFactory > xFactory, const OUString& rSourceFile ) throw( Exception ) { if( !rSourceFile.isEmpty() && - (rSourceFile.compareToAscii( RTL_CONSTASCII_STRINGPARAM("http:") ) != 0) && - (rSourceFile.compareToAscii( RTL_CONSTASCII_STRINGPARAM("https:") ) != 0) && - (rSourceFile.compareToAscii( RTL_CONSTASCII_STRINGPARAM("jar:") ) != 0) && - (rSourceFile.compareToAscii( RTL_CONSTASCII_STRINGPARAM("ftp:") ) != 0)) + !rSourceFile.startsWith("http:") && + !rSourceFile.startsWith("https:") && + !rSourceFile.startsWith("jar:") && + !rSourceFile.startsWith("ftp:") ) { OUString aFileURL( rSourceFile ); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 60e5188efcd4..0791c3f9cfd3 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1661,7 +1661,7 @@ OUString string_decode( const OUString & rText ) bool isFileURL( const ::rtl::OUString & rURL ) { - return rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("file:") ) == 0; + return rURL.startsWith("file:"); } // ----------------------------------------------------------------------- |