summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-04 10:08:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-04 10:12:25 +0100
commita4b581bb996142d2906f23161ec673f958511649 (patch)
tree22d82f4623e6ca74d5d0ebac707914a8ab1e52ca
parente9c01db5268a16d657d20f07a083583c2d2b011c (diff)
Resolves: tdf#107603 crash after loading new numrule in numbering dialog
Change-Id: I0f270793a4b0312e23079789a37c402b31e54238
-rw-r--r--sw/source/ui/misc/outline.cxx3
-rw-r--r--sw/source/uibase/inc/outline.hxx5
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 8aa522fc0d87..f58153e81672 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -307,6 +307,9 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool )
{
xNumRule.reset(pRules->MakeNumRule(rWrtSh));
xNumRule->SetRuleType( OUTLINE_RULE );
+ SfxTabPage* pOutlinePage = GetTabPage(m_nOutlineId);
+ assert(pOutlinePage);
+ static_cast<SwOutlineSettingsTabPage*>(pOutlinePage)->SetNumRule(xNumRule.get());
}
else
*xNumRule = *rWrtSh.GetOutlineNumRule();
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index b45ca7f26a90..7154dd394cc4 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -133,6 +133,11 @@ public:
virtual void Reset( const SfxItemSet* rSet ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
+ void SetNumRule(SwNumRule *pRule)
+ {
+ pNumRule = pRule;
+ m_pPreviewWIN->SetNumRule(pNumRule);
+ }
};
#endif