Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2620

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/20/2620/1

eu

Change-Id: Ib60a6dd29a89c3eb91520f9a6ced663a20596aac
---
M connectivity/source/commontools/AutoRetrievingBase.cxx
M connectivity/source/drivers/ado/AConnection.cxx
M dbaccess/source/core/dataaccess/ModelImpl.hxx
M extensions/source/plugin/base/context.cxx
M extensions/source/plugin/base/manager.cxx
M extensions/source/plugin/base/xplugin.cxx
M framework/inc/queries.h
M oox/source/drawingml/textfield.cxx
M package/source/manifest/ManifestImport.cxx
M padmin/source/padialog.cxx
M padmin/source/prtsetup.cxx
M scaddins/source/pricing/pricing.cxx
M sfx2/source/appl/appuno.cxx
M sfx2/source/doc/docfile.cxx
M sfx2/source/doc/graphhelp.cxx
M sfx2/source/doc/sfxbasemodel.cxx
M svx/source/customshapes/EnhancedCustomShape2d.cxx
M svx/workben/msview/xmlconfig.cxx
M sw/source/filter/xml/xmlimpit.cxx
M sw/source/ui/uno/unotxdoc.cxx
M ucb/source/ucp/webdav/SerfSession.cxx
M vcl/aqua/source/dtrans/DataFlavorMapping.cxx
M vcl/aqua/source/dtrans/OSXTransferable.cxx
M vcl/source/gdi/pdfwriter_impl.cxx
M vcl/unx/generic/dtrans/X11_selection.cxx
M vcl/unx/generic/printer/cupsmgr.cxx
M xmlhelp/source/cxxhelp/provider/databases.cxx
M xmlhelp/source/cxxhelp/provider/urlparameter.cxx
M xmloff/source/style/shadwhdl.cxx
29 files changed, 50 insertions(+), 50 deletions(-)



diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx 
b/connectivity/source/commontools/AutoRetrievingBase.cxx
index e88fe41..6e39c85 100644
--- a/connectivity/source/commontools/AutoRetrievingBase.cxx
+++ b/connectivity/source/commontools/AutoRetrievingBase.cxx
@@ -27,7 +27,7 @@
         OSL_ENSURE( m_bAutoRetrievingEnabled,"Illegal call here. isAutoRetrievingEnabled is 
false!");
         sStmt = sStmt.toAsciiUpperCase();
         ::rtl::OUString sStatement;
-        if ( sStmt.compareToAscii("INSERT",6) == 0 )
+        if ( sStmt.startsWith("INSERT") )
         {
             sStatement = m_sGeneratedValueStatement;
             static const ::rtl::OUString sColumn(RTL_CONSTASCII_USTRINGPARAM("$column"));
diff --git a/connectivity/source/drivers/ado/AConnection.cxx 
b/connectivity/source/drivers/ado/AConnection.cxx
index 2b24b24..9ffc553 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -106,7 +106,7 @@
     sal_Int32 nLen = url.indexOf(':');
     nLen = url.indexOf(':',nLen+1);
     ::rtl::OUString aDSN(url.copy(nLen+1)),aUID,aPWD;
-    if ( aDSN.compareToAscii("access:",7) == 0 )
+    if ( aDSN.startsWith("access:") )
         aDSN = aDSN.copy(7);
 
     sal_Int32 nTimeout = 20;
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx 
b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 2bff3c2..ab56f74 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -259,7 +259,7 @@
 
     /** determines whether the database document has an embedded data storage
     */
-    inline bool isEmbeddedDatabase() const { return ( m_sConnectURL.compareToAscii( 
"sdbc:embedded:", 14 ) == 0 ); }
+    inline bool isEmbeddedDatabase() const { return ( m_sConnectURL.startsWith("sdbc:embedded:") 
); }
 
     /** stores the embedded storage ("database")
 
diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx
index 4e153ca..a499201 100644
--- a/extensions/source/plugin/base/context.cxx
+++ b/extensions/source/plugin/base/context.cxx
@@ -142,7 +142,7 @@
         plugin->provideNewStream( ::rtl::OUString(),
                                   Reference< XActiveDataSource >(),
                                   aUrl,
-                                  0, 0, (sal_Bool)(aUrl.compareToAscii( "file:", 5 ) == 0) );
+                                  0, 0, aUrl.startsWith("file:") );
         return;
     }
 
diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx
index 80c6939..d3f8715 100644
--- a/extensions/source/plugin/base/manager.cxx
+++ b/extensions/source/plugin/base/manager.cxx
@@ -223,7 +223,7 @@
     pImpl->provideNewStream( pImpl->getDescription().Mimetype,
                              Reference< com::sun::star::io::XActiveDataSource >(),
                              url,
-                             0, 0, (sal_Bool)(url.compareToAscii( "file:", 5  ) == 0) );
+                             0, 0, url.startsWith("file:") );
 
     if( ! pImpl->getPluginComm() )
     {
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index a456c63..24fa2c7 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -456,7 +456,7 @@
     provideNewStream( m_aDescription.Mimetype,
                       uno::Reference< XActiveDataSource >(),
                       aURL,
-                      0, 0, (sal_Bool)(aURL.compareToAscii( "file:", 5 ) == 0) );
+                      0, 0, aURL.startsWith("file:") );
     m_nProvidingState = PROVIDING_NONE;
 }
 
@@ -786,7 +786,7 @@
         if( isfile && stype == NP_ASFILEONLY )
         {
             rtl::OString aFileName;
-            if( url.compareToAscii( "file:", 5 ) == 0 )
+            if( url.startsWith("file:") )
             {
                 OUString aSysName;
                 osl_getSystemPathFromFileURL( url.pData, &aSysName.pData );
diff --git a/framework/inc/queries.h b/framework/inc/queries.h
index b839910..94f6c32 100644
--- a/framework/inc/queries.h
+++ b/framework/inc/queries.h
@@ -345,8 +345,8 @@
         static sal_Bool isQuery( const OUString& sQuery )
         {
             return(
-                    ( sQuery.compareToAscii( "_query_"      , 7  ) == 0 ) ||    // new style
-                    ( sQuery.compareToAscii( "_filterquery_", 13 ) == 0 )       // old style!
+                    sQuery.startsWith("_query_") ||    // new style
+                    sQuery.startsWith("_filterquery_")       // old style!
                   );
         }
 
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index d188593..95f5e24 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -60,7 +60,7 @@
     Reference< XInterface > xIface;
     Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
 
-    if( sType.compareToAscii( "datetime", 8 ) == 0)
+    if( sType.startsWith("datetime"))
     {
         OString s = OUStringToOString( sType, RTL_TEXTENCODING_UTF8);
         OString p( s.pData->buffer + 8 );
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index de8c90c..0fe5475 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -408,7 +408,7 @@
             ::rtl::OUString aAttrName = xAttribs->getNameByIndex( nInd );
             ::rtl::OUString aAttrValue = xAttribs->getValueByIndex( nInd );
             if ( aAttrName.getLength() >= 5
-              && aAttrName.compareToAscii( "xmlns", 5 ) == 0
+              && aAttrName.startsWith("xmlns")
               && ( aAttrName.getLength() == 5 || aAttrName.getStr()[5] == ( sal_Unicode )':' ) )
             {
                 // this is a namespace declaration
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index 760b787..bf89597 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -701,9 +701,9 @@
             {
                 if( aToken.compareToAscii( "autoqueue" ) == 0 )
                     bAutoQueue = true;
-                else if( aToken.compareToAscii( "pdf=", 4 ) == 0 )
+                else if( aToken.startsWith("pdf=") )
                     bPdf = true;
-                else if( aToken.compareToAscii( "fax", 3 ) == 0 )
+                else if( aToken.startsWith("fax") )
                     bFax = true;
             }
         }
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 3df1a5e..2f136c9 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -104,7 +104,7 @@
         m_pTabControl->RemovePage(m_pTabControl->GetPageId("font"));
         m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
     }
-    else if( m_aJobData.m_aDriverName.compareToAscii( "CUPS:", 5 ) == 0 && ! 
PrinterInfoManager::get().isCUPSDisabled() )
+    else if( m_aJobData.m_aDriverName.startsWith("CUPS:") && ! 
PrinterInfoManager::get().isCUPSDisabled() )
     {
         // command page makes no sense for CUPS printers
         m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 525d9d9..8d6bf00 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -538,9 +538,9 @@
 namespace {
 
 bool getinput_putcall(bs::types::PutCall& pc, const OUString& str) {
-    if(str.compareToAscii("c",1)==0) {
+    if(str.startsWith("c")) {
         pc=bs::types::Call;
-    } else if(str.compareToAscii("p",1)==0) {
+    } else if(str.startsWith("p")) {
         pc=bs::types::Put;
     } else {
         return false;
@@ -572,9 +572,9 @@
 }
 
 bool getinput_inout(bs::types::BarrierKIO& kio, const OUString& str) {
-    if(str.compareToAscii("i",1)==0) {
+    if(str.startsWith("i")) {
         kio=bs::types::KnockIn;
-    } else if(str.compareToAscii("o",1)==0) {
+    } else if(str.startsWith("o")) {
         kio=bs::types::KnockOut;
     } else {
         return false;
@@ -583,9 +583,9 @@
 }
 
 bool getinput_barrier(bs::types::BarrierActive& cont, const OUString& str) {
-    if(str.compareToAscii("c",1)==0) {
+    if(str.startsWith("c")) {
         cont=bs::types::Continuous;
-    } else if(str.compareToAscii("e",1)==0) {
+    } else if(str.startsWith("e")) {
         cont=bs::types::Maturity;
     } else {
         return false;
@@ -594,9 +594,9 @@
 }
 
 bool getinput_fordom(bs::types::ForDom& fd, const OUString& str) {
-    if(str.compareToAscii("f",1)==0) {
+    if(str.startsWith("f")) {
         fd=bs::types::Foreign;
-    } else if(str.compareToAscii("d",1)==0) {
+    } else if(str.startsWith("d")) {
         fd=bs::types::Domestic;
     } else {
         return false;
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index df96769..62b2dfe 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1737,7 +1737,7 @@
     sal_Int32                            /*nSearchFlags*/    ) throw( 
::com::sun::star::uno::RuntimeException )
 {
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatcher;
-    if(aURL.Complete.compareToAscii("macro:",6)==0)
+    if(aURL.Complete.startsWith("macro:"))
         xDispatcher = this;
     return xDispatcher;
 }
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 9a59673..cea1947 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1801,7 +1801,7 @@
 
         // in case an output stream is provided from outside and the URL is correct
         // commit to the stream
-        if (pImp->m_aLogicName.compareToAscii("private:stream", 14) == 0)
+        if (pImp->m_aLogicName.startsWith("private:stream"))
         {
             // TODO/LATER: support storing to SID_STREAM
                SFX_ITEMSET_ARG( pImp->m_pSet, pOutStreamItem, SfxUnoAnyItem, SID_OUTPUTSTREAM, 
false);
@@ -2768,7 +2768,7 @@
             pImp->m_bRemote = true;
         break;
         default:
-            pImp->m_bRemote = GetName().compareToAscii("private:msgid", 13) == 0;
+            pImp->m_bRemote = GetName().startsWith("private:msgid");
             break;
     }
 
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index c4d18c9..392840e 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -500,7 +500,7 @@
     {
         nResult = BMP_128X128_MATH_DOC;
     }
-    else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "swriter" ) ) || 
aFactoryShortName.compareToAscii( "swriter/", 8 ) == 0 )
+    else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "swriter" ) ) || 
aFactoryShortName.startsWith("swriter/") )
     {
         nResult = BMP_128X128_WRITER_DOC;
     }
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index a37e4a7..9d288b5 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1617,7 +1617,7 @@
             // If this is an embedded object that has no URL based location it should be stored to 
