summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1
-rw-r--r--sw/source/core/tox/ToxWhitespaceStripper.cxx8
2 files changed, 4 insertions, 5 deletions
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index e085bbacea95..bcad79a6ee39 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -52,7 +52,6 @@
#include <unordered_map>
#include <utility>
#include <vector>
-#include <boost/numeric/conversion/cast.hpp>
#include <boost/optional.hpp>
#include <boost/optional/optional.hpp>
#include <boost/property_tree/json_parser.hpp>
diff --git a/sw/source/core/tox/ToxWhitespaceStripper.cxx b/sw/source/core/tox/ToxWhitespaceStripper.cxx
index c38079ce1731..9ea87c4e2ede 100644
--- a/sw/source/core/tox/ToxWhitespaceStripper.cxx
+++ b/sw/source/core/tox/ToxWhitespaceStripper.cxx
@@ -12,7 +12,6 @@
#include "rtl/ustrbuf.hxx"
#include "sal/log.hxx"
-#include <boost/numeric/conversion/cast.hpp>
namespace sw {
@@ -51,13 +50,14 @@ ToxWhitespaceStripper::ToxWhitespaceStripper(const OUString& inputString)
sal_Int32
ToxWhitespaceStripper::GetPositionInStrippedString(sal_Int32 pos) const
{
- size_t upos = boost::numeric_cast<size_t>(pos);
- if (upos >= mNewPositions.size()) {
+ assert(0 <= pos);
+ if (static_cast<size_t>(pos) >= mNewPositions.size()) {
+ // TODO probably this should assert, not just warn?
SAL_WARN("sw.core", "Requested position of TOX entry text which does not exist. "
"Maybe the formatting hint is corrupt?");
return mNewPositions.back();
}
- return mNewPositions.at(upos);
+ return mNewPositions.at(pos);
}