summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-01-18 13:07:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-18 19:15:10 +0100
commite95708426f0ec86640708da922f01e29fb419032 (patch)
treed6199e31475bd79184d502c12971e3b541b24100 /cui/source/dialogs
parentd7a04f745e124f869c0be0e641bacf2d2c0b09d5 (diff)
Revert "Try to fix Windows TB"
Try to apply Stephan's suggestion in https://gerrit.libreoffice.org/c/core/+/109464: "Instead of explicitly specifying the std::min template argument, it would be better to cast the '300L' to the appropriate type. (And do not change the std::max at all, which should be working fine?) That way, if the type of Height() should ever change to a type larger than tools::Long, the std::min call wouldn't silently truncate the first argument." This reverts commit 648edf96cde392545749923dc0c748e0bb31b5f6. Change-Id: I1e3cb70750d979468556ced7e7942abcb17fca98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109544 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index 333cf1087f05..b9120b0371c8 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -76,10 +76,9 @@ void FontFeaturesDialog::initialize()
fillGrid(rFilteredFontFeatures);
m_xContentWindow->set_size_request(
- -1,
- std::min<tools::Long>(std::max<tools::Long>(m_xContentWindow->get_preferred_size().Height(),
- m_xContentGrid->get_preferred_size().Height()),
- 300));
+ -1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(),
+ m_xContentGrid->get_preferred_size().Height()),
+ static_cast<tools::Long>(300L)));
updateFontPreview();
}