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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 14 14:12:38 UTC 2020


 basegfx/source/color/bcolortools.cxx              |    4 ++--
 basegfx/source/matrix/b2dhommatrixtools.cxx       |    7 ++-----
 basegfx/source/matrix/b3dhommatrixtools.cxx       |    5 +----
 basegfx/source/polygon/b2dlinegeometry.cxx        |    7 ++-----
 basegfx/source/polygon/b2dpolygonclipper.cxx      |    7 ++-----
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx  |    7 ++-----
 basegfx/source/polygon/b2dpolygontools.cxx        |    7 ++-----
 basegfx/source/polygon/b2dpolygontriangulator.cxx |    7 ++-----
 basegfx/source/polygon/b2dpolypolygoncutter.cxx   |    7 ++-----
 basegfx/source/polygon/b2dpolypolygontools.cxx    |    7 ++-----
 basegfx/source/polygon/b2dsvgpolypolygon.cxx      |    5 +----
 basegfx/source/polygon/b2dtrapezoid.cxx           |   21 ++++++---------------
 basegfx/source/polygon/b3dpolygontools.cxx        |    7 ++-----
 basegfx/source/polygon/b3dpolypolygontools.cxx    |    7 ++-----
 basegfx/source/tools/b2dclipstate.cxx             |    5 +----
 basegfx/source/tools/canvastools.cxx              |    9 ++-------
 basegfx/source/tools/keystoplerp.cxx              |    5 +----
 basegfx/source/tools/numbertools.cxx              |    4 ++--
 basegfx/source/tools/stringconversiontools.cxx    |    7 ++-----
 basegfx/source/tools/tools.cxx                    |    5 +----
 basegfx/source/tools/unopolypolygon.cxx           |    5 +----
 basegfx/source/tools/zoomtools.cxx                |    5 +----
 22 files changed, 41 insertions(+), 109 deletions(-)

New commits:
commit f8554b5053d17d39f71eca246e4ad7264f4998a8
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jan 14 15:11:29 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jan 14 15:12:05 2020 +0100

    clang-tidy modernize-concat-nested-namespace in basegfx
    
    Change-Id: I79b5b135c00b31152ff37de3485dcbb955ca1071
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86757
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx
index 42e326af11a4..14f5e35780af 100644
--- a/basegfx/source/color/bcolortools.cxx
+++ b/basegfx/source/color/bcolortools.cxx
@@ -21,7 +21,7 @@
 #include <basegfx/color/bcolor.hxx>
 #include <basegfx/color/bcolortools.hxx>
 
-namespace basegfx { namespace utils
+namespace basegfx::utils
 {
     BColor rgb2hsl(const BColor& rRGBColor)
     {
@@ -189,6 +189,6 @@ namespace basegfx { namespace utils
         }
     }
 
-} } // end of namespace basegfx
+} // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx
index 2c831854761b..6cf751fc8b87 100644
--- a/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -22,9 +22,7 @@
 
 #include <osl/diagnose.h>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         void createSinCosOrthogonal(double& o_rSin, double& o_rCos, double fRadiant)
         {
@@ -454,7 +452,6 @@ namespace basegfx
         {
             return B2DTuple(rMatrix.get(0, nCol), rMatrix.get(1, nCol));
         }
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/matrix/b3dhommatrixtools.cxx b/basegfx/source/matrix/b3dhommatrixtools.cxx
index d6b9d32ef773..f8860df4acf6 100644
--- a/basegfx/source/matrix/b3dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b3dhommatrixtools.cxx
@@ -20,9 +20,7 @@
 #include <basegfx/matrix/b3dhommatrixtools.hxx>
 #include <com/sun/star/drawing/HomogenMatrix.hpp>
 
-namespace basegfx
-{
-namespace utils
+namespace basegfx::utils
 {
 B3DHomMatrix UnoHomogenMatrixToB3DHomMatrix(const com::sun::star::drawing::HomogenMatrix& rMatrixIn)
 {
@@ -68,7 +66,6 @@ void B3DHomMatrixToUnoHomogenMatrix(const B3DHomMatrix& rMatrixIn,
     rMatrixOut.Line4.Column3 = rMatrixIn.get(3, 2);
     rMatrixOut.Line4.Column4 = rMatrixIn.get(3, 3);
 }
-} // end of namespace tools
 } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index 91769a833ff5..1ae29f2a6047 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -32,9 +32,7 @@
 #include <basegfx/polygon/b2dpolypolygoncutter.hxx>
 #include <basegfx/polygon/b2dpolygontriangulator.hxx>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         B2DPolyPolygon createAreaGeometryForLineStartEnd(
             const B2DPolygon& rCandidate,
@@ -126,8 +124,7 @@ namespace basegfx
 
             return aRetval;
         }
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 namespace basegfx
 {
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index 043f2c9bdfe3..13a569575b02 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -26,9 +26,7 @@
 #include <basegfx/curve/b2dcubicbezier.hxx>
 #include <basegfx/utils/rectcliptools.hxx>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         B2DPolyPolygon clipPolygonOnParallelAxis(const B2DPolygon& rCandidate, bool bParallelToXAxis, bool bAboveAxis, double fValueOnOtherAxis, bool bStroke)
         {
@@ -814,7 +812,6 @@ namespace basegfx
             return aResult;
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 0fd59291604e..ed4af0843504 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -838,9 +838,7 @@ namespace basegfx
     } // end of anonymous namespace
 } // end of namespace basegfx
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
 
         B2DPolygon addPointsAtCutsAndTouches(const B2DPolygon& rCandidate)
@@ -1053,7 +1051,6 @@ namespace basegfx
             return rCandidate;
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 4ac68958eaa2..c2089431e1fb 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -39,9 +39,7 @@
 #define ANGLE_BOUND_MINIMUM_VALUE   (0.1)
 #define STEPSPERQUARTER     (3)
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         void openWithGeometryChange(B2DPolygon& rCandidate)
         {
@@ -3487,7 +3485,6 @@ namespace basegfx
             }
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index ed58d2f03d27..cebe714386ef 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -368,9 +368,7 @@ namespace basegfx
     } // end of anonymous namespace
 } // end of namespace basegfx
 
