diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:36:45 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:36:45 +0200 |
commit | 70ef99c447fcdb73ecadb8b3afd251ef8021a6cc (patch) | |
tree | cf2b528049b53062ccbf0306b4f769037c890f4b /sw | |
parent | 9eea0332e091ebd49b25c1289fbb3572b3f4bc2c (diff) |
String to OUString, mark as const
Change-Id: Id5ab789b3518a23ccef6f3a13f852c478a129089
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/txtatr2.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index e5464dcf4105..659a7561ead8 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -139,9 +139,9 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt() SetVisitedValid( true ); } sal_uInt16 nId; - const String& rStr = IsVisited() ? rFmt.GetVisitedFmt() + const OUString rStr = IsVisited() ? rFmt.GetVisitedFmt() : rFmt.GetINetFmt(); - if( rStr.Len() ) + if( !rStr.isEmpty() ) nId = IsVisited() ? rFmt.GetVisitedFmtId() : rFmt.GetINetFmtId(); else nId = static_cast<sal_uInt16>(IsVisited() ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL); @@ -258,14 +258,14 @@ SwCharFmt* SwTxtRuby::GetCharFmt() if( !rFmt.GetText().isEmpty() ) { const SwDoc* pDoc = GetTxtNode().GetDoc(); - const String& rStr = rFmt.GetCharFmtName(); - sal_uInt16 nId = RES_POOLCHR_RUBYTEXT; - if ( rStr.Len() ) - nId = rFmt.GetCharFmtId(); + const OUString rStr = rFmt.GetCharFmtName(); + const sal_uInt16 nId = rStr.isEmpty() + ? static_cast<sal_uInt16>(RES_POOLCHR_RUBYTEXT) + : rFmt.GetCharFmtId(); // JP 10.02.2000, Bug 72806: dont modify the doc for getting the // correct charstyle. - bool bResetMod = !pDoc->IsModified(); + const bool bResetMod = !pDoc->IsModified(); Link aOle2Lnk; if( bResetMod ) { |