Jean-Marc Lasgouttes wrote:
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
The following patch introduces LabelString for counters. This
labelstring will be used in several places:
Here is the updated version of the patch, the shortcoming have been
resolved and the layout files have been updated. For example floats
and footnotes are now correctly numbered by chapter for book and
report classes.
I updated the documentation too.
Note that the rest of the layut files should be updated. I do not
think they are broken by the patch, but they can be simplified.
Some cosmetic comments on the code (all IMHO):
@@ -922,14 +928,31 @@ void TextClass::readCounter(Lexer & lexr
switch (static_cast<CounterTags>(le)) {
case CT_NAME:
lexrc.next();
- name = from_ascii(lexrc.getString());
+ name = lexrc.getDocString();
+ if (ctrs_->hasCounter(name))
ctrs_ should be renamed to counters_ and the line above should be:
+ if (counters_->has(name))
The same for ctrs_->newCounter() which could become counters_->new(). In
general I think that members should have explicit naming (I know this is
not your doing).
Some of the new methods lacks doxygen comments. Also Lars said someday
that we should standardize on a doxygen style ex:
/// Title.
/**
* Optional detailed comments.
*/
The trailing dot after Title is *important*.
For return values, you could use "\return" and/or "\retval".
Otherwise, I like the results :-)
Abdel.