Kaydet (Commit) e2c9ee8e authored tarafından Jan Holesovsky's avatar Jan Holesovsky

line spacing: Finally use the reworked line spacing popup in the sidebar too.

Change-Id: I7f33a25903dec7e5aa0dc878ff5dea7f35935863
üst f3798fa1
......@@ -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();
......
......@@ -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
......
......@@ -412,11 +412,10 @@
</packing>
</child>
<child>
<object class="GtkToolbar" id="linespacing">
<object class="sfxlo-SidebarToolBox" id="linespacing">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Line Spacing</property>
<property name="hexpand">True</property>
<child>
<object class="GtkMenuToolButton" id="setlinespacing">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment