summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-09 15:54:51 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:35 +0200
commitb7c58f553296bb6f5bd85108dd26f0180fac5e4a (patch)
treea1ec68639cfd9afa3b816e66baf0f45d5875b2d3 /editeng
parent201f05e1b82d8ff66eede73c79da21ea62ef858d (diff)
covnert editeng/source/editeng/textconv.hxx from String to OUString
Change-Id: Icae973338acf98c07b2073641801a4843d4e0315
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/textconv.cxx14
-rw-r--r--editeng/source/editeng/textconv.hxx4
2 files changed, 9 insertions, 9 deletions
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index be8c31ad2ef7..4e132e26b69e 100644
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -435,15 +435,15 @@ void TextConvWrapper::ReplaceUnit(
}
-void TextConvWrapper::ChangeText( const String &rNewText,
+void TextConvWrapper::ChangeText( const OUString &rNewText,
const OUString& rOrigText,
const uno::Sequence< sal_Int32 > *pOffsets,
ESelection *pESelection )
{
//!! code is a modifed copy of SwHHCWrapper::ChangeText from sw !!
- DBG_ASSERT( rNewText.Len() != 0, "unexpected empty string" );
- if (rNewText.Len() == 0)
+ DBG_ASSERT( !rNewText.isEmpty(), "unexpected empty string" );
+ if (rNewText.isEmpty())
return;
if (pOffsets && pESelection) // try to keep as much attributation as possible ?
@@ -455,7 +455,7 @@ void TextConvWrapper::ChangeText( const String &rNewText,
const sal_Int32 nIndices = pOffsets->getLength();
const sal_Int32 *pIndices = pOffsets->getConstArray();
- xub_StrLen nConvTextLen = rNewText.Len();
+ sal_Int32 nConvTextLen = rNewText.getLength();
xub_StrLen nPos = 0;
xub_StrLen nChgPos = STRING_NOTFOUND;
xub_StrLen nChgLen = 0;
@@ -483,7 +483,7 @@ void TextConvWrapper::ChangeText( const String &rNewText,
nIndex = static_cast< xub_StrLen >( rOrigText.getLength() );
}
- if (rOrigText.getStr()[nIndex] == rNewText.GetChar(nPos) ||
+ if (rOrigText.getStr()[nIndex] == rNewText[nPos] ||
nPos == nConvTextLen /* end of string also terminates non-matching char sequence */)
{
// substring that needs to be replaced found?
@@ -494,7 +494,7 @@ void TextConvWrapper::ChangeText( const String &rNewText,
#ifdef DEBUG
String aInOrig( rOrigText.copy( nChgPos, nChgLen ) );
#endif
- String aInNew( rNewText.Copy( nConvChgPos, nConvChgLen ) );
+ String aInNew( rNewText.copy( nConvChgPos, nConvChgLen ) );
// set selection to sub string to be replaced in original text
ESelection aSel( *pESelection );
@@ -543,7 +543,7 @@ void TextConvWrapper::ChangeText( const String &rNewText,
}
-void TextConvWrapper::ChangeText_impl( const String &rNewText, bool bKeepAttributes )
+void TextConvWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttributes )
{
if (bKeepAttributes)
{
diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx
index d7736e86c3de..011d94a923fe 100644
--- a/editeng/source/editeng/textconv.hxx
+++ b/editeng/source/editeng/textconv.hxx
@@ -62,11 +62,11 @@ class TextConvWrapper : public editeng::HangulHanjaConversion
void SelectNewUnit_impl( const sal_Int32 nUnitStart,
const sal_Int32 nUnitEnd );
- void ChangeText( const String &rNewText,
+ void ChangeText( const OUString &rNewText,
const OUString& rOrigText,
const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets,
ESelection *pESelection );
- void ChangeText_impl( const String &rNewText, bool bKeepAttributes );
+ void ChangeText_impl( const OUString &rNewText, bool bKeepAttributes );
// Forbidden and not implemented.
TextConvWrapper (const TextConvWrapper &);