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)
SvTreeListEntry* pSelected = m_aExceptionList.FirstSelected();
OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?");
String sText;
OUString sText;
if ( pSelected )
{
......@@ -404,21 +404,21 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected)
if ( aExceptionInfo.sSQLState.Len() )
{
sText += m_sStatusLabel;
sText.AppendAscii(": ");
sText += ": ";
sText += aExceptionInfo.sSQLState;
sText.AppendAscii("\n");
sText += "\n";
}
if ( aExceptionInfo.sErrorCode.Len() )
{
sText += m_sErrorCodeLabel;
sText.AppendAscii(": ");
sText += ": ";
sText += aExceptionInfo.sErrorCode;
sText.AppendAscii("\n");
sText += "\n";
}
if ( sText.Len() )
sText.AppendAscii( "\n" );
if ( !sText.isEmpty() )
sText += "\n";
sText += aExceptionInfo.sMessage;
}
......
......@@ -64,8 +64,8 @@ namespace dbaui
ImageButton m_ibColumn_down_right;
PushButton m_pbAll;
PushButton m_pbNone;
String m_sSourceText;
String m_sDestText;
OUString m_sSourceText;
OUString m_sDestText;
DECL_LINK( ButtonClickHdl, Button * );
DECL_LINK( RightButtonClickHdl, Button * );
......
......@@ -65,10 +65,10 @@ OWizNameMatching::OWizNameMatching( Window* pParent)
m_CTRL_LEFT.SetStyle( m_CTRL_LEFT.GetStyle() | WB_FORCE_MAKEVISIBLE );
m_CTRL_RIGHT.SetStyle( m_CTRL_RIGHT.GetStyle() | WB_FORCE_MAKEVISIBLE );
m_sSourceText = m_FT_TABLE_LEFT.GetText();
m_sSourceText.AppendAscii("\n");
m_sDestText = m_FT_TABLE_RIGHT.GetText();
m_sDestText.AppendAscii("\n");
m_sSourceText = m_FT_TABLE_LEFT.GetText();
m_sSourceText += "\n";
m_sDestText = m_FT_TABLE_RIGHT.GetText();
m_sDestText += "\n";
FreeResource();
}
......@@ -101,14 +101,14 @@ void OWizNameMatching::ActivatePage( )
DBG_CHKTHIS(OWizNameMatching,NULL);
// set source table name
String aName = m_sSourceText;
aName += String(m_pParent->m_sSourceName);
OUString aName = m_sSourceText;
aName += m_pParent->m_sSourceName;
m_FT_TABLE_LEFT.SetText(aName);
// set dest table name
aName = m_sDestText;
aName += String(m_pParent->m_sName);
aName += m_pParent->m_sName;
m_FT_TABLE_RIGHT.SetText(aName);
......
......@@ -395,35 +395,35 @@ namespace
const OQueryTableConnectionData* pData)
{
String aErg(rLh);
OUString aErg(rLh);
if ( pData->isNatural() && pData->GetJoinType() != CROSS_JOIN )
aErg.AppendAscii(" NATURAL ");
aErg += " NATURAL ";
switch(pData->GetJoinType())
{
case LEFT_JOIN:
aErg.AppendAscii(" LEFT OUTER ");
aErg += " LEFT OUTER ";
break;
case RIGHT_JOIN:
aErg.AppendAscii(" RIGHT OUTER ");
aErg += " RIGHT OUTER ";
break;
case CROSS_JOIN:
OSL_ENSURE(!pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!");
aErg.AppendAscii(" CROSS ");
aErg += " CROSS ";
break;
case INNER_JOIN:
OSL_ENSURE(pData->isNatural(),"OQueryDesignView::BuildJoin: This should not happen!");
aErg.AppendAscii(" INNER ");
aErg += " INNER ";
break;
default:
aErg.AppendAscii(" FULL OUTER ");
aErg += " FULL OUTER ";
break;
}
aErg.AppendAscii("JOIN ");
aErg += String(rRh);
aErg += "JOIN ";
aErg += rRh;
if ( CROSS_JOIN != pData->GetJoinType() && !pData->isNatural() )
{
aErg.AppendAscii(" ON ");
aErg += String(BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData));
aErg += " ON ";
aErg += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData);
}
return aErg;
......
......@@ -487,16 +487,16 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pFieldCell->Clear();
m_pFieldCell->SetText(String());
String aField(pEntry->GetField());
OUString aField(pEntry->GetField());
String aTable(pEntry->GetAlias());
getDesignView()->fillValidFields(aTable, m_pFieldCell);
// replace with alias.*
if ((aField.GetChar(0) == '*') && aTable.Len())
if ((aField[0] == '*') && aTable.Len())
{
aField = aTable;
aField.AppendAscii(".*");
aField += ".*";
}
m_pFieldCell->SetText(aField);
} 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