From 1ebe85bc1fc6cf2adeb05aac78749806e20a71c2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Jul 2020 18:11:15 +0200 Subject: compact namespace: drawinglayer Change-Id: I32648ae81c4a06f944b70c0cca1694333ec02859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98916 Tested-by: Jenkins Reviewed-by: Noel Grandin --- drawinglayer/inc/primitive2d/cropprimitive2d.hxx | 8 ++--- .../inc/primitive2d/texteffectprimitive2d.hxx | 8 ++--- .../inc/primitive2d/textlineprimitive2d.hxx | 8 ++--- .../inc/primitive2d/textstrikeoutprimitive2d.hxx | 24 +++++-------- .../inc/primitive2d/wallpaperprimitive2d.hxx | 8 ++--- .../inc/primitive3d/hatchtextureprimitive3d.hxx | 8 ++--- .../inc/primitive3d/hiddengeometryprimitive3d.hxx | 8 ++--- .../inc/primitive3d/polygontubeprimitive3d.hxx | 8 ++--- .../inc/primitive3d/sdrdecompositiontools3d.hxx | 7 ++-- drawinglayer/inc/primitive3d/shadowprimitive3d.hxx | 8 ++--- .../inc/primitive3d/textureprimitive3d.hxx | 40 ++++++++-------------- .../inc/processor3d/defaultprocessor3d.hxx | 8 ++--- .../inc/processor3d/geometry2dextractor.hxx | 8 ++--- drawinglayer/inc/processor3d/shadow3dextractor.hxx | 8 ++--- .../inc/processor3d/zbufferprocessor3d.hxx | 11 +++--- drawinglayer/inc/texture/texture3d.hxx | 32 +++++++---------- drawinglayer/source/attribute/sdrglowattribute.cxx | 7 ++-- .../source/primitive2d/polygonprimitive2d.cxx | 5 +-- 18 files changed, 78 insertions(+), 136 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx index ba427eb6fba6..818e6f2b3771 100644 --- a/drawinglayer/inc/primitive2d/cropprimitive2d.hxx +++ b/drawinglayer/inc/primitive2d/cropprimitive2d.hxx @@ -24,9 +24,7 @@ #include -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { /** CropPrimitive2D class @@ -90,7 +88,7 @@ namespace drawinglayer /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx index a39256453f17..ac2343220316 100644 --- a/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/primitive2d/texteffectprimitive2d.hxx @@ -25,9 +25,7 @@ #include -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { /** TextEffectStyle2D definition */ enum class TextEffectStyle2D @@ -93,8 +91,8 @@ namespace drawinglayer /// Override standard getDecomposition to be view-dependent here virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx b/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx index 059c69bd7ca3..500190658a5d 100644 --- a/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx +++ b/drawinglayer/inc/primitive2d/textlineprimitive2d.hxx @@ -27,9 +27,7 @@ #include -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { class TextLinePrimitive2D final : public BufferedDecompositionPrimitive2D { @@ -71,8 +69,8 @@ namespace drawinglayer /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx b/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx index 1e1e75f7ced1..21efcebfd3cd 100644 --- a/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx +++ b/drawinglayer/inc/primitive2d/textstrikeoutprimitive2d.hxx @@ -29,9 +29,7 @@ #include -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { class BaseTextStrikeoutPrimitive2D : public BufferedDecompositionPrimitive2D { @@ -58,13 +56,11 @@ namespace drawinglayer /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer +} // end of namespace drawinglayer::primitive2d -namespace drawinglayer -{ - namespace primitive2d + +namespace drawinglayer::primitive2d { class TextCharacterStrikeoutPrimitive2D final : public BaseTextStrikeoutPrimitive2D { @@ -97,13 +93,11 @@ namespace drawinglayer /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { class TextGeometryStrikeoutPrimitive2D final : public BaseTextStrikeoutPrimitive2D { @@ -136,8 +130,8 @@ namespace drawinglayer /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx b/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx index a8e4b158f30e..1b6080437583 100644 --- a/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx +++ b/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx @@ -26,9 +26,7 @@ #include -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { /** WallpaperBitmapPrimitive2D class @@ -74,7 +72,7 @@ namespace drawinglayer /// provide unique ID virtual sal_uInt32 getPrimitive2DID() const override; }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive2d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/primitive3d/hatchtextureprimitive3d.hxx index 1329bf70647f..b897ff4273d0 100644 --- a/drawinglayer/inc/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/primitive3d/hatchtextureprimitive3d.hxx @@ -25,9 +25,7 @@ #include -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** HatchTexturePrimitive3D class @@ -71,8 +69,8 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/hiddengeometryprimitive3d.hxx b/drawinglayer/inc/primitive3d/hiddengeometryprimitive3d.hxx index 246abe38a664..6ea90a9a09e8 100644 --- a/drawinglayer/inc/primitive3d/hiddengeometryprimitive3d.hxx +++ b/drawinglayer/inc/primitive3d/hiddengeometryprimitive3d.hxx @@ -24,9 +24,7 @@ #include -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { // This primitive is used to represent geometry for non-visible objects, // e.g. a 3D cube without fill attributes. To still be able to use @@ -54,8 +52,8 @@ namespace drawinglayer // provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/primitive3d/polygontubeprimitive3d.hxx index e27201ad6a12..b0de7d82b935 100644 --- a/drawinglayer/inc/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/primitive3d/polygontubeprimitive3d.hxx @@ -24,9 +24,7 @@ #include -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** PolygonStrokePrimitive3D class @@ -85,8 +83,8 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/primitive3d/sdrdecompositiontools3d.hxx index 9a4d62cbc24f..204019dfc41f 100644 --- a/drawinglayer/inc/primitive3d/sdrdecompositiontools3d.hxx +++ b/drawinglayer/inc/primitive3d/sdrdecompositiontools3d.hxx @@ -43,9 +43,7 @@ namespace drawinglayer::attribute { } -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { // #i98295# basegfx::B3DRange getRangeFrom3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill); @@ -85,8 +83,7 @@ namespace drawinglayer const basegfx::B2DVector& rTextureSize, const attribute::Sdr3DObjectAttribute& aSdr3DObjectAttribute); - } // end of namespace primitive3d -} // end of namespace drawinglayer +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/shadowprimitive3d.hxx b/drawinglayer/inc/primitive3d/shadowprimitive3d.hxx index 60ec61fe7dff..93b62a4c685b 100644 --- a/drawinglayer/inc/primitive3d/shadowprimitive3d.hxx +++ b/drawinglayer/inc/primitive3d/shadowprimitive3d.hxx @@ -26,9 +26,7 @@ #include -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** ShadowPrimitive3D class @@ -70,8 +68,8 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/primitive3d/textureprimitive3d.hxx index 0dc3ed4d3b19..2e39c07864b4 100644 --- a/drawinglayer/inc/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/primitive3d/textureprimitive3d.hxx @@ -27,9 +27,7 @@ #include -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** TexturePrimitive3D class @@ -65,13 +63,11 @@ namespace drawinglayer /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const override; }; - } // end of namespace primitive3d -} // end of namespace drawinglayer +} // end of namespace drawinglayer::primitive3d -namespace drawinglayer -{ - namespace primitive3d + +namespace drawinglayer::primitive3d { /** UnifiedTransparenceTexturePrimitive3D class @@ -106,13 +102,11 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** GradientTexturePrimitive3D class @@ -144,13 +138,11 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d -namespace drawinglayer -{ - namespace primitive3d +namespace drawinglayer::primitive3d { /** BitmapTexturePrimitive3D class @@ -182,13 +174,11 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer +} // end of namespace drawinglayer::primitive3d -namespace drawinglayer -{ - namespace primitive3d + +namespace drawinglayer::primitive3d { /** TransparenceTexturePrimitive3D class @@ -212,8 +202,8 @@ namespace drawinglayer /// provide unique ID DeclPrimitive3DIDBlock() }; - } // end of namespace primitive3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::primitive3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/processor3d/defaultprocessor3d.hxx b/drawinglayer/inc/processor3d/defaultprocessor3d.hxx index f23a826a669e..4db2bde555c8 100644 --- a/drawinglayer/inc/processor3d/defaultprocessor3d.hxx +++ b/drawinglayer/inc/processor3d/defaultprocessor3d.hxx @@ -52,9 +52,7 @@ namespace drawinglayer::texture { } -namespace drawinglayer -{ - namespace processor3d +namespace drawinglayer::processor3d { /** DefaultProcessor3D class @@ -139,8 +137,8 @@ namespace drawinglayer /// access to Drawinglayer configuration options const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; } }; - } // end of namespace processor3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::processor3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/processor3d/geometry2dextractor.hxx index ae3050fb2850..d5ff9f5b31eb 100644 --- a/drawinglayer/inc/processor3d/geometry2dextractor.hxx +++ b/drawinglayer/inc/processor3d/geometry2dextractor.hxx @@ -27,9 +27,7 @@ #include -namespace drawinglayer -{ - namespace processor3d +namespace drawinglayer::processor3d { /** Geometry2DExtractingProcessor class @@ -63,8 +61,8 @@ namespace drawinglayer const primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; } const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } }; - } // end of namespace processor3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::processor3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/processor3d/shadow3dextractor.hxx index 37c1c0f0e6fc..526199b7d009 100644 --- a/drawinglayer/inc/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/processor3d/shadow3dextractor.hxx @@ -32,9 +32,7 @@ namespace basegfx { class B3DPolyPolygon; } namespace basegfx { class B3DPolygon; } -namespace drawinglayer -{ - namespace processor3d +namespace drawinglayer::processor3d { /** Shadow3DExtractingProcessor class @@ -93,7 +91,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; } }; - } // end of namespace processor3d -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::processor3d /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/processor3d/zbufferprocessor3d.hxx b/drawinglayer/inc/processor3d/zbufferprocessor3d.hxx index 9a0b422ac380..642781e58177 100644 --- a/drawinglayer/inc/processor3d/zbufferprocessor3d.hxx +++ b/drawinglayer/inc/processor3d/zbufferprocessor3d.hxx @@ -27,20 +27,17 @@ namespace basegfx { class BZPixelRaster; } -namespace drawinglayer { - namespace attribute { +namespace drawinglayer::attribute { class SdrSceneAttribute; class SdrLightingAttribute; class MaterialAttribute3D; - } } + class ZBufferRasterConverter3D; class RasterPrimitive3D; -namespace drawinglayer -{ - namespace processor3d +namespace drawinglayer::processor3d { /** This 3D renderer derived from DefaultProcessor3D renders all fed primitives to a 2D @@ -90,7 +87,7 @@ namespace drawinglayer void finish(); }; - } + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/texture/texture3d.hxx b/drawinglayer/inc/texture/texture3d.hxx index 47ef9ff450a1..e7cf87d764ff 100644 --- a/drawinglayer/inc/texture/texture3d.hxx +++ b/drawinglayer/inc/texture/texture3d.hxx @@ -28,9 +28,7 @@ namespace drawinglayer::primitive3d { class HatchTexturePrimitive3D; } -namespace drawinglayer -{ - namespace texture +namespace drawinglayer::texture { class GeoTexSvxMono final : public GeoTexSvx { @@ -47,12 +45,10 @@ namespace drawinglayer virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const override; }; - } // end of namespace texture -} // end of namespace drawinglayer -namespace drawinglayer -{ - namespace texture +} // end of namespace drawinglayer::texture + +namespace drawinglayer::texture { class GeoTexSvxBitmapEx : public GeoTexSvx { @@ -83,12 +79,10 @@ namespace drawinglayer virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const override; }; - } // end of namespace texture -} // end of namespace drawinglayer -namespace drawinglayer -{ - namespace texture +} // end of namespace drawinglayer::texture + +namespace drawinglayer::texture { class GeoTexSvxBitmapExTiled final : public GeoTexSvxBitmapEx { @@ -111,12 +105,10 @@ namespace drawinglayer virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const override; }; - } // end of namespace texture -} // end of namespace drawinglayer -namespace drawinglayer -{ - namespace texture +} // end of namespace drawinglayer::texture + +namespace drawinglayer::texture { class GeoTexSvxMultiHatch final : public GeoTexSvx { @@ -137,7 +129,7 @@ namespace drawinglayer virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const override; }; - } // end of namespace texture -} // end of namespace drawinglayer + +} // end of namespace drawinglayer::texture /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/attribute/sdrglowattribute.cxx b/drawinglayer/source/attribute/sdrglowattribute.cxx index 90367ff67ea0..f0c0174e7bf5 100644 --- a/drawinglayer/source/attribute/sdrglowattribute.cxx +++ b/drawinglayer/source/attribute/sdrglowattribute.cxx @@ -17,9 +17,7 @@ #include -namespace drawinglayer -{ -namespace attribute +namespace drawinglayer::attribute { SdrGlowAttribute::SdrGlowAttribute(sal_Int32 nRadius, const Color& rColor) : m_nRadius(nRadius) @@ -44,7 +42,6 @@ bool SdrGlowAttribute::operator==(const SdrGlowAttribute& rCandidate) const return m_nRadius == rCandidate.m_nRadius && m_color == rCandidate.m_color; } -} // end of namespace attribute -} // end of namespace drawinglayer +} // end of namespace drawinglayer::attribute /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 0251910e8252..6d2784dee46d 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -194,9 +194,7 @@ namespace drawinglayer::primitive2d } // end of namespace -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer::primitive2d { void PolygonStrokePrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*rViewInformation*/) const { @@ -597,7 +595,6 @@ namespace drawinglayer // provide unique ID ImplPrimitive2DIDBlock(PolygonStrokeArrowPrimitive2D, PRIMITIVE2D_ID_POLYGONSTROKEARROWPRIMITIVE2D) - } } // end of namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit