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 @@ ...@@ -19,7 +19,6 @@
#include "ParaPropertyPanel.hxx" #include "ParaPropertyPanel.hxx"
#include "ParaPropertyPanel.hrc" #include "ParaPropertyPanel.hrc"
#include "ParaLineSpacingControl.hxx"
#include "ParaBulletsPopup.hxx" #include "ParaBulletsPopup.hxx"
#include "ParaBulletsControl.hxx" #include "ParaBulletsControl.hxx"
#include "ParaNumberingPopup.hxx" #include "ParaNumberingPopup.hxx"
...@@ -313,24 +312,12 @@ void ParaPropertyPanel::InitToolBoxSpacing() ...@@ -313,24 +312,12 @@ void ParaPropertyPanel::InitToolBoxSpacing()
m_eULSpaceUnit = maULSpaceControl.GetCoreMetric(); 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() void ParaPropertyPanel::initial()
{ {
//toolbox //toolbox
InitToolBoxIndent(); InitToolBoxIndent();
InitToolBoxBulletsNumbering(); InitToolBoxBulletsNumbering();
InitToolBoxSpacing(); InitToolBoxSpacing();
InitToolBoxLineSpacing();
} }
// for Numbering & Bullet // for Numbering & Bullet
...@@ -494,20 +481,6 @@ IMPL_LINK(ParaPropertyPanel, ClickProDemote_Hdl_Impl, ToolBox *, pControl) ...@@ -494,20 +481,6 @@ IMPL_LINK(ParaPropertyPanel, ClickProDemote_Hdl_Impl, ToolBox *, pControl)
return( 0L ); 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 // for Paragraph Spacing
IMPL_LINK_NOARG( ParaPropertyPanel, ULSpaceHdl_Impl) IMPL_LINK_NOARG( ParaPropertyPanel, ULSpaceHdl_Impl)
...@@ -968,12 +941,6 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI ...@@ -968,12 +941,6 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI
return eUnit; return eUnit;
} }
/*
PopupControl* ParaPropertyPanel::CreateLineSpacingControl (PopupContainer* pParent)
{
return new ParaLineSpacingControl(pParent, *this);
}*/
PopupControl* ParaPropertyPanel::CreateBulletsPopupControl (PopupContainer* pParent) PopupControl* ParaPropertyPanel::CreateBulletsPopupControl (PopupContainer* pParent)
{ {
return new ParaBulletsControl(pParent, *this); return new ParaBulletsControl(pParent, *this);
...@@ -1022,7 +989,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, ...@@ -1022,7 +989,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
mxFrame(rxFrame), mxFrame(rxFrame),
maContext(), maContext(),
mpBindings(pBindings), mpBindings(pBindings),
//maLineSpacePopup(this, ::boost::bind(&ParaPropertyPanel::CreateLineSpacingControl, this, _1)),
maBulletsPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBulletsPopupControl, this, _1)), maBulletsPopup(this, ::boost::bind(&ParaPropertyPanel::CreateBulletsPopupControl, this, _1)),
maNumberingPopup(this, ::boost::bind(&ParaPropertyPanel::CreateNumberingPopupControl, this, _1)), maNumberingPopup(this, ::boost::bind(&ParaPropertyPanel::CreateNumberingPopupControl, this, _1)),
mxSidebar(rxSidebar) mxSidebar(rxSidebar)
...@@ -1046,7 +1012,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, ...@@ -1046,7 +1012,6 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
get(mpTbxIndent_IncDec, "indent"); get(mpTbxIndent_IncDec, "indent");
get(mpTbxProDemote, "promotedemote"); get(mpTbxProDemote, "promotedemote");
get(mpLineSPTbx, "linespacing");
get(mpTbxUL_IncDec, "paraspacing"); get(mpTbxUL_IncDec, "paraspacing");
initial(); initial();
......
...@@ -92,7 +92,6 @@ private: ...@@ -92,7 +92,6 @@ private:
ToolBox* mpTbxUL_IncDec; ToolBox* mpTbxUL_IncDec;
SvxRelativeField* mpTopDist; SvxRelativeField* mpTopDist;
SvxRelativeField* mpBottomDist; SvxRelativeField* mpBottomDist;
ToolBox* mpLineSPTbx;
ToolBox* mpTbxIndent_IncDec; ToolBox* mpTbxIndent_IncDec;
ToolBox* mpTbxProDemote; ToolBox* mpTbxProDemote;
SvxRelativeField* mpLeftIndent; SvxRelativeField* mpLeftIndent;
...@@ -172,8 +171,6 @@ private: ...@@ -172,8 +171,6 @@ private:
void initial(); void initial();
void ReSize(bool bSize); void ReSize(bool bSize);
//PopupControl* CreateLineSpacingControl (PopupContainer* pParent);
PopupControl* CreateBulletsPopupControl (PopupContainer* pParent); PopupControl* CreateBulletsPopupControl (PopupContainer* pParent);
PopupControl* CreateNumberingPopupControl (PopupContainer* pParent); PopupControl* CreateNumberingPopupControl (PopupContainer* pParent);
DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*); DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*);
...@@ -182,7 +179,6 @@ private: ...@@ -182,7 +179,6 @@ private:
void InitToolBoxIndent(); void InitToolBoxIndent();
void InitToolBoxBulletsNumbering(); void InitToolBoxBulletsNumbering();
void InitToolBoxSpacing(); void InitToolBoxSpacing();
void InitToolBoxLineSpacing();
}; };
} } // end of namespace ::svx::sidebar } } // end of namespace ::svx::sidebar
......
...@@ -412,11 +412,10 @@ ...@@ -412,11 +412,10 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkToolbar" id="linespacing"> <object class="sfxlo-SidebarToolBox" id="linespacing">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="has_tooltip">True</property> <property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Line Spacing</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<child> <child>
<object class="GtkMenuToolButton" id="setlinespacing"> <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