Convert traditional for loops to range based for loops without changing the existing behaviour of the code. Change-Id: I118b12572ea1074e5a9aba329cc1acdd06d61666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202618 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins