Kaydet (Commit) 58080e8f authored tarafından Michael Stahl's avatar Michael Stahl

basegfx,oox,slideshow: replace boost::next/prior with std::next/prev

Change-Id: I38fde54d0fdbb9c61e3df004242a70e14429f52f
üst c06be534
......@@ -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>
......
......@@ -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,
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 <<
......
......@@ -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() );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment