From 4f20c9f6f95c117bcdb520682df4fa1429a56477 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sat, 17 Aug 2013 01:11:11 +0200 Subject: fdo#57950: Remove some chained appends in xmlsecurity Change-Id: If70fa38ad4836b6dacdd0c5577c66b78be6826a6 Reviewed-on: https://gerrit.libreoffice.org/5465 Reviewed-by: Andrzej J.R. Hunt Tested-by: Andrzej J.R. Hunt --- xmlsecurity/source/dialogs/certificatechooser.cxx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'xmlsecurity/source/dialogs/certificatechooser.cxx') diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index d339cde84220..aa829172641c 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -65,12 +65,8 @@ CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::X m_pCertLB = new SvSimpleTable(*pSignatures); static long nTabs[] = { 3, 0, 30*nControlWidth/100, 60*nControlWidth/100 }; m_pCertLB->SetTabs( &nTabs[0] ); - OUStringBuffer sHeader; - sHeader.append(get("issuedto")->GetText()) - .append("\t").append(get("issuedby")->GetText()) - .append("\t").append(get("expiration")->GetText()); - m_pCertLB->InsertHeaderEntry(sHeader.makeStringAndClear()); - + m_pCertLB->InsertHeaderEntry(get("issuedto")->GetText() + "\t" + get("issuedby")->GetText() + + "\t" + get("expiration")->GetText()); m_pCertLB->SetSelectHdl( LINK( this, CertificateChooser, CertificateHighlightHdl ) ); m_pCertLB->SetDoubleClickHdl( LINK( this, CertificateChooser, CertificateSelectHdl ) ); m_pViewBtn->SetClickHdl( LINK( this, CertificateChooser, ViewButtonHdl ) ); @@ -174,12 +170,9 @@ void CertificateChooser::ImplInitialize() // fill list of certificates; the first entry will be selected for ( sal_Int32 nC = 0; nC < nCertificates; ++nC ) { - OUStringBuffer sEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() ) ); - sEntry.append( '\t' ); - sEntry.append( XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() ) ); - sEntry.append( '\t' ); - sEntry.append( XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) ); - SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( sEntry.makeStringAndClear() ); + SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() ) + + "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() ) + + "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) ); pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index } -- cgit