[PATCH] String::AppendAscii cleanup in dbaccess
Ricardo Montania (via Code Review)
gerrit at gerrit.libreoffice.org
Tue Mar 26 13:30:29 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3068
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/68/3068/1
String::AppendAscii cleanup in dbaccess
Change-Id: I6a6d695c9e4b850bc19a3a80c2d8343147724df6
---
M dbaccess/source/ui/dlg/sqlmessage.cxx
M dbaccess/source/ui/inc/WNameMatch.hxx
M dbaccess/source/ui/misc/WNameMatch.cxx
M dbaccess/source/ui/querydesign/QueryDesignView.cxx
M dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
5 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index f9deeba..4b3c1a5 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -394,7 +394,7 @@
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 @@
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;
}
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
index 0beb955..bd2a2de 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -64,8 +64,8 @@
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 * );
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index cfad889..725cba0 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -65,10 +65,10 @@
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 @@
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);
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index b9c5279..7b5660a 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -395,35 +395,35 @@
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;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 3556f0e..2b53c89 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -487,16 +487,16 @@
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;
--
To view, visit https://gerrit.libreoffice.org/3068
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a6d695c9e4b850bc19a3a80c2d8343147724df6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ricardo Montania <ricardo at linuxafundo.com.br>
More information about the LibreOffice
mailing list