mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Kill a (public) magic boolean.
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
This commit is contained in:
parent
bb044b16c9
commit
b18bfcf3cc
@ -1656,7 +1656,21 @@ void Paragraph::setLabelWidthString(docstring const & s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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
|
BufferParams const & bparams, bool process_appendix) const
|
||||||
{
|
{
|
||||||
DocumentClass const & tclass = bparams.documentClass();
|
DocumentClass const & tclass = bparams.documentClass();
|
||||||
@ -1677,7 +1691,7 @@ docstring Paragraph::expandLabel(Layout const & layout,
|
|||||||
docstring parent(fmt, i + 1, j - i - 1);
|
docstring parent(fmt, i + 1, j - i - 1);
|
||||||
docstring label = from_ascii("??");
|
docstring label = from_ascii("??");
|
||||||
if (tclass.hasLayout(parent))
|
if (tclass.hasLayout(parent))
|
||||||
docstring label = expandLabel(tclass[parent], bparams,
|
docstring label = expandParagraphLabel(tclass[parent], bparams,
|
||||||
process_appendix);
|
process_appendix);
|
||||||
fmt = docstring(fmt, 0, i) + label
|
fmt = docstring(fmt, 0, i) + label
|
||||||
+ docstring(fmt, j + 1, docstring::npos);
|
+ docstring(fmt, j + 1, docstring::npos);
|
||||||
|
@ -242,16 +242,16 @@ public:
|
|||||||
/// recompute this value
|
/// recompute this value
|
||||||
void setBeginOfBody();
|
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
|
/// the next two functions are for the manual labels
|
||||||
docstring const getLabelWidthString() const;
|
docstring const getLabelWidthString() const;
|
||||||
/// Set label width string.
|
/// Set label width string.
|
||||||
void setLabelWidthString(docstring const & s);
|
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
|
/// Actual paragraph alignment used
|
||||||
char getAlign() const;
|
char getAlign() const;
|
||||||
/// The nesting depth of a paragraph
|
/// The nesting depth of a paragraph
|
||||||
@ -430,6 +430,9 @@ public:
|
|||||||
std::string magicLabel() const;
|
std::string magicLabel() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/// Expand the counters for the labelstring of \c layout
|
||||||
|
docstring expandParagraphLabel(Layout const &, BufferParams const &,
|
||||||
|
bool process_appendix) const;
|
||||||
///
|
///
|
||||||
void deregisterWords();
|
void deregisterWords();
|
||||||
///
|
///
|
||||||
|
@ -260,7 +260,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf,
|
|||||||
if (!bstyle.labeltag().empty()) {
|
if (!bstyle.labeltag().empty()) {
|
||||||
sgml::openTag(os, bstyle.labeltag());
|
sgml::openTag(os, bstyle.labeltag());
|
||||||
// We don't care about appendix in DOCBOOK.
|
// 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,7 +699,7 @@ ParagraphList::const_iterator makeEnvironmentHtml(Buffer const & buf,
|
|||||||
openItemTag(xs, style);
|
openItemTag(xs, style);
|
||||||
if (par == pbegin && style.htmllabeltag() != "NONE") {
|
if (par == pbegin && style.htmllabeltag() != "NONE") {
|
||||||
docstring const lbl =
|
docstring const lbl =
|
||||||
pbegin->expandLabel(style, buf.params(), false);
|
pbegin->expandLabel(style, buf.params());
|
||||||
if (!lbl.empty()) {
|
if (!lbl.empty()) {
|
||||||
openLabelTag(xs, style);
|
openLabelTag(xs, style);
|
||||||
xs << lbl;
|
xs << lbl;
|
||||||
@ -721,7 +721,7 @@ ParagraphList::const_iterator makeEnvironmentHtml(Buffer const & buf,
|
|||||||
else if (style.labeltype != LABEL_NO_LABEL
|
else if (style.labeltype != LABEL_NO_LABEL
|
||||||
&& style.htmllabeltag() != "NONE") {
|
&& style.htmllabeltag() != "NONE") {
|
||||||
openLabelTag(xs, style);
|
openLabelTag(xs, style);
|
||||||
xs << par->expandLabel(style, buf.params(), false);
|
xs << par->expandLabel(style, buf.params());
|
||||||
closeLabelTag(xs, style);
|
closeLabelTag(xs, style);
|
||||||
xs.cr();
|
xs.cr();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user