This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 99f15c57f4 Cleanup
99f15c57f4 is described below

commit 99f15c57f44ecfe18ac95196ce2a1674a8b90579
Author: mseidel <[email protected]>
AuthorDate: Fri Apr 25 22:06:16 2025 +0200

    Cleanup
    
    (cherry picked from commit 45d1b581a3afed2711c07fe77472516d35fbd7b3)
---
 main/basegfx/source/matrix/b2dhommatrix.cxx      |  75 ++++----
 main/basegfx/source/matrix/b2dhommatrixtools.cxx | 215 +++++++++++------------
 main/basegfx/source/matrix/b3dhommatrix.cxx      | 150 ++++++++--------
 main/basegfx/source/numeric/ftools.cxx           |   4 +-
 main/basegfx/source/pixel/bpixel.cxx             |  24 +--
 5 files changed, 224 insertions(+), 244 deletions(-)

diff --git a/main/basegfx/source/matrix/b2dhommatrix.cxx 
b/main/basegfx/source/matrix/b2dhommatrix.cxx
index 8ac7b7c9fb..cfa46522fb 100644
--- a/main/basegfx/source/matrix/b2dhommatrix.cxx
+++ b/main/basegfx/source/matrix/b2dhommatrix.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basegfx.hxx"
 #include <osl/diagnose.h>
@@ -31,24 +29,22 @@
 #include <basegfx/vector/b2dvector.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 
-///////////////////////////////////////////////////////////////////////////////
-
 namespace basegfx
 {
-    class Impl2DHomMatrix : public ::basegfx::internal::ImplHomMatrixTemplate< 
3 >
-    {
-    };
-    
-    namespace { struct IdentityMatrix : public rtl::Static< 
B2DHomMatrix::ImplType, 
-                                                            IdentityMatrix > 
{}; }
+       class Impl2DHomMatrix : public 
::basegfx::internal::ImplHomMatrixTemplate< 3 >
+       {
+       };
+
+       namespace { struct IdentityMatrix : public rtl::Static< 
B2DHomMatrix::ImplType,
+                                                                               
                                        IdentityMatrix > {}; }
 
        B2DHomMatrix::B2DHomMatrix() :
-        mpImpl( IdentityMatrix::get() ) // use common identity matrix
+               mpImpl( IdentityMatrix::get() ) // use common identity matrix
        {
        }
 
        B2DHomMatrix::B2DHomMatrix(const B2DHomMatrix& rMat) :
-        mpImpl(rMat.mpImpl)
+               mpImpl(rMat.mpImpl)
        {
        }
 
@@ -69,14 +65,14 @@ namespace basegfx
 
        B2DHomMatrix& B2DHomMatrix::operator=(const B2DHomMatrix& rMat)
        {
-        mpImpl = rMat.mpImpl;
+               mpImpl = rMat.mpImpl;
                return *this;
        }
 
-    void B2DHomMatrix::makeUnique()
-    {
-        mpImpl.make_unique();
-    }
+       void B2DHomMatrix::makeUnique()
+       {
+               mpImpl.make_unique();
+       }
 
        double B2DHomMatrix::get(sal_uInt16 nRow, sal_uInt16 nColumn) const
        {
@@ -113,7 +109,7 @@ namespace basegfx
 
        void B2DHomMatrix::identity()
        {
-        mpImpl = IdentityMatrix::get();
+               mpImpl = IdentityMatrix::get();
        }
 
        bool B2DHomMatrix::isInvertible() const
@@ -215,7 +211,7 @@ namespace basegfx
 
        bool B2DHomMatrix::operator!=(const B2DHomMatrix& rMat) const
        {
-        return !(*this == rMat);
+               return !(*this == rMat);
        }
 
        void B2DHomMatrix::rotate(double fRadiant)
@@ -227,7 +223,7 @@ namespace basegfx
 
                        tools::createSinCosOrthogonal(fSin, fCos, fRadiant);
                        Impl2DHomMatrix aRotMat;
-                       
+
                        aRotMat.set(0, 0, fCos);
                        aRotMat.set(1, 1, fCos);
                        aRotMat.set(1, 0, fSin);
@@ -242,7 +238,7 @@ namespace basegfx
                if(!fTools::equalZero(fX) || !fTools::equalZero(fY))
                {
                        Impl2DHomMatrix aTransMat;
-                       
+
                        aTransMat.set(0, 2, fX);
                        aTransMat.set(1, 2, fY);
 
@@ -257,7 +253,7 @@ namespace basegfx
                if(!fTools::equal(fOne, fX) || !fTools::equal(fOne, fY))
                {
                        Impl2DHomMatrix aScaleMat;
-                       
+
                        aScaleMat.set(0, 0, fX);
                        aScaleMat.set(1, 1, fY);
 
@@ -267,11 +263,11 @@ namespace basegfx
 
        void B2DHomMatrix::shearX(double fSx)
        {
-               // #i76239# do not test againt 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
+               // #i76239# do not test against 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
                if(!fTools::equalZero(fSx))
                {
                        Impl2DHomMatrix aShearXMat;
-                       
+
                        aShearXMat.set(0, 1, fSx);
 
                        mpImpl->doMulMatrix(aShearXMat);
@@ -280,11 +276,11 @@ namespace basegfx
 
        void B2DHomMatrix::shearY(double fSy)
        {
-               // #i76239# do not test againt 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
+               // #i76239# do not test against 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
                if(!fTools::equalZero(fSy))
                {
                        Impl2DHomMatrix aShearYMat;
-                       
+
                        aShearYMat.set(1, 0, fSy);
 
                        mpImpl->doMulMatrix(aShearYMat);
@@ -293,10 +289,10 @@ namespace basegfx
 
        /** Decomposition
 
-          New, optimized version with local shearX detection. Old version 
(keeping
-          below, is working well, too) used the 3D matrix decomposition when
-          shear was used. Keeping old version as comment below since it may get
-          necessary to add the determinant() test from there here, too.
+               New, optimized version with local shearX detection. Old version 
(keeping
+               below, is working well, too) used the 3D matrix decomposition 
when
+               shear was used. Keeping old version as comment below since it 
may get
+               necessary to add the determinant() test from there here, too.
        */
        bool B2DHomMatrix::decompose(B2DTuple& rScale, B2DTuple& rTranslate, 
double& rRotate, double& rShearX) const
        {
@@ -352,8 +348,8 @@ namespace basegfx
                                                // and correct rotation, it's 
the Y-Axis rotation minus 90 degrees
                                                rRotate = 
atan2(aUnitVecY.getY(), aUnitVecY.getX()) - M_PI_2;
                                        }
-                                       
-                                       // one or both unit vectors do not 
extist, determinant is zero, no decomposition possible.
+
+                                       // one or both unit vectors do not 
exist, determinant is zero, no decomposition possible.
                                        // Eventually used rotations or shears 
are lost
                                        return false;
                                }
@@ -407,7 +403,7 @@ namespace basegfx
 
                                        if(!fTools::equalZero(rRotate))
                                        {
-                                               // To be able to correct the 
shear for aUnitVecY, rotation needs to be 
+                                               // To be able to correct the 
shear for aUnitVecY, rotation needs to be
                                                // removed first. Correction of 
aUnitVecX is easy, it will be rotated back to (1, 0).
                                                aUnitVecX.setX(rScale.getX());
                                                aUnitVecX.setY(0.0);
@@ -416,7 +412,7 @@ namespace basegfx
                                                const double 
fNegRotate(-rRotate);
                                                const double 
fSin(sin(fNegRotate));
                                                const double 
fCos(cos(fNegRotate));
-                                               
+
                                                const double 
fNewX(aUnitVecY.getX() * fCos - aUnitVecY.getY() * fSin);
                                                const double 
fNewY(aUnitVecY.getX() * fSin + aUnitVecY.getY() * fCos);
 
@@ -446,5 +442,4 @@ namespace basegfx
        }
 } // end of namespace basegfx
 
-///////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/basegfx/source/matrix/b2dhommatrixtools.cxx 
b/main/basegfx/source/matrix/b2dhommatrixtools.cxx
index 185e3533fc..651fc75449 100644
--- a/main/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/main/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basegfx.hxx"
 
@@ -28,35 +26,33 @@
 #include <rtl/ustring.hxx>
 #include <rtl/ustrbuf.hxx>
 
-///////////////////////////////////////////////////////////////////////////////
-
 namespace basegfx
 {
-    ::rtl::OUString exportToSvg( const B2DHomMatrix& rMatrix )
-    {
-        rtl::OUStringBuffer aStrBuf;
-        aStrBuf.appendAscii("matrix(");
+       ::rtl::OUString exportToSvg( const B2DHomMatrix& rMatrix )
+       {
+               rtl::OUStringBuffer aStrBuf;
+               aStrBuf.appendAscii("matrix(");
 
-        aStrBuf.append(rMatrix.get(0,0));
-        aStrBuf.appendAscii(", ");
+               aStrBuf.append(rMatrix.get(0,0));
+               aStrBuf.appendAscii(", ");
 
-        aStrBuf.append(rMatrix.get(1,0));
-        aStrBuf.appendAscii(", ");
+               aStrBuf.append(rMatrix.get(1,0));
+               aStrBuf.appendAscii(", ");
 
-        aStrBuf.append(rMatrix.get(0,1));
-        aStrBuf.appendAscii(", ");
+               aStrBuf.append(rMatrix.get(0,1));
+               aStrBuf.appendAscii(", ");
 
-        aStrBuf.append(rMatrix.get(1,1));
-        aStrBuf.appendAscii(", ");
+               aStrBuf.append(rMatrix.get(1,1));
+               aStrBuf.appendAscii(", ");
 
-        aStrBuf.append(rMatrix.get(0,2));
-        aStrBuf.appendAscii(", ");
+               aStrBuf.append(rMatrix.get(0,2));
+               aStrBuf.appendAscii(", ");
 
-        aStrBuf.append(rMatrix.get(1,2));
-        aStrBuf.appendAscii(")");
+               aStrBuf.append(rMatrix.get(1,2));
+               aStrBuf.appendAscii(")");
 
-        return aStrBuf.makeStringAndClear();
-    }
+               return aStrBuf.makeStringAndClear();
+       }
 
        namespace tools
        {
@@ -65,7 +61,7 @@ namespace basegfx
                        if( fTools::equalZero( fmod( fRadiant, F_PI2 ) ) )
                        {
                                // determine quadrant
-                               const sal_Int32 nQuad( 
+                               const sal_Int32 nQuad(
                                        (4 + fround( 4/F_2PI*fmod( fRadiant, 
F_2PI ) )) % 4 );
                                switch( nQuad )
                                {
@@ -186,23 +182,23 @@ namespace basegfx
 
                        if(fTools::equal(fScaleX, fOne) && 
fTools::equal(fScaleY, fOne))
                        {
-                               /// no scale, take shortcut
+                               // no scale, take shortcut
                                return 
createShearXRotateTranslateB2DHomMatrix(fShearX, fRadiant, fTranslateX, 
fTranslateY);
                        }
                        else
                        {
-                               /// scale used
+                               // scale used
                                if(fTools::equalZero(fShearX))
                                {
-                                       /// no shear
+                                       // no shear
                                        if(fTools::equalZero(fRadiant))
                                        {
-                                               /// no rotate, take shortcut
+                                               // no rotate, take shortcut
                                                return 
createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, fTranslateX, fTranslateY);
                                        }
                                        else
                                        {
-                                               /// rotate and scale used, no 
shear
+                                               // rotate and scale used, no 
shear
                                                double fSin(0.0);
                                                double fCos(1.0);
 
@@ -215,16 +211,16 @@ namespace basegfx
                                                        /* Row 1, Column 0 */ 
fSin * fScaleX,
                                                        /* Row 1, Column 1 */ 
fScaleY * fCos,
                                                        /* Row 1, Column 2 */ 
fTranslateY);
-                                               
+
                                                return aRetval;
                                        }
                                }
                                else
                                {
-                                       /// scale and shear used
+                                       // scale and shear used
                                        if(fTools::equalZero(fRadiant))
                                        {
-                                               /// scale and shear, but no 
rotate
+                                               // scale and shear, but no 
rotate
                                                B2DHomMatrix aRetval(
                                                        /* Row 0, Column 0 */ 
fScaleX,
                                                        /* Row 0, Column 1 */ 
fScaleY * fShearX,
@@ -237,7 +233,7 @@ namespace basegfx
                                        }
                                        else
                                        {
-                                               /// scale, shear and rotate used
+                                               // scale, shear and rotate used
                                                double fSin(0.0);
                                                double fCos(1.0);
 
@@ -250,13 +246,13 @@ namespace basegfx
                                                        /* Row 1, Column 0 */ 
fSin * fScaleX,
                                                        /* Row 1, Column 1 */ 
fScaleY * ((fSin * fShearX) + fCos),
                                                        /* Row 1, Column 2 */ 
fTranslateY);
-                                               
+
                                                return aRetval;
                                        }
                                }
                        }
                }
-               
+
                B2DHomMatrix createShearXRotateTranslateB2DHomMatrix(
                        double fShearX,
                        double fRadiant,
@@ -264,15 +260,15 @@ namespace basegfx
                {
                        if(fTools::equalZero(fShearX))
                        {
-                               /// no shear
+                               // no shear
                                if(fTools::equalZero(fRadiant))
                                {
-                                       /// no shear, no rotate, take shortcut
+                                       // no shear, no rotate, take shortcut
                                        return 
createTranslateB2DHomMatrix(fTranslateX, fTranslateY);
                                }
                                else
                                {
-                                       /// no shear, but rotate used
+                                       // no shear, but rotate used
                                        double fSin(0.0);
                                        double fCos(1.0);
 
@@ -285,16 +281,16 @@ namespace basegfx
                                                /* Row 1, Column 0 */ fSin,
                                                /* Row 1, Column 1 */ fCos,
                                                /* Row 1, Column 2 */ 
fTranslateY);
-                                       
+
                                        return aRetval;
                                }
                        }
                        else
                        {
-                               /// shear used
+                               // shear used
                                if(fTools::equalZero(fRadiant))
                                {
-                                       /// no rotate, but shear used
+                                       // no rotate, but shear used
                                        B2DHomMatrix aRetval(
                                                /* Row 0, Column 0 */ 1.0,
                                                /* Row 0, Column 1 */ fShearX,
@@ -302,12 +298,12 @@ namespace basegfx
                                                /* Row 1, Column 0 */ 0.0,
                                                /* Row 1, Column 1 */ 1.0,
                                                /* Row 1, Column 2 */ 
fTranslateY);
-                                       
+
                                        return aRetval;
                                }
                                else
                                {
-                                       /// shear and rotate used
+                                       // shear and rotate used
                                        double fSin(0.0);
                                        double fCos(1.0);
 
@@ -320,12 +316,12 @@ namespace basegfx
                                                /* Row 1, Column 0 */ fSin,
                                                /* Row 1, Column 1 */ (fSin * 
fShearX) + fCos,
                                                /* Row 1, Column 2 */ 
fTranslateY);
-                                       
+
                                        return aRetval;
                                }
                        }
                }
-               
+
                B2DHomMatrix createScaleTranslateB2DHomMatrix(
                        double fScaleX, double fScaleY,
                        double fTranslateX, double fTranslateY)
@@ -334,17 +330,17 @@ namespace basegfx
 
                        if(fTools::equal(fScaleX, fOne) && 
fTools::equal(fScaleY, fOne))
                        {
-                               /// no scale, take shortcut
+                               // no scale, take shortcut
                                return createTranslateB2DHomMatrix(fTranslateX, 
fTranslateY);
                        }
                        else
                        {
-                               /// scale used
+                               // scale used
                                if(fTools::equalZero(fTranslateX) && 
fTools::equalZero(fTranslateY))
                                {
-                                       /// no translate, but scale.
+                                       // no translate, but scale.
                                        B2DHomMatrix aRetval;
-                                       
+
                                        aRetval.set(0, 0, fScaleX);
                                        aRetval.set(1, 1, fScaleY);
 
@@ -352,7 +348,7 @@ namespace basegfx
                                }
                                else
                                {
-                                       /// translate and scale
+                                       // translate and scale
                                        B2DHomMatrix aRetval(
                                                /* Row 0, Column 0 */ fScaleX,
                                                /* Row 0, Column 1 */ 0.0,
@@ -360,79 +356,78 @@ namespace basegfx
                                                /* Row 1, Column 0 */ 0.0,
                                                /* Row 1, Column 1 */ fScaleY,
                                                /* Row 1, Column 2 */ 
fTranslateY);
-                                       
+
                                        return aRetval;
                                }
                        }
                }
 
-        B2DHomMatrix createRotateAroundPoint(
-            double fPointX, double fPointY,
-            double fRadiant)
-        {
+               B2DHomMatrix createRotateAroundPoint(
+                       double fPointX, double fPointY,
+                       double fRadiant)
+               {
                        B2DHomMatrix aRetval;
-            
+
                        if(!fTools::equalZero(fRadiant))
                        {
-                double fSin(0.0);
+                               double fSin(0.0);
                                double fCos(1.0);
 
                                createSinCosOrthogonal(fSin, fCos, fRadiant);
-                
-                aRetval.set3x2(
+
+                               aRetval.set3x2(
                                        /* Row 0, Column 0 */ fCos,
                                        /* Row 0, Column 1 */ -fSin,
                                        /* Row 0, Column 2 */ (fPointX * (1.0 - 
fCos)) + (fSin * fPointY),
                                        /* Row 1, Column 0 */ fSin,
                                        /* Row 1, Column 1 */ fCos,
                                        /* Row 1, Column 2 */ (fPointY * (1.0 - 
fCos)) - (fSin * fPointX));
-            }
-
-            return aRetval;
-        }
-
-        /// special for the case to map from source range to target range
-        B2DHomMatrix createSourceRangeTargetRangeTransform(
-            const B2DRange& rSourceRange,
-            const B2DRange& rTargetRange)
-        {
-            B2DHomMatrix aRetval;
-
-            if(&rSourceRange == &rTargetRange)
-            {
-                return aRetval;
-            }
-
-            if(!fTools::equalZero(rSourceRange.getMinX()) || 
!fTools::equalZero(rSourceRange.getMinY()))
-            {
-                aRetval.set(0, 2, -rSourceRange.getMinX());
-                aRetval.set(1, 2, -rSourceRange.getMinY());
-            }
-
-            const double fSourceW(rSourceRange.getWidth());
-            const double fSourceH(rSourceRange.getHeight());
-            const bool bDivX(!fTools::equalZero(fSourceW) && 
!fTools::equal(fSourceW, 1.0));
-            const bool bDivY(!fTools::equalZero(fSourceH) && 
!fTools::equal(fSourceH, 1.0));
-            const double fScaleX(bDivX ? rTargetRange.getWidth() / fSourceW : 
rTargetRange.getWidth());
-            const double fScaleY(bDivY ? rTargetRange.getHeight() / fSourceH : 
rTargetRange.getHeight());
-
-            if(!fTools::equalZero(fScaleX) || !fTools::equalZero(fScaleY))
-            {
-                aRetval.scale(fScaleX, fScaleY);
-            }
-
-            if(!fTools::equalZero(rTargetRange.getMinX()) || 
!fTools::equalZero(rTargetRange.getMinY()))
-            {
-                aRetval.translate(
-                    rTargetRange.getMinX(), 
-                    rTargetRange.getMinY());
-            }
-
-            return aRetval;
-        }
-
-    } // end of namespace tools
+                       }
+
+                       return aRetval;
+               }
+
+               // special for the case to map from source range to target range
+               B2DHomMatrix createSourceRangeTargetRangeTransform(
+                       const B2DRange& rSourceRange,
+                       const B2DRange& rTargetRange)
+               {
+                       B2DHomMatrix aRetval;
+
+                       if(&rSourceRange == &rTargetRange)
+                       {
+                               return aRetval;
+                       }
+
+                       if(!fTools::equalZero(rSourceRange.getMinX()) || 
!fTools::equalZero(rSourceRange.getMinY()))
+                       {
+                               aRetval.set(0, 2, -rSourceRange.getMinX());
+                               aRetval.set(1, 2, -rSourceRange.getMinY());
+                       }
+
+                       const double fSourceW(rSourceRange.getWidth());
+                       const double fSourceH(rSourceRange.getHeight());
+                       const bool bDivX(!fTools::equalZero(fSourceW) && 
!fTools::equal(fSourceW, 1.0));
+                       const bool bDivY(!fTools::equalZero(fSourceH) && 
!fTools::equal(fSourceH, 1.0));
+                       const double fScaleX(bDivX ? rTargetRange.getWidth() / 
fSourceW : rTargetRange.getWidth());
+                       const double fScaleY(bDivY ? rTargetRange.getHeight() / 
fSourceH : rTargetRange.getHeight());
+
+                       if(!fTools::equalZero(fScaleX) || 
!fTools::equalZero(fScaleY))
+                       {
+                               aRetval.scale(fScaleX, fScaleY);
+                       }
+
+                       if(!fTools::equalZero(rTargetRange.getMinX()) || 
!fTools::equalZero(rTargetRange.getMinY()))
+                       {
+                               aRetval.translate(
+                                       rTargetRange.getMinX(),
+                                       rTargetRange.getMinY());
+                       }
+
+                       return aRetval;
+               }
+
+       } // end of namespace tools
 } // end of namespace basegfx
 
-///////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/basegfx/source/matrix/b3dhommatrix.cxx 
b/main/basegfx/source/matrix/b3dhommatrix.cxx
index d01806260c..c378424023 100644
--- a/main/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/main/basegfx/source/matrix/b3dhommatrix.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basegfx.hxx"
 
@@ -31,20 +29,20 @@
 
 namespace basegfx
 {
-    class Impl3DHomMatrix : public ::basegfx::internal::ImplHomMatrixTemplate< 
4 >
-    {
-    };
-    
-    namespace { struct IdentityMatrix : public rtl::Static< 
B3DHomMatrix::ImplType, 
-                                                            IdentityMatrix > 
{}; }
+       class Impl3DHomMatrix : public 
::basegfx::internal::ImplHomMatrixTemplate< 4 >
+       {
+       };
+
+       namespace { struct IdentityMatrix : public rtl::Static< 
B3DHomMatrix::ImplType,
+                                                                               
                                        IdentityMatrix > {}; }
 
        B3DHomMatrix::B3DHomMatrix() :
-        mpImpl( IdentityMatrix::get() ) // use common identity matrix
+               mpImpl( IdentityMatrix::get() ) // use common identity matrix
        {
        }
 
        B3DHomMatrix::B3DHomMatrix(const B3DHomMatrix& rMat) :
-        mpImpl(rMat.mpImpl)
+               mpImpl(rMat.mpImpl)
        {
        }
 
@@ -54,14 +52,14 @@ namespace basegfx
 
        B3DHomMatrix& B3DHomMatrix::operator=(const B3DHomMatrix& rMat)
        {
-        mpImpl = rMat.mpImpl;
+               mpImpl = rMat.mpImpl;
                return *this;
        }
 
-    void B3DHomMatrix::makeUnique()
-    {
-        mpImpl.make_unique();
-    }
+       void B3DHomMatrix::makeUnique()
+       {
+               mpImpl.make_unique();
+       }
 
        double B3DHomMatrix::get(sal_uInt16 nRow, sal_uInt16 nColumn) const
        {
@@ -88,7 +86,7 @@ namespace basegfx
 
        void B3DHomMatrix::identity()
        {
-        mpImpl = IdentityMatrix::get();
+               mpImpl = IdentityMatrix::get();
        }
 
        bool B3DHomMatrix::isInvertible() const
@@ -190,7 +188,7 @@ namespace basegfx
 
        bool B3DHomMatrix::operator!=(const B3DHomMatrix& rMat) const
        {
-        return !(*this == rMat);
+               return !(*this == rMat);
        }
 
        void B3DHomMatrix::rotate(double fAngleX,double fAngleY,double fAngleZ)
@@ -224,7 +222,7 @@ namespace basegfx
 
                                mpImpl->doMulMatrix(aRotMatY);
                        }
-                       
+
                        if(!fTools::equalZero(fAngleZ))
                        {
                                Impl3DHomMatrix aRotMatZ;
@@ -246,7 +244,7 @@ namespace basegfx
                if(!fTools::equalZero(fX) || !fTools::equalZero(fY) || 
!fTools::equalZero(fZ))
                {
                        Impl3DHomMatrix aTransMat;
-                       
+
                        aTransMat.set(0, 3, fX);
                        aTransMat.set(1, 3, fY);
                        aTransMat.set(2, 3, fZ);
@@ -262,7 +260,7 @@ namespace basegfx
                if(!fTools::equal(fOne, fX) || !fTools::equal(fOne, fY) 
||!fTools::equal(fOne, fZ))
                {
                        Impl3DHomMatrix aScaleMat;
-                       
+
                        aScaleMat.set(0, 0, fX);
                        aScaleMat.set(1, 1, fY);
                        aScaleMat.set(2, 2, fZ);
@@ -273,11 +271,11 @@ namespace basegfx
 
        void B3DHomMatrix::shearXY(double fSx, double fSy)
        {
-               // #i76239# do not test againt 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
+               // #i76239# do not test against 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
                if(!fTools::equalZero(fSx) || !fTools::equalZero(fSy))
                {
                        Impl3DHomMatrix aShearXYMat;
-                       
+
                        aShearXYMat.set(0, 2, fSx);
                        aShearXYMat.set(1, 2, fSy);
 
@@ -287,11 +285,11 @@ namespace basegfx
 
        void B3DHomMatrix::shearYZ(double fSy, double fSz)
        {
-               // #i76239# do not test againt 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
+               // #i76239# do not test against 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
                if(!fTools::equalZero(fSy) || !fTools::equalZero(fSz))
                {
                        Impl3DHomMatrix aShearYZMat;
-                       
+
                        aShearYZMat.set(1, 0, fSy);
                        aShearYZMat.set(2, 0, fSz);
 
@@ -301,11 +299,11 @@ namespace basegfx
 
        void B3DHomMatrix::shearXZ(double fSx, double fSz)
        {
-               // #i76239# do not test againt 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
+               // #i76239# do not test against 1.0, but against 0.0. We are 
talking about a value not on the diagonal (!)
                if(!fTools::equalZero(fSx) || !fTools::equalZero(fSz))
                {
                        Impl3DHomMatrix aShearXZMat;
-                       
+
                        aShearXZMat.set(0, 1, fSx);
                        aShearXZMat.set(2, 1, fSz);
 
@@ -346,7 +344,7 @@ namespace basegfx
                }
 
                Impl3DHomMatrix aFrustumMat;
-               
+
                aFrustumMat.set(0, 0, 2.0 * fNear / (fRight - fLeft));
                aFrustumMat.set(1, 1, 2.0 * fNear / (fTop - fBottom));
                aFrustumMat.set(0, 2, (fRight + fLeft) / (fRight - fLeft));
@@ -358,7 +356,7 @@ namespace basegfx
 
                mpImpl->doMulMatrix(aFrustumMat);
        }
-       
+
        void B3DHomMatrix::ortho(double fLeft, double fRight, double fBottom, 
double fTop, double fNear, double fFar)
        {
                if(fTools::equal(fNear, fFar))
@@ -379,14 +377,14 @@ namespace basegfx
                }
 
                Impl3DHomMatrix aOrthoMat;
-               
+
                aOrthoMat.set(0, 0, 2.0 / (fRight - fLeft));
                aOrthoMat.set(1, 1, 2.0 / (fTop - fBottom));
                aOrthoMat.set(2, 2, -1.0 * (2.0 / (fFar - fNear)));
                aOrthoMat.set(0, 3, -1.0 * ((fRight + fLeft) / (fRight - 
fLeft)));
                aOrthoMat.set(1, 3, -1.0 * ((fTop + fBottom) / (fTop - 
fBottom)));
                aOrthoMat.set(2, 3, -1.0 * ((fFar + fNear) / (fFar - fNear)));
-               
+
                mpImpl->doMulMatrix(aOrthoMat);
        }
 
@@ -497,7 +495,7 @@ namespace basegfx
 
                // get ShearYZ
                rShear.setZ(aCol1.scalar(aCol2));
-               
+
                if(fTools::equalZero(rShear.getZ()))
                {
                        rShear.setZ(0.0);
@@ -544,49 +542,49 @@ namespace basegfx
                rScale.correctValues(1.0);
 
                // Get rotations
-        {
-            double fy=0;
-            double cy=0;
-            
-            if( ::basegfx::fTools::equal( aCol0.getZ(), 1.0 )
-                || aCol0.getZ() > 1.0 )
-            {
-                fy = -F_PI/2.0;
-                cy = 0.0;
-            }
-            else if( ::basegfx::fTools::equal( aCol0.getZ(), -1.0 )
-                || aCol0.getZ() < -1.0 )
-            {
-                fy = F_PI/2.0;
-                cy = 0.0;
-            }
-            else
-            {
-                fy = asin( -aCol0.getZ() );
-                cy = cos(fy);
-            }
-
-            rRotate.setY(fy);
-            if( ::basegfx::fTools::equalZero( cy ) )
-            {
-                if( aCol0.getZ() > 0.0 )
-                    rRotate.setX(atan2(-1.0*aCol1.getX(), aCol1.getY()));
-                else
-                    rRotate.setX(atan2(aCol1.getX(), aCol1.getY()));
-                rRotate.setZ(0.0);
-            }
-            else
-            {
-                rRotate.setX(atan2(aCol1.getZ(), aCol2.getZ()));
-                rRotate.setZ(atan2(aCol0.getY(), aCol0.getX()));
-            }
-
-            // corrcet rotate values
-            rRotate.correctValues();
-        }
+               {
+                       double fy=0;
+                       double cy=0;
+
+                       if( ::basegfx::fTools::equal( aCol0.getZ(), 1.0 )
+                               || aCol0.getZ() > 1.0 )
+                       {
+                               fy = -F_PI/2.0;
+                               cy = 0.0;
+                       }
+                       else if( ::basegfx::fTools::equal( aCol0.getZ(), -1.0 )
+                               || aCol0.getZ() < -1.0 )
+                       {
+                               fy = F_PI/2.0;
+                               cy = 0.0;
+                       }
+                       else
+                       {
+                               fy = asin( -aCol0.getZ() );
+                               cy = cos(fy);
+                       }
+
+                       rRotate.setY(fy);
+                       if( ::basegfx::fTools::equalZero( cy ) )
+                       {
+                               if( aCol0.getZ() > 0.0 )
+                                       rRotate.setX(atan2(-1.0*aCol1.getX(), 
aCol1.getY()));
+                               else
+                                       rRotate.setX(atan2(aCol1.getX(), 
aCol1.getY()));
+                               rRotate.setZ(0.0);
+                       }
+                       else
+                       {
+                               rRotate.setX(atan2(aCol1.getZ(), aCol2.getZ()));
+                               rRotate.setZ(atan2(aCol0.getY(), aCol0.getX()));
+                       }
+
+                       // correct rotate values
+                       rRotate.correctValues();
+               }
 
                return true;
        }
 } // end of namespace basegfx
 
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/basegfx/source/numeric/ftools.cxx 
b/main/basegfx/source/numeric/ftools.cxx
index 31eb4577c7..17fafd5417 100644
--- a/main/basegfx/source/numeric/ftools.cxx
+++ b/main/basegfx/source/numeric/ftools.cxx
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basegfx.hxx"
 #include <basegfx/numeric/ftools.hxx>
@@ -108,4 +106,4 @@ namespace basegfx
        }
 } // end of namespace basegfx
 
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/basegfx/source/pixel/bpixel.cxx 
b/main/basegfx/source/pixel/bpixel.cxx
index b5d93c5a34..6c068eaf57 100644
--- a/main/basegfx/source/pixel/bpixel.cxx
+++ b/main/basegfx/source/pixel/bpixel.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basegfx.hxx"
 
@@ -29,19 +27,15 @@
 
 namespace { struct EmptyBPixel : public rtl::Static<basegfx::BPixel, 
EmptyBPixel> {}; }
 
-//////////////////////////////////////////////////////////////////////////////
-
 namespace basegfx
 {
-    const BPixel& BPixel::getEmptyBPixel()
-    {
-        return EmptyBPixel::get();
-    }
+       const BPixel& BPixel::getEmptyBPixel()
+       {
+               return EmptyBPixel::get();
+       }
 
-       
//////////////////////////////////////////////////////////////////////////
        // external operators
 
 } // end of namespace basegfx
 
-//////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */

Reply via email to