summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/interpr1.cxx12
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx3
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
4 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d3e0f96a82f4..54ce21d086fa 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3134,17 +3134,17 @@ void ScInterpreter::ScN()
void ScInterpreter::ScTrim()
{
// Doesn't only trim but also removes duplicated blanks within!
- String aVal = comphelper::string::strip(GetString(), ' ');
- String aStr;
- const sal_Unicode* p = aVal.GetBuffer();
- const sal_Unicode* const pEnd = p + aVal.Len();
+ OUString aVal = comphelper::string::strip(GetString(), ' ');
+ OUStringBuffer aStr;
+ const sal_Unicode* p = aVal.getStr();
+ const sal_Unicode* const pEnd = p + aVal.getLength();
while ( p < pEnd )
{
if ( *p != ' ' || p[-1] != ' ' ) // first can't be ' ', so -1 is fine
- aStr += *p;
+ aStr.append(*p);
p++;
}
- PushString( aStr );
+ PushString(aStr.makeStringAndClear());
}
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 93e04e7f1e13..0ad6dbd38555 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -281,7 +281,7 @@ public:
void ExtendScenario();
void UseScenario( const String& rName );
- void InsertSpecialChar( const String& rStr, const Font& rFont );
+ void InsertSpecialChar( const OUString& rStr, const Font& rFont );
void InsertDummyObject();
void InsertOleObject();
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index de55b28351ae..1fd2840313c0 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -569,8 +569,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
{
OUString aUStr;
rArg >>= aUStr;
- String aStr( aUStr );
- aTokenArr.AddString( aStr.GetBuffer() );
+ aTokenArr.AddString( aUStr );
}
else if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence<sal_Int16> > *)0 ) ) )
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 267969276b9d..6cb7c8164220 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2915,7 +2915,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark )
//----------------------------------------------------------------------------
-void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
+void ScViewFunc::InsertSpecialChar( const OUString& rStr, const Font& rFont )
{
ScEditableTester aTester( this );
if (!aTester.IsEditable())
@@ -2924,7 +2924,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont )
return;
}
- const sal_Unicode* pChar = rStr.GetBuffer();
+ const sal_Unicode* pChar = rStr.getStr();
ScTabViewShell* pViewShell = GetViewData()->GetViewShell();
SvxFontItem aFontItem( rFont.GetFamily(),
rFont.GetName(),