[Libreoffice-commits] core.git: sw/source
Julien Nabet
serval2412 at yahoo.fr
Sat Apr 7 15:45:58 UTC 2018
sw/source/core/doc/docnew.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 20a35c313496b1ca63d3bb79e0a88a3d862d8747
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Feb 4 12:13:48 2018 +0100
When clearing mpNumRuleTable, clear too maNumRuleMap and maListStyleLists
Open a brand new file on Writer
type "fn", then F3 to open formula editor
console logs show:
<DocumentListsManager::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect.
bt:
0 0x00007fffc91ebdee in sw::DocumentListsManager::createListForListStyle(rtl::OUString const&) (this=0x55555c7e85c0, sListStyleName="Outline")
at /home/julien/lo/libreoffice/sw/source/core/doc/DocumentListsManager.cxx:98
1 0x00007fffc917ad81 in SwDoc::AddNumRule(SwNumRule*) (this=0x55555c7e2ef0, pRule=0x55555c872a50) at /home/julien/lo/libreoffice/sw/source/core/doc/docnum.cxx:2142
2 0x00007fffc915b04b in SwDoc::ClearDoc() (this=0x55555c7e2ef0) at /home/julien/lo/libreoffice/sw/source/core/doc/docnew.cxx:700
3 0x00007fffc961f9dc in SwXMLTextBlocks::ClearDoc() (this=0x555558cc15b0) at /home/julien/lo/libreoffice/sw/source/core/swg/SwXMLTextBlocks.cxx:134
4 0x00007fffc96306ef in SwTextBlocks::BeginGetDoc(unsigned short) (this=0x55555bc7ba00, n=11) at /home/julien/lo/libreoffice/sw/source/core/swg/swblocks.cxx:398
5 0x00007fffc9141032 in SwDoc::InsertGlossary(SwTextBlocks&, rtl::OUString const&, SwPaM&, SwCursorShell*) (this=0x5555579631a0, rBlock=..., rEntry="fn", rPaM=
SwPaM = {...}, pShell=0x555557a23cb0) at /home/julien/lo/libreoffice/sw/source/core/doc/docglos.cxx:139
6 0x00007fffc9409518 in SwEditShell::InsertGlossary(SwTextBlocks&, rtl::OUString const&) (this=0x555557a23cb0, rGlossary=..., rStr="fn")
at /home/julien/lo/libreoffice/sw/source/core/edit/edglss.cxx:42
7 0x00007fffc9d4d31e in SwGlossaryHdl::Expand(rtl::OUString const&, SwGlossaries*, SwTextBlocks*) (this=0x55555bc9dbc0, rShortName="fn", pGlossaries=0x55555beb9530, pGlossary=0x55555bc7ba00) at /home/julien/lo/libreoffice/sw/source/uibase/dochdl/gloshdl.cxx:503
8 0x00007fffc9d4c93e in SwGlossaryHdl::ExpandGlossary() (this=0x55555bc9dbc0) at /home/julien/lo/libreoffice/sw/source/uibase/dochdl/gloshdl.cxx:383
9 0x00007fffc9ec3322 in SwTextShell::ExecGlossary(SfxRequest&) (this=0x555558402620, rReq=...) at /home/julien/lo/libreoffice/sw/source/uibase/shells/textglos.cxx:57
10 0x00007fffc9ec5422 in SfxStubSwTextShellExecGlossary(SfxShell*, SfxRequest&) (pShell=0x555558402620, rReq=...)
at /home/julien/lo/libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:2996
11 0x00007ffff1aa5b7a in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x555558402620, pFunc=0x7fffc9ec53f4 <SfxStubSwTextShellExecGlossary(SfxShell*, SfxRequest&)>, rReq=...) at /home/julien/lo/libreoffice/include/sfx2/shell.hxx:210
12 0x00007ffff1a9c4b2 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x555557a0add0, rShell=..., rSlot=..., rReq=..., bRecord=true)
at /home/julien/lo/libreoffice/sfx2/source/control/dispatch.cxx:377
Since maListStyleLists is private member, we must use getIDocumentListsAccess().deleteListForListStyle
Change-Id: I8c5a80adbba29b89784a49983fc69d300300334a
Reviewed-on: https://gerrit.libreoffice.org/49200
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 1f7e0f3d5a16..9d6027622514 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -690,8 +690,12 @@ void SwDoc::ClearDoc()
// *after* the document nodes are deleted.
mpOutlineRule = nullptr;
for( SwNumRule* pNumRule : *mpNumRuleTable )
+ {
+ getIDocumentListsAccess().deleteListForListStyle(pNumRule->GetName());
delete pNumRule;
+ }
mpNumRuleTable->clear();
+ maNumRuleMap.clear();
// creation of new outline numbering rule
mpOutlineRule = new SwNumRule( SwNumRule::GetOutlineRuleName(),
More information about the Libreoffice-commits
mailing list