3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
17 #include "support/lstrings.h"
29 Floating::Floating(string const & type, string const & placement,
30 string const & ext, string const & within,
31 string const & style, string const & name,
32 string const & listName, string const & htmlTag,
33 string const & htmlAttrib, string const & htmlStyle,
35 : type_(type), placement_(placement), ext_(ext), within_(within),
36 style_(style), name_(name), listName_(listName), html_tag_(htmlTag),
37 html_attrib_(htmlAttrib), html_style_(htmlStyle), builtin_(builtin)
41 string const & Floating::type() const
47 string const & Floating::placement() const
53 string const & Floating::ext() const
59 string const & Floating::within() const
65 string const & Floating::style() const
71 string const & Floating::name() const
77 string const & Floating::listName() const
83 string const & Floating::htmlStyle() const
89 string const & Floating::htmlAttrib() const
91 if (html_attrib_.empty())
92 html_attrib_ = "class='float " + defaultCSSClass() + "'";
97 string const & Floating::htmlTag() const
99 if (html_tag_.empty())
105 string Floating::defaultCSSClass() const
107 if (!defaultcssclass_.empty())
108 return defaultcssclass_;
111 string::const_iterator it = n.begin();
112 string::const_iterator en = n.end();
113 for (; it != en; ++it) {
116 else if (islower(*it))
119 d += support::lowercase(*it);
121 // are there other characters we need to remove?
122 defaultcssclass_ = "float-" + d;
123 return defaultcssclass_;
127 bool Floating::builtin() const