summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-09 13:54:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-09 20:59:06 +0100
commita59952f64c6e78f8e5bad6d6ab8373879f6a826f (patch)
treea0097c9f4791e0871f125c99ea3c3edec7a9e726
parent5cefbd837a9e41102270d8c60010e3496b76f0a0 (diff)
Resolves: tdf#132591 set property if Fixed Ratio checkbox was toggled
Change-Id: I10a2085e91bb592a8ccea7a50b7188250288e74a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129730 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 49999bb82586..e002d74ca35a 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())
{