]> git.lyx.org Git - lyx.git/blobdiff - src/Counters.h
Fix compilation with Qt4.2
[lyx.git] / src / Counters.h
index 3384e564c694a4b688e5cc56295d39dd6fef454d..d992bbb3c646f64b003eca3928d7d2372642d388 100644 (file)
@@ -57,6 +57,10 @@ public:
         *  want the version shown in an appendix.
         */
        docstring const & labelString(bool in_appendix) const;
+       /// Similar, but used for formatted references in XHTML output.
+       /// E.g., for a section counter it might be "section \thesection"
+       docstring const & prettyFormat() const { return prettyformat_; }
+       
        /// Returns a map of LaTeX-like strings to format the counter. 
        /** For each language, the string is similar to what one gets
         *  in LaTeX when using "\the<counter>". The \c in_appendix
@@ -79,6 +83,8 @@ private:
        docstring labelstring_;
        /// The same as labelstring_, but in appendices.
        docstring labelstringappendix_;
+       /// Similar, but used for formatted references in XHTML output
+       docstring prettyformat_;
        /// Cache of the labelstring with \\the<counter> expressions expanded, 
        /// indexed by language
        mutable StringMap flatlabelstring_;
@@ -138,6 +144,10 @@ public:
         */
        docstring counterLabel(docstring const & format,
                               std::string const & lang) const;
+       /// returns a formatted version of the counter, using the 
+       /// format given by Counter::prettyFormat().
+       docstring prettyCounter(docstring const & cntr,
+                              std::string const & lang) const;
        /// Are we in appendix?
        bool appendix() const { return appendix_; }
        /// Set the state variable indicating whether we are in appendix.