diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-17 10:32:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-17 22:06:55 +0100 |
commit | 83057749a921286add0b7e588f67cd3522125665 (patch) | |
tree | 44196c674bedaa29fbe08642339db6f606ea0925 /sw/source/ui | |
parent | df24517ed069092ee34eba77d045cb68b51530b0 (diff) |
Resolves: tdf#130045 dial control frame not hidden along with the control
Change-Id: Idcdf3d748849fbe1ba1a6cce278373e349ba1e5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86967
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7bb7c04b752d..480611b6a23e 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2316,12 +2316,13 @@ SwGrfExtPage::SwGrfExtPage(weld::Container* pPage, weld::DialogController* pCont // RotGrfFlyFrame: Need Angle and RotateControls now , m_xFlAngle(m_xBuilder->weld_frame("FL_ANGLE")) , m_xNfAngle(m_xBuilder->weld_metric_spin_button("NF_ANGLE", FieldUnit::DEGREE)) - , m_xCtlAngle(new weld::CustomWeld(*m_xBuilder, "CTL_ANGLE", m_aCtlAngle)) + , m_xCtlAngle(new svx::DialControl(m_xBuilder->weld_scrolled_window("anglepreview"))) + , m_xCtlAngleWin(new weld::CustomWeld(*m_xBuilder, "CTL_ANGLE", *m_xCtlAngle)) , m_xBmpWin(new weld::CustomWeld(*m_xBuilder, "preview", m_aBmpWin)) { m_aBmpWin.SetBitmapEx(BitmapEx(RID_BMP_PREVIEW_FALLBACK)); - m_aCtlAngle.SetLinkedField(m_xNfAngle.get(), 2); + m_xCtlAngle->SetLinkedField(m_xNfAngle.get(), 2); SetExchangeSupport(); m_xMirrorHorzBox->connect_toggled(LINK(this, SwGrfExtPage, MirrorHdl)); @@ -2332,6 +2333,7 @@ SwGrfExtPage::SwGrfExtPage(weld::Container* pPage, weld::DialogController* pCont SwGrfExtPage::~SwGrfExtPage() { m_xBmpWin.reset(); + m_xCtlAngleWin.reset(); m_xCtlAngle.reset(); m_xGrfDlg.reset(); } @@ -2357,13 +2359,13 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet) // RotGrfFlyFrame: Get RotationAngle and set at control if(SfxItemState::SET == rSet->GetItemState( SID_ATTR_TRANSFORM_ANGLE, false, &pItem)) { - m_aCtlAngle.SetRotation(static_cast<const SfxInt32Item*>(pItem)->GetValue()); + m_xCtlAngle->SetRotation(static_cast<const SfxInt32Item*>(pItem)->GetValue()); } else { - m_aCtlAngle.SetRotation(0); + m_xCtlAngle->SetRotation(0); } - m_aCtlAngle.SaveValue(); + m_xCtlAngle->SaveValue(); ActivatePage(*rSet); } @@ -2496,9 +2498,9 @@ bool SwGrfExtPage::FillItemSet( SfxItemSet *rSet ) } // RotGrfFlyFrame: Safe rotation if modified - if(m_aCtlAngle.IsValueModified()) + if(m_xCtlAngle->IsValueModified()) { - rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ANGLE), m_aCtlAngle.GetRotation())); + rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ANGLE), m_xCtlAngle->GetRotation())); bModified = true; } |