diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:18:44 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:18:44 +0100 |
commit | fe99ee368fef4059e187a81059679ca150161119 (patch) | |
tree | 7647d116d16e3cc5f5a6ab95fd9a6d86642e3604 /sw/source/uibase | |
parent | 577e90091bc72eb72b1432611c82cbdaf18b557c (diff) |
sw: Use appropriate OUString functions on string constants
Change-Id: I559d1e44d9096a2583af8e05468b3743ac210c6c
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/config/modcfg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 20 |
5 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 330e033bba94..05914a78b074 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -394,19 +394,19 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem )) { OUString aFamily = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if(aFamily.equalsAscii("CharacterStyles")) + if(aFamily == "CharacterStyles") nFamily = SFX_STYLE_FAMILY_CHAR; else - if(aFamily.equalsAscii("ParagraphStyles")) + if(aFamily == "ParagraphStyles") nFamily = SFX_STYLE_FAMILY_PARA; else - if(aFamily.equalsAscii("PageStyles")) + if(aFamily == "PageStyles") nFamily = SFX_STYLE_FAMILY_PAGE; else - if(aFamily.equalsAscii("FrameStyles")) + if(aFamily == "FrameStyles") nFamily = SFX_STYLE_FAMILY_FRAME; else - if(aFamily.equalsAscii("NumberingStyles")) + if(aFamily == "NumberingStyles") nFamily = SFX_STYLE_FAMILY_PSEUDO; } diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 049cf028e4df..5364393870d7 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -1092,7 +1092,7 @@ void SwInsertConfig::Load() //#i61007# initialize caption order, right now only HUNGARIAN seems to need a different order SvtSysLocaleOptions aSysLocaleOptions; OUString sLang = aSysLocaleOptions.GetLocaleConfigString(); - bCaptionOrderNumberingFirst = !sLang.isEmpty() && sLang.matchAsciiL( "hu", 2 ); + bCaptionOrderNumberingFirst = sLang.startsWith( "hu" ); } } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 7b97da3e0836..6005d42dc9b0 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1165,7 +1165,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, //convert fields to text if we are exporting to PDF //this prevents a second merge while updating the fields in SwXTextDocument::getRendererCount() - if( pStoreToFilter && pStoreToFilter->GetFilterName().equalsAscii("writer_pdf_Export")) + if( pStoreToFilter && pStoreToFilter->GetFilterName() == "writer_pdf_Export") rWorkShell.ConvertFieldsToText(); xWorkDocSh->DoSaveAs(*pDstMed); xWorkDocSh->DoSaveCompleted(pDstMed); diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 798c167dacd5..8142dfc90685 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -635,11 +635,11 @@ uno::Any SwConnectionContext::getValueByName( const OUString& rName ) throw (uno::RuntimeException, std::exception) { uno::Any aRet; - if( rName.equalsAscii( "ServerName" )) + if( rName == "ServerName" ) aRet <<= m_sMailServer; - else if( rName.equalsAscii( "Port" )) + else if( rName == "Port" ) aRet <<= (sal_Int32) m_nPort; - else if( rName.equalsAscii( "ConnectionType" )) + else if( rName == "ConnectionType" ) aRet <<= m_sConnectionType; return aRet; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 3fdcc451a3ce..56c148b939f5 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1083,43 +1083,43 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue const Any& rVal = pProperties[i].Value; bool bException; sal_uInt32 nVal = lcl_Any_To_ULONG(rVal, bException); - if( sName.equalsAscii("PageRows" ) ) + if( sName == "PageRows" ) { if(!nVal || nVal > 0xff) throw RuntimeException(); aData.SetRow((sal_uInt8)nVal); } - else if(sName.equalsAscii("PageColumns")) + else if(sName == "PageColumns") { if(!nVal || nVal > 0xff) throw RuntimeException(); aData.SetCol((sal_uInt8)nVal); } - else if(sName.equalsAscii("LeftMargin")) + else if(sName == "LeftMargin") { aData.SetLeftSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("RightMargin")) + else if(sName == "RightMargin") { aData.SetRightSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("TopMargin")) + else if(sName == "TopMargin") { aData.SetTopSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("BottomMargin")) + else if(sName == "BottomMargin") { aData.SetBottomSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("HoriMargin")) + else if(sName == "HoriMargin") { aData.SetHorzSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("VertMargin")) + else if(sName == "VertMargin") { aData.SetVertSpace(convertMm100ToTwip(nVal)); } - else if(sName.equalsAscii("IsLandscape")) + else if(sName == "IsLandscape") { bException = (::getBooleanCppuType() != rVal.getValueType()); aData.SetLandscape(*(sal_Bool*)rVal.getValue()); @@ -1751,7 +1751,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void) OUString* pRet = aRet.getArray(); for ( sal_Int32 i = 0; i < aRet.getLength(); ++i ) { - if ( pRet[i].equalsAscii( "com.sun.star.drawing.OLE2Shape" ) ) + if ( pRet[i] == "com.sun.star.drawing.OLE2Shape" ) { pRet[i] = pRet[aRet.getLength() - 1]; aRet.realloc( aRet.getLength() - 1 ); // <pRet> no longer valid. |