Bug 265054

Summary: Table of content with empty headings
Product: [Applications] calligrawords Reporter: LukasT <lukast.dev>
Component: generalAssignee: Calligra Words Bugs <calligra-words-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: patch for this bug
TOC
Screenshot in Latest Calligra Words

Description LukasT 2011-02-01 08:40:07 UTC
Created attachment 56725 [details]
patch for this bug

Version:           svn (using KDE 4.5.5) 
OS:                Linux

When the document contain heading with just whitespaces,
this empty heading is added in the toc in words.

The situation is same for OpenOffice but different for MS Office.
MS Office does not include this empty heading into TOC.

I don't know if this is a bug or behaviour.
I suppose that the user should fix his document and
remove the empty heading. 

Reproducible: Always

Steps to Reproduce:
Load some document with table of content.



Test file and patch for fix about to be included.
Comment 1 LukasT 2011-02-01 08:54:22 UTC
Created attachment 56728 [details]
TOC

And here comes the document...
Comment 2 LukasT 2011-02-07 16:40:40 UTC
Git commit 2902a564697b2276d652c19b9e9780376f89754b by Luk���� Tvrd��.
Committed on 07/02/11 at 16:37.
Pushed by lukast into branch 'master'.

Don't include empty headings from document in the table of content.

BUG:265054

M  +9    -1    plugins/textshape/ToCGenerator.cpp     
M  +2    -0    plugins/textshape/ToCGenerator.h     

http://commits.kde.org/calligra/2902a564697b2276d652c19b9e9780376f89754b
Comment 3 swathi 2011-02-10 13:59:36 UTC
Created attachment 57087 [details]
Screenshot in Latest Calligra Words

Tested in git commit e812ba7ebf585736a2587b8a928ff59b1649f3ce.
In this table of contents is dispalyed.