sw/source/ui/frmdlg/frmpage.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 27b03993c49b3c8a3bafa736db9ca25e834a2195 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 9 13:54:42 2022 +0000 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Thu Feb 10 03:51:27 2022 +0100 Resolves: tdf#132591 set property if Fixed Ratio checkbox was toggled Change-Id: I10a2085e91bb592a8ccea7a50b7188250288e74a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129756 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 5e5629495687..c9b119521850 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1159,7 +1159,8 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet) bool bValueModified = m_xWidthED->get_value_changed_from_saved() || m_xHeightED->get_value_changed_from_saved(); bool bCheckChanged = m_xRelWidthCB->get_state_changed_from_saved() || - m_xRelHeightCB->get_state_changed_from_saved(); + m_xRelHeightCB->get_state_changed_from_saved() || + m_xFixedRatioCB->get_state_changed_from_saved(); bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() && m_xWidthED->get_value() == m_xWidthED->get_min() && @@ -1191,6 +1192,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet) aSz.SetWidthPercent(SwFormatFrameSize::SYNCED); } } + if( !IsInGraficMode() ) { if (m_xAutoHeightCB->get_state_changed_from_saved()) @@ -2190,11 +2192,8 @@ void SwFramePage::Init(const SfxItemSet& rSet) m_nUpperBorder = rUL.GetUpper(); m_nLowerBorder = rUL.GetLower(); - if(SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) - { + if (SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) m_xFixedRatioCB->set_active(static_cast<const SfxBoolItem&>(rSet.Get(FN_KEEP_ASPECT_RATIO)).GetValue()); - m_xFixedRatioCB->save_state(); - } // columns SwFormatCol aCol( rSet.Get(RES_COL) ); @@ -2253,6 +2252,7 @@ void SwFramePage::Init(const SfxItemSet& rSet) if (rSize.GetWidthPercent() == SwFormatFrameSize::SYNCED || rSize.GetHeightPercent() == SwFormatFrameSize::SYNCED) m_xFixedRatioCB->set_active(true); + m_xFixedRatioCB->save_state(); if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED && !m_xRelWidthCB->get_active()) {