From 257a187af4165571aa379ee6e00e5fb8d1167c82 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 22 Nov 2018 16:53:36 +0000 Subject: tdf#120426 save the style names when set or changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit instead of waiting until gaining focus of the listbox, because of the differences in what that focus means in the different backends. It was an odd way to do things anyway. Change-Id: I072e3da04db184b49a86a9888080b60223813729 Reviewed-on: https://gerrit.libreoffice.org/63820 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/misc/outline.cxx | 6 ++++-- sw/source/uibase/inc/outline.hxx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 39fa5cfd4749..112d35de150d 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -411,7 +411,6 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(TabPageParent pPage, m_xLevelLB->connect_changed(LINK(this, SwOutlineSettingsTabPage, LevelHdl)); m_xAllLevelNF->connect_value_changed(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); m_xCollBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, CollSelect)); - m_xCollBox->connect_focus_in(LINK(this, SwOutlineSettingsTabPage, CollSelectGetFocus)); m_xNumberBox->connect_changed(LINK(this, SwOutlineSettingsTabPage, NumberSelect)); m_xPrefixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify)); m_xSuffixED->connect_changed(LINK(this, SwOutlineSettingsTabPage, DelimModify)); @@ -609,9 +608,10 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, weld::ComboBox&, rBox, void ) } SetModified(); + CollSave(); } -IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CollSelectGetFocus, weld::Widget&, void) +void SwOutlineSettingsTabPage::CollSave() { for (sal_uInt8 i = 0; i < MAXLEVEL; ++i) aSaveCollNames[i] = pCollNames[i]; @@ -724,6 +724,8 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) pNumRule = static_cast(GetDialogController())->GetNumRule(); pCollNames = static_cast(GetDialogController())->GetCollNames(); + CollSave(); + m_aPreviewWIN.SetNumRule(pNumRule); m_aPreviewWIN.SetOutlineNames(pCollNames); // set start value - nActLevel must be 1 here diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index 114372f39863..c77970db5072 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -100,7 +100,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage DECL_LINK( LevelHdl, weld::TreeView&, void ); DECL_LINK( ToggleComplete, weld::SpinButton&, void ); DECL_LINK( CollSelect, weld::ComboBox&, void ); - DECL_LINK( CollSelectGetFocus, weld::Widget&, void ); + void CollSave(); DECL_LINK( NumberSelect, weld::ComboBox&, void ); DECL_LINK( DelimModify, weld::Entry&, void ); DECL_LINK( StartModified, weld::SpinButton&, void ); -- cgit