diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-19 23:27:29 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-19 23:28:55 +0900 |
commit | 96cb767123c9e8f5db197454b4da02c8f7583d2b (patch) | |
tree | 4790978cfa591fb5cf5fd0920159abee7d6f1ac8 /oox | |
parent | e34e95aef33262c7aad006883e02cb76e5bb9947 (diff) |
Prefer equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("..."))
to equalsIgnoreAsciiCaseAscii("...")
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 18 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/dump/pptxdumper.cxx | 34 | ||||
-rw-r--r-- | oox/source/dump/xlsbdumper.cxx | 34 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 4 | ||||
-rw-r--r-- | oox/source/mathml/importutils.cxx | 15 |
7 files changed, 57 insertions, 52 deletions
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 076aa41a7e78..ab9e4cce412f 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1147,7 +1147,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo } else try { - sal_Int32 nIndex = rNumberFormat.maFormatCode.equalsIgnoreAsciiCaseAscii( "general" ) ? + sal_Int32 nIndex = rNumberFormat.maFormatCode.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("general")) ? mxData->mxNumTypes->getStandardIndex( mxData->maFromLocale ) : mxData->mxNumFmts->addNewConverted( rNumberFormat.maFormatCode, mxData->maEnUsLocale, mxData->maFromLocale ); if( nIndex >= 0 ) diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index ff6e972dfa1f..a916f4570d28 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -318,15 +318,15 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P aFontDesc.Name = aBulletFontName; aFontDesc.Pitch = nBulletFontPitch; aFontDesc.Family = nBulletFontFamily; - if ( aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings 2" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "Wingdings 3" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "Monotype Sorts" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "Monotype Sorts 2" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "Webdings" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "StarBats" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "StarMath" ) || - aBulletFontName.equalsIgnoreAsciiCaseAscii( "ZapfDingbats" ) ) { + if ( aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Wingdings")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Wingdings 2")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Wingdings 3")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Monotype Sorts")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Monotype Sorts 2")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Webdings")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("StarBats")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("StarMath")) || + aBulletFontName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("ZapfDingbats")) ) { aFontDesc.CharSet = RTL_TEXTENCODING_SYMBOL; bSymbolFont = sal_True; } diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index f109168e7a09..d8061cf07f5f 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2942,7 +2942,7 @@ void XmlStreamObject::implDumpText( TextInputStream& rTextStrm ) matching start/end elements and the element text on the same line. */ OUStringBuffer aOldStartElem; // special handling for VML - bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName ).equalsIgnoreAsciiCaseAscii( "vml" ); + bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName ).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml")); while( !rTextStrm.isEof() ) { diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx index 798d805ae5e5..a569f04edb55 100644 --- a/oox/source/dump/pptxdumper.cxx +++ b/oox/source/dump/pptxdumper.cxx @@ -60,38 +60,38 @@ RootStorageObject::RootStorageObject( const DumperBase& rParent ) void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName ) { OUString aExt = InputOutputHelper::getFileNameExtension( rStrmName ); - if( aExt.equalsIgnoreAsciiCaseAscii( "pptx" ) || - aExt.equalsIgnoreAsciiCaseAscii( "potx" ) ) + if( aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("pptx")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("potx")) ) { Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "xlsb" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlsm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlsx" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xltm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xltx" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsb")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsx")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltx")) ) { ::oox::dump::xlsb::Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "xla" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlc" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xls" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlt" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlw" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xla")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlc")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xls")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlt")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlw")) ) { ::oox::dump::biff::Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "xml" ) || - aExt.equalsIgnoreAsciiCaseAscii( "vml" ) || - aExt.equalsIgnoreAsciiCaseAscii( "rels" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xml")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("rels")) ) { XmlStreamObject( *this, rxStrm, rSysFileName ).dump(); } - else if( aExt.equalsIgnoreAsciiCaseAscii( "bin" ) ) + else if( aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bin")) ) { if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ppt" ) ) && rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vbaProject.bin" ) ) ) { diff --git a/oox/source/dump/xlsbdumper.cxx b/oox/source/dump/xlsbdumper.cxx index 9a13d973fb3b..610ffce2b046 100644 --- a/oox/source/dump/xlsbdumper.cxx +++ b/oox/source/dump/xlsbdumper.cxx @@ -2236,38 +2236,38 @@ void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, { OUString aExt = InputOutputHelper::getFileNameExtension( rStrmName ); if( - aExt.equalsIgnoreAsciiCaseAscii( "xlsb" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlsm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlsx" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xltm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xltx" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsb")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlsx")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xltx")) ) { Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "xla" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlc" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlm" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xls" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlt" ) || - aExt.equalsIgnoreAsciiCaseAscii( "xlw" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xla")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlc")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlm")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xls")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlt")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xlw")) ) { ::oox::dump::biff::Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "pptx" ) || - aExt.equalsIgnoreAsciiCaseAscii( "potx" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("pptx")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("potx")) ) { ::oox::dump::pptx::Dumper( getContext(), rxStrm, rSysFileName ).dump(); } else if( - aExt.equalsIgnoreAsciiCaseAscii( "xml" ) || - aExt.equalsIgnoreAsciiCaseAscii( "vml" ) || - aExt.equalsIgnoreAsciiCaseAscii( "rels" ) ) + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("xml")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml")) || + aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("rels")) ) { XmlStreamObject( *this, rxStrm, rSysFileName ).dump(); } - else if( aExt.equalsIgnoreAsciiCaseAscii( "bin" ) ) + else if( aExt.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bin")) ) { if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "xl" ) ) && rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vbaProject.bin" ) ) ) { diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index ea35320461cd..119d970d4ebb 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1497,8 +1497,8 @@ sal_Unicode DrawingML::SubstituteBullet( sal_Unicode cBulletId, ::com::sun::star { String sNumStr = cBulletId; - if ( rFontDesc.Name.equalsIgnoreAsciiCaseAscii("starsymbol") || - rFontDesc.Name.equalsIgnoreAsciiCaseAscii("opensymbol") ) { + if ( rFontDesc.Name.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("starsymbol")) || + rFontDesc.Name.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("opensymbol")) ) { String sFontName = rFontDesc.Name; rtl_TextEncoding aCharSet = rFontDesc.CharSet; diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index 23db8f2b92d6..ab9d22483387 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -132,13 +132,18 @@ bool XmlStream::AttributeList::attribute( int token, bool def ) const std::map< int, rtl::OUString >::const_iterator find = attrs.find( token ); if( find != attrs.end()) { - if( find->second.equalsIgnoreAsciiCaseAscii( "true" ) || find->second.equalsIgnoreAsciiCaseAscii( "on" ) - || find->second.equalsIgnoreAsciiCaseAscii( "t" ) || find->second.equalsIgnoreAsciiCaseAscii( "1" )) + const rtl::OUString sValue = find->second; + if( sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("on")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("t")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) ) return true; - if( find->second.equalsIgnoreAsciiCaseAscii( "false" ) || find->second.equalsIgnoreAsciiCaseAscii( "off" ) - || find->second.equalsIgnoreAsciiCaseAscii( "f" ) || find->second.equalsIgnoreAsciiCaseAscii( "0" )) + if( sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("off")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("f")) || + sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) ) return false; - SAL_WARN( "oox.xmlstream", "Cannot convert \'" << find->second << "\' to bool." ); + SAL_WARN( "oox.xmlstream", "Cannot convert \'" << sValue << "\' to bool." ); } return def; } |