]> git.lyx.org Git - features.git/commitdiff
Fix bug #8598. We need to use the masterBuffer's counters in the
authorRichard Heck <rgheck@lyx.org>
Mon, 18 Mar 2013 22:45:09 +0000 (18:45 -0400)
committerRichard Heck <rgheck@lyx.org>
Mon, 18 Mar 2013 22:45:09 +0000 (18:45 -0400)
XHTML output routines.

src/output_xhtml.cpp

index c894f89cef8150d0c88f48b6ae694cf5b8adc66c..84fc0cd2c8e21eba33a1225b798770d7c7949e3d 100644 (file)
@@ -706,7 +706,8 @@ ParagraphList::const_iterator makeParagraphs(Buffer const & buf,
        for (; par != pend; ++par) {
                Layout const & lay = par->layout();
                if (!lay.counter.empty())
-                       buf.params().documentClass().counters().step(lay.counter, OutputUpdate);
+                       buf.masterBuffer()->params().
+                           documentClass().counters().step(lay.counter, OutputUpdate);
                // FIXME We should see if there's a label to be output and
                // do something with it.
                if (par != pbegin)
@@ -800,7 +801,7 @@ ParagraphList::const_iterator makeEnvironmentHtml(Buffer const & buf,
                // FIXME There may be a bug here about user defined enumeration
                // types. If so, then we'll need to take the counter and add "i",
                // "ii", etc, as with enum.
-               Counters & cnts = buf.params().documentClass().counters();
+               Counters & cnts = buf.masterBuffer()->params().documentClass().counters();
                docstring const & cntr = style.counter;
                if (!style.counter.empty() 
                    && (par == pbegin || !isNormalEnv(style)) 
@@ -924,7 +925,8 @@ void makeCommand(Buffer const & buf,
 {
        Layout const & style = pbegin->layout();
        if (!style.counter.empty())
-               buf.params().documentClass().counters().step(style.counter, OutputUpdate);
+               buf.masterBuffer()->params().
+                   documentClass().counters().step(style.counter, OutputUpdate);
 
        openTag(xs, style, pbegin->params());