summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-12 14:48:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-10-12 16:33:42 +0100
commit53acdd29e32707eb4ad6e922b47e1c1216f9d7d6 (patch)
tree53b62faaa7b0f7a3781c781dda023a77e6843aca /editeng
parenta551cad4e35b6b664167d65dfc25e5a0f6990687 (diff)
XubString->OUString
Change-Id: Ib5f39e099d238b739e0d6b3d92d3f04ee50022fb
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/outlobj.hxx9
-rw-r--r--editeng/inc/editeng/svxfont.hxx2
-rw-r--r--editeng/source/items/svxfont.cxx24
-rw-r--r--editeng/source/outliner/outlobj.cxx9
4 files changed, 25 insertions, 19 deletions
diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx
index ff2f1f7dd5c0..73eb9b5b96d5 100644
--- a/editeng/inc/editeng/outlobj.hxx
+++ b/editeng/inc/editeng/outlobj.hxx
@@ -78,9 +78,12 @@ public:
void ClearPortionInfo();
// StyleSheet support
- bool ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily);
- void ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName);
- void SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily);
+ bool ChangeStyleSheets(const OUString& rOldName, SfxStyleFamily eOldFamily,
+ const OUString& rNewName, SfxStyleFamily eNewFamily);
+ void ChangeStyleSheetName(SfxStyleFamily eFamily, const OUString& rOldName,
+ const OUString& rNewName);
+ void SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
+ const SfxStyleFamily& rNewFamily);
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx
index 20db6474adf5..96729e9488d0 100644
--- a/editeng/inc/editeng/svxfont.hxx
+++ b/editeng/inc/editeng/svxfont.hxx
@@ -82,7 +82,7 @@ public:
inline sal_Bool IsEsc() const { return 0 != nEsc; }
// Consider Upper case, Lower case letters etc.
- String CalcCaseMap( const String &rTxt ) const;
+ OUString CalcCaseMap(const OUString &rTxt) const;
// The following section is not needed by anyone, so it can be excluded.
#ifndef REDUCEDSVXFONT
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index ae8c99d13f7a..5f8745d43ebb 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -110,10 +110,11 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
}
-XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
+OUString SvxFont::CalcCaseMap(const OUString &rTxt) const
{
- if( !IsCaseMap() || !rTxt.Len() ) return rTxt;
- XubString aTxt( rTxt );
+ if (!IsCaseMap() || rTxt.isEmpty())
+ return rTxt;
+ OUString aTxt(rTxt);
// I still have to get the language
const LanguageType eLng = LANGUAGE_DONTKNOW == eLang
? LANGUAGE_SYSTEM : eLang;
@@ -139,21 +140,20 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
// Every beginning of a word is capitalized, the rest of the word
// is taken over as is.
// Bug: if the attribute starts in the middle of the word.
- sal_Bool bBlank = sal_True;
+ bool bBlank = true;
- for( sal_uInt16 i = 0; i < aTxt.Len(); ++i )
+ for (sal_Int32 i = 0; i < aTxt.getLength(); ++i)
{
- if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) )
- bBlank = sal_True;
+ if( aTxt[i] == ' ' || aTxt[i] == '\t')
+ bBlank = true;
else
{
- if( bBlank )
+ if (bBlank)
{
- rtl::OUString aTemp(aTxt.GetChar(i));
- aTemp = aCharClass.uppercase( aTemp );
- aTxt.Replace( i, 1, aTemp );
+ OUString sTitle(aCharClass.uppercase(OUString(aTxt[i])));
+ aTxt = aTxt.replaceAt(i, 1, sTitle);
}
- bBlank = sal_False;
+ bBlank = false;
}
}
break;
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 6edfcf48947b..447f7a5ac607 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -240,19 +240,22 @@ void OutlinerParaObject::ClearPortionInfo()
mpImplOutlinerParaObject->mpEditTextObject->ClearPortionInfo();
}
-bool OutlinerParaObject::ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily)
+bool OutlinerParaObject::ChangeStyleSheets(const OUString& rOldName,
+ SfxStyleFamily eOldFamily, const OUString& rNewName, SfxStyleFamily eNewFamily)
{
ImplMakeUnique();
return mpImplOutlinerParaObject->mpEditTextObject->ChangeStyleSheets(rOldName, eOldFamily, rNewName, eNewFamily);
}
-void OutlinerParaObject::ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName)
+void OutlinerParaObject::ChangeStyleSheetName(SfxStyleFamily eFamily,
+ const OUString& rOldName, const OUString& rNewName)
{
ImplMakeUnique();
mpImplOutlinerParaObject->mpEditTextObject->ChangeStyleSheetName(eFamily, rOldName, rNewName);
}
-void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily)
+void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
+ const SfxStyleFamily& rNewFamily)
{
const sal_uInt32 nCount(mpImplOutlinerParaObject->maParagraphDataVector.size());