From 6d7536ce4e6b51f499ccdd6aa0e749bda2d63d46 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 16 Jan 2011 14:12:57 +0000 Subject: equalsAsciiL faster than equalsAscii & comparetoAscii(const sal_Char*) --- framework/source/helper/titlebarupdate.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'framework/source/helper/titlebarupdate.cxx') diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 6cb4ed5adcc2..a7e61256f988 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -231,27 +231,27 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr rtl::OUString aModuleId = xModuleManager->identify(xFrame); rtl::OUString sDesktopName; - if ( aModuleId.equalsAscii( "com.sun.star.text.TextDocument" ) || - aModuleId.equalsAscii( "com.sun.star.text.GlobalDocument" ) || - aModuleId.equalsAscii( "com.sun.star.text.WebDocument" ) || - aModuleId.equalsAscii( "com.sun.star.xforms.XMLFormDocument" ) ) + if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GlobalDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.xforms.XMLFormDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer")); - else if ( aModuleId.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc")); - else if ( aModuleId.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("impress")); - else if ( aModuleId.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("draw")); - else if ( aModuleId.equalsAscii( "com.sun.star.formula.FormulaProperties" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.formula.FormulaProperties")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("math")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DatabaseDocument" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.OfficeDatabaseDocument" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.RelationDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.QueryDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.TableDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.DataSourceBrowser" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.RelationDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.QueryDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.TableDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DataSourceBrowser")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("base")); - else if ( aModuleId.equalsAscii( "com.sun.star.frame.StartModule" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.StartModule")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter")); else sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter")); -- cgit