The point of this will become clear shortly. I hope.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33133
a592a061-630c-0410-9148-
cb99ea01b6c8
-docstring Paragraph::expandLabel(Layout const & layout,
+docstring Paragraph::expandLabel(Layout const & layout,
+ BufferParams const & bparams) const
+{
+ return expandParagraphLabel(layout, bparams, true);
+}
+
+
+docstring Paragraph::expandDocBookLabel(Layout const & layout,
+ BufferParams const & bparams) const
+{
+ return expandParagraphLabel(layout, bparams, false);
+}
+
+
+docstring Paragraph::expandParagraphLabel(Layout const & layout,
BufferParams const & bparams, bool process_appendix) const
{
DocumentClass const & tclass = bparams.documentClass();
BufferParams const & bparams, bool process_appendix) const
{
DocumentClass const & tclass = bparams.documentClass();
docstring parent(fmt, i + 1, j - i - 1);
docstring label = from_ascii("??");
if (tclass.hasLayout(parent))
docstring parent(fmt, i + 1, j - i - 1);
docstring label = from_ascii("??");
if (tclass.hasLayout(parent))
- docstring label = expandLabel(tclass[parent], bparams,
+ docstring label = expandParagraphLabel(tclass[parent], bparams,
process_appendix);
fmt = docstring(fmt, 0, i) + label
+ docstring(fmt, j + 1, docstring::npos);
process_appendix);
fmt = docstring(fmt, 0, i) + label
+ docstring(fmt, j + 1, docstring::npos);
/// recompute this value
void setBeginOfBody();
/// recompute this value
void setBeginOfBody();
+ ///
+ docstring expandLabel(Layout const &, BufferParams const &) const;
+ ///
+ docstring expandDocBookLabel(Layout const &, BufferParams const &) const;
///
docstring const & labelString() const;
///
docstring const & labelString() const;
/// the next two functions are for the manual labels
docstring const getLabelWidthString() const;
/// Set label width string.
void setLabelWidthString(docstring const & s);
/// the next two functions are for the manual labels
docstring const getLabelWidthString() const;
/// Set label width string.
void setLabelWidthString(docstring const & s);
- /// Expand the counters for the labelstring of \c layout
- docstring expandLabel(Layout const &, BufferParams const &,
- bool process_appendix = true) const;
/// Actual paragraph alignment used
char getAlign() const;
/// The nesting depth of a paragraph
/// Actual paragraph alignment used
char getAlign() const;
/// The nesting depth of a paragraph
std::string magicLabel() const;
private:
std::string magicLabel() const;
private:
+ /// Expand the counters for the labelstring of \c layout
+ docstring expandParagraphLabel(Layout const &, BufferParams const &,
+ bool process_appendix) const;
///
void deregisterWords();
///
///
void deregisterWords();
///
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.labeltag());
// We don't care about appendix in DOCBOOK.
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.labeltag());
// We don't care about appendix in DOCBOOK.
- os << par->expandLabel(bstyle, buf.params(), false);
+ os << par->expandDocBookLabel(bstyle, buf.params());
sgml::closeTag(os, bstyle.labeltag());
}
sgml::closeTag(os, bstyle.labeltag());
}
openItemTag(xs, style);
if (par == pbegin && style.htmllabeltag() != "NONE") {
docstring const lbl =
openItemTag(xs, style);
if (par == pbegin && style.htmllabeltag() != "NONE") {
docstring const lbl =
- pbegin->expandLabel(style, buf.params(), false);
+ pbegin->expandLabel(style, buf.params());
if (!lbl.empty()) {
openLabelTag(xs, style);
xs << lbl;
if (!lbl.empty()) {
openLabelTag(xs, style);
xs << lbl;
else if (style.labeltype != LABEL_NO_LABEL
&& style.htmllabeltag() != "NONE") {
openLabelTag(xs, style);
else if (style.labeltype != LABEL_NO_LABEL
&& style.htmllabeltag() != "NONE") {
openLabelTag(xs, style);
- xs << par->expandLabel(style, buf.params(), false);
+ xs << par->expandLabel(style, buf.params());
closeLabelTag(xs, style);
xs.cr();
}
closeLabelTag(xs, style);
xs.cr();
}