From e2c9ee8e1b404d07e40c35c6dd270ddaec98e43a Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 4 Nov 2014 17:11:27 +0100 Subject: line spacing: Finally use the reworked line spacing popup in the sidebar too. Change-Id: I7f33a25903dec7e5aa0dc878ff5dea7f35935863 --- svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 35 ---------------------- svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 4 --- svx/uiconfig/ui/sidebarparagraph.ui | 3 +- 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 45d7bd5e5d05..5e7604fc9a70 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -19,7 +19,6 @@ #include "ParaPropertyPanel.hxx" #include "ParaPropertyPanel.hrc" -#include "ParaLineSpacingControl.hxx" #include "ParaBulletsPopup.hxx" #include "ParaBulletsControl.hxx" #include "ParaNumberingPopup.hxx" @@ -313,24 +312,12 @@ void ParaPropertyPanel::InitToolBoxSpacing() m_eULSpaceUnit = maULSpaceControl.GetCoreMetric(); } -void ParaPropertyPanel::InitToolBoxLineSpacing() -{ - Link aLink = LINK( this, ParaPropertyPanel, ClickLineSPDropDownHdl_Impl ); - mpLineSPTbx->SetDropdownClickHdl( aLink ); - mpLineSPTbx->SetSelectHdl( aLink ); //support keyinput "ENTER" - - const sal_uInt16 nIdSpacing = mpLineSPTbx->GetItemId(UNO_LINESPACING); - mpLineSPTbx->SetItemBits( nIdSpacing, mpLineSPTbx->GetItemBits( nIdSpacing ) | ToolBoxItemBits::DROPDOWNONLY ); - mpLineSPTbx->SetItemImage(nIdSpacing, maSpace3); -} - void ParaPropertyPanel::initial() { //toolbox InitToolBoxIndent(); InitToolBoxBulletsNumbering(); InitToolBoxSpacing(); - InitToolBoxLineSpacing(); } // for Numbering & Bullet @@ -494,20 +481,6 @@ IMPL_LINK(ParaPropertyPanel, ClickProDemote_Hdl_Impl, ToolBox *, pControl) return( 0L ); } -// for Paragraph Line Spacing -IMPL_LINK( ParaPropertyPanel, ClickLineSPDropDownHdl_Impl, ToolBox*, pBox ) -{ - const sal_uInt16 nId = pBox->GetCurItemId(); - const OUString aCommand(pBox->GetItemCommand(nId)); - - if (aCommand == UNO_LINESPACING) - { - pBox->SetItemDown( nId, true ); - //maLineSpacePopup.Rearrange(meLnSpState,m_eMetricUnit,mpLnSPItem,maContext); - //maLineSpacePopup.Show(*pBox); - } - return (0L); -} // for Paragraph Spacing IMPL_LINK_NOARG( ParaPropertyPanel, ULSpaceHdl_Impl) @@ -968,12 +941,6 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI return eUnit; } -/* -PopupControl* ParaPropertyPanel::CreateLineSpacingControl (PopupContainer* pParent) -{ - return new ParaLineSpacingControl(pParent, *this); -}*/ - PopupControl* ParaPropertyPanel::CreateBulletsPopupControl (PopupContainer* pParent) { return new ParaBulletsControl(pParent, *this); @@ -1022,7 +989,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, mxFrame(rxFrame), maContext(), mpBindings(pBindings), - //maLineSpacePopup(this, ::boost::bind(&ParaPropertyPanel::CreateLineSpacingControl, this, _1)), maBulletsPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBulletsPopupControl, this, _1)), maNumberingPopup(this, ::boost::bind(&ParaPropertyPanel::CreateNumberingPopupControl, this, _1)), mxSidebar(rxSidebar) @@ -1046,7 +1012,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, get(mpTbxIndent_IncDec, "indent"); get(mpTbxProDemote, "promotedemote"); - get(mpLineSPTbx, "linespacing"); get(mpTbxUL_IncDec, "paraspacing"); initial(); diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index f387988d8e12..56179def9973 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -92,7 +92,6 @@ private: ToolBox* mpTbxUL_IncDec; SvxRelativeField* mpTopDist; SvxRelativeField* mpBottomDist; - ToolBox* mpLineSPTbx; ToolBox* mpTbxIndent_IncDec; ToolBox* mpTbxProDemote; SvxRelativeField* mpLeftIndent; @@ -172,8 +171,6 @@ private: void initial(); void ReSize(bool bSize); - - //PopupControl* CreateLineSpacingControl (PopupContainer* pParent); PopupControl* CreateBulletsPopupControl (PopupContainer* pParent); PopupControl* CreateNumberingPopupControl (PopupContainer* pParent); DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*); @@ -182,7 +179,6 @@ private: void InitToolBoxIndent(); void InitToolBoxBulletsNumbering(); void InitToolBoxSpacing(); - void InitToolBoxLineSpacing(); }; } } // end of namespace ::svx::sidebar diff --git a/svx/uiconfig/ui/sidebarparagraph.ui b/svx/uiconfig/ui/sidebarparagraph.ui index ed298f0f924d..cb3dc4c575a6 100644 --- a/svx/uiconfig/ui/sidebarparagraph.ui +++ b/svx/uiconfig/ui/sidebarparagraph.ui @@ -412,11 +412,10 @@ - + True False True - Line Spacing True -- cgit