svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 7d2b92d0e78751ac00d25dd312f7bc77abe96b4e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Aug 21 12:51:41 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Aug 21 15:04:19 2025 +0200 Resolves: tdf#150743 disable keep ratio is any value is zero can't divide by zero Change-Id: Ia6f60e1614a621cee7eaa6029cf0eefda32210bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189997 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index d6d232286495..802139bbbd64 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -991,6 +991,8 @@ FieldUnit PosSizePropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPo void PosSizePropertyPanel::DisableControls() { + const bool bZeroDimension = mlOldWidth == 0 || mlOldHeight == 0; + if( mbPositionProtected ) { // the position is protected("Position protect" option in modal dialog is checked), @@ -1065,6 +1067,10 @@ void PosSizePropertyPanel::DisableControls() } } } + + // tdf#150743 Disable Keep ratio if there is zero width/height + if (bZeroDimension) + mxCbxScale->set_sensitive(false); } void PosSizePropertyPanel::SetPosSizeMinMax(const Fraction& rUIScale)