Kaydet (Commit) 96cb7671 authored tarafından Takeshi Abe's avatar Takeshi Abe

Prefer equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("..."))

to equalsIgnoreAsciiCaseAscii("...")
üst e34e95ae
......@@ -605,7 +605,7 @@ void CloseDispatcher::implts_notifyResultListener(const css::uno::Reference< css
css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRightTargetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame ,
const ::rtl::OUString& sTarget)
{
if (sTarget.equalsIgnoreAsciiCaseAscii("_self"))
if (sTarget.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("_self")))
return xFrame;
OSL_ENSURE(sTarget.isEmpty(), "CloseDispatch used for unexpected target. Magic things will happen now .-)");
......
......@@ -197,8 +197,8 @@ void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent& aEv
void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
throw (css::uno::RuntimeException)
{
if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnSaveAsDone")
&& ! aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged"))
if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnSaveAsDone"))
&& ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")))
return;
// SYNCHRONIZED ->
......@@ -211,7 +211,7 @@ void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
if (
aEvent.Source != xOwner ||
(aEvent.EventName.equalsIgnoreAsciiCaseAscii ("OnTitleChanged") && !xOwner.is())
(aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")) && !xOwner.is())
)
{
return;
......
......@@ -1151,7 +1151,8 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars()
// Check that we only create:
// - Toolbars (the statusbar is also member of the persistent window state)
// - Not custom toolbars, there are created with their own method (implts_createCustomToolbars)
if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" ) && aElementName.indexOf( m_aCustomTbxPrefix ) == -1 )
if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) &&
aElementName.indexOf( m_aCustomTbxPrefix ) == -1 )
{
UIElement aNewToolbar = implts_findToolbar( aName );
bool bFound = ( aNewToolbar.m_aName == aName );
......
......@@ -1415,11 +1415,11 @@ sal_Bool LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens
|| TAG_COMMONEND == aTokenId )
{
rtl::OUString aTagName = aToken.GetTagName();
return !(aTagName.equalsIgnoreAsciiCaseAscii( "comment" )
|| aTagName.equalsIgnoreAsciiCaseAscii( "bookmark_value" )
|| aTagName.equalsIgnoreAsciiCaseAscii( "emph" )
|| aTagName.equalsIgnoreAsciiCaseAscii( "item" )
|| aTagName.equalsIgnoreAsciiCaseAscii( "br" ) );
return !(aTagName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("comment"))
|| aTagName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bookmark_value"))
|| aTagName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("emph"))
|| aTagName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("item"))
|| aTagName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("br")) );
}
return sal_False;
}
......
......@@ -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 )
......
......@@ -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;
}
......
......@@ -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() )
{
......
......@@ -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" ) ) )
{
......
......@@ -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" ) ) )
{
......
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment