// the last parameter to true will suppress a warning message about missing
// tex class.
LayoutFile * tc = new LayoutFile(textclass, textclass, "Unknown text class " + textclass, true);
// the last parameter to true will suppress a warning message about missing
// tex class.
LayoutFile * tc = new LayoutFile(textclass, textclass, "Unknown text class " + textclass, true);
- if (!tc->load(tempLayout.absFilename()))
+ if (!tc->load(tempLayout.absFilename())) {
// The only way this happens is because the hardcoded layout file above
// is wrong.
LASSERT(false, /**/);
// The only way this happens is because the hardcoded layout file above
// is wrong.
LASSERT(false, /**/);
classmap_[textclass] = tc;
return textclass;
}
classmap_[textclass] = tc;
return textclass;
}
void GuiInfo::applyView()
{
void GuiInfo::applyView()
{
- InsetInfo const * ii = static_cast<InsetInfo const *>(inset(INFO_CODE));
+ InsetInfo const * ii = dynamic_cast<InsetInfo const *>(inset(INFO_CODE));
void GuiInfo::updateView()
{
void GuiInfo::updateView()
{
- InsetInfo const * ii = static_cast<InsetInfo const *>(inset(INFO_CODE));
+ InsetInfo const * ii = dynamic_cast<InsetInfo const *>(inset(INFO_CODE));
if (!ii) {
enableView(false);
return;
if (!ii) {
enableView(false);
return;
bool InsetCommandParams::writeEmptyOptional(ParamInfo::const_iterator ci) const
{
bool InsetCommandParams::writeEmptyOptional(ParamInfo::const_iterator ci) const
{
+ if (!ci->isOptional()) {
++ci; // we want to start with the next one
ParamInfo::const_iterator end = info_.end();
for (; ci != end; ++ci) {
++ci; // we want to start with the next one
ParamInfo::const_iterator end = info_.end();
for (; ci != end; ++ci) {
ParamInfo::const_iterator it =
find_if(info_.begin(), info_.end(),
not1(mem_fun_ref(&ParamInfo::ParamData::isOptional)));
ParamInfo::const_iterator it =
find_if(info_.begin(), info_.end(),
not1(mem_fun_ref(&ParamInfo::ParamData::isOptional)));
+ if (it == info_.end()) {
LASSERT(false, return docstring());
LASSERT(false, return docstring());
return (*this)[it->name()];
}
return (*this)[it->name()];
}
idx_type i = cellIndex(r, c);
if (c == cellColumn(i) + columnSpan(i) - 1) {
++total;
idx_type i = cellIndex(r, c);
if (c == cellColumn(i) + columnSpan(i) - 1) {
++total;
- bool left = c + 1 < column_info.size()
- && cellInfo(cellIndex(r, c + 1)).left_line
+ bool left = (c + 1 < column_info.size()
+ && cellInfo(cellIndex(r, c + 1)).left_line)
|| c + 1 == column_info.size();
if (cellInfo(i).right_line && left)
++nrows_right;
|| c + 1 == column_info.size();
if (cellInfo(i).right_line && left)
++nrows_right;
break;
}
if (theClipboard().isInternal() ||
break;
}
if (theClipboard().isInternal() ||
- !theClipboard().hasInternal() && theClipboard().hasLyXContents()) {
+ (!theClipboard().hasInternal() && theClipboard().hasLyXContents())) {
cur.recordUndoInset(INSERT_UNDO);
pasteClipboard(cur);
}
cur.recordUndoInset(INSERT_UNDO);
pasteClipboard(cur);
}
// also if the next paragraph is a multilingual environment (because of nesting)
if (nextpit != paragraphs.end() && open_encoding_ == CJK &&
(nextpit->getParLanguage(bparams)->encoding()->package() != Encoding::CJK ||
// also if the next paragraph is a multilingual environment (because of nesting)
if (nextpit != paragraphs.end() && open_encoding_ == CJK &&
(nextpit->getParLanguage(bparams)->encoding()->package() != Encoding::CJK ||
- nextpit->layout().isEnvironment() && nextpit->isMultiLingual(bparams))
+ (nextpit->layout().isEnvironment() && nextpit->isMultiLingual(bparams)))
// inbetween environments, CJK has to be closed later (nesting!)
&& (!style.isEnvironment() || !nextpit->layout().isEnvironment())) {
os << "\\end{CJK}\n";
// inbetween environments, CJK has to be closed later (nesting!)
&& (!style.isEnvironment() || !nextpit->layout().isEnvironment())) {
os << "\\end{CJK}\n";