]> git.lyx.org Git - features.git/commitdiff
Make the new argument to step() mandatory, and add a comment to
authorRichard Heck <rgheck@comcast.net>
Wed, 20 Jan 2010 19:47:27 +0000 (19:47 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 20 Jan 2010 19:47:27 +0000 (19:47 +0000)
sgml::OpenTag().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33112 a592a061-630c-0410-9148-cb99ea01b6c8

src/Counters.h
src/sgml.cpp

index 16f1d981840e6766c59ce866d6ca43894b32659c..3384e564c694a4b688e5cc56295d39dd6fef454d 100644 (file)
@@ -117,8 +117,8 @@ public:
        /// counter(s) for which it is the master.
        /// Sub-slaves are not zeroed! That happens at slave's first 
        /// step 0->1. Seems to be sufficient.
-       /// \param for_output: whether to track the counters
-       void step(docstring const & ctr, UpdateType = InternalUpdate);
+       /// \param utype determines whether we track the counters.
+       void step(docstring const & ctr, UpdateType utype);
        /// Reset all counters.
        void reset();
        /// Reset counters matched by match string.
index f895287195b5c55aabc8d7e8301cb572fb6c8057..985478498a3583dfee1b1325f56a99f39cad55b0 100644 (file)
@@ -220,10 +220,12 @@ void sgml::openTag(Buffer const & buf, odocstream & os,
                if (param.find('#') != string::npos) {
                        // FIXME UNICODE
                        if (!style.counter.empty())
-                               // NOTE This could use OutputUpdate and track the counters.
-                               counters.step(style.counter);
+                               // This uses InternalUpdate at the moment becuase sgml output
+                               // does not do anything with tracked counters, and it would need
+                               // to track layouts if it did want to use them.
+                               counters.step(style.counter, InternalUpdate);
                        else
-                               counters.step(from_ascii(name));
+                               counters.step(from_ascii(name), InternalUpdate);
                        int i = counters.value(from_ascii(name));
                        attribute = subst(param, "#", convert<string>(i));
                } else {