[Libreoffice-commits] core.git: winaccessibility/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 13 10:07:27 UTC 2019


 winaccessibility/source/UAccCOM/AccEditableText.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit e57afb5fd09ed07252a8ff963f63dc08b2f1b582
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Mon Dec 31 15:46:01 2018 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 13 11:07:08 2019 +0100

    Simplify
    
    Change-Id: I02492fe6532baedffa21de6d2f98955a57cb856d
    Reviewed-on: https://gerrit.libreoffice.org/66228
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx
index 87addcaa5a8f..333c6c54ba2e 100644
--- a/winaccessibility/source/UAccCOM/AccEditableText.cxx
+++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx
@@ -228,14 +228,9 @@ STDMETHODIMP CAccEditableText::setAttributes(long startOffset, long endOffset, B
 
     OUString ouStr(o3tl::toU(*attributes));
 
-    sal_Int32 nIndex = 0;
     vector< OUString > vecAttr;
-    do
-    {
-        OUString ouToken = ouStr.getToken(0, ';', nIndex);
-        vecAttr.push_back(ouToken);
-    }
-    while(nIndex >= 0);
+    for (sal_Int32 nIndex {0}; nIndex >= 0; )
+        vecAttr.push_back(ouStr.getToken(0, ';', nIndex));
 
     Sequence< PropertyValue > beanSeq(vecAttr.size());
     for(std::vector<OUString>::size_type i = 0; i < vecAttr.size(); i ++)


More information about the Libreoffice-commits mailing list