Kaydet (Commit) 7ee37c3a authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Thomas Arnhold

String::AppendAscii cleanup in dbaccess

Change-Id: I6a6d695c9e4b850bc19a3a80c2d8343147724df6
Reviewed-on: https://gerrit.libreoffice.org/3068Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 50c0ce4b
...@@ -394,7 +394,7 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected) ...@@ -394,7 +394,7 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected)
SvTreeListEntry* pSelected = m_aExceptionList.FirstSelected(); SvTreeListEntry* pSelected = m_aExceptionList.FirstSelected();
OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?"); OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?");
String sText; OUString sText;
if ( pSelected ) if ( pSelected )
{ {
...@@ -404,21 +404,21 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected) ...@@ -404,21 +404,21 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected)
if ( aExceptionInfo.sSQLState.Len() ) if ( aExceptionInfo.sSQLState.Len() )
{ {
sText += m_sStatusLabel; sText += m_sStatusLabel;
sText.AppendAscii(": "); sText += ": ";
sText += aExceptionInfo.sSQLState; sText += aExceptionInfo.sSQLState;
sText.AppendAscii("\n"); sText += "\n";
} }
if ( aExceptionInfo.sErrorCode.Len() ) if ( aExceptionInfo.sErrorCode.Len() )
{ {
sText += m_sErrorCodeLabel; sText += m_sErrorCodeLabel;
sText.AppendAscii(": "); sText += ": ";
sText += aExceptionInfo.sErrorCode; sText += aExceptionInfo.sErrorCode;
sText.AppendAscii("\n"); sText += "\n";
} }
if ( sText.Len() ) if ( !sText.isEmpty() )
sText.AppendAscii( "\n" ); sText += "\n";
sText += aExceptionInfo.sMessage; sText += aExceptionInfo.sMessage;
} }
......
...@@ -64,8 +64,8 @@ namespace dbaui ...@@ -64,8 +64,8 @@ namespace dbaui
ImageButton m_ibColumn_down_right; ImageButton m_ibColumn_down_right;
PushButton m_pbAll; PushButton m_pbAll;
PushButton m_pbNone; PushButton m_pbNone;
String m_sSourceText; OUString m_sSourceText;
String m_sDestText; OUString m_sDestText;
DECL_LINK( ButtonClickHdl, Button * ); DECL_LINK( ButtonClickHdl, Button * );
DECL_LINK( RightButtonClickHdl, Button * ); DECL_LINK( RightButtonClickHdl, Button * );
......
...@@ -65,10 +65,10 @@ OWizNameMatching::OWizNameMatching( Window* pParent) ...@@ -65,10 +65,10 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
m_CTRL_LEFT.SetStyle( m_CTRL_LEFT.GetStyle() | WB_FORCE_MAKEVISIBLE ); m_CTRL_LEFT.SetStyle( m_CTRL_LEFT.GetStyle() | WB_FORCE_MAKEVISIBLE );
m_CTRL_RIGHT.SetStyle( m_CTRL_RIGHT.GetStyle() | WB_FORCE_MAKEVISIBLE ); m_CTRL_RIGHT.SetStyle( m_CTRL_RIGHT.GetStyle() | WB_FORCE_MAKEVISIBLE );
m_sSourceText = m_FT_TABLE_LEFT.GetText(); m_sSourceText = m_FT_TABLE_LEFT.GetText();
m_sSourceText.AppendAscii("\n"); m_sSourceText += "\n";
m_sDestText = m_FT_TABLE_RIGHT.GetText(); m_sDestText = m_FT_TABLE_RIGHT.GetText();
m_sDestText.AppendAscii("\n"); m_sDestText += "\n";
FreeResource(); FreeResource();
} }
...@@ -101,14 +101,14 @@ void OWizNameMatching::ActivatePage( ) ...@@ -101,14 +101,14 @@ void OWizNameMatching::ActivatePage( )
DBG_CHKTHIS(OWizNameMatching,NULL); DBG_CHKTHIS(OWizNameMatching,NULL);
// set source table name // set source table name
String aName = m_sSourceText; OUString aName = m_sSourceText;
aName += String(m_pParent->m_sSourceName); aName += m_pParent->m_sSourceName;
m_FT_TABLE_LEFT.SetText(aName); m_FT_TABLE_LEFT.SetText(aName);
// set dest table name // set dest table name
aName = m_sDestText; aName = m_sDestText;
aName += String(m_pParent->m_sName); aName += m_pParent->m_sName;
m_FT_TABLE_RIGHT.SetText(aName); m_FT_TABLE_RIGHT.SetText(aName);
......
...@@ -395,35 +395,35 @@ namespace ...@@ -395,35 +395,35 @@ namespace
const OQueryTableConnectionData* pData) const OQueryTableConnectionData* pData)
{ {
String aErg(rLh); OUString aErg(rLh);
if ( pData->isNatural() && pData->GetJoinType() != CROSS_JOIN ) if ( pData->isNatural() && pData->GetJoinType() != CROSS_JOIN )
aErg.AppendAscii(" NATURAL "); aErg += " NATURAL ";
switch(pData->GetJoinType()) switch(pData->GetJoinType())
{ {
case LEFT_JOIN: case LEFT_JOIN:
aErg.AppendAscii(" LEFT OUTER "); aErg += " LEFT OUTER ";
break; break;
case RIGHT_JOIN: case RIGHT_JOIN:
aErg.AppendAscii(" RIGHT OUTER "); aErg += " RIGHT OUTER ";
break; break;
case CROSS_JOIN: case CROSS_JOIN:
OSL_ENSURE(!pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!"); OSL_ENSURE(!pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!");
aErg.AppendAscii(" CROSS "); aErg += " CROSS ";
break; break;
case INNER_JOIN: case INNER_JOIN:
OSL_ENSURE(pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!"); OSL_ENSURE(pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!");
aErg.AppendAscii(" INNER "); aErg += " INNER ";
break; break;
default: default:
aErg.AppendAscii(" FULL OUTER "); aErg += " FULL OUTER ";
break; break;
} }
aErg.AppendAscii("JOIN "); aErg += "JOIN ";
aErg += String(rRh); aErg += rRh;
if ( CROSS_JOIN != pData->GetJoinType() && !pData->isNatural() ) if ( CROSS_JOIN != pData->GetJoinType() && !pData->isNatural() )
{ {
aErg.AppendAscii(" ON "); aErg += " ON ";
aErg += String(BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData)); aErg += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData);
} }
return aErg; return aErg;
......
...@@ -487,16 +487,16 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon ...@@ -487,16 +487,16 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pFieldCell->Clear(); m_pFieldCell->Clear();
m_pFieldCell->SetText(String()); m_pFieldCell->SetText(String());
String aField(pEntry->GetField()); OUString aField(pEntry->GetField());
String aTable(pEntry->GetAlias()); String aTable(pEntry->GetAlias());
getDesignView()->fillValidFields(aTable, m_pFieldCell); getDesignView()->fillValidFields(aTable, m_pFieldCell);
// replace with alias.* // replace with alias.*
if ((aField.GetChar(0) == '*') && aTable.Len()) if ((aField[0] == '*') && aTable.Len())
{ {
aField = aTable; aField = aTable;
aField.AppendAscii(".*"); aField += ".*";
} }
m_pFieldCell->SetText(aField); m_pFieldCell->SetText(aField);
} break; } break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment