diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-23 15:16:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-31 09:34:46 +0100 |
commit | 84b396a235671ea77f1a9fa0d131cb56d7662737 (patch) | |
tree | 13d9de3d2b31424e785780864e084bd2d9315ff1 /basegfx | |
parent | c81d766dd4ff7d8b580b7fdc79db6e68c5f14204 (diff) |
new loplugin:namespaceindentation
check indentation of braces in namespace decls,
and the comments that often appear with them.
This is my penance for messing up the indentation with
clang-tidy-modernize-namespaces.
As such I have limited it to new-style namespaces for now,
and the check is off by default.
Change-Id: I4db7f10a81c79bc0eece8f8e3ee564da8bc7f168
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
20 files changed, 39 insertions, 41 deletions
diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx index 14f5e35780af..0ff808bc8367 100644 --- a/basegfx/source/color/bcolortools.cxx +++ b/basegfx/source/color/bcolortools.cxx @@ -189,6 +189,6 @@ namespace basegfx::utils } } -} // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx index 6cf751fc8b87..72256688c0b2 100644 --- a/basegfx/source/matrix/b2dhommatrixtools.cxx +++ b/basegfx/source/matrix/b2dhommatrixtools.cxx @@ -23,7 +23,7 @@ #include <osl/diagnose.h> namespace basegfx::utils - { +{ void createSinCosOrthogonal(double& o_rSin, double& o_rCos, double fRadiant) { if( fTools::equalZero( fmod( fRadiant, F_PI2 ) ) ) @@ -452,6 +452,6 @@ namespace basegfx::utils { return B2DTuple(rMatrix.get(0, nCol), rMatrix.get(1, nCol)); } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/matrix/b3dhommatrixtools.cxx b/basegfx/source/matrix/b3dhommatrixtools.cxx index f8860df4acf6..9125aca4e0a6 100644 --- a/basegfx/source/matrix/b3dhommatrixtools.cxx +++ b/basegfx/source/matrix/b3dhommatrixtools.cxx @@ -66,6 +66,6 @@ void B3DHomMatrixToUnoHomogenMatrix(const B3DHomMatrix& rMatrixIn, rMatrixOut.Line4.Column3 = rMatrixIn.get(3, 2); rMatrixOut.Line4.Column4 = rMatrixIn.get(3, 3); } -} // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index 1ae29f2a6047..72c25f0c0593 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -33,7 +33,7 @@ #include <basegfx/polygon/b2dpolygontriangulator.hxx> namespace basegfx::utils - { +{ B2DPolyPolygon createAreaGeometryForLineStartEnd( const B2DPolygon& rCandidate, const B2DPolyPolygon& rArrow, @@ -124,7 +124,7 @@ namespace basegfx::utils return aRetval; } - } // end of namespace basegfx +} // end of namespace namespace basegfx { diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx index 13a569575b02..cdcfeafbfaea 100644 --- a/basegfx/source/polygon/b2dpolygonclipper.cxx +++ b/basegfx/source/polygon/b2dpolygonclipper.cxx @@ -27,7 +27,7 @@ #include <basegfx/utils/rectcliptools.hxx> namespace basegfx::utils - { +{ B2DPolyPolygon clipPolygonOnParallelAxis(const B2DPolygon& rCandidate, bool bParallelToXAxis, bool bAboveAxis, double fValueOnOtherAxis, bool bStroke) { B2DPolyPolygon aRetval; @@ -812,6 +812,6 @@ namespace basegfx::utils return aResult; } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index ed4af0843504..d96a38ac7f30 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -839,7 +839,7 @@ namespace basegfx } // end of namespace basegfx namespace basegfx::utils - { +{ B2DPolygon addPointsAtCutsAndTouches(const B2DPolygon& rCandidate) { @@ -1051,6 +1051,6 @@ namespace basegfx::utils return rCandidate; } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index c2089431e1fb..cf2de34859cd 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -40,7 +40,7 @@ #define STEPSPERQUARTER (3) namespace basegfx::utils - { +{ void openWithGeometryChange(B2DPolygon& rCandidate) { if(rCandidate.isClosed()) @@ -3485,6 +3485,6 @@ namespace basegfx::utils } } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx index cebe714386ef..880b1b5c310c 100644 --- a/basegfx/source/polygon/b2dpolygontriangulator.cxx +++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx @@ -369,7 +369,7 @@ namespace basegfx } // end of namespace basegfx namespace basegfx::triangulator - { +{ B2DTriangleVector triangulate(const B2DPolygon& rCandidate) { B2DTriangleVector aRetval; @@ -430,6 +430,6 @@ namespace basegfx::triangulator return aRetval; } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx index fa0471403d92..ad185f47f336 100644 --- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx +++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx @@ -681,7 +681,7 @@ namespace basegfx } // end of namespace basegfx namespace basegfx::utils - { +{ B2DPolyPolygon solveCrossovers(const B2DPolyPolygon& rCandidate) { @@ -1104,6 +1104,6 @@ namespace basegfx::utils return B2DPolyPolygon(); } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index b7e3bacf19ae..75b6d38a19df 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -29,7 +29,7 @@ #include <numeric> namespace basegfx::utils - { +{ B2DPolyPolygon correctOrientations(const B2DPolyPolygon& rCandidate) { B2DPolyPolygon aRetval(rCandidate); @@ -650,6 +650,6 @@ namespace basegfx::utils } } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 0d846280b8b1..e8ec2cf6e76e 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -61,7 +61,7 @@ void putNumberChar(OUStringBuffer& rStr,double fValue, double fOldValue, bool bU } namespace basegfx::utils - { +{ bool PointIndex::operator<(const PointIndex& rComp) const { if(rComp.getPolygonIndex() == getPolygonIndex()) @@ -926,6 +926,6 @@ namespace basegfx::utils 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 8d7eab51337f..36c0c483a291 100644 --- a/basegfx/source/polygon/b2dtrapezoid.cxx +++ b/basegfx/source/polygon/b2dtrapezoid.cxx @@ -27,7 +27,7 @@ #include <list> namespace basegfx::trapezoidhelper - { +{ // helper class to hold a simple edge. This is only used for horizontal edges // currently, thus the YPositions will be equal. I did not create a special @@ -189,10 +189,8 @@ namespace basegfx::trapezoidhelper typedef std::list< TrDeEdgeEntry > TrDeEdgeEntries; - } // end of namespace basegfx -namespace basegfx::trapezoidhelper - { + // FIXME: templatize this and use it for TrDeEdgeEntries too ... namespace { @@ -890,7 +888,7 @@ namespace basegfx::trapezoidhelper }; } - } // end of namespace basegfx +} // end of namespace namespace basegfx { @@ -944,7 +942,7 @@ namespace basegfx } // end of namespace basegfx namespace basegfx::utils - { +{ // convert Source utils::PolyPolygon to trapezoids void trapezoidSubdivide(B2DTrapezoidVector& ro_Result, const B2DPolyPolygon& rSourcePolyPolygon) { @@ -1168,6 +1166,6 @@ namespace basegfx::utils } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index 4fbd1bfa2c94..1d97d4d43f0e 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -28,7 +28,7 @@ #include <numeric> namespace basegfx::utils - { +{ // B3DPolygon tools void checkClosed(B3DPolygon& rCandidate) { @@ -737,6 +737,6 @@ namespace basegfx::utils } } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index f8b29914f4ac..31581a0be298 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -33,7 +33,7 @@ #define nMaxSegments sal_uInt32(512) namespace basegfx::utils - { +{ // B3DPolyPolygon tools B3DRange getRange(const B3DPolyPolygon& rCandidate) { @@ -581,6 +581,6 @@ namespace basegfx::utils } } - } // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx index 4efe6fc2cb5e..aa5f655ccbc7 100644 --- a/basegfx/source/tools/b2dclipstate.cxx +++ b/basegfx/source/tools/b2dclipstate.cxx @@ -475,6 +475,6 @@ namespace basegfx::utils } -} // end of namespace basegfx +} // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx index d52ddcfdfe18..3ef52a85e197 100644 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; namespace basegfx::unotools - { +{ namespace { uno::Sequence< geometry::RealBezierSegment2D > bezierSequenceFromB2DPolygon(const ::basegfx::B2DPolygon& rPoly) @@ -470,6 +470,6 @@ namespace basegfx::unotools ceil(rRange.getMaxY()) ); } - } // namespace canvas +} // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx index cb1a050dc94e..725d52cf431a 100644 --- a/basegfx/source/tools/keystoplerp.cxx +++ b/basegfx/source/tools/keystoplerp.cxx @@ -41,7 +41,7 @@ static void validateInput(const std::vector<double>& rKeyStops) } namespace basegfx::utils - { +{ KeyStopLerp::KeyStopLerp( const std::vector<double>& rKeyStops ) : maKeyStops(rKeyStops), mnLastIndex(0) @@ -86,6 +86,6 @@ namespace basegfx::utils mnLastIndex, std::clamp(fRawLerp,0.0,1.0)); } - } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/stringconversiontools.cxx b/basegfx/source/tools/stringconversiontools.cxx index 994812fbaeb8..079966b27557 100644 --- a/basegfx/source/tools/stringconversiontools.cxx +++ b/basegfx/source/tools/stringconversiontools.cxx @@ -21,7 +21,7 @@ #include <rtl/math.hxx> namespace basegfx::internal - { +{ void skipSpaces(sal_Int32& io_rPos, const OUString& rStr, const sal_Int32 nLen) @@ -157,6 +157,6 @@ namespace basegfx::internal return true; } - } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx index ac791656d1a0..4a7f2c962ab3 100644 --- a/basegfx/source/tools/tools.cxx +++ b/basegfx/source/tools/tools.cxx @@ -23,7 +23,7 @@ #include <algorithm> namespace basegfx::utils - { +{ namespace { double distance( const double& nX, @@ -106,6 +106,6 @@ namespace basegfx::utils moveLineOutsideRect( io_rLeftTop, io_rRightTop, aNormalTop, rFitTarget ); moveLineOutsideRect( io_rLeftBottom, io_rRightBottom, aNormalBottom, rFitTarget ); } - } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx index 3acf23e8688b..488b19b31264 100644 --- a/basegfx/source/tools/zoomtools.cxx +++ b/basegfx/source/tools/zoomtools.cxx @@ -108,6 +108,6 @@ long zoomOut(long nCurrent) nNew = enforceStep(nNew, nCurrent, 25); return nNew; } -} // namespace basegfx +} // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |