From 0a9ef5a18e148c7a5c9a088e153a7873d1564841 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Nov 2013 11:06:18 +0200 Subject: convert OUString 0==compareToAscii to equalsAscii Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07 --- sw/source/ui/envelp/mailmrge.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index fbddd97bf583..52e142c0673c 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -424,7 +424,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, const beans::PropertyValue* pFilterProperties = aFilterProperties.getConstArray(); for(int nProp = 0; nProp < aFilterProperties.getLength(); nProp++) { - if(!pFilterProperties[nProp].Name.compareToAscii("UIName")) + if(pFilterProperties[nProp].Name.equalsAscii("UIName")) { pFilterProperties[nProp].Value >>= sUIName2; break; @@ -433,7 +433,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, if( !sUIName2.isEmpty() ) { sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 ); - if( 0 == sFilter.compareToAscii("writer8") ) + if( sFilter.equalsAscii("writer8") ) nODT = nFilter; aFilterLB.SetEntryData( nFilter, new OUString( sFilter ) ); } -- cgit