diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-19 15:58:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-20 10:07:31 +0200 |
commit | 3af99e4d59d89c343965a928681a30f36b1007d2 (patch) | |
tree | 2389765131bdb92817e98bc922ffecbf0184d69b /editeng | |
parent | fdo#71645 remove footnote numbers in cross-references (diff) | |
download | core-3af99e4d59d89c343965a928681a30f36b1007d2.tar.gz core-3af99e4d59d89c343965a928681a30f36b1007d2.zip |
convert equalsAsciiL calls to startsWith calls
Convert code like:
aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
to
aStr.startsWith( "ActiveConnection" )
which compiles down to the same machine code.
Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/edtspell.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 4 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index f9eb3560ac56..3ec1a921cf3e 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -651,7 +651,7 @@ sal_Bool EdtAutoCorrDoc::SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, { SfxItemPool* pPool = &mpEditEngine->GetEditDoc().GetItemPool(); while ( pPool->GetSecondaryPool() && - !pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")) ) + !pPool->GetName().startsWith("EditEngineItemPool") ) { pPool = pPool->GetSecondaryPool(); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 3ec19db12ef4..74ca596acfb9 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -158,13 +158,13 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel ) // The SvRTF parser expects the Which-mapping passed on in the pool, not // dependant on a secondary. SfxItemPool* pPool = &aEditDoc.GetItemPool(); - while (pPool->GetSecondaryPool() && !pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool"))) + while (pPool->GetSecondaryPool() && !pPool->GetName().startsWith("EditEngineItemPool")) { pPool = pPool->GetSecondaryPool(); } - DBG_ASSERT(pPool && pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")), + DBG_ASSERT(pPool && pPool->GetName().startsWith("EditEngineItemPool"), "ReadRTF: no EditEnginePool!"); EditRTFParserRef xPrsr = new EditRTFParser(rInput, aSel, *pPool, pEditEngine); diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index c130771a862e..5f11920eb39b 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1164,7 +1164,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const SfxItemPool *pPool = SfxItemPool::GetStoringPool(); const bool bStoreDefTabs = pPool - && pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SWG")) + && pPool->GetName().startsWith("SWG") && ::IsDefaultItem( this ); const short nTabs = Count(); |