Issue 112384 - sw: crash on export of toc to .doc
Summary: sw: crash on export of toc to .doc
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 3.2.1
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: openoffice
QA Contact: issues@sw
Depends on:
Blocks: 90439
  Show dependency tree
Reported: 2010-06-14 14:34 UTC by caolanm
Modified: 2017-05-20 10:22 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

fix up like so (816 bytes, patch)
2010-06-14 14:35 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-06-14 14:34:48 UTC shows a crash on export to
.doc of a TOC

The crash is in 

SwTxtFmtColl* pColl = GetExport().pDoc->FindTxtFmtCollByName(sStyle);
if (!pColl->IsAssignedToListLevelOfOutlineStyle() ||
pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)

IIRC its possible to set a list of styles to generate a TOC from, persumably
this crash happens when a style doesn't actually exist in the document.

If so then this simple patch would avoid the problem
Comment 1 caolanm 2010-06-14 14:35:08 UTC
Created attachment 69983 [details]
fix up like so
Comment 2 openoffice 2010-07-27 15:57:38 UTC
applied patch and verified

changeset:   271037:503495456903
Comment 3 openoffice 2010-07-27 16:13:00 UTC
set target