desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 ++++---- desktop/source/lib/init.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit 2562ad74d1945322e9fdf8af5fc0b1f17e854c9b Author: Caolán McNamara <caol...@redhat.com> Date: Wed Feb 1 10:22:17 2017 +0000 stoi not a member of std under android toolchain Change-Id: I73a4e7894e33dd95ca50ea25f5f95bf94a43531e diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 4312089..175947b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -863,13 +863,13 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector<int> aExpected = {5, 6, 7, 8, 9}; + std::vector<long> aExpected = {5, 6, 7, 8, 9}; std::istringstream iss(pCopiedContent); for (size_t i = 0; i < aExpected.size(); i++) { std::string token; iss >> token; - CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token)); + CPPUNIT_ASSERT_EQUAL(aExpected[i], strtol(token.c_str(), nullptr, 10)); } free(pUsedMimeType); @@ -909,13 +909,13 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector<int> aExpected = { 8 }; + std::vector<long> aExpected = { 8 }; std::istringstream iss(pCopiedContent); for (size_t i = 0; i < aExpected.size(); i++) { std::string token; iss >> token; - CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token)); + CPPUNIT_ASSERT_EQUAL(aExpected[i], strtol(token.c_str(), nullptr, 10)); } free(pUsedMimeType); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d879798..c11e161 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -463,7 +463,7 @@ int lcl_getViewId(const std::string& payload) } if (numberPos < payload.length() && payload[numberPos] >= '0' && payload[numberPos] <= '9') - return std::stoi(payload.substr(numberPos)); + return strtol(payload.substr(numberPos).c_str(), nullptr, 10); return 0; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits