[LyX/master] Fix a few warnings in Floating.

Thibaut Cuvelier tcuvelier at lyx.org
Thu Sep 23 22:58:08 UTC 2021


commit dca39815d3e3e753e310ed53fe6007fb41f7a32b
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Fri Sep 24 01:19:28 2021 +0200

    Fix a few warnings in Floating.
---
 src/Floating.cpp |    4 ++++
 src/Floating.h   |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/Floating.cpp b/src/Floating.cpp
index ecd325f..d396e8a 100644
--- a/src/Floating.cpp
+++ b/src/Floating.cpp
@@ -85,6 +85,10 @@ Floating::Floating(string const & type, string const & placement,
 		// Specific floats for achemso.
 		else if (docbook_float_type_ == "figure" && achemso.find(floattype_) != achemso.end())
 			docbook_attr_ += " type='" + floattype_ + "'";
+
+		// Finally, merge in the attributes given in argument.
+		if (!docbookAttr.empty())
+			docbook_attr_ += " " + docbookAttr;
 	}
 }
 
diff --git a/src/Floating.h b/src/Floating.h
index 7461e96..7af2334 100644
--- a/src/Floating.h
+++ b/src/Floating.h
@@ -143,7 +143,7 @@ private:
 	/// DocBook tag type (block, paragraph, inline)
 	mutable std::string docbook_tag_type_;
 	/// DocBook float type, to override float_type_ (figure, table, algorithm, video)
-	mutable std::string docbook_float_type_;
+	std::string docbook_float_type_;
 };
 
 


More information about the lyx-cvs mailing list