diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-06 23:01:58 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-06 23:37:10 +0200 |
commit | 58080e8f78f57e4340bbc428b167472e8e6c05d1 (patch) | |
tree | 96af5ac496f8d155fd8368238ddff034c7031d8e | |
parent | c06be53493013abadf844929b7724b6b2ddda1a0 (diff) |
basegfx,oox,slideshow: replace boost::next/prior with std::next/prev
Change-Id: I38fde54d0fdbb9c61e3df004242a70e14429f52f
-rw-r--r-- | basegfx/inc/pch/precompiled_basegfx.hxx | 1 | ||||
-rw-r--r-- | basegfx/source/range/b2drangeclipper.cxx | 4 | ||||
-rw-r--r-- | cui/inc/pch/precompiled_cui.hxx | 1 | ||||
-rw-r--r-- | oox/inc/pch/precompiled_oox.hxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 49 | ||||
-rw-r--r-- | slideshow/source/inc/listenercontainer.hxx | 4 |
6 files changed, 28 insertions, 32 deletions
diff --git a/basegfx/inc/pch/precompiled_basegfx.hxx b/basegfx/inc/pch/precompiled_basegfx.hxx index 1590126f2b97..2fada70bdf10 100644 --- a/basegfx/inc/pch/precompiled_basegfx.hxx +++ b/basegfx/inc/pch/precompiled_basegfx.hxx @@ -30,7 +30,6 @@ #include <sstream> #include <string> #include <vector> -#include <boost/next_prior.hpp> #include <osl/diagnose.h> #include <osl/interlck.h> #include <rtl/instance.hxx> diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index 46f9e490e37c..3814437208f8 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -29,11 +29,11 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <o3tl/vector_pool.hxx> -#include <boost/next_prior.hpp> #include <algorithm> #include <deque> #include <list> +#include <iterator> namespace basegfx { @@ -716,7 +716,7 @@ namespace basegfx ListOfEdges& rList, const ListOfEdges::reverse_iterator& aIter) { return ListOfEdges::reverse_iterator( - rList.erase(boost::prior(aIter.base()))); + rList.erase(std::prev(aIter.base()))); } template<int bPerformErase, diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index 81841ceea124..bd28f0068276 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -54,7 +54,6 @@ #include <unordered_map> #include <utility> #include <vector> -#include <boost/intrusive_ptr.hpp> #include <boost/optional.hpp> #include <boost/optional/optional.hpp> #include <osl/diagnose.h> diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx index fac869e40f30..4522449e10c8 100644 --- a/oox/inc/pch/precompiled_oox.hxx +++ b/oox/inc/pch/precompiled_oox.hxx @@ -43,7 +43,6 @@ #include <vector> #include <boost/algorithm/string.hpp> #include <boost/intrusive_ptr.hpp> -#include <boost/next_prior.hpp> #include <boost/optional.hpp> #include <boost/optional/optional.hpp> #include <osl/diagnose.h> diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 338b8233dff6..d02c8ae1e84e 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -20,7 +20,6 @@ #include <oox/drawingml/fillproperties.hxx> #include <iterator> -#include <boost/next_prior.hpp> #include <drawingml/graphicproperties.hxx> @@ -402,7 +401,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, bool bSymmetric(true); { GradientFillProperties::GradientStopMap::const_iterator aItA( aGradientStops.begin() ); - GradientFillProperties::GradientStopMap::const_iterator aItZ( boost::prior( aGradientStops.end() ) ); + GradientFillProperties::GradientStopMap::const_iterator aItZ(std::prev(aGradientStops.end())); while( bSymmetric && aItA->first < aItZ->first ) { if( aItA->second.getColor( rGraphicHelper, nPhClr ) != aItZ->second.getColor( rGraphicHelper, nPhClr ) || @@ -411,7 +410,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, else { ++aItA; - aItZ = boost::prior(aItZ); + aItZ = std::prev(aItZ); } } // Don't be fooled if the middlemost stop isn't at 0.5. @@ -454,10 +453,10 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, ++aIt; while( aIt != aGradientStops.end() ) { - if( aIt->first - boost::prior(aIt)->first > nWidestWidth ) + if (aIt->first - std::prev(aIt)->first > nWidestWidth) { - nWidestWidth = aIt->first - boost::prior(aIt)->first; - aWidestSegmentStart = boost::prior(aIt); + nWidestWidth = aIt->first - std::prev(aIt)->first; + aWidestSegmentStart = std::prev(aIt); } ++aIt; } @@ -470,42 +469,42 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, // segments, and the widest one is the first or last one, and is it of uniform colour? If // so, deduce the border from it, and drop that segment. if( aGradientStops.size() == 3 && - aGradientStops.begin()->second.getColor( rGraphicHelper, nPhClr ) == boost::next(aGradientStops.begin())->second.getColor( rGraphicHelper, nPhClr ) && - aGradientStops.begin()->second.getTransparency() == boost::next(aGradientStops.begin())->second.getTransparency( ) ) + aGradientStops.begin()->second.getColor(rGraphicHelper, nPhClr) == std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) && + aGradientStops.begin()->second.getTransparency() == std::next(aGradientStops.begin())->second.getTransparency()) { // Two segments, first is uniformly coloured SAL_INFO("oox.drawingml.gradient", "two segments, first is uniformly coloured"); - nBorder = boost::next(aGradientStops.begin())->first - aGradientStops.begin()->first; + nBorder = std::next(aGradientStops.begin())->first - aGradientStops.begin()->first; aGradientStops.erase(aGradientStops.begin()); aWidestSegmentStart = aGradientStops.begin(); } else if( !bSymmetric && aGradientStops.size() == 3 && - boost::next(aGradientStops.begin())->second.getColor( rGraphicHelper, nPhClr ) == boost::prior(aGradientStops.end())->second.getColor( rGraphicHelper, nPhClr ) && - boost::next(aGradientStops.begin())->second.getTransparency() == boost::prior(aGradientStops.end())->second.getTransparency( ) ) + std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) == std::prev(aGradientStops.end())->second.getColor(rGraphicHelper, nPhClr) && + std::next(aGradientStops.begin())->second.getTransparency() == std::prev(aGradientStops.end())->second.getTransparency()) { // Two segments, second is uniformly coloured SAL_INFO("oox.drawingml.gradient", "two segments, second is uniformly coloured"); - nBorder = boost::prior(aGradientStops.end())->first - boost::next(aGradientStops.begin())->first; - aGradientStops.erase(boost::next(aGradientStops.begin())); + nBorder = std::prev(aGradientStops.end())->first - std::next(aGradientStops.begin())->first; + aGradientStops.erase(std::next(aGradientStops.begin())); aWidestSegmentStart = aGradientStops.begin(); bSwap = true; nShapeRotation = 180*60000 - nShapeRotation; } else if( !bSymmetric && aGradientStops.size() >= 4 && - aWidestSegmentStart->second.getColor( rGraphicHelper, nPhClr ) == boost::next(aWidestSegmentStart)->second.getColor( rGraphicHelper, nPhClr ) && - aWidestSegmentStart->second.getTransparency() == boost::next(aWidestSegmentStart)->second.getTransparency() && + aWidestSegmentStart->second.getColor( rGraphicHelper, nPhClr ) == std::next(aWidestSegmentStart)->second.getColor(rGraphicHelper, nPhClr) && + aWidestSegmentStart->second.getTransparency() == std::next(aWidestSegmentStart)->second.getTransparency() && ( aWidestSegmentStart == aGradientStops.begin() || - boost::next(aWidestSegmentStart) == boost::prior( aGradientStops.end() ) ) ) + std::next(aWidestSegmentStart) == std::prev(aGradientStops.end()))) { // Not symmetric, three or more segments, the widest is first or last and is uniformly coloured SAL_INFO("oox.drawingml.gradient", "first or last segment is widest and is uniformly coloured"); - nBorder = boost::next(aWidestSegmentStart)->first - aWidestSegmentStart->first; + nBorder = std::next(aWidestSegmentStart)->first - aWidestSegmentStart->first; // If it's the last segment that is uniformly coloured, rotate the gradient 180 // degrees and swap start and end colours - if( boost::next(aWidestSegmentStart) == boost::prior( aGradientStops.end() ) ) + if (std::next(aWidestSegmentStart) == std::prev(aGradientStops.end())) { bSwap = true; nShapeRotation = 180*60000 - nShapeRotation; @@ -514,14 +513,14 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, aGradientStops.erase( aWidestSegmentStart++ ); // Look for which is widest now - aIt = boost::next(aGradientStops.begin()); + aIt = std::next(aGradientStops.begin()); nWidestWidth = -1; while( aIt != aGradientStops.end() ) { - if( aIt->first - boost::prior(aIt)->first > nWidestWidth ) + if (aIt->first - std::prev(aIt)->first > nWidestWidth) { - nWidestWidth = aIt->first - boost::prior(aIt)->first; - aWidestSegmentStart = boost::prior(aIt); + nWidestWidth = aIt->first - std::prev(aIt)->first; + aWidestSegmentStart = std::prev(aIt); } ++aIt; } @@ -538,19 +537,19 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, Color aStartColor, aEndColor; if( bSymmetric ) { - aStartColor = boost::next(aWidestSegmentStart)->second; + aStartColor = std::next(aWidestSegmentStart)->second; aEndColor = aWidestSegmentStart->second; nBorder *= 2; } else if( bSwap ) { - aStartColor = boost::next(aWidestSegmentStart)->second; + aStartColor = std::next(aWidestSegmentStart)->second; aEndColor = aWidestSegmentStart->second; } else { aStartColor = aWidestSegmentStart->second; - aEndColor = boost::next(aWidestSegmentStart)->second; + aEndColor = std::next(aWidestSegmentStart)->second; } SAL_INFO("oox.drawingml.gradient", "start color: " << std::hex << aStartColor.getColor( rGraphicHelper, nPhClr ) << std::dec << diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx index e07cf3ecdecf..0b20464e4995 100644 --- a/slideshow/source/inc/listenercontainer.hxx +++ b/slideshow/source/inc/listenercontainer.hxx @@ -20,9 +20,9 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_LISTENERCONTAINER_HXX #include <osl/mutex.hxx> -#include <boost/next_prior.hpp> #include <algorithm> #include <vector> +#include <iterator> namespace slideshow { namespace internal { @@ -297,7 +297,7 @@ public: { std::inplace_merge( maListeners.begin(), - boost::prior(maListeners.end()), + std::prev(maListeners.end()), maListeners.end() ); } |