]> 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:47:27 +0000 (18:47 -0400)
XHTML output routines.
(cherry picked from commit b3ceb89efc3df54274eddce6ebea05ad9b94330c)

src/output_xhtml.cpp
status.20x

index 1d604183d52b8f486802a14b67fe1b6ae9c35565..52e78d19c3b307d61582485f4d2730ce609798c2 100644 (file)
@@ -684,7 +684,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)
@@ -778,7 +779,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)) 
@@ -902,7 +903,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());
 
index f7b50c148348a0f549eb3fc676fa8dcc5aeeda2b..ca3e680126ab2bb7b14b2068ae3984e7b4f40966 100644 (file)
@@ -114,6 +114,8 @@ What's new
 
 - Fix lyx2lyx bug with non-ASCII layout file names (Debian bug 700828).
 
+- Reset counters properly when outputting included XHTML files (bug 8598).
+
 
 * USER INTERFACE