diff options
-rw-r--r-- | filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 2 | ||||
-rw-r--r-- | filter/source/xmlfilterdetect/filterdetect.cxx | 12 | ||||
-rw-r--r-- | unoxml/source/dom/element.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/rdf/CLiteral.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 6 | ||||
-rw-r--r-- | writerperfect/source/wpgimp/WPGImportFilter.cxx | 2 |
6 files changed, 11 insertions, 15 deletions
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index cf13627d3463..b82ec15a9bd3 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -151,7 +151,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star //******************** //Template Loading if Required //******************** - if (!msTemplateName.equalsAscii("")){ + if (msTemplateName.getLength()){ Reference< XStyleFamiliesSupplier > xstylefamiliessupplier(mxDoc, UNO_QUERY); Reference< XNameAccess >xName; diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index 5fa92e9b0a7b..35ec83cb39d0 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -163,18 +163,18 @@ Reference< com::sun::star::frame::XModel > xModel; sal_Int32 new_nlength=0; sal_Int32 i = 0 ; - while( (i < nLength) && (sTypeName.equalsAscii(""))) + while( (i < nLength) && (sTypeName.getLength() == 0)) { Any elem = xTypeCont->getByName(myTypes[i]); elem >>=lProps; new_nlength = lProps.getLength(); sal_Int32 j =0; - while( j < new_nlength && sTypeName.equalsAscii("")) + while( j < new_nlength && (sTypeName.getLength() == 0)) { ::rtl::OUString tmpStr; lProps[j].Value >>=tmpStr; - if((lProps[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ClipboardFormat"))) && (!tmpStr.equalsAscii("")) ) + if((lProps[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ClipboardFormat"))) && tmpStr.getLength() ) { sTypeName = supportedByType(tmpStr,resultString, myTypes[i]); } @@ -189,11 +189,7 @@ Reference< com::sun::star::frame::XModel > xModel; { OSL_ENSURE( sal_False, "An Exception occurred while opening File stream" ); } - if(sTypeName.equalsAscii("")) - { - //sTypeName=::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer_Flat_XML_File")); - } - else + if (sTypeName.getLength()) { if ( location == aArguments.getLength() ) { diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index cc8bde8fd0cd..804e8473f2a7 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -60,7 +60,7 @@ namespace DOM OUString prefix(reinterpret_cast<const sal_Char*>(pPrefix), strlen(reinterpret_cast<const char*>(pPrefix)), RTL_TEXTENCODING_UTF8); - OUString name = (prefix.equalsAscii("")) + OUString name = (prefix.getLength() == 0) ? OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns")) : OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:")) + prefix; const xmlChar *pHref = pNs->href; diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx index 6867d71ed1c8..549cee2146f4 100644 --- a/unoxml/source/rdf/CLiteral.cxx +++ b/unoxml/source/rdf/CLiteral.cxx @@ -160,7 +160,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u // ::com::sun::star::rdf::XNode: ::rtl::OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException) { - if (!m_Language.equalsAscii("")) { + if (m_Language.getLength()) { ::rtl::OUStringBuffer buf(m_Value); buf.appendAscii("@"); buf.append(m_Language); diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index caf6c19dfd32..fa5b065d068b 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1434,7 +1434,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, // ensure that the metadatable has an XML ID i_xObject->ensureMetadataReference(); const beans::StringPair mdref( i_xObject->getMetadataReference() ); - if (mdref.First.equalsAscii("") || mdref.Second.equalsAscii("")) { + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::setStatementRDFa: " "ensureMetadataReference did not")), *this); @@ -1497,7 +1497,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } const beans::StringPair mdref( i_xElement->getMetadataReference() ); - if (mdref.First.equalsAscii("") || mdref.Second.equalsAscii("")) { + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { return; // nothing to do... } uno::Reference<rdf::XURI> xXmlId; @@ -1528,7 +1528,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, "librdf_Repository::getStatementRDFa: Element is null")), *this, 0); } const beans::StringPair mdref( i_xElement->getMetadataReference() ); - if (mdref.First.equalsAscii("") || mdref.Second.equalsAscii("")) { + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >(); } ::rtl::OUString const sXmlId(mdref.First + diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx index 8a1f92d97041..1d6859088e15 100644 --- a/writerperfect/source/wpgimp/WPGImportFilter.cxx +++ b/writerperfect/source/wpgimp/WPGImportFilter.cxx @@ -175,7 +175,7 @@ OUString SAL_CALL WPGImportFilter::detect( com::sun::star::uno::Sequence< Proper if (input) delete input; - if (!sTypeName.equalsAscii("")) + if (sTypeName.getLength()) { if ( location == Descriptor.getLength() ) { |