reduce use of UniString ctor from null-terminated unicodearray
Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0
This commit is contained in:
parent
2e16eaf31c
commit
6191fa0847
@ -480,12 +480,9 @@ String SbiImage::GetString( short nId ) const
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String aStr( pStr );
|
||||
return aStr;
|
||||
}
|
||||
return rtl::OUString(pStr);
|
||||
}
|
||||
return String();
|
||||
return rtl::OUString();
|
||||
}
|
||||
|
||||
const SbxObject* SbiImage::FindType (String aTypeName) const
|
||||
|
@ -153,7 +153,7 @@ static SbxVariable* Operand
|
||||
{
|
||||
// A number could be scanned in directly!
|
||||
sal_uInt16 nLen;
|
||||
if( !refVar->Scan( XubString( p ), &nLen ) )
|
||||
if( !refVar->Scan( rtl::OUString( p ), &nLen ) )
|
||||
refVar.Clear();
|
||||
else
|
||||
p += nLen;
|
||||
|
@ -504,11 +504,11 @@ String OFlatTable::getEntry()
|
||||
}
|
||||
xDir->beforeFirst(); // move back to before first record
|
||||
}
|
||||
catch(Exception&)
|
||||
catch(const Exception&)
|
||||
{
|
||||
OSL_ASSERT(0);
|
||||
}
|
||||
return sURL.getStr();
|
||||
return sURL;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
void OFlatTable::refreshColumns()
|
||||
|
@ -535,7 +535,7 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString languag
|
||||
// must be a neater way to deal with the strings than as above
|
||||
// append the language to the dialog title
|
||||
String winTitle( GetText() );
|
||||
winTitle.SearchAndReplace( String::CreateFromAscii( "%MACROLANG" ), language.pData->buffer );
|
||||
winTitle.SearchAndReplace( String::CreateFromAscii( "%MACROLANG" ), m_sLanguage );
|
||||
SetText( winTitle );
|
||||
|
||||
aScriptsBox.SetSelectHdl( LINK( this, SvxScriptOrgDialog, ScriptSelectHdl ) );
|
||||
|
@ -1857,7 +1857,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
|
||||
}
|
||||
::rtl::OUString aName;
|
||||
xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName;
|
||||
String sObject(aName.getStr());
|
||||
String sObject(aName);
|
||||
|
||||
sTitle.SearchAndReplace('#',sObject);
|
||||
aReturn.sTitle = sTitle;
|
||||
@ -2873,7 +2873,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
|
||||
SvLBoxEntry* pContainer = getEntryFromContainer(xNames);
|
||||
if ( pContainer )
|
||||
{ // a query or table has been removed
|
||||
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
|
||||
String aName = ::comphelper::getString(_rEvent.Accessor);
|
||||
|
||||
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
|
||||
{ // the element displayed currently has been replaced
|
||||
@ -2924,7 +2924,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
|
||||
SvLBoxEntry* pContainer = getEntryFromContainer(xNames);
|
||||
if ( pContainer )
|
||||
{ // a table or query as been replaced
|
||||
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
|
||||
String aName = ::comphelper::getString(_rEvent.Accessor);
|
||||
|
||||
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
|
||||
{ // the element displayed currently has been replaced
|
||||
|
@ -971,7 +971,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
|
||||
{
|
||||
::rtl::OUString sValue;
|
||||
_rValue >>= sValue;
|
||||
_rSet.Put(SfxStringItem(_nId, sValue.getStr()));
|
||||
_rSet.Put(SfxStringItem(_nId, sValue));
|
||||
}
|
||||
else {
|
||||
OSL_FAIL(
|
||||
|
@ -350,7 +350,6 @@ void ODbaseIndexDialog::Init()
|
||||
|
||||
::std::vector< String > aUsedIndexes;
|
||||
|
||||
String aExt;
|
||||
const ::rtl::OUString *pBegin = aFolderContent.getConstArray();
|
||||
const ::rtl::OUString *pEnd = pBegin + aFolderContent.getLength();
|
||||
aURL.SetSmartProtocol(INET_PROT_FILE);
|
||||
@ -359,12 +358,12 @@ void ODbaseIndexDialog::Init()
|
||||
rtl::OUString aName;
|
||||
::utl::LocalFileHelper::ConvertURLToPhysicalName(pBegin->getStr(),aName);
|
||||
aURL.SetSmartURL(aName);
|
||||
aExt = aURL.getExtension();
|
||||
if(aExt == aIndexExt.getStr())
|
||||
rtl::OUString aExt = aURL.getExtension();
|
||||
if (aExt == aIndexExt)
|
||||
{
|
||||
m_aFreeIndexList.push_back( OTableIndex(aURL.getName()) );
|
||||
}
|
||||
else if(aExt == aTableExt.getStr())
|
||||
else if (aExt == aTableExt)
|
||||
{
|
||||
m_aTableInfoList.push_back( OTableInfo(aURL.getName()) );
|
||||
OTableInfo& rTabInfo = m_aTableInfoList.back();
|
||||
|
@ -231,7 +231,7 @@ DBG_NAME(OParameterDialog)
|
||||
LocalResourceAccess aDummy(DLG_PARAMETERS, RSC_MODALDIALOG);
|
||||
sMessage = String(ModuleRes(STR_COULD_NOT_CONVERT_PARAM));
|
||||
}
|
||||
sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName.getStr());
|
||||
sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName);
|
||||
ErrorBox(NULL, WB_OK, sMessage).Execute();
|
||||
m_aParam.GrabFocus();
|
||||
return 1L;
|
||||
|
@ -485,7 +485,7 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo
|
||||
DBG_CHKTHIS(DlgFilterCrit,NULL);
|
||||
::rtl::OUString aCondition;
|
||||
_rItem.Value >>= aCondition;
|
||||
String aStr = aCondition.getStr();
|
||||
String aStr = aCondition;
|
||||
::Replace_SQL_PlaceHolder(aStr);
|
||||
aStr = comphelper::string::stripEnd(aStr, ' ');
|
||||
|
||||
|
@ -746,7 +746,7 @@ FormulaToken* FormulaTokenArray::Add( FormulaToken* t )
|
||||
|
||||
FormulaToken* FormulaTokenArray::AddString( const sal_Unicode* pStr )
|
||||
{
|
||||
return AddString( String( pStr ) );
|
||||
return AddString( rtl::OUString( pStr ) );
|
||||
}
|
||||
|
||||
FormulaToken* FormulaTokenArray::AddString( const String& rStr )
|
||||
@ -761,7 +761,7 @@ FormulaToken* FormulaTokenArray::AddDouble( double fVal )
|
||||
|
||||
FormulaToken* FormulaTokenArray::AddExternal( const sal_Unicode* pStr )
|
||||
{
|
||||
return AddExternal( String( pStr ) );
|
||||
return AddExternal( rtl::OUString( pStr ) );
|
||||
}
|
||||
|
||||
FormulaToken* FormulaTokenArray::AddExternal( const String& rStr,
|
||||
|
@ -813,7 +813,7 @@ void ScGlobal::AddQuotes( String& rString, sal_Unicode cQuote, bool bEscapeEmbed
|
||||
sal_Unicode pQ[3];
|
||||
pQ[0] = pQ[1] = cQuote;
|
||||
pQ[2] = 0;
|
||||
String aQuotes( pQ );
|
||||
rtl::OUString aQuotes( pQ );
|
||||
rString.SearchAndReplaceAll( cQuote, aQuotes);
|
||||
}
|
||||
rString.Insert( cQuote, 0 ).Append( cQuote );
|
||||
@ -829,7 +829,7 @@ void ScGlobal::EraseQuotes( String& rString, sal_Unicode cQuote, bool bUnescapeE
|
||||
sal_Unicode pQ[3];
|
||||
pQ[0] = pQ[1] = cQuote;
|
||||
pQ[2] = 0;
|
||||
String aQuotes( pQ );
|
||||
rtl::OUString aQuotes( pQ );
|
||||
rString.SearchAndReplaceAll( aQuotes, cQuote);
|
||||
}
|
||||
}
|
||||
|
@ -1071,8 +1071,8 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
|
||||
}
|
||||
else
|
||||
{
|
||||
String aTmp( p );
|
||||
long n = aTmp.ToInt32() - 1;
|
||||
rtl::OUString aTmp( p );
|
||||
long n = aTmp.toInt32() - 1;
|
||||
while (CharClass::isAsciiDigit( *p ))
|
||||
p++;
|
||||
if( n < 0 || n > MAXROW )
|
||||
|
@ -234,7 +234,7 @@ void ScCellKeywordTranslator::addToMap(const String& rKey, const sal_Char* pName
|
||||
void ScCellKeywordTranslator::addToMap(const TransItem* pItems, const Locale& rLocale)
|
||||
{
|
||||
for (sal_uInt16 i = 0; pItems[i].from != NULL; ++i)
|
||||
addToMap(String(pItems[i].from), pItems[i].to, rLocale, pItems[i].func);
|
||||
addToMap(rtl::OUString(pItems[i].from), pItems[i].to, rLocale, pItems[i].func);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -3494,7 +3494,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
|
||||
const sal_Unicode* p = aRef[j].GetBuffer();
|
||||
while ( *p && CharClass::isAsciiNumeric( *p ) )
|
||||
aStr2 += *p++;
|
||||
aRef[j] = String( p );
|
||||
aRef[j] = rtl::OUString( p );
|
||||
aRef[j] += aStr2;
|
||||
if ( bColons || aRef[j] != aOld )
|
||||
{
|
||||
@ -3561,7 +3561,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
|
||||
// Short cut for references when reading ODF to speedup things.
|
||||
if (mnPredetectedReference)
|
||||
{
|
||||
String aStr( cSymbol);
|
||||
rtl::OUString aStr( cSymbol);
|
||||
if (!IsPredetectedReference( aStr) && !IsExternalNamedRange( aStr))
|
||||
{
|
||||
/* TODO: it would be nice to generate a #REF! error here, which
|
||||
@ -3571,7 +3571,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
|
||||
* information if not ODFF (in that case it was already handled).
|
||||
* */
|
||||
ScRawToken aToken;
|
||||
aToken.SetString( aStr.GetBuffer() );
|
||||
aToken.SetString( aStr.getStr() );
|
||||
aToken.NewOpCode( ocBad );
|
||||
pRawToken = aToken.Clone();
|
||||
}
|
||||
@ -3625,7 +3625,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
|
||||
do
|
||||
{
|
||||
mbRewind = false;
|
||||
const String aOrg( cSymbol );
|
||||
const rtl::OUString aOrg( cSymbol );
|
||||
|
||||
if (bAsciiNonAlnum)
|
||||
{
|
||||
|
@ -1898,7 +1898,7 @@ void ScInterpreter::PushStringBuffer( const sal_Unicode* pString )
|
||||
{
|
||||
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushStringBuffer" );
|
||||
if ( pString )
|
||||
PushString( String( pString ) );
|
||||
PushString( rtl::OUString(pString) );
|
||||
else
|
||||
PushString( EMPTY_STRING );
|
||||
}
|
||||
|
@ -364,9 +364,9 @@ FormulaToken* ScRawToken::CreateToken() const
|
||||
return new FormulaDoubleToken( nValue );
|
||||
case svString :
|
||||
if (eOp == ocPush)
|
||||
return new FormulaStringToken( String( cStr ) );
|
||||
return new FormulaStringToken( rtl::OUString( cStr ) );
|
||||
else
|
||||
return new FormulaStringOpToken( eOp, String( cStr ) );
|
||||
return new FormulaStringOpToken( eOp, rtl::OUString( cStr ) );
|
||||
case svSingleRef :
|
||||
if (eOp == ocPush)
|
||||
return new ScSingleRefToken( aRef.Ref1 );
|
||||
@ -384,23 +384,23 @@ FormulaToken* ScRawToken::CreateToken() const
|
||||
return new FormulaIndexToken( eOp, name.nIndex, name.bGlobal);
|
||||
case svExternalSingleRef:
|
||||
{
|
||||
String aTabName(extref.cTabName);
|
||||
rtl::OUString aTabName(extref.cTabName);
|
||||
return new ScExternalSingleRefToken(extref.nFileId, aTabName, extref.aRef.Ref1);
|
||||
}
|
||||
case svExternalDoubleRef:
|
||||
{
|
||||
String aTabName(extref.cTabName);
|
||||
rtl::OUString aTabName(extref.cTabName);
|
||||
return new ScExternalDoubleRefToken(extref.nFileId, aTabName, extref.aRef);
|
||||
}
|
||||
case svExternalName:
|
||||
{
|
||||
String aName(extname.cName);
|
||||
rtl::OUString aName(extname.cName);
|
||||
return new ScExternalNameToken( extname.nFileId, aName );
|
||||
}
|
||||
case svJump :
|
||||
return new FormulaJumpToken( eOp, (short*) nJump );
|
||||
case svExternal :
|
||||
return new FormulaExternalToken( eOp, sbyte.cByte, String( cStr+1 ) );
|
||||
return new FormulaExternalToken( eOp, sbyte.cByte, rtl::OUString( cStr+1 ) );
|
||||
case svFAP :
|
||||
return new FormulaFAPToken( eOp, sbyte.cByte, NULL );
|
||||
case svMissing :
|
||||
|
@ -70,7 +70,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
sal_Bool bSyntErrWarn = false;
|
||||
sal_Bool bOverflowWarn = false;
|
||||
|
||||
String& rData = aDifParser.aData;
|
||||
rtl::OUString aData = aDifParser.aData;
|
||||
sal_Bool bData = false;
|
||||
|
||||
rIn.Seek( 0 );
|
||||
@ -83,7 +83,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
|
||||
aPrgrsBar.Progress();
|
||||
|
||||
bData = rData.Len() > 0;
|
||||
bData = !aData.isEmpty();
|
||||
|
||||
switch( eTopic )
|
||||
{
|
||||
@ -92,7 +92,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
if( aDifParser.nVector != 0 || aDifParser.nVal != 1 )
|
||||
bSyntErrWarn = sal_True;
|
||||
if( bData )
|
||||
pDoc->RenameTab( nBaseTab, rData );
|
||||
pDoc->RenameTab( nBaseTab, aData );
|
||||
}
|
||||
break;
|
||||
case T_VECTORS:
|
||||
@ -164,14 +164,14 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
if( ValidCol(nColCnt) && ValidRow(nRowCnt) )
|
||||
{
|
||||
ScBaseCell* pCell;
|
||||
if( DifParser::IsV( rData.GetBuffer() ) )
|
||||
if( DifParser::IsV( aData.getStr() ) )
|
||||
{
|
||||
pCell = new ScValueCell( aDifParser.fVal );
|
||||
if( !bPlain )
|
||||
aAttrCache.SetNumFormat( nColCnt, nRowCnt,
|
||||
aDifParser.nNumFormat );
|
||||
}
|
||||
else if( rData == pKeyTRUE || rData == pKeyFALSE )
|
||||
else if( aData == pKeyTRUE || aData == pKeyFALSE )
|
||||
{
|
||||
pCell = new ScValueCell( aDifParser.fVal );
|
||||
if( bPlain )
|
||||
@ -180,12 +180,12 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
aAttrCache.SetNumFormat( nColCnt, nRowCnt,
|
||||
aDifParser.nNumFormat );
|
||||
}
|
||||
else if( rData == pKeyNA || rData == pKeyERROR )
|
||||
pCell = new ScStringCell( rData );
|
||||
else if( aData == pKeyNA || aData == pKeyERROR )
|
||||
pCell = new ScStringCell( aData );
|
||||
else
|
||||
{
|
||||
String aTmp( RTL_CONSTASCII_USTRINGPARAM( "#IND: " ));
|
||||
aTmp += rData;
|
||||
aTmp += aData;
|
||||
aTmp += sal_Unicode('?');
|
||||
pCell = new ScStringCell( aTmp );
|
||||
}
|
||||
@ -203,10 +203,10 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc,
|
||||
|
||||
if( ValidCol(nColCnt) && ValidRow(nRowCnt) )
|
||||
{
|
||||
if( rData.Len() > 0 )
|
||||
if (!aData.isEmpty())
|
||||
{
|
||||
pDoc->PutCell( nColCnt, nRowCnt, nBaseTab,
|
||||
ScBaseCell::CreateTextCell( rData, pDoc ), true );
|
||||
ScBaseCell::CreateTextCell( aData, pDoc ), true );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -434,7 +434,7 @@ DATASET DifParser::GetNumberDataset( const sal_Unicode* pPossibleNumericData )
|
||||
else
|
||||
{ // ...und zur Strafe mit'm Numberformatter...
|
||||
OSL_ENSURE( pNumFormatter, "-DifParser::GetNextDataset(): No Formatter, more fun!" );
|
||||
String aTestVal( pPossibleNumericData );
|
||||
rtl::OUString aTestVal( pPossibleNumericData );
|
||||
sal_uInt32 nFormat = 0;
|
||||
double fTmpVal;
|
||||
if( pNumFormatter->IsNumberFormat( aTestVal, nFormat, fTmpVal ) )
|
||||
|
@ -375,7 +375,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
|
||||
{
|
||||
// #n382718# (and #n261623#) Convert smb notation to '\\'
|
||||
aFileName = aUrlObj.GetMainURL( INetURLObject::NO_DECODE );
|
||||
aFileName = String( aFileName.GetBuffer() + 4 ); // skip the 'smb:' part
|
||||
aFileName = rtl::OUString( aFileName.GetBuffer() + 4 ); // skip the 'smb:' part
|
||||
aFileName.SearchAndReplaceAll( '/', '\\' );
|
||||
}
|
||||
|
||||
|
@ -1751,16 +1751,16 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
|
||||
switch( ch )
|
||||
{
|
||||
case 'X':
|
||||
nCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1;
|
||||
nCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1;
|
||||
break;
|
||||
case 'Y':
|
||||
nRow = String( p ).ToInt32() + nStartRow - 1;
|
||||
nRow = rtl::OUString(p).toInt32() + nStartRow - 1;
|
||||
break;
|
||||
case 'C':
|
||||
nRefCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1;
|
||||
nRefCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1;
|
||||
break;
|
||||
case 'R':
|
||||
nRefRow = String( p ).ToInt32() + nStartRow - 1;
|
||||
nRefRow = rtl::OUString(p).toInt32() + nStartRow - 1;
|
||||
break;
|
||||
case 'K':
|
||||
{
|
||||
@ -1871,10 +1871,10 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
|
||||
switch( ch )
|
||||
{
|
||||
case 'X':
|
||||
nCol = static_cast<SCCOL>(String( p ).ToInt32()) + nStartCol - 1;
|
||||
nCol = static_cast<SCCOL>(rtl::OUString(p).toInt32()) + nStartCol - 1;
|
||||
break;
|
||||
case 'Y':
|
||||
nRow = String( p ).ToInt32() + nStartRow - 1;
|
||||
nRow = rtl::OUString(p).toInt32() + nStartRow - 1;
|
||||
break;
|
||||
case 'P' :
|
||||
if ( bData )
|
||||
@ -1913,16 +1913,11 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
|
||||
{
|
||||
if ( bData && *p == ';' && *(p+1) == 'P' )
|
||||
{
|
||||
String aCode( p+2 );
|
||||
rtl::OUString aCode( p+2 );
|
||||
// unescape doubled semicolons
|
||||
xub_StrLen nPos = 0;
|
||||
String aSemicolon( RTL_CONSTASCII_USTRINGPARAM(";;"));
|
||||
while ( (nPos = aCode.Search( aSemicolon, nPos )) != STRING_NOTFOUND )
|
||||
aCode.Erase( nPos++, 1 );
|
||||
aCode = aCode.replaceAll(";;", ";");
|
||||
// get rid of Xcl escape characters
|
||||
nPos = 0;
|
||||
while ( (nPos = aCode.Search( sal_Unicode(0x1b), nPos )) != STRING_NOTFOUND )
|
||||
aCode.Erase( nPos, 1 );
|
||||
aCode = aCode.replaceAll(rtl::OUString(static_cast<sal_Unicode>(0x1b)), rtl::OUString());
|
||||
xub_StrLen nCheckPos;
|
||||
short nType;
|
||||
sal_uInt32 nKey;
|
||||
|
@ -330,7 +330,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
|
||||
sal_uInt16 nPos=aFilter.Search('|');
|
||||
if( nPos != STRING_NOTFOUND )
|
||||
{
|
||||
String aOptions(aFilter.Copy( nPos ).GetBuffer()+1);
|
||||
rtl::OUString aOptions(aFilter.Copy(nPos).GetBuffer()+1);
|
||||
aFilter.Erase( nPos );
|
||||
aReq.AppendItem( SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri
|
||||
String sPath;
|
||||
sal_Unicode aPathBuffer[nMaxPathSize];
|
||||
if ( SystemPath::GetUserTemplateLocation( aPathBuffer, nMaxPathSize ))
|
||||
sPath = String( aPathBuffer );
|
||||
sPath = rtl::OUString( aPathBuffer );
|
||||
::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, sURL );
|
||||
|
||||
::rtl::OUString aUserTemplateURL( sURL );
|
||||
|
@ -361,7 +361,7 @@ String SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
|
||||
rStrm.SeekRel( 2 );
|
||||
// create string from character array
|
||||
aBuffer.push_back( 0 );
|
||||
aValue = String( &aBuffer.front() );
|
||||
aValue = rtl::OUString( &aBuffer.front() );
|
||||
}
|
||||
return aValue;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ void SvObjectServerList::FillInsertObjects()
|
||||
{
|
||||
if( !Get( aClassName ) )
|
||||
// noch nicht eingetragen
|
||||
aObjectServerList.push_back( SvObjectServer( aClassName, String( aUIName.getStr() ) ) );
|
||||
aObjectServerList.push_back( SvObjectServer( aClassName, aUIName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -315,12 +315,12 @@ void ImpSvMEdit::ImpSetScrollBarRanges()
|
||||
|
||||
void ImpSvMEdit::ImpInitScrollBars()
|
||||
{
|
||||
static const sal_Unicode sampleText[] = { 'x', '\0' };
|
||||
static const sal_Unicode sampleChar = { 'x' };
|
||||
if ( mpHScrollBar || mpVScrollBar )
|
||||
{
|
||||
ImpSetScrollBarRanges();
|
||||
Size aCharBox;
|
||||
aCharBox.Width() = mpTextWindow->GetTextWidth( sampleText );
|
||||
aCharBox.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) );
|
||||
aCharBox.Height() = mpTextWindow->GetTextHeight();
|
||||
Size aOutSz = mpTextWindow->GetOutputSizePixel();
|
||||
if ( mpHScrollBar )
|
||||
@ -673,11 +673,11 @@ Size ImpSvMEdit::CalcMinimumSize() const
|
||||
|
||||
Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
|
||||
{
|
||||
static const sal_Unicode sampleText[] = { 'X', '\0' };
|
||||
static const sal_Unicode sampleChar = 'X';
|
||||
|
||||
Size aSz;
|
||||
Size aCharSz;
|
||||
aCharSz.Width() = mpTextWindow->GetTextWidth( sampleText );
|
||||
aCharSz.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) );
|
||||
aCharSz.Height() = mpTextWindow->GetTextHeight();
|
||||
|
||||
if ( nLines )
|
||||
@ -700,9 +700,9 @@ Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
|
||||
|
||||
void ImpSvMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
|
||||
{
|
||||
static const sal_Unicode sampleText[] = { 'x', '\0' };
|
||||
static const sal_Unicode sampleChar = { 'x' };
|
||||
Size aOutSz = mpTextWindow->GetOutputSizePixel();
|
||||
Size aCharSz( mpTextWindow->GetTextWidth( sampleText ), mpTextWindow->GetTextHeight() );
|
||||
Size aCharSz( mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ), mpTextWindow->GetTextHeight() );
|
||||
rnCols = (sal_uInt16) (aOutSz.Width()/aCharSz.Width());
|
||||
rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height());
|
||||
}
|
||||
|
@ -1095,7 +1095,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
|
||||
*pWMF >> nChar;
|
||||
lfFaceName[ i ] = nChar;
|
||||
}
|
||||
aLogFont.alfFaceName = UniString( lfFaceName );
|
||||
aLogFont.alfFaceName = rtl::OUString( lfFaceName );
|
||||
pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) );
|
||||
}
|
||||
}
|
||||
|
@ -999,7 +999,7 @@ void FmSearchEngine::SearchNextImpl()
|
||||
if (!m_bWildcard)
|
||||
{ // da natuerlich in allen anderen Faellen auch * und ? im Suchstring erlaubt sind, aber nicht als WildCards zaehlen
|
||||
// sollen, muss ich normieren
|
||||
UniString aTmp(strSearchExpression.getStr());
|
||||
UniString aTmp(strSearchExpression);
|
||||
static const UniString s_sStar = UniString::CreateFromAscii("\\*");
|
||||
static const UniString s_sQuotation = UniString::CreateFromAscii("\\?");
|
||||
aTmp.SearchAndReplaceAll('*', s_sStar);
|
||||
|
@ -315,7 +315,7 @@ sal_uLong SwASCIIParser::ReadChars()
|
||||
if( pStt >= pEnd )
|
||||
{
|
||||
if( pLastStt != pStt )
|
||||
InsertText( String( pLastStt ));
|
||||
InsertText( rtl::OUString( pLastStt ));
|
||||
|
||||
// Read a new block
|
||||
sal_uLong lGCount;
|
||||
@ -438,7 +438,7 @@ sal_uLong SwASCIIParser::ReadChars()
|
||||
*pStt++ = 0;
|
||||
if( nLineLen )
|
||||
{
|
||||
InsertText( String( pLastStt ));
|
||||
InsertText( rtl::OUString( pLastStt ));
|
||||
}
|
||||
pDoc->SplitNode( *pPam->GetPoint(), false );
|
||||
pDoc->InsertPoolItem( *pPam, SvxFmtBreakItem(
|
||||
@ -472,7 +472,7 @@ sal_uLong SwASCIIParser::ReadChars()
|
||||
{
|
||||
sal_Unicode c = *pStt;
|
||||
*pStt = 0;
|
||||
InsertText( String( pLastStt ));
|
||||
InsertText( rtl::OUString( pLastStt ));
|
||||
pDoc->SplitNode( *pPam->GetPoint(), false );
|
||||
pLastStt = pStt;
|
||||
nLineLen = 0;
|
||||
@ -484,7 +484,7 @@ sal_uLong SwASCIIParser::ReadChars()
|
||||
else if( bSplitNode )
|
||||
{
|
||||
// We found a CR/LF, thus save the text
|
||||
InsertText( String( pLastStt ));
|
||||
InsertText( rtl::OUString( pLastStt ));
|
||||
pDoc->SplitNode( *pPam->GetPoint(), false );
|
||||
pLastStt = pStt;
|
||||
nLineLen = 0;
|
||||
|
@ -773,7 +773,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
|
||||
break;
|
||||
|
||||
case MID_GRAPHIC_FILTER:
|
||||
pBrush->SetGraphicFilter( rValue.getStr() );
|
||||
pBrush->SetGraphicFilter( rValue );
|
||||
bOk = sal_True;
|
||||
break;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh)
|
||||
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
|
||||
sal_uInt16 nFilter(rGF.GetExportFormatNumber(fExt));
|
||||
String aFilter(rGF.GetExportFormatShortName(nFilter));
|
||||
String sPath(tempFileName.getStr());
|
||||
String sPath(tempFileName);
|
||||
|
||||
// Write the Graphic to the file now
|
||||
XOutBitmap::WriteGraphic(pGraphic, sPath, aFilter,
|
||||
|
@ -2665,7 +2665,7 @@ sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, rtl::OUString& sTitle )
|
||||
{
|
||||
TabControl *pTabControl = getTabControl();
|
||||
sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ );
|
||||
pTabControl->InsertPage( id, sTitle.getStr(), TAB_APPEND );
|
||||
pTabControl->InsertPage( id, sTitle, TAB_APPEND );
|
||||
pTabControl->SetTabPage( id, pPage );
|
||||
return id;
|
||||
}
|
||||
@ -2711,15 +2711,15 @@ void SAL_CALL VCLXMultiPage::setTabProps( sal_Int32 ID, const uno::Sequence< bea
|
||||
if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
|
||||
throw lang::IndexOutOfBoundsException();
|
||||
|
||||
for ( int i = 0; i < Properties.getLength(); i++ )
|
||||
for (sal_Int32 i = 0; i < Properties.getLength(); ++i)
|
||||
{
|
||||
const rtl::OUString &name = Properties[i].Name;
|
||||
const uno::Any &value = Properties[i].Value;
|
||||
|
||||
if ( name == rtl::OUString( "Title" ) )
|
||||
if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")))
|
||||
{
|
||||
rtl::OUString title = value.get<rtl::OUString>();
|
||||
pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() );
|
||||
pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -296,15 +296,15 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
|
||||
|
||||
String aFallBackJapaneseLocalized( RTL_CONSTASCII_USTRINGPARAM( "MS UI Gothic;" ) );
|
||||
aFallBackJapaneseLocalized += String( RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_JAPANESE1 ) );
|
||||
aFallBackJapaneseLocalized += String( aMSPGothic );
|
||||
aFallBackJapaneseLocalized += OUString( aMSPGothic );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackJapaneseLocalized += String( aMSGothic );
|
||||
aFallBackJapaneseLocalized += OUString( aMSGothic );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackJapaneseLocalized += String( aTLPGothic );
|
||||
aFallBackJapaneseLocalized += OUString( aTLPGothic );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackJapaneseLocalized += String( aLXGothic );
|
||||
aFallBackJapaneseLocalized += OUString( aLXGothic );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackJapaneseLocalized += String( aKochiGothic );
|
||||
aFallBackJapaneseLocalized += OUString( aKochiGothic );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackJapaneseLocalized += String(RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_JAPANESE2 ) );
|
||||
static const OUString aFallBackJapanese( aFallBackJapaneseLocalized );
|
||||
@ -318,9 +318,9 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
|
||||
// we need localized names for korean fonts
|
||||
static sal_Unicode const aSunGulim[] = { 0xC36C, 0xAD74, 0xB9BC, 0 };
|
||||
static sal_Unicode const aBaekmukGulim[] = { 0xBC31, 0xBC35, 0xAD74, 0xB9BC, 0 };
|
||||
String aFallBackKoreanLocalized( aSunGulim );
|
||||
rtl::OUString aFallBackKoreanLocalized( aSunGulim );
|
||||
aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackKoreanLocalized += String( aBaekmukGulim );
|
||||
aFallBackKoreanLocalized += rtl::OUString( aBaekmukGulim );
|
||||
aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( ";" ) );
|
||||
aFallBackKoreanLocalized += String(RTL_CONSTASCII_USTRINGPARAM( FALLBACKFONT_UI_SANS_KOREAN ) );
|
||||
static const OUString aFallBackKorean( aFallBackKoreanLocalized );
|
||||
|
@ -419,7 +419,7 @@ void GetEnglishSearchFontName( String& rName )
|
||||
// translate normalized localized name to its normalized English ASCII name
|
||||
if( bNeedTranslation )
|
||||
{
|
||||
typedef boost::unordered_map<const String, const char*,FontNameHash> FontNameDictionary;
|
||||
typedef boost::unordered_map<const rtl::OUString, const char*, FontNameHash> FontNameDictionary;
|
||||
static FontNameDictionary aDictionary( SAL_N_ELEMENTS(aImplLocalizedNamesList) );
|
||||
// the font name dictionary needs to be intialized once
|
||||
if( aDictionary.empty() )
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
void SetAlign( FontAlign );
|
||||
FontAlign GetAlign() const;
|
||||
|
||||
void SetName( const String& rFamilyName );
|
||||
void SetName( const rtl::OUString& rFamilyName );
|
||||
const String& GetName() const;
|
||||
void SetStyleName( const String& rStyleName );
|
||||
const String& GetStyleName() const;
|
||||
|
@ -376,7 +376,7 @@ void Font::SetAlign( FontAlign eAlign )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void Font::SetName( const String& rFamilyName )
|
||||
void Font::SetName( const rtl::OUString& rFamilyName )
|
||||
{
|
||||
DBG_CHKTHIS( Font, NULL );
|
||||
|
||||
|
@ -1673,10 +1673,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
|
||||
MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
|
||||
// measure a test string to get ascend and descent right
|
||||
static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
|
||||
String aStr( pStr );
|
||||
rtl::OUString aStr( pStr );
|
||||
|
||||
Rectangle aRect;
|
||||
aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL );
|
||||
aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.getLength(), 0, NULL );
|
||||
Point aPt( pAct->GetStartPoint() );
|
||||
aRect.Move( aPt.X(), aPt.Y() );
|
||||
aRect.Right() = aRect.Left() + pAct->GetWidth();
|
||||
|
@ -2350,7 +2350,7 @@ public:
|
||||
const PDFWriterImpl::BuiltinFont&,
|
||||
long nPixelPerEM, int nOrientation );
|
||||
|
||||
void SetText( const String& rText ) { maOrigText = rText; }
|
||||
void SetText( const rtl::OUString& rText ) { maOrigText = rText; }
|
||||
virtual bool LayoutText( ImplLayoutArgs& );
|
||||
virtual void InitFont() const;
|
||||
virtual void DrawText( SalGraphics& ) const;
|
||||
|
@ -167,8 +167,7 @@ String GetCommandLineToken( int nToken, const String& rLine )
|
||||
|
||||
*pLeap = 0;
|
||||
|
||||
String aRet( pBuffer );
|
||||
return aRet;
|
||||
return rtl::OUString(pBuffer);
|
||||
}
|
||||
|
||||
rtl::OString GetCommandLineToken(int nToken, const rtl::OString& rLine)
|
||||
@ -324,8 +323,7 @@ String WhitespaceToSpace( const String& rLine, sal_Bool bProtect )
|
||||
if( *pLeap == ' ' )
|
||||
*pLeap = 0;
|
||||
|
||||
String aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer );
|
||||
return aRet;
|
||||
return rtl::OUString(*pBuffer == ' ' ? pBuffer+1 : pBuffer);
|
||||
}
|
||||
|
||||
rtl::OString WhitespaceToSpace(const rtl::OString& rLine, sal_Bool bProtect)
|
||||
|
@ -606,7 +606,7 @@ void I18NStatus::setStatusText( const String& rText )
|
||||
else
|
||||
pBuffer[i] = pCopy[i];
|
||||
}
|
||||
String aText( pBuffer );
|
||||
rtl::OUString aText( pBuffer );
|
||||
m_pStatusWindow->setText( aText );
|
||||
m_pStatusWindow->setPosition( m_pParent );
|
||||
|
||||
|
@ -1070,8 +1070,7 @@ void SvXMLNumFmtElementContext::EndElement()
|
||||
{
|
||||
case XML_TOK_STYLE_TEXT:
|
||||
if ( rParent.HasLongDoW() &&
|
||||
rParent.GetLocaleData().getLongDateDayOfWeekSep() ==
|
||||
String( aContent.getStr() ) )
|
||||
aContent.toString().equals(rParent.GetLocaleData().getLongDateDayOfWeekSep()) )
|
||||
{
|
||||
// skip separator constant after long day of week
|
||||
// (NF_KEY_NNNN contains the separator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user