diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-20 18:34:16 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-27 14:00:42 +0200 |
commit | 9938cb54589680b335e75cc5fd47cd646b8a7314 (patch) | |
tree | 2ddaad3ee9d85a36a0a44dfab4b1241b0b4d8e44 /sw/source | |
parent | e6ad7c39b88246884597cd0027f1fad55072b3b2 (diff) |
OUString: use startsWith, plus minor optimization
Change-Id: I883d9c3fa1e31791dfcae73b9e551e97440db647
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 454440b40261..93b4eecc1b34 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -67,7 +67,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet, { if(pStr) { - SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + OUString(')')); + SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + ")"); } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); @@ -238,14 +238,12 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet) bool SwCharURLPage::FillItemSet(SfxItemSet& rSet) { - OUString sURL = m_pURLED->GetText(); - if(!sURL.isEmpty()) + OUString sURL = m_pURLED->GetText(); + if(!sURL.isEmpty()) { sURL = URIHelper::SmartRel2Abs(INetURLObject(), sURL, Link(), false ); // #i100683# file URLs should be normalized in the UI - static const sal_Char* pFile = "file:"; - sal_Int32 nLength = ((sal_Int32)sizeof(pFile)-1); - if( sURL.copy(0, nLength ).equalsAsciiL( pFile, nLength )) + if ( sURL.startsWith("file:") ) sURL = URIHelper::simpleNormalizedMakeRelative(OUString(), sURL); } |