]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetNote.cpp
* Lazy MathData to avoid unneeded interpretation of macro definitions
[features.git] / src / insets / InsetNote.cpp
index 62c8915b6feb5b81daef8dab3c9567be2c69be02..94463a64decc44880a0602962359b269fca6cb39 100644 (file)
@@ -44,7 +44,7 @@ namespace lyx {
 
 namespace {
 
-typedef Translator<std::string, InsetNoteParams::Type> NoteTranslator;
+typedef Translator<string, InsetNoteParams::Type> NoteTranslator;
 typedef Translator<docstring, InsetNoteParams::Type> NoteTranslatorLoc;
 
 NoteTranslator const init_notetranslator()
@@ -218,6 +218,16 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it)
 }
 
 
+bool InsetNote::isMacroScope(Buffer const & buf) const
+{
+       // LyX note has no latex output
+       if (params_.type == InsetNoteParams::Note)
+               return true;
+
+       return InsetCollapsable::isMacroScope(buf);
+}
+
+
 int InsetNote::latex(Buffer const & buf, odocstream & os,
                     OutputParams const & runparams_in) const
 {
@@ -251,7 +261,7 @@ int InsetNote::latex(Buffer const & buf, odocstream & os,
        os << str;
        runparams_in.encoding = runparams.encoding;
        // Return how many newlines we issued.
-       return int(std::count(str.begin(), str.end(), '\n'));
+       return int(count(str.begin(), str.end(), '\n'));
 }