[Libreoffice-commits] core.git: basegfx/source chart2/source sw/source

Julien Nabet serval2412 at yahoo.fr
Sun Jan 12 13:27:00 PST 2014


 basegfx/source/polygon/b2dtrapezoid.cxx |    3 +--
 chart2/source/tools/DiagramHelper.cxx   |    6 ++----
 sw/source/core/access/acccell.cxx       |    3 +--
 3 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit a14b4d2dfdadf25ed1fa1b75f959e8817036a86e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jan 12 22:26:20 2014 +0100

    cppcheck: fix some redundantAssignment
    
    Change-Id: I9ea73bada743b195d778b17038137e9089d03404

diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index dc36587..6c98959 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -406,10 +406,9 @@ namespace basegfx
                     B2DPoint* pNewPoint = bAIsLonger
                         ? maNewPoints.allocatePoint(aEdgeA.getStart() + (fCutA * aDeltaA))
                         : maNewPoints.allocatePoint(aEdgeB.getStart() + (fCutB * aDeltaB));
-                    bool bRetval = false;
 
                     // try to split both edges
-                    bRetval = splitEdgeAtGivenPoint(aEdgeA, *pNewPoint, aCurrent);
+                    bool bRetval = splitEdgeAtGivenPoint(aEdgeA, *pNewPoint, aCurrent);
                     bRetval |= splitEdgeAtGivenPoint(aEdgeB, *pNewPoint, aCurrent);
 
                     if(!bRetval)
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 6685fe5..e434ad8 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1437,10 +1437,9 @@ bool DiagramHelper::isSeriesMoveable(
     const Reference< XDataSeries >& xGivenDataSeries,
     bool bForward )
 {
-    bool bIsMoveable = false;
     const bool bDoMove = false;
 
-    bIsMoveable = lcl_moveSeriesOrCheckIfMoveIsAllowed(
+    bool bIsMoveable = lcl_moveSeriesOrCheckIfMoveIsAllowed(
         xDiagram, xGivenDataSeries, bForward, bDoMove );
 
     return bIsMoveable;
@@ -1448,10 +1447,9 @@ bool DiagramHelper::isSeriesMoveable(
 
 bool DiagramHelper::moveSeries( const Reference< XDiagram >& xDiagram, const Reference< XDataSeries >& xGivenDataSeries, bool bForward )
 {
-    bool bMoved = false;
     const bool bDoMove = true;
 
-    bMoved = lcl_moveSeriesOrCheckIfMoveIsAllowed(
+    bool bMoved = lcl_moveSeriesOrCheckIfMoveIsAllowed(
         xDiagram, xGivenDataSeries, bForward, bDoMove );
 
     return bMoved;
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 84c3347..4cdf3ab 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -398,8 +398,7 @@ uno::Any SwAccessibleCell::getMinimumValue(  )
 
 static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString replaceStr)
 {
-    int iReplace = -1;
-    iReplace = oldOUString.lastIndexOf(replacedChar);
+    int iReplace = oldOUString.lastIndexOf(replacedChar);
     if (iReplace > -1)
     {
         for(;iReplace>-1;)


More information about the Libreoffice-commits mailing list