[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: KWord & Chapters...
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2003-02-18 19:01:22
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 17 February 2003 23:26, Rodolfo Conde Martinez wrote:
> The 'Introduction' word is with head 1, thats fine, but when generating a
> contents table its not included.....is this a missing feature or how do i
> include it in the toc ??
Ouch. I made a choice, long ago, which goes against this:
// We recognize headers by the "numbering" property of the paragraph
// This way, we don't rely on a particular name (breaks when renaming)
// nor on whether the user used styles or not.
// It even lets a user create two styles for the same level of chapter.
if ( p->counter() && p->counter()->numbering() == KoParagCounter::NUM_CHAPTER )
What I apparently missed is the fact that people might not only want
numbered paragraphs in a Table Of Contents.
The fix for your problem is easy: the above logic (kword/contents.cc:68)
needs to be turned into
if ( p->style() && p->style()->name().startsWith( "Head" ) )
But this isn't a good long-term solution. The above problems will happen.
A user creating a style named "Titre 4" (french for "Head 4") will have no way
to include it in the TOC.
I think the only solution is to either
1) ask which styles to use when "Insert / Table Of Contents" is being called.
or
2) add a checkbox to the style manager, titled "Include in Table Of Contents".
OOo seems to have "Outline styles" which are separate from normal "paragraph styles",
if I read the doc correctly - this would mean something like solution 2).
How does that sound?
- --
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+UoMD72KcVAmwbhARAt6uAJ4/JLTzjK5+OInI/l1q+R4G7rVaUQCgrfd5
qDZ4XDKrsFmtxcu6y8FOH8Y=
=5n2p
-----END PGP SIGNATURE-----
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic