summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorRicardo Montania <ricardo@linuxafundo.com.br>2013-05-20 07:30:19 -0300
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-22 21:03:56 +0000
commitb7df3446c373a93dc5b77b495a54d873d83a91a7 (patch)
tree1de5e9567eaf1e7c5115e6b968ec4e49c45af3c1 /extensions
parent8eb1fb9eff4d4eea9c0c1c2e8d3b380e227b5d50 (diff)
AppendAscii cleanup
Change-Id: I7398272de0bd340ebfb5f31b314d32fcff007eec Reviewed-on: https://gerrit.libreoffice.org/3974 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/datman.cxx5
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx20
-rw-r--r--extensions/source/propctrlr/browserline.cxx10
-rw-r--r--extensions/source/scanner/sanedlg.cxx8
4 files changed, 20 insertions, 23 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 3509dc0ca873..d3598d10019e 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -178,9 +178,8 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
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 eea291394515..866a34e5227e 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -184,13 +184,9 @@ namespace dbp
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 @@ namespace dbp
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 a8ec00ca0b77..ffc1968502c2 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -275,19 +275,19 @@ namespace pcr
{
if( m_pTheParent )
{
- String aText = m_aFtTitle.GetText();
+ OUStringBuffer aText( m_aFtTitle.GetText() );
- while( m_pTheParent->GetTextWidth( aText ) < m_nNameWidth )
- aText.AppendAscii("...........");
+ while( m_pTheParent->GetTextWidth( aText.makeStringAndClear() ) < m_nNameWidth )
+ aText.append("...........");
// for Issue 69452
if (Application::GetSettings().GetLayoutRTL())
{
sal_Unicode cRTL_mark = 0x200F;
- aText.Append(cRTL_mark);
+ aText.append( OUString(cRTL_mark) );
}
- m_aFtTitle.SetText(aText);
+ m_aFtTitle.SetText( aText.makeStringAndClear() );
}
}
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 2ccd4d94d432..f13b2434147b 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -1244,8 +1244,12 @@ void SaneDlg::SaveState()
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) + "/.so_sane_state";
+ else
+ aFileName = OStringToOUString("", osl_getThreadTextEncoding()) + "/.so_sane_state";
Config aConfig( aFileName );
aConfig.DeleteGroup( "SANE" );