diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-02 16:02:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-03 21:24:35 +0100 |
commit | bccf34c19ae022b67565e212fa4ec0d5213947de (patch) | |
tree | 73c2d2e29ad8d15999cbfb2ff554efa1e502a35e /sw/source/core/txtnode | |
parent | 285289275d1cf1769080a208b55be984cd269e1e (diff) |
ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a27754494e5e..9848b60c04b8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3409,8 +3409,7 @@ namespace { rTxtNode.RemoveFromList(); // If new list style is the outline style, apply outline // level as the list level. - if ( sNumRule == - String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) ) + if ( sNumRule.EqualsAscii(SwNumRule::GetOutlineRuleName()) ) { // #i70748# OSL_ENSURE( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(), @@ -4656,8 +4655,8 @@ namespace { // If paragraph has no list level attribute set and list style // is the outline style, apply outline level as the list level. if ( !mrTxtNode.HasAttrListLevel() && - mrTxtNode.GetNumRule()->GetName() == - String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) && + mrTxtNode.GetNumRule()->GetName().EqualsAscii( + SwNumRule::GetOutlineRuleName()) && mrTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle() ) { int nNewListLevel = mrTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel(); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index f5e4b16fee26..56f9b33798e7 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -806,10 +806,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) { xub_StrLen nOldIdx(rInf.GetIdx()); xub_StrLen nOldLen(rInf.GetLen()); - String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDSTART); + rtl::OUString aNewText(CH_TXT_ATR_SUBST_FIELDSTART); rInf.SetText( aNewText ); rInf.SetIdx( 0 ); - rInf.SetLen( aNewText.Len() ); + rInf.SetLen( aNewText.getLength() ); aTxtSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); @@ -818,10 +818,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) { xub_StrLen nOldIdx(rInf.GetIdx()); xub_StrLen nOldLen(rInf.GetLen()); - String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDEND); + rtl::OUString aNewText(CH_TXT_ATR_SUBST_FIELDEND); rInf.SetText( aNewText ); rInf.SetIdx( 0 ); - rInf.SetLen( aNewText.Len() ); + rInf.SetLen( aNewText.getLength() ); aTxtSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); |