diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 09:24:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 15:45:06 +0200 |
commit | 1b7ced8e77910e7f44d726f48185f16bc2fb087d (patch) | |
tree | 37dddab01f9e18a04fe113ef5c5292d18cda4864 /winaccessibility | |
parent | 7b55e994338ab5e7d9056f84d1aa2989534f59fb (diff) |
loplugin:stringadd
Change-Id: Id63306a86c955c1f00252c555a6c0faaed625c7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150481
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccTextBase.cxx | 3 | ||||
-rw-r--r-- | winaccessibility/source/UAccCOM/MAccessible.cxx | 31 |
2 files changed, 10 insertions, 24 deletions
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx index 40620bb5b64f..183ec3467655 100644 --- a/winaccessibility/source/UAccCOM/AccTextBase.cxx +++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx @@ -195,8 +195,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_attributes(long offset, long { strAttrs.append(';'); } - strAttrs.append(pValue.Name); - strAttrs.append(':'); + strAttrs.append(pValue.Name + ":"); if (pValue.Name == "CharBackColor" || pValue.Name == "CharColor" || diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 7579d7ee1271..24e3bde478c2 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2551,25 +2551,17 @@ OUString CMAccessible::get_StringFromAny(Any const & pAny) OUStringBuffer buf; for (const css::style::TabStop& rSingleVal : val) { - buf.append("Position="); - buf.append(rSingleVal.Position); - buf.append(",TabAlign="); - buf.append(sal_Int32(rSingleVal.Alignment)); - buf.append(","); - - buf.append("DecimalChar="); + buf.append( + "Position=" + OUString::number(rSingleVal.Position) + ",TabAlign=" + + OUString::number(sal_Int32(rSingleVal.Alignment)) + ",DecimalChar="); if (rSingleVal.DecimalChar==';' || rSingleVal.DecimalChar == ':' || rSingleVal.DecimalChar == ',' || rSingleVal.DecimalChar == '=' || rSingleVal.DecimalChar == '\\') buf.append('\\'); - buf.append(rSingleVal.DecimalChar); - buf.append(","); - - buf.append("FillChar="); + buf.append(OUStringChar(rSingleVal.DecimalChar) + ",FillChar="); if (rSingleVal.FillChar==';' || rSingleVal.FillChar == ':' || rSingleVal.FillChar == ',' || rSingleVal.FillChar == '=' || rSingleVal.FillChar == '\\') buf.append('\\'); - buf.append(rSingleVal.FillChar); - buf.append(","); + buf.append(OUStringChar(rSingleVal.FillChar) + ","); } return buf.makeStringAndClear(); } @@ -2634,24 +2626,19 @@ OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 numbering Any aAny = pXIndex->getByIndex(numberingLevel); Sequence< css::beans::PropertyValue > aProps; aAny >>= aProps; - OUStringBuffer buf("Numbering:NumberingLevel="); - buf.append(sal_Int32(numberingLevel)); - buf.append(','); + OUStringBuffer buf("Numbering:NumberingLevel=" + OUString::number(numberingLevel) + ","); for (const css::beans::PropertyValue& rProp : aProps) { if( (rProp.Name == "BulletChar" ) || (rProp.Name == "NumberingType" )) { - buf.append(rProp.Name); - buf.append('='); + buf.append(rProp.Name + "="); auto const pTemp = CMAccessible::get_StringFromAny(rProp.Value); - buf.append(pTemp); - buf.append(','); + buf.append(pTemp + ","); if (rProp.Name == "NumberingType" && !numberingPrefix.empty()) { - buf.append("NumberingPrefix="); - buf.append(numberingPrefix); + buf.append(OUString::Concat("NumberingPrefix=") + numberingPrefix); } } } |