summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 09:13:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-21 12:52:36 +0200
commit09c757cbdd3f973c97151203d8ff522141102da7 (patch)
treed1424cd2d3698965f847dc161c282ce1d00f9a94 /writerfilter
parent22a4b7e621cbb6cab1d82d57c370e3cf33b4e74e (diff)
use for-range on Sequence in testtools..xmloff
Change-Id: I05b02a2f8b4b9091c7de0f7e98409d5b608ed250 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/TagLogger.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx5
2 files changed, 5 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/TagLogger.cxx b/writerfilter/source/dmapper/TagLogger.cxx
index 94b65fbebece..6c655589d8cc 100644
--- a/writerfilter/source/dmapper/TagLogger.cxx
+++ b/writerfilter/source/dmapper/TagLogger.cxx
@@ -115,14 +115,14 @@ struct TheTagLogger:
void TagLogger::unoPropertySet(const uno::Reference<beans::XPropertySet>& rPropSet)
{
uno::Reference<beans::XPropertySetInfo> xPropSetInfo(rPropSet->getPropertySetInfo());
- uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties());
+ const uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties());
startElement( "unoPropertySet" );
- for (int i = 0; i < aProps.getLength(); ++i)
+ for (beans::Property const & prop : aProps)
{
startElement( "property" );
- OUString sName(aProps[i].Name);
+ OUString sName(prop.Name);
attribute( "name", sName );
try
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index d32e29fcd167..7c4209a9ea8e 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -970,10 +970,9 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
{
uno::Sequence<awt::Point>& rPolygon = aPolyPolySequence[0];
basegfx::B2DPolygon aPoly;
- for (sal_Int32 i = 0; i < rPolygon.getLength(); ++i)
+ for (const awt::Point& rPoint : std::as_const(rPolygon))
{
- const awt::Point& rPoint = rPolygon[i];
- aPoly.insert(i, basegfx::B2DPoint(rPoint.X, rPoint.Y));
+ aPoly.append(basegfx::B2DPoint(rPoint.X, rPoint.Y));
}
basegfx::B2DHomMatrix aTransformation;
aTransformation.scale(1.0, obRelFlipV ? -1.0 : 1.0);