-namespace basegfx
-{
-    namespace triangulator
+namespace basegfx::triangulator
     {
         B2DTriangleVector triangulate(const B2DPolygon& rCandidate)
         {
@@ -432,7 +430,6 @@ namespace basegfx
 
             return aRetval;
         }
-    } // end of namespace triangulator
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 0ea1e8b9b863..fa0471403d92 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -680,9 +680,7 @@ namespace basegfx
     } // end of anonymous namespace
 } // end of namespace basegfx
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
 
         B2DPolyPolygon solveCrossovers(const B2DPolyPolygon& rCandidate)
@@ -1106,7 +1104,6 @@ namespace basegfx
             return B2DPolyPolygon();
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index e1ff392ae306..b7e3bacf19ae 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -28,9 +28,7 @@
 #include <algorithm>
 #include <numeric>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         B2DPolyPolygon correctOrientations(const B2DPolyPolygon& rCandidate)
         {
@@ -652,7 +650,6 @@ namespace basegfx
             }
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 490bcd69c9a6..0d846280b8b1 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -60,9 +60,7 @@ void putNumberChar(OUStringBuffer& rStr,double fValue, double fOldValue, bool bU
 
 }
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         bool PointIndex::operator<(const PointIndex& rComp) const
         {
@@ -929,6 +927,5 @@ namespace basegfx
             return aResult.makeStringAndClear();
         }
     }
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 8bba58f8106e..8d7eab51337f 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -26,9 +26,7 @@
 
 #include <list>
 
-namespace basegfx
-{
-    namespace trapezoidhelper
+namespace basegfx::trapezoidhelper
     {
 
         // helper class to hold a simple edge. This is only used for horizontal edges
@@ -191,12 +189,9 @@ namespace basegfx
 
         typedef std::list< TrDeEdgeEntry > TrDeEdgeEntries;
 
-    } // end of anonymous namespace
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
-namespace basegfx
-{
-    namespace trapezoidhelper
+namespace basegfx::trapezoidhelper
     {
         // FIXME: templatize this and use it for TrDeEdgeEntries too ...
 
@@ -895,8 +890,7 @@ namespace basegfx
         };
 
         }
-    } // end of anonymous namespace
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 namespace basegfx
 {
@@ -949,9 +943,7 @@ namespace basegfx
     }
 } // end of namespace basegfx
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         // convert Source utils::PolyPolygon to trapezoids
         void trapezoidSubdivide(B2DTrapezoidVector& ro_Result, const B2DPolyPolygon& rSourcePolyPolygon)
@@ -1176,7 +1168,6 @@ namespace basegfx
         }
 
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index bfbd2ae7319c..4fbd1bfa2c94 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -27,9 +27,7 @@
 #include <basegfx/tuple/b3ituple.hxx>
 #include <numeric>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         // B3DPolygon tools
         void checkClosed(B3DPolygon& rCandidate)
@@ -739,7 +737,6 @@ namespace basegfx
             }
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index 083678726a4d..f8b29914f4ac 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -32,9 +32,7 @@
 #define nMinSegments sal_uInt32(1)
 #define nMaxSegments sal_uInt32(512)
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         // B3DPolyPolygon tools
         B3DRange getRange(const B3DPolyPolygon& rCandidate)
@@ -583,7 +581,6 @@ namespace basegfx
             }
         }
 
