diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 15:24:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 18:54:15 +0200 |
commit | 4bef6511332073fbe3899fa2003caf88d9f2ac49 (patch) | |
tree | dca0d58c3fc86d6c88abc2a72fd91f149a917058 /sw/source/ui/vba | |
parent | c9dcd0a6197160fdc8bf086ae4d8a78558e7d078 (diff) |
loplugin:stringloop in sw
Change-Id: Ie316aee8d1e4f772dc25725b46e130c6717458c2
Reviewed-on: https://gerrit.libreoffice.org/58331
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r-- | sw/source/ui/vba/vbatemplate.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 27af69f99148..c33cdb000b8d 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star; static OUString lcl_CheckGroupName( const OUString& rGroupName ) { - OUString sRet; + OUStringBuffer sRet; //group name should contain only A-Z and a-z and spaces for( sal_Int32 i = 0; i < rGroupName.getLength(); i++ ) { @@ -40,10 +40,11 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName ) if (rtl::isAsciiAlphanumeric(cChar) || cChar == '_' || cChar == 0x20) { - sRet += OUStringLiteral1(cChar); + sRet.append(cChar); } } - return comphelper::string::strip(sRet, ' '); + sRet.strip(' '); + return sRet.makeStringAndClear(); } SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const OUString& rFullUrl ) |