sw/source/ui/index/cnttab.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 753358fde275c26afd56103b3b532b2646757a1f Author: Timotej Lazar <timotej.la...@araneo.si> AuthorDate: Sat Jul 6 15:10:50 2019 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Wed Jul 10 11:04:57 2019 +0200 Qualify call to std::ceil Without the std:: qualifier, GCC uses the C version of the function, which returns a double instead of float, and compilation fails. Also include <cmath>, where std::ceil is declared. Change-Id: I88cb669fceb5b683d82093b68e8c696d28eaea8e Reviewed-on: https://gerrit.libreoffice.org/75166 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 13c5f4406081..3f39e6f9a22c 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -75,6 +75,7 @@ #include <unomid.h> +#include <cmath> #include <memory> #include <vector> #include <numeric> @@ -1554,7 +1555,7 @@ void SwTOXEdit::AdjustSize() { auto nWidth = m_xEntry->get_pixel_size(GetText()).Width(); float fChars = nWidth / m_xEntry->get_approximate_digit_width(); - m_xEntry->set_width_chars(std::max(1.0f, ceil(fChars))); + m_xEntry->set_width_chars(std::max(1.0f, std::ceil(fChars))); } class SwTOXButton : public SwTOXWidget _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits