summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx8
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx2
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:");
}
// -----------------------------------------------------------------------