-    } // end of namespace utils
-} // end of namespace basegfx
+    } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx
index 1d1d34a29b99..4efe6fc2cb5e 100644
--- a/basegfx/source/tools/b2dclipstate.cxx
+++ b/basegfx/source/tools/b2dclipstate.cxx
@@ -28,9 +28,7 @@
 #include <basegfx/polygon/b2dpolypolygoncutter.hxx>
 
 
-namespace basegfx
-{
-namespace utils
+namespace basegfx::utils
 {
     class ImplB2DClipState
     {
@@ -477,7 +475,6 @@ namespace utils
     }
 
 
-} // end of namespace utils
 } // end of namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx
index 3d87887e37ac..d52ddcfdfe18 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -42,10 +42,7 @@
 
 using namespace ::com::sun::star;
 
-namespace basegfx
-{
-
-    namespace unotools
+namespace basegfx::unotools
     {
         namespace
         {
@@ -473,8 +470,6 @@ namespace basegfx
                                         ceil(rRange.getMaxY()) );
         }
 
-    } // namespace bgfxtools
-
-} // namespace canvas
+    } // namespace canvas
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx
index 0d7ac7537be6..cb1a050dc94e 100644
--- a/basegfx/source/tools/keystoplerp.cxx
+++ b/basegfx/source/tools/keystoplerp.cxx
@@ -40,9 +40,7 @@ static void validateInput(const std::vector<double>& rKeyStops)
 #endif
 }
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         KeyStopLerp::KeyStopLerp( const std::vector<double>& rKeyStops ) :
             maKeyStops(rKeyStops),
@@ -89,6 +87,5 @@ namespace basegfx
                 std::clamp(fRawLerp,0.0,1.0));
         }
     }
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/numbertools.cxx b/basegfx/source/tools/numbertools.cxx
index 031bef3ba6e1..4248068b7d79 100644
--- a/basegfx/source/tools/numbertools.cxx
+++ b/basegfx/source/tools/numbertools.cxx
@@ -15,7 +15,7 @@
 #include <rtl/strbuf.hxx>
 #include <rtl/math.hxx>
 
-namespace basegfx { namespace utils
+namespace basegfx::utils
 {
     B2DPolyPolygon number2PolyPolygon(double fValue, sal_Int32 nTotalDigits, sal_Int32 nDecPlaces, bool bLitSegments)
     {
@@ -53,6 +53,6 @@ namespace basegfx { namespace utils
         return aRes;
     }
 
-} }
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/stringconversiontools.cxx b/basegfx/source/tools/stringconversiontools.cxx
index 6e48c22b1f89..994812fbaeb8 100644
--- a/basegfx/source/tools/stringconversiontools.cxx
+++ b/basegfx/source/tools/stringconversiontools.cxx
@@ -20,9 +20,7 @@
 #include <stringconversiontools.hxx>
 #include <rtl/math.hxx>
 
-namespace basegfx
-{
-    namespace internal
+namespace basegfx::internal
     {
         void skipSpaces(sal_Int32&      io_rPos,
                         const OUString& rStr,
@@ -159,7 +157,6 @@ namespace basegfx
             return true;
         }
 
-    } // namespace internal
-}
+    }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx
index 74e1ad785612..ac791656d1a0 100644
--- a/basegfx/source/tools/tools.cxx
+++ b/basegfx/source/tools/tools.cxx
@@ -22,9 +22,7 @@
 
 #include <algorithm>
 
-namespace basegfx
-{
-    namespace utils
+namespace basegfx::utils
     {
         namespace
         {
@@ -109,6 +107,5 @@ namespace basegfx
             moveLineOutsideRect( io_rLeftBottom, io_rRightBottom, aNormalBottom, rFitTarget );
         }
     }
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx
index b0c1de7d5636..c05f50f62684 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -31,9 +31,7 @@
 
 using namespace ::com::sun::star;
 
-namespace basegfx
-{
-namespace unotools
+namespace basegfx::unotools
 {
     UnoPolyPolygon::UnoPolyPolygon( const B2DPolyPolygon& rPolyPoly ) :
         UnoPolyPolygonBase( m_aMutex ),
@@ -454,6 +452,5 @@ namespace unotools
     }
 
 }
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx
index 7e007c525b52..3acf23e8688b 100644
--- a/basegfx/source/tools/zoomtools.cxx
+++ b/basegfx/source/tools/zoomtools.cxx
@@ -9,9 +9,7 @@
 
 #include <basegfx/utils/zoomtools.hxx>
 
-namespace basegfx
-{
-namespace zoomtools
+namespace basegfx::zoomtools
 {
 
 /** 2^(1/6) as the default step
@@ -110,7 +108,6 @@ long zoomOut(long nCurrent)
     nNew = enforceStep(nNew, nCurrent, 25);
     return nNew;
 }
-} // namespace zoomtools
 } // namespace basegfx
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list