[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/vcl vcl/source

2018-06-14 Thread Caolán McNamara
 cui/source/inc/chardlg.hxx  |   23 +++
 cui/source/tabpages/chardlg.cxx |  130 +---
 cui/uiconfig/ui/twolinespage.ui |  117 ++--
 include/vcl/builder.hxx |2 
 vcl/source/window/builder.cxx   |   12 +++
 5 files changed, 164 insertions(+), 120 deletions(-)

New commits:
commit fa5f3096c9f669a063fe81325b5b47c6903d94a5
Author: Caolán McNamara 
Date:   Wed Jun 13 16:31:39 2018 +0100

weld SvxCharTwoLinesPage

Change-Id: I54a8963cd8b12f5fd51bf6b3bb791a4a15fbd13d
Reviewed-on: https://gerrit.libreoffice.org/55766
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index fd46e3c3c334..489ea991b5a4 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -354,32 +354,31 @@ public:
 
 // class SvxCharTwoLinesPage -
 
-class SvxCharTwoLinesPage : public SvxCharBasePage
+class SvxCharTwoLinesPage : public CharBasePage
 {
 friend class VclPtr;
 private:
 static const sal_uInt16 pTwoLinesRanges[];
-VclPtr   m_pTwoLinesBtn;
-VclPtr   m_pEnclosingFrame;
-VclPtrm_pStartBracketLB;
-VclPtrm_pEndBracketLB;
-
 sal_uInt16  m_nStartBracketPosition;
 sal_uInt16  m_nEndBracketPosition;
 
-SvxCharTwoLinesPage(vcl::Window* pParent, const SfxItemSet& rSet);
+std::unique_ptr  m_xTwoLinesBtn;
+std::unique_ptr m_xEnclosingFrame;
+std::unique_ptr m_xStartBracketLB;
+std::unique_ptr m_xEndBracketLB;
+
+SvxCharTwoLinesPage(TabPageParent pParent, const SfxItemSet& rSet);
 
 voidUpdatePreview_Impl();
 voidInitialize();
-voidSelectCharacter( ListBox* pBox );
-voidSetBracket( sal_Unicode cBracket, bool bStart );
+voidSelectCharacter(weld::TreeView* pBox);
+voidSetBracket(sal_Unicode cBracket, bool bStart);
 
-DECL_LINK(TwoLinesHdl_Impl, Button*, void);
-DECL_LINK(CharacterMapHdl_Impl, ListBox&, void );
+DECL_LINK(TwoLinesHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(CharacterMapHdl_Impl, weld::TreeView&, void);
 
 public:
 virtual ~SvxCharTwoLinesPage() override;
-virtual void dispose() override;
 
 using SfxTabPage::ActivatePage;
 using SfxTabPage::DeactivatePage;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 22422651f504..c2b7a78eda83 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3130,45 +3130,33 @@ void SvxCharPositionPage::PageCreated(const 
SfxAllItemSet& aSet)
 }
 // class SvxCharTwoLinesPage 
 
-SvxCharTwoLinesPage::SvxCharTwoLinesPage(vcl::Window* pParent, const 
SfxItemSet& rInSet)
-: SvxCharBasePage(pParent, "TwoLinesPage", "cui/ui/twolinespage.ui", 
rInSet)
+SvxCharTwoLinesPage::SvxCharTwoLinesPage(TabPageParent pParent, const 
SfxItemSet& rInSet)
+: CharBasePage(pParent, "cui/ui/twolinespage.ui", "TwoLinesPage", rInSet)
 , m_nStartBracketPosition( 0 )
 , m_nEndBracketPosition( 0 )
+, m_xTwoLinesBtn(m_xBuilder->weld_check_button("twolines"))
+, m_xEnclosingFrame(m_xBuilder->weld_widget("enclosing"))
+, m_xStartBracketLB(m_xBuilder->weld_tree_view("startbracket"))
+, m_xEndBracketLB(m_xBuilder->weld_tree_view("endbracket"))
 {
-get(m_pTwoLinesBtn, "twolines");
-get(m_pEnclosingFrame, "enclosing");
-get(m_pStartBracketLB, "startbracket");
-get(m_pEndBracketLB, "endbracket");
-
-get(m_pPreviewWin, "preview");
-
+m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWin));
 Initialize();
 }
 
 SvxCharTwoLinesPage::~SvxCharTwoLinesPage()
 {
-disposeOnce();
-}
-
-void SvxCharTwoLinesPage::dispose()
-{
-m_pTwoLinesBtn.clear();
-m_pEnclosingFrame.clear();
-m_pStartBracketLB.clear();
-m_pEndBracketLB.clear();
-SvxCharBasePage::dispose();
 }
 
 void SvxCharTwoLinesPage::Initialize()
 {
-m_pTwoLinesBtn->Check( false );
-TwoLinesHdl_Impl( nullptr );
+m_xTwoLinesBtn->set_active(false);
+TwoLinesHdl_Impl(*m_xTwoLinesBtn);
 
-m_pTwoLinesBtn->SetClickHdl( LINK( this, SvxCharTwoLinesPage, 
TwoLinesHdl_Impl ) );
+m_xTwoLinesBtn->connect_toggled(LINK(this, SvxCharTwoLinesPage, 
TwoLinesHdl_Impl));
 
-Link aLink = LINK( this, SvxCharTwoLinesPage, 
CharacterMapHdl_Impl );
-m_pStartBracketLB->SetSelectHdl( aLink );
-m_pEndBracketLB->SetSelectHdl( aLink );
+Link aLink = LINK(this, SvxCharTwoLinesPage, 
CharacterMapHdl_Impl);
+m_xStartBracketLB->connect_changed(aLink);
+m_xEndBracketLB->connect_changed(aLink);
 
 SvxFont& rFont = GetPreviewFont();
 SvxFont& rCJKFont = GetPreviewCJKFont();
@@ -3178,10 +3166,9 @@ void 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/vcl

2018-05-29 Thread Caolán McNamara
 cui/source/inc/transfrm.hxx   |   70 +++---
 cui/source/tabpages/transfrm.cxx  |  439 --
 cui/uiconfig/ui/possizetabpage.ui |  145 +++-
 include/vcl/customweld.hxx|1 
 4 files changed, 311 insertions(+), 344 deletions(-)

New commits:
commit 7ea2b86a7f82860be35bd1f7a4597d33cc82cef6
Author: Caolán McNamara 
Date:   Mon May 28 16:51:20 2018 +0100

weld SvxPositionSizeTabPage

Change-Id: Ic642d6ab2470a14b3a1d83284407fc690d5eba88
Reviewed-on: https://gerrit.libreoffice.org/54975
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 94fa4836de51..959cd6bd8f4d 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -74,32 +74,6 @@ class SvxPositionSizeTabPage : public SvxTabPage
 static const sal_uInt16 pPosSizeRanges[];
 
 private:
-// position
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlPos;
-
-// size
-VclPtrm_pFlSize;
-VclPtr   m_pFtWidth;
-VclPtr m_pMtrWidth;
-VclPtr   m_pFtHeight;
-VclPtr m_pMtrHeight;
-VclPtrm_pCbxScale;
-VclPtr  m_pCtlSize;
-
-// protect
-VclPtrm_pFlProtect;
-VclPtr m_pTsbPosProtect;
-VclPtr m_pTsbSizeProtect;
-
-// adjust
-VclPtrm_pFlAdjust;
-VclPtr m_pTsbAutoGrowWidth;
-VclPtr m_pTsbAutoGrowHeight;
-
-private:
 const SfxItemSet&   mrOutAttrs;
 
 const SdrView*  mpView;
@@ -123,22 +97,48 @@ private:
 double  mfOldHeight;
 RectPoint  meRP;
 
+RectCtl  m_aCtlPos;
+RectCtl  m_aCtlSize;
 
-DECL_LINK( ChangePosProtectHdl, Button*, void );
-DECL_LINK( ChangeSizeProtectHdl, Button*, void );
+// position
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlPos;
+
+// size
+std::unique_ptr m_xFlSize;
+std::unique_ptr m_xFtWidth;
+std::unique_ptr m_xMtrWidth;
+std::unique_ptr m_xFtHeight;
+std::unique_ptr m_xMtrHeight;
+std::unique_ptr m_xCbxScale;
+std::unique_ptr m_xCtlSize;
+
+// protect
+std::unique_ptr m_xFlProtect;
+std::unique_ptr m_xTsbPosProtect;
+std::unique_ptr m_xTsbSizeProtect;
+
+// adjust
+std::unique_ptr m_xFlAdjust;
+std::unique_ptr m_xTsbAutoGrowWidth;
+std::unique_ptr m_xTsbAutoGrowHeight;
+
+DECL_LINK(ChangePosProtectHdl, weld::ToggleButton&, void);
+DECL_LINK(ChangeSizeProtectHdl, weld::ToggleButton&, void);
 
 void SetMinMaxPosition();
 void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& 
rRange);
 
-DECL_LINK( ChangeWidthHdl, Edit&, void );
-DECL_LINK( ChangeHeightHdl, Edit&, void );
-DECL_LINK( ClickSizeProtectHdl, Button*, void );
-DECL_LINK( ClickAutoHdl, Button*, void );
+DECL_LINK( ChangeWidthHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ChangeHeightHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ClickSizeProtectHdl, weld::ToggleButton&, void );
+DECL_LINK( ClickAutoHdl, weld::ToggleButton&, void );
 
 public:
-SvxPositionSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  
);
+SvxPositionSizeTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxPositionSizeTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() {  return pPosSizeRanges; }
@@ -149,8 +149,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 570635d1737a..0e67b85261b9 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -804,8 +804,8 @@ void SvxSlantTabPage::PointChanged( weld::DrawingArea*, 
RectPoint )
 |*  Dialog for changing position and size of graphic objects
 |*
 \/
-SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const 
SfxItemSet& rInAttrs)
-: SvxTabPage(pParent,"PositionAndSize","cui/ui/possizetabpage.ui", 
rInAttrs)
+SvxPositionSizeTabPage::SvxPositionSizeTabPage(TabPageParent pParent, const 
SfxItemSet&