Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3974
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/74/3974/1
AppendAscii cleanup
Change-Id: I7398272de0bd340ebfb5f31b314d32fcff007eec
---
M extensions/source/bibliography/datman.cxx
M extensions/source/dbpilots/listcombowizard.cxx
M extensions/source/propctrlr/browserline.cxx
M extensions/source/scanner/sanedlg.cxx
M linguistic/source/convdiclist.cxx
M padmin/source/helper.cxx
M sc/inc/editutil.hxx
M sc/source/core/tool/editutil.cxx
M sc/source/core/tool/interpr1.cxx
M sc/source/filter/dif/difimp.cxx
M sc/source/filter/excel/excrecds.cxx
M sc/source/filter/excel/xehelper.cxx
M sc/source/filter/inc/excrecds.hxx
M sc/source/ui/app/inputhdl.cxx
14 files changed, 98 insertions(+), 98 deletions(-)
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index f4cfa2b..4fdf310 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -178,9 +178,8 @@
catch (const Exception& e)
{
#ifdef DBG_UTIL
- String sMsg(OUString("::getColumns : catched an exception ("));
- sMsg += String(e.Message);
- sMsg.AppendAscii(") ...");
+ OUString sMsg( "::getColumns : catched an exception (" + e.Message + ") ..." );
+
OSL_FAIL(OUStringToOString(sMsg, RTL_TEXTENCODING_ASCII_US ).getStr());
#else
(void)e;
diff --git a/extensions/source/dbpilots/listcombowizard.cxx
b/extensions/source/dbpilots/listcombowizard.cxx
index eea2913..866a34e 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -184,13 +184,9 @@
getContext().xObjectModel->setPropertyValue(OUString("BoundColumn"),
makeAny((sal_Int16)1));
// build the statement to set as list source
- String sStatement;
- sStatement.AppendAscii("SELECT ");
- sStatement += getSettings().sListContentField;
- sStatement.AppendAscii(", ");
- sStatement += getSettings().sLinkedListField;
- sStatement.AppendAscii(" FROM ");
- sStatement += getSettings().sListContentTable;
+ OUString sStatement = "SELECT " +
+ OUString( getSettings().sListContentField ) + ", " + OUString(
getSettings().sLinkedListField ) +
+ " FROM " + OUString( getSettings().sListContentTable );
Sequence< OUString > aListSource(1);
aListSource[0] = sStatement;
getContext().xObjectModel->setPropertyValue(OUString("ListSource"),
makeAny(aListSource));
@@ -198,12 +194,10 @@
else
{
// build the statement to set as list source
- String sStatement;
- sStatement.AppendAscii("SELECT DISTINCT ");
- sStatement += getSettings().sListContentField;
- sStatement.AppendAscii(" FROM ");
- sStatement += getSettings().sListContentTable;
- getContext().xObjectModel->setPropertyValue(OUString("ListSource"),
makeAny(OUString(sStatement)));
+ OUString sStatement = "SELECT DISTINCT " +
+ OUString( getSettings().sListContentField ) +
+ " FROM " + OUString( getSettings().sListContentTable );
+ getContext().xObjectModel->setPropertyValue( "ListSource",
makeAny(OUString(sStatement)));
}
// the bound field
diff --git a/extensions/source/propctrlr/browserline.cxx
b/extensions/source/propctrlr/browserline.cxx
index a8ec00c..37e9a74 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -275,16 +275,16 @@
{
if( m_pTheParent )
{
- String aText = m_aFtTitle.GetText();
+ OUString aText( m_aFtTitle.GetText() );
while( m_pTheParent->GetTextWidth( aText ) < m_nNameWidth )
- aText.AppendAscii("...........");
+ aText += "...........";
// for Issue 69452
if (Application::GetSettings().GetLayoutRTL())
{
sal_Unicode cRTL_mark = 0x200F;
- aText.Append(cRTL_mark);
+ aText += OUString( cRTL_mark );
}
m_aFtTitle.SetText(aText);
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 2ccd4d9..f0b31c6 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -1244,8 +1244,14 @@
return;
const char* pEnv = getenv( "HOME" );
- String aFileName( pEnv ? pEnv : "", osl_getThreadTextEncoding() );
- aFileName.AppendAscii( "/.so_sane_state" );
+ OUString aFileName;
+
+ if( pEnv )
+ aFileName = OUString::createFromAscii(pEnv);
+ else
+ aFileName = OStringToOUString("", osl_getThreadTextEncoding());
+
+ aFileName += "/.so_sane_state";
Config aConfig( aFileName );
aConfig.DeleteGroup( "SANE" );
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 7183d82..e2402fc 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -68,8 +68,7 @@
{
// build URL to use for new (persistent) dictionaries
- String aFullDicName( rDicName );
- aFullDicName.AppendAscii( CONV_DIC_DOT_EXT );
+ OUString aFullDicName = OUString(rDicName) + CONV_DIC_DOT_EXT;
INetURLObject aURLObj;
aURLObj.SetSmartProtocol( INET_PROT_FILE );
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 3b5e5f7..957c8f7 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -250,8 +250,13 @@
if( ! pRC )
{
static const char* pEnv = getenv( "HOME" );
- String aFileName( pEnv ? pEnv : "", osl_getThreadTextEncoding() );
- aFileName.AppendAscii( "/.padminrc" );
+ OUString aFileName;
+ if( pEnv )
+ aFileName += OUString::createFromAscii( pEnv );
+ else
+ aFileName += OStringToOUString( "", osl_getThreadTextEncoding() );
+
+ aFileName += "/.padminrc";
pRC = new Config( aFileName );
}
return *pRC;
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index c033415..a4c7af8 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -51,7 +51,7 @@
static const char pCalcDelimiters[];
public:
- static String ModifyDelimiters( const String& rOld );
+ static OUString ModifyDelimiters( const OUString& rOld );
/// Retrieves string with paragraphs delimited by spaces
static String GetSpaceDelimitedString( const EditEngine& rEngine );
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index a004d86..bf0a725 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -59,12 +59,12 @@
//------------------------------------------------------------------------
-String ScEditUtil::ModifyDelimiters( const String& rOld )
+OUString ScEditUtil::ModifyDelimiters( const OUString& rOld )
{
// underscore is used in function argument names
- String aRet = comphelper::string::remove(rOld, '_');
- aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM( pCalcDelimiters ) );
- aRet.Append(ScCompiler::GetNativeSymbol(ocSep)); // argument separator is localized.
+ OUString aRet = OUString( comphelper::string::remove(rOld, '_') ) +
+ OUString::createFromAscii( pCalcDelimiters ) +
+ ScCompiler::GetNativeSymbol(ocSep); // argument separator is localized.
return aRet;
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 53db8dc..6fc4816 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2371,7 +2371,7 @@
namespace {
-void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, String& rFmtStr)
+void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, OUString& rFmtStr)
{
bool bAppendPrec = true;
sal_uInt16 nPrec, nLeading;
@@ -2380,10 +2380,10 @@
switch( pFormatter->GetType( nFormat ) )
{
- case NUMBERFORMAT_NUMBER: rFmtStr = (bThousand ? ',' : 'F'); break;
- case NUMBERFORMAT_CURRENCY: rFmtStr = 'C'; break;
- case NUMBERFORMAT_SCIENTIFIC: rFmtStr = 'S'; break;
- case NUMBERFORMAT_PERCENT: rFmtStr = 'P'; break;
+ case NUMBERFORMAT_NUMBER: if(bThousand) rFmtStr = ","; else rFmtStr = "F"; break;
+ case NUMBERFORMAT_CURRENCY: rFmtStr = "C"; break;
+ case NUMBERFORMAT_SCIENTIFIC: rFmtStr = "S"; break;
+ case NUMBERFORMAT_PERCENT: rFmtStr = "P"; break;
default:
{
bAppendPrec = false;
@@ -2396,18 +2396,18 @@
case NF_DATE_SYS_DMMMYYYY:
case NF_DATE_DIN_DMMMYYYY:
case NF_DATE_SYS_DMMMMYYYY:
- case NF_DATE_DIN_DMMMMYYYY: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D1"
) ); break;
- case NF_DATE_SYS_DDMMM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D2"
) ); break;
- case NF_DATE_SYS_MMYY: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D3"
) ); break;
+ case NF_DATE_DIN_DMMMMYYYY: rFmtStr = "D1"; break;
+ case NF_DATE_SYS_DDMMM: rFmtStr = "D2"; break;
+ case NF_DATE_SYS_MMYY: rFmtStr = "D3"; break;
case NF_DATETIME_SYSTEM_SHORT_HHMM:
case NF_DATETIME_SYS_DDMMYYYY_HHMMSS:
- rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D4"
) ); break;
- case NF_DATE_DIN_MMDD: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D5"
) ); break;
- case NF_TIME_HHMMSSAMPM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D6"
) ); break;
- case NF_TIME_HHMMAMPM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D7"
) ); break;
- case NF_TIME_HHMMSS: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D8"
) ); break;
- case NF_TIME_HHMM: rFmtStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "D9"
) ); break;
- default: rFmtStr = 'G';
+ rFmtStr = "D4"; break;
+ case NF_DATE_DIN_MMDD: rFmtStr = "D5"; break;
+ case NF_TIME_HHMMSSAMPM: rFmtStr = "D6"; break;
+ case NF_TIME_HHMMAMPM: rFmtStr = "D7"; break;
+ case NF_TIME_HHMMSS: rFmtStr = "D8"; break;
+ case NF_TIME_HHMM: rFmtStr = "D9"; break;
+ default: rFmtStr = "G";
}
}
}
@@ -2415,9 +2415,9 @@
rFmtStr += OUString::number(nPrec);
const SvNumberformat* pFormat = pFormatter->GetEntry( nFormat );
if( lcl_FormatHasNegColor( pFormat ) )
- rFmtStr += '-';
+ rFmtStr += "-";
if( lcl_FormatHasOpenPar( pFormat ) )
- rFmtStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "()" ) );
+ rFmtStr += "()";
}
}
@@ -2584,7 +2584,7 @@
// *** FORMATTING ***
else if( aInfoType.EqualsAscii( "FORMAT" ) )
{ // specific format code for standard formats
- String aFuncResult;
+ OUString aFuncResult;
sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
getFormatString(pFormatter, nFormat, aFuncResult);
PushString( aFuncResult );
@@ -2720,7 +2720,7 @@
}
else if ( aInfoType == "FORMAT" )
{
- String aFmtStr;
+ OUString aFmtStr;
sal_uLong nFmt = aFmt.mbIsSet ? aFmt.mnIndex : 0;
getFormatString(pFormatter, nFmt, aFmtStr);
PushString(aFmtStr);
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 734253a..816b221 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -533,12 +533,9 @@
ReadNextLine( aTmpLine );
if ( eRet == D_SYNT_ERROR )
{ // for broken records write "#ERR: data" to cell
- String aTmp( RTL_CONSTASCII_USTRINGPARAM( "#ERR: " ));
- aTmp += pAktBuffer;
- aTmp.AppendAscii( " (" );
- OSL_ENSURE( aTmpLine.getLength() <= STRING_MAXLEN - aTmp.Len() - 1,
"GetNextDataset(): line doesn't fit into data");
- aTmp += aTmpLine;
- aTmp += sal_Unicode(')');
+ OUString aTmp = "#ERR: " + OUString( pAktBuffer ) + " (";
+ OSL_ENSURE( aTmpLine.getLength() <= STRING_MAXLEN - aTmp.getLength() - 1,
"GetNextDataset(): line doesn't fit into data");
+ aTmp += aTmpLine + ")";
aData = aTmp;
eRet = D_STRING;
}
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index fc8be48..3469b36 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -552,14 +552,14 @@
return pText ? (1 + pText->GetBufferSize()) : 0;
}
-void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT )
+void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, OUString* pT )
{
nType = nTp;
nOper = nOp;
fVal = fV;
delete pText;
- pText = pT ? new XclExpString( *pT, EXC_STR_8BITLENGTH ) : NULL;
+ (pT) ? pText = new XclExpString( *pT, EXC_STR_8BITLENGTH ) : pText = NULL;
}
void ExcFilterCondition::Save( XclExpStream& rStrm )
@@ -641,7 +641,7 @@
}
bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp,
- double fVal, String* pText, bool bSimple )
+ double fVal, OUString* pText, bool bSimple )
{
if( !aCond[ 1 ].IsEmpty() )
return false;
@@ -675,28 +675,27 @@
return AddMultiValueEntry(rEntry);
bool bConflict = false;
- String sText;
+ OUString sText;
const ScQueryEntry::Item& rItem = rItems[0];
const OUString& rQueryStr = rItem.maString;
if (!rQueryStr.isEmpty())
{
- sText.Assign(rQueryStr);
+ sText = rQueryStr;
switch( rEntry.eOp )
{
case SC_CONTAINS:
case SC_DOES_NOT_CONTAIN:
{
- sText.InsertAscii( "*" , 0 );
- sText.AppendAscii( "*" );
+ sText = "*" + sText + "*";
}
break;
case SC_BEGINS_WITH:
case SC_DOES_NOT_BEGIN_WITH:
- sText.AppendAscii( "*" );
+ sText += "*";
break;
case SC_ENDS_WITH:
case SC_DOES_NOT_END_WITH:
- sText.InsertAscii( "*" , 0 );
+ sText = "*" + sText;
break;
default:
{
@@ -705,7 +704,7 @@
}
}
- bool bLen = sText.Len() > 0;
+ bool bLen = sText.getLength() > 0;
// empty/nonempty fields
if (rEntry.IsQueryByEmpty())
@@ -718,7 +717,8 @@
double fVal = 0.0;
sal_uInt32 nIndex = 0;
bool bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : true;
- String* pText = bIsNum ? NULL : &sText;
+ OUString* pText;
+ (bIsNum) ? pText = NULL : pText = &sText;
// top10 flags
sal_uInt16 nNewFlags = 0x0000;
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index dc05fda..a13b7fe 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -713,7 +713,7 @@
for( sal_Int32 nPara = 0; nPara < nParaCount; ++nPara )
{
ESelection aSel( nPara, 0 );
- String aParaText;
+ OUString aParaText;
sal_Int32 nParaHeight = 0;
std::vector<sal_uInt16> aPosList;
mrEE.GetPortions( nPara, aPosList );
@@ -741,7 +741,7 @@
(aFontData.mbItalic != aNewData.mbItalic);
if( bNewFont || (bNewStyle && pFontList) )
{
- aParaText.AppendAscii( "&\"" ).Append( aNewData.maName );
+ aParaText = "&\"" + OUString(aNewData.maName);
if( pFontList )
{
FontInfo aFontInfo( pFontList->Get(
@@ -750,9 +750,9 @@
aNewData.mbItalic ? ITALIC_NORMAL : ITALIC_NONE ) );
aNewData.maStyle = pFontList->GetStyleName( aFontInfo );
if( aNewData.maStyle.Len() )
- aParaText.Append( ',' ).Append( aNewData.maStyle );
+ aParaText += "," + OUString(aNewData.maStyle);
}
- aParaText.Append( '"' );
+ aParaText += "\"";
}
// height
@@ -762,7 +762,7 @@
(aNewData.mnHeight += 10) /= 20;
bool bFontHtChanged = (aFontData.mnHeight != aNewData.mnHeight);
if( bFontHtChanged )
- aParaText.Append( '&' ).Append( OUString::number( aNewData.mnHeight ) );
+ aParaText += "&" + OUString::number( aNewData.mnHeight );
// update maximum paragraph height, convert to twips
nParaHeight = ::std::max< sal_Int32 >( nParaHeight, aNewData.mnHeight * 20 );
@@ -779,13 +779,13 @@
{
sal_uInt8 nTmpUnderl = (aNewData.mnUnderline == EXC_FONTUNDERL_NONE) ?
aFontData.mnUnderline : aNewData.mnUnderline;
- aParaText.AppendAscii( (nTmpUnderl == EXC_FONTUNDERL_SINGLE) ? "&U" : "&E" );
+ (nTmpUnderl == EXC_FONTUNDERL_SINGLE)? aParaText += "&U" : aParaText += "&E";
}
// strikeout
aNewData.mbStrikeout = (aFont.GetStrikeout() != STRIKEOUT_NONE);
if( aFontData.mbStrikeout != aNewData.mbStrikeout )
- aParaText.AppendAscii( "&S" );
+ aParaText += "&S";
// super/sub script
const SvxEscapementItem& rEscapeItem = GETITEM( aEditSet, SvxEscapementItem,
EE_CHAR_ESCAPEMENT );
@@ -795,9 +795,9 @@
switch(aNewData.mnEscapem)
{
// close the previous super/sub script.
- case EXC_FONTESC_NONE: aParaText.AppendAscii( (aFontData.mnEscapem ==
EXC_FONTESC_SUPER) ? "&X" : "&Y" ); break;
- case EXC_FONTESC_SUPER: aParaText.AppendAscii( "&X" ); break;
- case EXC_FONTESC_SUB: aParaText.AppendAscii( "&Y" ); break;
+ case EXC_FONTESC_NONE: (aFontData.mnEscapem == EXC_FONTESC_SUPER) ?
aParaText += "&X" : aParaText += "&Y"; break;
+ case EXC_FONTESC_SUPER: aParaText += "&X"; break;
+ case EXC_FONTESC_SUB: aParaText += "&Y"; break;
default: break;
}
}
@@ -813,30 +813,30 @@
if( const SvxFieldData* pFieldData = static_cast< const SvxFieldItem* >( pItem
)->GetField() )
{
if( pFieldData->ISA( SvxPageField ) )
- aParaText.AppendAscii( "&P" );
+ aParaText += "&P";
else if( pFieldData->ISA( SvxPagesField ) )
- aParaText.AppendAscii( "&N" );
+ aParaText += "&N";
else if( pFieldData->ISA( SvxDateField ) )
- aParaText.AppendAscii( "&D" );
+ aParaText += "&D";
else if( pFieldData->ISA( SvxTimeField ) || pFieldData->ISA(
SvxExtTimeField ) )
- aParaText.AppendAscii( "&T" );
+ aParaText += "&T";
else if( pFieldData->ISA( SvxTableField ) )
- aParaText.AppendAscii( "&A" );
+ aParaText += "&A";
else if( pFieldData->ISA( SvxFileField ) ) // title -> file name
- aParaText.AppendAscii( "&F" );
+ aParaText += "&F";
else if( const SvxExtFileField* pFileField = PTR_CAST( SvxExtFileField,
pFieldData ) )
{
switch( pFileField->GetFormat() )
{
case SVXFILEFORMAT_NAME_EXT:
case SVXFILEFORMAT_NAME:
- aParaText.AppendAscii( "&F" );
+ aParaText += "&F";
break;
case SVXFILEFORMAT_PATH:
- aParaText.AppendAscii( "&Z" );
+ aParaText += "&Z";
break;
case SVXFILEFORMAT_FULLPATH:
- aParaText.AppendAscii( "&Z&F" );
+ aParaText += "&Z&F";
break;
default:
OSL_FAIL( "XclExpHFConverter::AppendPortion - unknown file
field" );
@@ -849,14 +849,14 @@
String aPortionText( mrEE.GetText( aSel ) );
aPortionText.SearchAndReplaceAll( OUString('&'), OUString("&&") );
// #i17440# space between font height and numbers in text
- if( bFontHtChanged && aParaText.Len() && aPortionText.Len() )
+ if( bFontHtChanged && aParaText.getLength() && aPortionText.Len() )
{
- sal_Unicode cLast = aParaText.GetChar( aParaText.Len() - 1 );
+ sal_Unicode cLast = aParaText[ aParaText.getLength() - 1 ];
sal_Unicode cFirst = aPortionText.GetChar( 0 );
if( ('0' <= cLast) && (cLast <= '9') && ('0' <= cFirst) && (cFirst <= '9')
)
- aParaText.Append( ' ' );
+ aParaText += " ";
}
- aParaText.Append( aPortionText );
+ aParaText += aPortionText;
}
}
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index fe70907..426f0cf 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -366,7 +366,7 @@
inline bool HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); }
sal_uLong GetTextBytes() const;
- void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT );
+ void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, OUString* pT );
void Save( XclExpStream& rStrm );
void SaveXml( XclExpXmlStream& rStrm );
@@ -386,7 +386,7 @@
std::vector<OUString> maMultiValues;
bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType,
- sal_uInt8 nOp, double fVal, String* pText,
+ sal_uInt8 nOp, double fVal, OUString* pText,
bool bSimple = false );
virtual void WriteBody( XclExpStream& rStrm );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9baa6cc..3bcca09 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -201,15 +201,15 @@
if ( !pActiveViewSh || !SC_MOD()->GetInputOptions().GetRangeFinder() )
return;
- String aDelimiters = ScEditUtil::ModifyDelimiters(
+ OUString aDelimiters = ScEditUtil::ModifyDelimiters(
OUString::createFromAscii( pMinDelimiters ) );
- xub_StrLen nColon = aDelimiters.Search(':');
+ sal_Int32 nColon = aDelimiters.indexOf( ':' );
if ( nColon != STRING_NOTFOUND )
- aDelimiters.Erase( nColon, 1 ); // Delimiter ohne Doppelpunkt
- xub_StrLen nDot = aDelimiters.Search(cSheetSep);
+ aDelimiters = aDelimiters.replaceAt( nColon, 1, ""); // Delimiter ohne
Doppelpunkt
+ sal_Int32 nDot = aDelimiters.indexOf(cSheetSep);
if ( nDot != STRING_NOTFOUND )
- aDelimiters.Erase( nDot, 1 ); // Delimiter ohne Punkt
+ aDelimiters = aDelimiters.replaceAt( nDot, 1 , ""); // Delimiter ohne Punkt
const sal_Unicode* pChar = rFormula.GetBuffer();
xub_StrLen nLen = rFormula.Len();
@@ -220,7 +220,7 @@
while ( nPos < nLen && nCount < RANGEFIND_MAX )
{
// Trenner ueberlesen
- while ( nPos<nLen && ScGlobal::UnicodeStrChr( aDelimiters.GetBuffer(), pChar[nPos] ) )
+ while ( nPos<nLen && ScGlobal::UnicodeStrChr( aDelimiters.getStr(), pChar[nPos] ) )
{
if ( pChar[nPos] == '"' ) // String
{
@@ -234,7 +234,7 @@
// Text zwischen Trennern
nStart = nPos;
handle_r1c1:
- while ( nPos<nLen && !ScGlobal::UnicodeStrChr( aDelimiters.GetBuffer(), pChar[nPos] ) )
+ while ( nPos<nLen && !ScGlobal::UnicodeStrChr( aDelimiters.getStr(), pChar[nPos] ) )
++nPos;
// for R1C1 '-' in R[-]... or C[-]... are not delimiters
--
To view, visit https://gerrit.libreoffice.org/3974
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7398272de0bd340ebfb5f31b314d32fcff007eec
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ricardo Montania <ricardo@linuxafundo.com.br>
Context
- [PATCH] AppendAscii cleanup · Ricardo Montania (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.