]> git.lyx.org Git - features.git/commitdiff
Kill a (public) magic boolean.
authorRichard Heck <rgheck@comcast.net>
Thu, 21 Jan 2010 18:46:20 +0000 (18:46 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 21 Jan 2010 18:46:20 +0000 (18:46 +0000)
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

src/Paragraph.cpp
src/Paragraph.h
src/output_docbook.cpp
src/output_xhtml.cpp

index 23d0ca34a4331a8e15023e9d7f7f896f369200ff..2e72ff23140047c26cc7131e2519f2eb74ef93db 100644 (file)
@@ -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
 {
        DocumentClass const & tclass = bparams.documentClass();
                BufferParams const & bparams, bool process_appendix) const
 {
        DocumentClass const & tclass = bparams.documentClass();
@@ -1677,7 +1691,7 @@ docstring Paragraph::expandLabel(Layout const & layout,
                        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);
index 2c04b66935081170ee7207d4ccbf552f9d102724..06c3cfb1e8ef5cb1746f5dd6edd67b2fe27972d1 100644 (file)
@@ -242,16 +242,16 @@ public:
        /// 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
@@ -430,6 +430,9 @@ public:
        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();
        ///
index 4dc6048d5b92804d5faafe8a25a892c9e93e4c80..f413f2831b790bffdd0f532c4fadc0a095d2593a 100644 (file)
@@ -260,7 +260,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf,
        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());
        }
 
index 1e57a28c45c0e25097fc1763b6f59c456c05a896..21894a2941cb99af660e5f37318e1a1a61850a31 100644 (file)
@@ -699,7 +699,7 @@ ParagraphList::const_iterator makeEnvironmentHtml(Buffer const & buf,
                                        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;
@@ -721,7 +721,7 @@ ParagraphList::const_iterator makeEnvironmentHtml(Buffer const & buf,
                                        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();
                                        }