[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sd/source

Gülşah Köse (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 13 16:03:47 UTC 2019


 sd/source/ui/dlg/BulletAndPositionDlg.cxx |   11 +++++++++++
 sd/source/ui/inc/BulletAndPositionDlg.hxx |    3 +++
 2 files changed, 14 insertions(+)

New commits:
commit 7558ad766b8a03ef3d16205a506dbeb414b3328f
Author:     Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Thu Jul 25 21:40:48 2019 +0300
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Aug 13 18:03:08 2019 +0200

    tdf#125923 Fix reset button.
    
    Reset/Revert button worked as cancel, not reset.
    That commit provides reset button to do its own job.
    
    Reviewed-on: https://gerrit.libreoffice.org/76341
    Tested-by: Jenkins
    Reviewed-by: Gülşah Köse <gulsah.kose at collabora.com>
    (cherry picked from commit 15664117ef4db51bdcabb46b7990573509da0d73)
    
    Change-Id: I82d3e838bff3fd690cb5a901232ecb5f76257b95
    Reviewed-on: https://gerrit.libreoffice.org/76345
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index c09c6a79987f..f6eb2d709c76 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -34,6 +34,8 @@
 #include <editeng/brushitem.hxx>
 #include <svl/intitem.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/sfxresid.hxx>
+#include <sfx2/strings.hrc>
 #include <vcl/graph.hxx>
 #include <vcl/settings.hxx>
 #include <editeng/flstitem.hxx>
@@ -115,6 +117,7 @@ class SdDrawDocument;
 SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const SfxItemSet& rSet,
                                                  ::sd::View* pView)
     : GenericDialogController(pWindow, "cui/ui/bulletandposition.ui", "BulletAndPosition")
+    , rFirstStateSet(rSet)
     , bLastWidthModified(false)
     , bModified(false)
     , bPreset(false)
@@ -162,6 +165,7 @@ SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
     , m_xSlideRB(m_xBuilder->weld_radio_button("sliderb"))
     , m_xSelectionRB(m_xBuilder->weld_radio_button("selectionrb"))
     , m_xApplyToMaster(m_xBuilder->weld_toggle_button("applytomaster"))
+    , m_xReset(m_xBuilder->weld_button("reset"))
 {
     m_xBulColLB->SetSlotId(SID_ATTR_CHAR_COLOR);
     m_xBulRelSizeMF->set_min(SVX_NUM_REL_SIZE_MIN, FieldUnit::PERCENT);
@@ -187,6 +191,8 @@ SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
         LINK(this, SvxBulletAndPositionDlg, SelectCenterAlignmentHdl_Impl));
     m_xRightTB->connect_toggled(LINK(this, SvxBulletAndPositionDlg, SelectRightAlignmentHdl_Impl));
     m_xApplyToMaster->connect_toggled(LINK(this, SvxBulletAndPositionDlg, ApplyToMasterHdl_Impl));
+    m_xReset->set_label(SfxResId(STR_RESET));
+    m_xReset->connect_clicked(LINK(this, SvxBulletAndPositionDlg, ResetHdl_Impl));
 
     aInvalidateTimer.SetInvokeHandler(
         LINK(this, SvxBulletAndPositionDlg, PreviewInvalidateHdl_Impl));
@@ -1193,6 +1199,11 @@ IMPL_LINK(SvxBulletAndPositionDlg, ApplyToMasterHdl_Impl, weld::ToggleButton&, r
     bApplyToMaster = rButton.get_active();
 }
 
+IMPL_LINK_NOARG(SvxBulletAndPositionDlg, ResetHdl_Impl, weld::Button&, void)
+{
+    Reset(&rFirstStateSet);
+}
+
 IMPL_LINK(SvxBulletAndPositionDlg, EditModifyHdl_Impl, weld::Entry&, rEdit, void)
 {
     EditModifyHdl_Impl(&rEdit);
diff --git a/sd/source/ui/inc/BulletAndPositionDlg.hxx b/sd/source/ui/inc/BulletAndPositionDlg.hxx
index 54fe2abcd057..5dd28638fedc 100644
--- a/sd/source/ui/inc/BulletAndPositionDlg.hxx
+++ b/sd/source/ui/inc/BulletAndPositionDlg.hxx
@@ -57,6 +57,7 @@ class SvxBulletAndPositionDlg : public weld::GenericDialogController
 
     std::unique_ptr<SvxNumRule> pActNum;
     std::unique_ptr<SvxNumRule> pSaveNum;
+    const SfxItemSet& rFirstStateSet;
 
     Size aInitSize[SVX_MAX_NUM];
 
@@ -116,6 +117,7 @@ class SvxBulletAndPositionDlg : public weld::GenericDialogController
     std::unique_ptr<weld::RadioButton> m_xSlideRB;
     std::unique_ptr<weld::RadioButton> m_xSelectionRB;
     std::unique_ptr<weld::ToggleButton> m_xApplyToMaster;
+    std::unique_ptr<weld::Button> m_xReset;
 
     void InitControls();
     /** To switch between the numbering type
@@ -143,6 +145,7 @@ class SvxBulletAndPositionDlg : public weld::GenericDialogController
     DECL_LINK(SelectCenterAlignmentHdl_Impl, weld::ToggleButton&, void);
     DECL_LINK(SelectRightAlignmentHdl_Impl, weld::ToggleButton&, void);
     DECL_LINK(ApplyToMasterHdl_Impl, weld::ToggleButton&, void);
+    DECL_LINK(ResetHdl_Impl, weld::Button&, void);
     void EditModifyHdl_Impl(const weld::Entry*);
     void InitPosAndSpaceMode();
     void SetAlignmentHdl_Impl(SvxAdjust);


More information about the Libreoffice-commits mailing list