diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-04 13:43:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-05 08:55:05 +0200 |
commit | 5da63b03c0ad1b93e6918d901b48f5850588a42b (patch) | |
tree | f35f8a767dc39092f32a9d357a33f1c968fc2376 /svx/source/svdraw/svdotxat.cxx | |
parent | dea5704e934d523438546ce8891d9cf5aef9b347 (diff) |
convert svx/source/svdraw/*.cxx from String to OUString
Change-Id: I081cc5220fb0f55af2c08ae24bb92e4bf8d3f546
Diffstat (limited to 'svx/source/svdraw/svdotxat.cxx')
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 97c1bd413e57..bbb4f7f8f30e 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -224,7 +224,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL; if (pStylePool!=NULL) { - std::vector<XubString*> aStyleNames; + std::vector<OUString> aStyleNames; OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); if (pOutlinerParaObject!=NULL) { @@ -256,12 +256,12 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() { // we don't want duplicate stylesheets nNum--; - bFnd = aStyleName.equals(*aStyleNames[nNum]); + bFnd = aStyleName == aStyleNames[nNum]; } if(!bFnd) { - aStyleNames.push_back(new XubString(aStyleName)); + aStyleNames.push_back(aStyleName); } } } @@ -270,20 +270,19 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() // now convert the strings in the vector from names to StyleSheet* std::set<SfxStyleSheet*> aStyleSheets; while (!aStyleNames.empty()) { - XubString* pName=aStyleNames.back(); + OUString aName = aStyleNames.back(); aStyleNames.pop_back(); - String aFam = pName->Copy(0, pName->Len() - 6); + OUString aFam = aName.copy(0, aName.getLength() - 6); - aFam.Erase(0,1); + aFam = aFam.copy(1); aFam = comphelper::string::stripEnd(aFam, ' '); - sal_uInt16 nFam = (sal_uInt16)aFam.ToInt32(); + sal_uInt16 nFam = (sal_uInt16)aFam.toInt32(); - SfxStyleFamily eFam=(SfxStyleFamily)nFam; - SfxStyleSheetBase* pStyleBase=pStylePool->Find(*pName,eFam); - SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pStyleBase); - delete pName; + SfxStyleFamily eFam = (SfxStyleFamily)nFam; + SfxStyleSheetBase* pStyleBase = pStylePool->Find(aName,eFam); + SfxStyleSheet* pStyle = PTR_CAST(SfxStyleSheet,pStyleBase); if (pStyle!=NULL && pStyle!=GetStyleSheet()) { aStyleSheets.insert(pStyle); } |