diff options
author | Timotej Lazar <timotej.lazar@araneo.si> | 2019-07-06 15:10:50 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-07-10 11:04:57 +0200 |
commit | 753358fde275c26afd56103b3b532b2646757a1f (patch) | |
tree | a37f5b7074109d641d7a6b4e69964d1f71aef071 /sw/source/ui | |
parent | cf9e5ab822a45738dcd8893b445cce4770a87cc2 (diff) |
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.Stahl@cib.de>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |