summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-01 20:12:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-02 11:43:04 +0100
commitf7f421670206d265024a99da6bc1ad8781c30c99 (patch)
tree24e990a0d03a5cde3febad7fc10292a0236acc36
parentb95a901089ac096131bb6a4fe9c1f1346ffdde6f (diff)
remove some UniString::GetBuffer
Change-Id: I808026a6f593b0251ee107d27e7ca12d55b2d0a0
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-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
-rw-r--r--sfx2/source/bastyp/progress.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx16
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx10
9 files changed, 26 insertions, 27 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 4675cdc7ef00..d79aa47b096c 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -616,7 +616,7 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
}
if ( !aName.isEmpty() )
{
- pInfo->aUIName = aName.getStr();
+ pInfo->aUIName = aName;
pInfo->aUIName += aB1;
}
pInfo->aUIName += pInfo->aTypeName;
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(),
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index d3a25698ceb2..06661d95f6fc 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -149,7 +149,7 @@ SfxProgress::SfxProgress
pImp->nCreate = Get10ThSec();
pImp->nNextReschedule = pImp->nCreate;
DBG( DbgOutf( "SfxProgress: created for '%s' at %luds",
- rText.GetBuffer(), pImp->nCreate ) );
+ rText.getStr(), pImp->nCreate ) );
pImp->bAllDocs = bAll;
pImp->pWorkWin = 0;
pImp->pView = 0;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 49cb292f50ef..63bbb437ab25 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1049,7 +1049,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
OUString aPhysPath;
if ( ::utl::LocalFileHelper::ConvertURLToPhysicalName( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), aPhysPath ) )
- bContentReadonly = IsReadonlyAccordingACL( aPhysPath.GetBuffer() );
+ bContentReadonly = IsReadonlyAccordingACL( aPhysPath.getStr() );
}
#endif
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index e0029d9ed91f..471964a8f136 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1649,14 +1649,14 @@ void SwWW8Writer::InsUInt32(ww::bytes &rO, sal_uInt32 n)
rO.push_back(nL[3]);
}
-void SwWW8Writer::InsAsString16(ww::bytes &rO, const String& rStr)
+void SwWW8Writer::InsAsString16(ww::bytes &rO, const OUString& rStr)
{
- const sal_Unicode* pStr = rStr.GetBuffer();
- for( xub_StrLen n = 0, nLen = rStr.Len(); n < nLen; ++n, ++pStr )
+ const sal_Unicode* pStr = rStr.getStr();
+ for (sal_Int32 n = 0, nLen = rStr.getLength(); n < nLen; ++n, ++pStr)
SwWW8Writer::InsUInt16( rO, *pStr );
}
-void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
+void SwWW8Writer::InsAsString8(ww::bytes &rO, const OUString& rStr,
rtl_TextEncoding eCodeSet)
{
OString sTmp(OUStringToOString(rStr, eCodeSet));
@@ -1667,7 +1667,7 @@ void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
std::copy(pStart, pEnd, std::inserter(rO, rO.end()));
}
-void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
+void SwWW8Writer::WriteString16(SvStream& rStrm, const OUString& rStr,
bool bAddZero)
{
ww::bytes aBytes;
@@ -1680,10 +1680,10 @@ void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
rStrm.Write(&aBytes[0], aBytes.size());
}
-void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero)
+void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero)
{
ww::bytes aBytes;
- SwWW8Writer::InsUInt16(aBytes, rStr.Len());
+ SwWW8Writer::InsUInt16(aBytes, rStr.getLength());
SwWW8Writer::InsAsString16(aBytes, rStr);
if (bAddZero)
SwWW8Writer::InsUInt16(aBytes, 0);
@@ -1691,7 +1691,7 @@ void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAd
}
-void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
+void SwWW8Writer::WriteString8(SvStream& rStrm, const OUString& rStr,
bool bAddZero, rtl_TextEncoding eCodeSet)
{
ww::bytes aBytes;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 8d4534937ad5..b7f4c5cb6050 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -871,8 +871,8 @@ public:
public:
static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
static void InsUInt32(ww::bytes &rO, sal_uInt32 n);
- static void InsAsString16(ww::bytes &rO, const String& rStr);
- static void InsAsString8(ww::bytes & O, const String& rStr,
+ static void InsAsString16(ww::bytes &rO, const OUString& rStr);
+ static void InsAsString8(ww::bytes & O, const OUString& rStr,
rtl_TextEncoding eCodeSet);
static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
@@ -884,12 +884,12 @@ public:
static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
- static void WriteString16(SvStream& rStrm, const String& rStr,
+ static void WriteString16(SvStream& rStrm, const OUString& rStr,
bool bAddZero);
- static void WriteString8(SvStream& rStrm, const String& rStr,
+ static void WriteString8(SvStream& rStrm, const OUString& rStr,
bool bAddZero, rtl_TextEncoding eCodeSet);
- static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero);
+ static void WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero);
bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );