summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail..com>2019-07-20 13:17:06 -0800
committerJim Raykowski <raykowj@gmail.com>2019-07-27 05:11:37 +0200
commit5f5bfddf5fe8bbcd77dbb040d0bf77d595c90f30 (patch)
tree92c651c26c53b7cfa515ddb24a13c38e47e1d771 /cui
parent08995b6a764c9e387c94f6ce5faba2145b5512f9 (diff)
tdf#94395 Show paragraph style line spacing in organizer contains
This patch provides functionality to SvxLineSpacingItem::GetPresentation and also fixes tdf#126466 Change-Id: I9e0cb042c83c568051061de3467d402ef88cfdf4 Reviewed-on: https://gerrit.libreoffice.org/76069 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/paragrph.hxx3
-rw-r--r--cui/source/tabpages/paragrph.cxx12
2 files changed, 13 insertions, 2 deletions
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index bccaefeb6cac..35a9bea4b30c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -90,10 +90,13 @@ private:
void UpdateExample_Impl();
void ELRLoseFocus();
+ DECL_LINK(LineDistPopupHdl_Impl, weld::ComboBox&, void);
DECL_LINK(LineDistHdl_Impl, weld::ComboBox&, void);
DECL_LINK(ModifyHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(AutoHdl_Impl, weld::ToggleButton&, void);
+ bool m_bLineDistToggled = false;
+
protected:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index fb00c542c08c..0560ab0c0e2d 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -226,7 +226,8 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
int nPos = m_xLineDist->get_active();
if ( nPos != -1 &&
- ( m_xLineDist->get_value_changed_from_saved() ||
+ ( m_bLineDistToggled ||
+ m_xLineDist->get_value_changed_from_saved() ||
m_xLineDistAtPercentBox->get_value_changed_from_saved() ||
m_xLineDistAtMetricBox->get_value_changed_from_saved() ) )
{
@@ -264,7 +265,8 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
eState = GetItemSet().GetItemState( nWhich );
pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_LINESPACE );
- if ( !pOld || !( *static_cast<const SvxLineSpacingItem*>(pOld) == aSpacing ) ||
+ if ( m_bLineDistToggled ||
+ !pOld || !( *static_cast<const SvxLineSpacingItem*>(pOld) == aSpacing ) ||
SfxItemState::DONTCARE == eState )
{
rOutSet->Put( aSpacing );
@@ -789,6 +791,11 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl
LineDistHdl_Impl( *m_xLineDist );
}
+IMPL_LINK_NOARG(SvxStdParagraphTabPage, LineDistPopupHdl_Impl, weld::ComboBox&, void)
+{
+ m_bLineDistToggled = true;
+}
+
IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, weld::ComboBox&, rBox, void)
{
switch (rBox.get_active())
@@ -863,6 +870,7 @@ IMPL_LINK_NOARG(SvxStdParagraphTabPage, ModifyHdl_Impl, weld::MetricSpinButton&,
void SvxStdParagraphTabPage::Init_Impl()
{
+ m_xLineDist->connect_popup_toggled(LINK(this, SvxStdParagraphTabPage, LineDistPopupHdl_Impl));
m_xLineDist->connect_changed(LINK(this, SvxStdParagraphTabPage, LineDistHdl_Impl));
Link<weld::MetricSpinButton&,void> aLink2 = LINK(this, SvxStdParagraphTabPage, ELRLoseFocusHdl);