summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-21 19:57:19 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-21 19:58:46 +0100
commit22da27d9ddcdacaef21d667b0777052b7e817b9a (patch)
treee72e427eb7b6934b796179ed3e49ca4a8c8734a6 /drawinglayer
parentcfc2f1919f8cf856c0c884dac7e4eb83bece4a7f (diff)
Improve checking for emptiness
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/sdrprimitive3d.cxx2
-rw-r--r--drawinglayer/source/processor2d/canvasprocessor.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclhelpergradient.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
7 files changed, 11 insertions, 11 deletions
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index b2f1bb5aab2e..25afcfe365ce 100644
--- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
@@ -128,7 +128,7 @@ namespace drawinglayer
Primitive2DSequence aRetval(rColors.size() ? rMatrices.size() + 1 : rMatrices.size());
// create solid fill with start color
- if(rColors.size())
+ if(!rColors.empty())
{
// create primitive
const Primitive2DReference xRef(
@@ -175,7 +175,7 @@ namespace drawinglayer
aRetval.realloc(nEntryCount);
- if(rColors.size())
+ if(!rColors.empty())
{
basegfx::B2DRange aOuterPolyRange(aOuterPoly.getB2DRange());
aOuterPolyRange.expand(getObjectRange());
@@ -193,7 +193,7 @@ namespace drawinglayer
aCombinedPolyPoly = basegfx::B2DPolyPolygon(aInnerPoly);
}
- if(rColors.size())
+ if(!rColors.empty())
{
aRetval[nIndex] = Primitive2DReference(new PolyPolygonColorPrimitive2D(
aCombinedPolyPoly, rColors[rColors.size() - 1]));
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index 0b6447c4101b..8b676cdef929 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -55,7 +55,7 @@ namespace drawinglayer
// get slices
const Slice3DVector& rSliceVector = getSlices();
- if(rSliceVector.size())
+ if(!rSliceVector.empty())
{
sal_uInt32 a;
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index cc9cb8bc43ea..1639308f4d9c 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -55,7 +55,7 @@ namespace drawinglayer
// get slices
const Slice3DVector& rSliceVector = getSlices();
- if(rSliceVector.size())
+ if(!rSliceVector.empty())
{
const bool bBackScale(!basegfx::fTools::equal(getBackScale(), 1.0));
const bool bClosedRotation(!bBackScale && getHorizontalSegments() && basegfx::fTools::equal(getRotation(), F_2PI));
diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
index b2a098cc8ad8..e4ee45f2a8cb 100644
--- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
@@ -64,7 +64,7 @@ namespace drawinglayer
{
basegfx::B3DRange aRetval;
- if(rSlices.size())
+ if(!rSlices.empty())
{
for(sal_uInt32 a(0L); a < rSlices.size(); a++)
{
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index e916b293da9f..6dcdd99cb813 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -539,7 +539,7 @@ namespace drawinglayer
aStrokeAttribute.MiterLimit = 15.0; // degrees; maybe here (15.0 * F_PI180) is needed, not clear in the documentation
const ::std::vector< double >& rDotDashArray = rStrokeAttribute.getDotDashArray();
- if(rDotDashArray.size())
+ if(!rDotDashArray.empty())
{
aStrokeAttribute.DashArray = uno::Sequence< double >(&rDotDashArray[0], rDotDashArray.size());
}
diff --git a/drawinglayer/source/processor2d/vclhelpergradient.cxx b/drawinglayer/source/processor2d/vclhelpergradient.cxx
index 7564f000acbd..da7995a79c45 100644
--- a/drawinglayer/source/processor2d/vclhelpergradient.cxx
+++ b/drawinglayer/source/processor2d/vclhelpergradient.cxx
@@ -140,7 +140,7 @@ namespace drawinglayer
}
// draw last poly in last color
- if(rColors.size())
+ if(!rColors.empty())
{
const basegfx::BColor aFillColor(rColors[rColors.size() - 1L]);
rOutDev.SetFillColor(Color(aFillColor));
@@ -179,7 +179,7 @@ namespace drawinglayer
}
// draw last poly in last color
- if(rColors.size())
+ if(!rColors.empty())
{
const basegfx::BColor aFillColor(rColors[rColors.size() - 1L]);
rOutDev.SetFillColor(Color(aFillColor));
@@ -265,7 +265,7 @@ namespace drawinglayer
}
// paint them with mask using the XOR method
- if(aMatrices.size())
+ if(!aMatrices.empty())
{
if(bSimple)
{
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index d27826bd388b..c554eb818cb2 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -277,7 +277,7 @@ namespace drawinglayer
nLen = nChars;
}
- if(aTransformedDXArray.size())
+ if(!aTransformedDXArray.empty())
{
mpOutputDevice->DrawTextArray(
aStartPoint,