own storage.
             // An embedded object can have a location based on URL in case it is a link, then it 
should be
             // stored in normal way.
-            if ( !hasLocation() || getLocation().compareToAscii( "private:", 8 ) == 0 )
+            if ( !hasLocation() || getLocation().startsWith("private:") )
             {
                 // actually in this very rare case only UI parameters have sence
                 // TODO/LATER: should be done later, after integration of sb19
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 7d8920d..05abd27 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -770,7 +770,7 @@
     Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
     if ( pAny ) {
         *pAny >>= sShapeType;
-        bOOXMLShape = ( sShapeType.compareToAscii( "ooxml-", 6 ) == 0 );
+        bOOXMLShape = ( sShapeType.startsWith("ooxml-") );
         OSL_TRACE("shape type: %s %d", OUStringToOString( sShapeType, RTL_TEXTENCODING_ASCII_US 
).getStr(), bOOXMLShape);
     }
     eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx
index 96203dd..7f46b73 100644
--- a/svx/workben/msview/xmlconfig.cxx
+++ b/svx/workben/msview/xmlconfig.cxx
@@ -202,7 +202,7 @@
 
 sal_Int32 toInt( const OUString& rText )
 {
-    if( rText.compareToAscii("0x",2) == 0)
+    if( rText.startsWith("0x"))
     {
         sal_Int32 nValue = 0;
         const sal_Unicode *p = rText;
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 11343bb..22878e3 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -345,7 +345,7 @@
                     pShadow->SetLocation( SVX_SHADOW_NONE );
                     bOk = true;
                 }
-                else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 )
+                else if( !bColorFound && aToken.startsWith("#") )
                 {
                     sal_Int32 nColor(0);
                     bOk = ::sax::Converter::convertColor( nColor, aToken );
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index dc6d71c..a26ab16 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1646,7 +1646,7 @@
     }
     else
     {
-        if( rServiceName.compareToAscii( "com.sun.star.", 13 ) == 0 )
+        if( rServiceName.startsWith("com.sun.star.") )
         {
             sal_Int32 nIndex = COM_SUN_STAR__DRAWING_LENGTH;
             OUString sCategory = rServiceName.getToken( 0, '.', nIndex );
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 57696da..0a98c4e 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -418,12 +418,12 @@
     while (nIndex >= 0)
     {
         const ::rtl::OUString sToken (sServerCertificateSubject.getToken(0, ',', nIndex));
-        if (sToken.compareToAscii("CN=", 3) == 0)
+        if (sToken.startsWith("CN="))
         {
             sServerCertificateSubject = sToken.copy(3);
             break;
         }
-        else if (sToken.compareToAscii(" CN=", 4) == 0)
+        else if (sToken.startsWith(" CN="))
         {
             sServerCertificateSubject = sToken.copy(4);
             break;
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx 
b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index a338bd2..a1a69ff 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -660,7 +660,7 @@
 
   for (sal_uInt32 i = 0; i < nFlavors; i++)
   {
-      if( flavors[i].MimeType.compareToAscii( "image/bmp", 9 ) == 0 )
+      if( flavors[i].MimeType.startsWith("image/bmp") )
       {
           [array addObject: NSTIFFPboardType];
           [array addObject: NSPICTPboardType];
diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx
index 0f6c57d..6d7ef1b 100644
--- a/vcl/aqua/source/dtrans/OSXTransferable.cxx
+++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx
@@ -75,7 +75,7 @@
     }
 
   NSString* sysFormat =
-      (aFlavor.MimeType.compareToAscii( "image/bmp", 9 ) == 0)
+      (aFlavor.MimeType.startsWith("image/bmp"))
       ? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard )
       : mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor);
   DataProviderPtr_t dp;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 59dcfb7..636cd94 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4646,7 +4646,7 @@
 // getting the needed URL information from the current document path
             if( eTargetProtocol == INET_PROT_NOT_VALID )
             {
-                if( rLink.m_aURL.getLength() > 4 && rLink.m_aURL.compareToAscii( "\\\\\\\\", 4 ) 
== 0)
+                if( rLink.m_aURL.getLength() > 4 && rLink.m_aURL.startsWith("\\\\\\\\"))
                 {
                     bIsUNCPath = sal_True;
                 }
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 77f0cc0..46c2910 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -653,7 +653,7 @@
                 bSuccess = true;
             }
         }
-        else if( aFlavor.MimeType.compareToAscii( "text/plain", 10 ) == 0 )
+        else if( aFlavor.MimeType.startsWith("text/plain") )
         {
             rtl_TextEncoding aEncoding = RTL_TEXTENCODING_DONTKNOW;
             bool bCompoundText = false;
@@ -842,7 +842,7 @@
     bool bHaveText = false;
     for( int i = 0; i < nFlavors; i++ )
     {
-        if( pFlavors[i].MimeType.compareToAscii( "text/plain", 10 ) == 0)
+        if( pFlavors[i].MimeType.startsWith("text/plain"))
             bHaveText = true;
         else
             convertTypeToNative( pFlavors[i].MimeType, targetselection, nFormat, rOutTypeList );
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 1c58bfb..102d19c 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -438,7 +438,7 @@
     const PPDParser* pNewParser = NULL;
     OUString aPrinter;
 
-    if( rPrinter.compareToAscii( "CUPS:", 5 ) == 0 )
+    if( rPrinter.startsWith("CUPS:") )
         aPrinter = rPrinter.copy( 5 );
     else
         aPrinter = rPrinter;
@@ -561,7 +561,7 @@
     if( p_it->second.m_aInfo.m_aContext.getParser() == NULL )
     {
         OUString aPrinter;
-        if( p_it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) == 0 )
+        if( p_it->second.m_aInfo.m_aDriverName.startsWith("CUPS:") )
             aPrinter = p_it->second.m_aInfo.m_aDriverName.copy( 5 );
         else
             aPrinter = p_it->second.m_aInfo.m_aDriverName;
@@ -772,7 +772,7 @@
 {
     // don't touch the CUPS printers
     if( m_aCUPSDestMap.find( rName ) != m_aCUPSDestMap.end() ||
-        rDriver.compareToAscii( "CUPS:", 5 ) == 0
+        rDriver.startsWith("CUPS:")
         )
         return false;
     return PrinterInfoManager::addPrinter( rName, rDriver );
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx 
b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 33f1c1c..8660b53 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -466,31 +466,31 @@
                     {
                         current = rtl::OUString( lineBuffer,pos );
 
-                        if( current.compareToAscii( "Title",5 ) == 0 )
+                        if( current.startsWith("Title") )
                         {
                             title = current.copy( current.indexOf(sal_Unicode( '=' ) ) + 1 );
                         }
-                        else if( current.compareToAscii( "Start",5 ) == 0 )
+                        else if( current.startsWith("Start") )
                         {
                             startid = current.copy( current.indexOf('=') + 1 );
                         }
-                        else if( current.compareToAscii( "Language",8 ) == 0 )
+                        else if( current.startsWith("Language") )
                         {
                             lang_ = current.copy( current.indexOf('=') + 1 );
                         }
-                        else if( current.compareToAscii( "Program",7 ) == 0 )
+                        else if( current.startsWith("Program") )
                         {
                             program = current.copy( current.indexOf('=') + 1 );
                         }
-                        else if( current.compareToAscii( "Heading",7 ) == 0 )
+                        else if( current.startsWith("Heading") )
                         {
                             heading = current.copy( current.indexOf('=') + 1 );
                         }
-                        else if( current.compareToAscii( "FullText",8 ) == 0 )
+                        else if( current.startsWith("FullText") )
                         {
                             fulltext = current.copy( current.indexOf('=') + 1 );
                         }
-                        else if( current.compareToAscii( "Order",5 ) == 0 )
+                        else if( current.startsWith("Order") )
                         {
                             order = current.copy( current.indexOf('=') + 1 );
                         }
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx 
b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 386f466..f82117d 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -519,7 +519,7 @@
 {
     // Correct extension help links as sometimes the
     // module is missing resulting in a misformed URL
-    if( m_aExpr.compareToAscii( "vnd.sun.star.help:///", 21 ) == 0 )
+    if( m_aExpr.startsWith("vnd.sun.star.help:///") )
     {
         sal_Int32 nLen = m_aExpr.getLength();
         rtl::OUString aLastStr =
diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx
index 13c1d9a..8df434f 100644
--- a/xmloff/source/style/shadwhdl.cxx
+++ b/xmloff/source/style/shadwhdl.cxx
@@ -64,7 +64,7 @@
             bRet = sal_True;
             break;
         }
-        else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 )
+        else if( !bColorFound && aToken.startsWith("#") )
         {
             sal_Int32 nColor(0);
             bRet = ::sax::Converter::convertColor( nColor, aToken );

-- 
To view, visit https://gerrit.libreoffice.org/2620
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib60a6dd29a89c3eb91520f9a6ced663a20596aac
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Thomas Arnhold <thomas@arnhold.org>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.