diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-09-22 14:12:07 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-09-26 14:18:41 +0200 |
commit | 8e7897588d7185ef1964e8120669c1de3d1ce734 (patch) | |
tree | 8f48598670a5dc22703371943c05789d60b9a07d /basegfx/source/tools | |
parent | 0b4135ec9945ea627318ecf5fccc4b7d0940ff0d (diff) |
Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will
hopefully make it possible to remove the annoying initial :: when
referring to the global tools namespace. Unless we have even more
tools subnamespaces somewhere.
Thorsten said it was OK.
Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996
Reviewed-on: https://gerrit.libreoffice.org/42644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r-- | basegfx/source/tools/b2dclipstate.cxx | 40 | ||||
-rw-r--r-- | basegfx/source/tools/canvastools.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/tools/gradienttools.cxx | 12 | ||||
-rw-r--r-- | basegfx/source/tools/keystoplerp.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/tools/numbertools.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/tools/tools.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/tools/unopolypolygon.cxx | 8 | ||||
-rw-r--r-- | basegfx/source/tools/unotools.cxx | 6 | ||||
-rw-r--r-- | basegfx/source/tools/zoomtools.cxx | 2 |
9 files changed, 42 insertions, 42 deletions
diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx index 5e0453fbf529..cf848f1af1c2 100644 --- a/basegfx/source/tools/b2dclipstate.cxx +++ b/basegfx/source/tools/b2dclipstate.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/b2dclipstate.hxx> +#include <basegfx/utils/b2dclipstate.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2dpolyrange.hxx> @@ -31,7 +31,7 @@ namespace basegfx { -namespace tools +namespace utils { class ImplB2DClipState { @@ -196,7 +196,7 @@ namespace tools // assumption: maClipPoly has kept polygons prepared for // clipping; i.e. no neutral polygons & correct // orientation - maPendingPolygons = tools::prepareForPolygonOperation(maPendingPolygons); + maPendingPolygons = utils::prepareForPolygonOperation(maPendingPolygons); const bool bIsEmpty=isNullClipPoly(); const bool bIsCleared=!maClipPoly.count(); switch(mePendingOps) @@ -207,7 +207,7 @@ namespace tools if( bIsEmpty ) maClipPoly = maPendingPolygons; else - maClipPoly = tools::solvePolygonOperationOr( + maClipPoly = utils::solvePolygonOperationOr( maClipPoly, maPendingPolygons); break; @@ -217,7 +217,7 @@ namespace tools if( bIsCleared ) maClipPoly = maPendingPolygons; else - maClipPoly = tools::solvePolygonOperationAnd( + maClipPoly = utils::solvePolygonOperationAnd( maClipPoly, maPendingPolygons); break; @@ -235,13 +235,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), maPendingPolygons); } else - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( maClipPoly, maPendingPolygons); break; @@ -264,13 +264,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), maPendingPolygons); } else - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( maClipPoly, maPendingPolygons); break; @@ -300,7 +300,7 @@ namespace tools if( bIsEmpty ) maClipPoly = aCollectedRanges; else - maClipPoly = tools::solvePolygonOperationOr( + maClipPoly = utils::solvePolygonOperationOr( maClipPoly, aCollectedRanges); break; @@ -315,7 +315,7 @@ namespace tools if( bIsCleared ) maClipPoly = aCollectedRanges; else - maClipPoly = tools::solvePolygonOperationAnd( + maClipPoly = utils::solvePolygonOperationAnd( maClipPoly, aCollectedRanges); break; @@ -337,13 +337,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), aCollectedRanges); } else - maClipPoly = tools::solvePolygonOperationXor( + maClipPoly = utils::solvePolygonOperationXor( maClipPoly, aCollectedRanges); break; @@ -366,13 +366,13 @@ namespace tools // 'holes' here) // going for an ugly hack meanwhile - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( B2DPolyPolygon( - tools::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), + utils::createPolygonFromRect(B2DRange(-1E20,-1E20,1E20,1E20))), aCollectedRanges); } else - maClipPoly = tools::solvePolygonOperationDiff( + maClipPoly = utils::solvePolygonOperationDiff( maClipPoly, aCollectedRanges); break; @@ -493,7 +493,7 @@ namespace tools } -} // end of namespace tools +} // 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 e65ae9ce44b3..7073e49711ba 100644 --- a/basegfx/source/tools/canvastools.cxx +++ b/basegfx/source/tools/canvastools.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Rectangle.hpp> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b3dhommatrix.hxx> #include <basegfx/vector/b2dsize.hxx> @@ -47,7 +47,7 @@ #include <basegfx/range/b2ibox.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <limits> using namespace ::com::sun::star; diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index a3c42a6b7e75..b05d9b219a53 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/gradienttools.hxx> +#include <basegfx/utils/gradienttools.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> @@ -100,7 +100,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add object translate @@ -161,7 +161,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add defined offsets after rotation @@ -238,7 +238,7 @@ namespace basegfx { const B2DPoint aCenter(0.5 * fTargetSizeX, 0.5 * fTargetSizeY); - aTextureTransform *= basegfx::tools::createRotateAroundPoint(aCenter, fAngle); + aTextureTransform *= basegfx::utils::createRotateAroundPoint(aCenter, fAngle); } // add defined offsets after rotation @@ -258,7 +258,7 @@ namespace basegfx return ODFGradientInfo(aTextureTransform, fAspectRatio, nSteps); } - namespace tools + namespace utils { ODFGradientInfo createLinearODFGradientInfo( const B2DRange& rTargetArea, @@ -465,7 +465,7 @@ namespace basegfx { return getSquareGradientAlpha(rUV, rGradInfo); // only matrix setup differs } - } // namespace tools + } // namespace utils } // namespace basegfx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx index e68bb1b60bf6..0b0f230253f1 100644 --- a/basegfx/source/tools/keystoplerp.cxx +++ b/basegfx/source/tools/keystoplerp.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/keystoplerp.hxx> +#include <basegfx/utils/keystoplerp.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <osl/diagnose.h> @@ -42,7 +42,7 @@ static void validateInput(const std::vector<double>& rKeyStops) namespace basegfx { - namespace tools + namespace utils { KeyStopLerp::KeyStopLerp( const std::vector<double>& rKeyStops ) : maKeyStops(rKeyStops), diff --git a/basegfx/source/tools/numbertools.cxx b/basegfx/source/tools/numbertools.cxx index 86b926ab55d2..c4bf5792cfb5 100644 --- a/basegfx/source/tools/numbertools.cxx +++ b/basegfx/source/tools/numbertools.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -17,7 +17,7 @@ #include <utility> -namespace basegfx { namespace tools +namespace basegfx { namespace utils { B2DPolyPolygon number2PolyPolygon(double fValue, sal_Int32 nTotalDigits, sal_Int32 nDecPlaces, bool bLitSegments) { diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx index ec7170b513a7..16feb0c7ef16 100644 --- a/basegfx/source/tools/tools.cxx +++ b/basegfx/source/tools/tools.cxx @@ -17,14 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <basegfx/tools/tools.hxx> +#include <basegfx/utils/tools.hxx> #include <basegfx/range/b2drange.hxx> #include <algorithm> namespace basegfx { - namespace tools + namespace utils { namespace { diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index 05318647c2fb..e0b5b85f079b 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -28,10 +28,10 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/unopolypolygon.hxx> +#include <basegfx/utils/unopolypolygon.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <cppuhelper/supportsservice.hxx> @@ -117,13 +117,13 @@ namespace unotools } } - const B2DRange aBounds( tools::getRange( aSrcPoly ) ); + const B2DRange aBounds( utils::getRange( aSrcPoly ) ); const B2DVector aOffset( unotools::b2DPointFromRealPoint2D( position ) - aBounds.getMinimum() ); if( !aOffset.equalZero() ) { - const B2DHomMatrix aTranslate(tools::createTranslateB2DHomMatrix(aOffset)); + const B2DHomMatrix aTranslate(utils::createTranslateB2DHomMatrix(aOffset)); aSrcPoly.transform( aTranslate ); } diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx index 7e3309e09c79..a80b6b9994a3 100644 --- a/basegfx/source/tools/unotools.cxx +++ b/basegfx/source/tools/unotools.cxx @@ -26,7 +26,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/curve/b2dcubicbezier.hxx> -#include <basegfx/tools/unotools.hxx> +#include <basegfx/utils/unotools.hxx> #include <comphelper/sequence.hxx> using namespace ::com::sun::star; @@ -113,7 +113,7 @@ namespace unotools if(ePolyFlag == drawing::PolygonFlags_CONTROL || bControlA != bControlB) throw lang::IllegalArgumentException(); - // the previous writes used the B2DPolyPoygon -> tools::PolyPolygon converter + // the previous writes used the B2DPolyPoygon -> utils::PolyPolygon converter // which did not create minimal PolyPolygons, but created all control points // as null vectors (identical points). Because of the former P(CA)(CB)-norm of // B2DPolygon and it's unused sign of being the zero-vector and CA and CB being @@ -146,7 +146,7 @@ namespace unotools // #i72807# API import uses old line start/end-equal definition for closed, // so we need to correct this to closed state here - basegfx::tools::checkClosed(aNewPolygon); + basegfx::utils::checkClosed(aNewPolygon); // add new subpolygon aNewPolyPolygon.append(aNewPolygon); diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx index 57d88de6fe3c..7e007c525b52 100644 --- a/basegfx/source/tools/zoomtools.cxx +++ b/basegfx/source/tools/zoomtools.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <basegfx/tools/zoomtools.hxx> +#include <basegfx/utils/zoomtools.hxx> namespace basegfx { |