summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-18 11:22:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-18 16:41:37 +0100
commit1f904541c780207ccb37d1ef41f8b897e50c58cf (patch)
treeb68dcbacc865d496e003cd734e8fcefc35ed7524 /svx
parent5ec0eb98ce870b5da5ef1711b93b09edf36170bd (diff)
tdf#137397 Faulty Height value in Position and Size content panel
Change-Id: Ie7439371cb2d216ca1d95f21db44d203cccd9ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106053 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 47a7d405c6e5..aac8619a448e 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -1057,9 +1057,9 @@ void PosSizePropertyPanel::SetPosSizeMinMax()
double fMaxWidth = maWorkArea.getWidth() - (maRect.getWidth() - fLeft);
double fMaxHeight = maWorkArea.getHeight() - (maRect.getHeight() - fTop);
- mxMtrWidth->set_max(basegfx::fround64(fMaxWidth*100), FieldUnit::NONE);
+ mxMtrWidth->set_max(std::min<sal_Int64>(INT_MAX, basegfx::fround64(fMaxWidth*100)), FieldUnit::NONE);
limitWidth(*mxMtrWidth);
- mxMtrHeight->set_max(basegfx::fround64(fMaxHeight*100), FieldUnit::NONE);
+ mxMtrHeight->set_max(std::min<sal_Int64>(INT_MAX, basegfx::fround64(fMaxHeight*100)), FieldUnit::NONE);
limitWidth(*mxMtrHeight);
}