[LyX/master] Complete the FontTag typeinfo

Kornel Benko kornel at lyx.org
Mon Sep 20 09:32:50 UTC 2021


commit 687ccdbb3241f26a0875dcf9906d7609a8b56ddc
Author: Kornel Benko <kornel at lyx.org>
Date:   Mon Sep 20 11:52:16 2021 +0200

    Complete the FontTag typeinfo
---
 src/tests/dummy_functions.cpp |    1 +
 src/tex2lyx/dummy_impl.cpp    |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/tests/dummy_functions.cpp b/src/tests/dummy_functions.cpp
index f570616..2698351 100644
--- a/src/tests/dummy_functions.cpp
+++ b/src/tests/dummy_functions.cpp
@@ -54,6 +54,7 @@ namespace xml {
 docstring StartTag::writeTag() const { return docstring(); }
 docstring StartTag::writeEndTag() const { return docstring(); }
 bool StartTag::operator==(FontTag const & rhs) const { return rhs == *this; }
+  bool FontTag::operator==(StartTag const & tag) const { FontTag const * const ftag = tag.asFontTag();   if (!ftag) return false; return (font_type_ == ftag->font_type_); }
 }
 
 } // namespace lyx
diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp
index 961eb9a..eb44567 100644
--- a/src/tex2lyx/dummy_impl.cpp
+++ b/src/tex2lyx/dummy_impl.cpp
@@ -22,6 +22,7 @@
 #include "LaTeXFeatures.h"
 #include "LyXRC.h"
 #include "output_xhtml.h"
+#include "xml.h"
 
 #include "support/Messages.h"
 
@@ -117,6 +118,7 @@ namespace xml {
 docstring StartTag::writeTag() const { return docstring(); }
 docstring StartTag::writeEndTag() const { return docstring(); }
 bool StartTag::operator==(FontTag const & rhs) const { return rhs == *this; }
+bool FontTag::operator==(StartTag const & tag) const { FontTag const * const ftag = tag.asFontTag(); if (!ftag) return false; return (font_type_ == ftag->font_type_); }
 }
 
 } // namespace lyx


More information about the lyx-cvs mailing list