[Libreoffice-commits] core.git: sw/source
Norbert Thiebaud
nthiebaud at gmail.com
Mon Feb 18 07:53:39 PST 2013
sw/source/ui/fldui/changedb.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 9044c8e0ce57613e38264a10dcd164f7babe44f4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Feb 17 14:47:46 2013 -0600
coverity#983200 Resource leak
Change-Id: I5454b836fe085d73feff0da2ae3875b5d6b641ff
Reviewed-on: https://gerrit.libreoffice.org/2203
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 1e6bf39..e4dc8e9 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -196,14 +196,14 @@ void SwChangeDBDlg::UpdateFlds()
{
if( m_pUsedDBTLB->GetParent( pEntry ))
{
- String* pTmp = new String( m_pUsedDBTLB->GetEntryText(
- m_pUsedDBTLB->GetParent( pEntry )));
- *pTmp += DB_DELIM;
- *pTmp += m_pUsedDBTLB->GetEntryText( pEntry );
- *pTmp += DB_DELIM;
- int nCommandType = (int)(sal_uLong)pEntry->GetUserData();
- *pTmp += String::CreateFromInt32(nCommandType);
- aDBNames.push_back(*pTmp);
+ OUStringBuffer sTmp;
+
+ sTmp.append(m_pUsedDBTLB->GetEntryText( m_pUsedDBTLB->GetParent( pEntry )));
+ sTmp.append(DB_DELIM);
+ sTmp.append(m_pUsedDBTLB->GetEntryText( pEntry ));
+ sTmp.append(DB_DELIM);
+ sTmp.append(OUString::number((int)(sal_uLong)pEntry->GetUserData()));
+ aDBNames.push_back(sTmp.makeStringAndClear());
}
pEntry = m_pUsedDBTLB->NextSelected(pEntry);
}
More information about the Libreoffice-commits
mailing list