sw/source/ui/frmdlg/frmpage.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit d0702a3f17c1fbd1b8ffb9ca0b275943e1a1f442 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun May 19 15:08:14 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun May 19 20:08:15 2024 +0200 Resolves: tdf#151382 we want to save the FN_KEEP_ASPECT_RATIO state and not if it is implied to be toggled on by SwFormatFrameSize::SYNCED in which case on "ok" FN_KEEP_ASPECT_RATIO is set from the ui state so both tdf#151382 and tdf132591 work Change-Id: I039de0e8f0f9adcc3c02f0e07c12d83cd807887b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 6d6a1fefd49a..589af7dbb0a0 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2321,6 +2321,8 @@ void SwFramePage::Init(const SfxItemSet& rSet) if (SfxItemState::SET == rSet.GetItemState(FN_KEEP_ASPECT_RATIO)) m_xFixedRatioCB->set_active(rSet.Get(FN_KEEP_ASPECT_RATIO).GetValue()); + // see tdf#132591 and tdf#151382 for some examples of FN_KEEP_ASPECT_RATIO cases + m_xFixedRatioCB->save_state(); // columns SwFormatCol aCol( rSet.Get(RES_COL) ); @@ -2379,7 +2381,6 @@ 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()) {