[Libreoffice-commits] .: drawinglayer/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Sun Jul 31 08:52:58 PDT 2011
drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 6 +++---
drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx | 3 +--
drawinglayer/source/processor2d/canvasprocessor.cxx | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit b227820d14cffbf32be58c6efb9beddeb0791c6c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Jul 31 17:52:07 2011 +0200
Some cppcheck cleaning
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 71fc248..e779598 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -234,7 +234,7 @@ namespace
maPropertyHolders.push_back(new PropertyHolder());
}
- sal_uInt32 size()
+ sal_uInt32 size() const
{
return maPropertyHolders.size();
}
@@ -450,7 +450,7 @@ namespace
}
}
- sal_uInt32 size()
+ sal_uInt32 size() const
{
return aTargets.size();
}
@@ -515,7 +515,7 @@ namespace
maTargetHolders.push_back(new TargetHolder());
}
- sal_uInt32 size()
+ sal_uInt32 size() const
{
return maTargetHolders.size();
}
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index fd26f5e..c1f958f 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -67,7 +67,6 @@ namespace drawinglayer
const bool bCreateNormals(::com::sun::star::drawing::NormalsKind_SPECIFIC == eNormalsKind);
const bool bCreateTextureCoordiantesX(::com::sun::star::drawing::TextureProjectionMode_OBJECTSPECIFIC == getSdr3DObjectAttribute().getTextureProjectionX());
const bool bCreateTextureCoordiantesY(::com::sun::star::drawing::TextureProjectionMode_OBJECTSPECIFIC == getSdr3DObjectAttribute().getTextureProjectionY());
- double fRelativeTextureWidth(1.0);
basegfx::B2DHomMatrix aTexTransform;
if(!getSdrLFSAttribute().getFill().isDefault() && (bCreateTextureCoordiantesX || bCreateTextureCoordiantesY))
@@ -76,7 +75,7 @@ namespace drawinglayer
const double fFrontLength(basegfx::tools::getLength(aFirstPolygon));
const double fFrontArea(basegfx::tools::getArea(aFirstPolygon));
const double fSqrtFrontArea(sqrt(fFrontArea));
- fRelativeTextureWidth = basegfx::fTools::equalZero(fSqrtFrontArea) ? 1.0 : fFrontLength / fSqrtFrontArea;
+ double fRelativeTextureWidth = basegfx::fTools::equalZero(fSqrtFrontArea) ? 1.0 : fFrontLength / fSqrtFrontArea;
fRelativeTextureWidth = (double)((sal_uInt32)(fRelativeTextureWidth - 0.5));
if(fRelativeTextureWidth < 1.0)
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index e6311ab..3e59746 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -399,11 +399,11 @@ namespace drawinglayer
{
// adapt object's transformation to the correct scale
basegfx::B2DVector aScale, aTranslate;
- double fRotate, fShearX;
const Size aSizePixel(aModifiedBitmapEx.GetSizePixel());
if(0 != aSizePixel.Width() && 0 != aSizePixel.Height())
{
+ double fRotate, fShearX;
rBitmapCandidate.getTransform().decompose(aScale, aTranslate, fRotate, fShearX);
const basegfx::B2DHomMatrix aNewMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
aScale.getX() / aSizePixel.Width(), aScale.getY() / aSizePixel.Height(),
More information about the Libreoffice-commits
mailing list