}
-InsetMath::marker_type InsetDisplayLabelBox::marker(BufferView const * bv) const
+marker_type InsetDisplayLabelBox::marker(BufferView const * bv) const
{
if (parent_.editing(bv)
|| !parent_.cell(parent_.displayIdx()).empty())
- return MARKER;
+ return marker_type::MARKER;
else
- return NO_MARKER;
+ return marker_type::NO_MARKER;
}
if (macro)
macro->unlock();
- dim.wid += leftOffset(mi.base.bv) + rightOffset(mi.base.bv);;
+ dim.wid += leftOffset(mi.base.bv) + rightOffset(mi.base.bv);
dim.des += bottomOffset(mi.base.bv);
dim.asc += topOffset(mi.base.bv);
}
if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
continue;
InsetMathMacroArgument * arg = static_cast<InsetMathMacroArgument*>(it.nextInset());
- maxArg = std::max(int(arg->number()), maxArg);
+ maxArg = std::max(arg->number(), maxArg);
}
return maxArg;
}
bool InsetMathMacroTemplate::getStatus(Cursor & cur, FuncRequest const & cmd,
- FuncStatus & flag) const
+ FuncStatus & status) const
{
bool ret = true;
string const arg = to_utf8(cmd.argument());
num = convert<int>(arg);
bool on = (num >= optionals_
&& numargs_ < 9 && num <= numargs_ + 1);
- flag.setEnabled(on);
+ status.setEnabled(on);
break;
}
case LFUN_MATH_MACRO_APPEND_GREEDY_PARAM:
- flag.setEnabled(numargs_ < 9);
+ status.setEnabled(numargs_ < 9);
break;
case LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM:
int num = numargs_;
if (!arg.empty())
num = convert<int>(arg);
- flag.setEnabled(num >= 1 && num <= numargs_);
+ status.setEnabled(num >= 1 && num <= numargs_);
break;
}
case LFUN_MATH_MACRO_MAKE_OPTIONAL:
- flag.setEnabled(numargs_ > 0
+ status.setEnabled(numargs_ > 0
&& optionals_ < numargs_
&& type_ != MacroTypeDef);
break;
case LFUN_MATH_MACRO_MAKE_NONOPTIONAL:
- flag.setEnabled(optionals_ > 0
+ status.setEnabled(optionals_ > 0
&& type_ != MacroTypeDef);
break;
case LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM:
- flag.setEnabled(numargs_ < 9);
+ status.setEnabled(numargs_ < 9);
break;
case LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM:
- flag.setEnabled(optionals_ > 0);
+ status.setEnabled(optionals_ > 0);
break;
case LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM:
- flag.setEnabled(numargs_ == 0
+ status.setEnabled(numargs_ == 0
&& type_ != MacroTypeDef);
break;
case LFUN_IN_MATHMACROTEMPLATE:
- flag.setEnabled(true);
+ status.setEnabled(true);
break;
default:
- ret = InsetMathNest::getStatus(cur, cmd, flag);
+ ret = InsetMathNest::getStatus(cur, cmd, status);
break;
}
return ret;
{
odocstringstream oss;
otexrowstream ots(oss);
- WriteStream wi(ots, false, false, WriteStream::wsDefault);
+ TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault);
oss << "FormulaMacro\n";
write(wi);
os << to_utf8(oss.str());
}
-void InsetMathMacroTemplate::write(WriteStream & os) const
+void InsetMathMacroTemplate::write(TeXMathStream & os) const
{
write(os, false);
}
-int InsetMathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) const
+int InsetMathMacroTemplate::write(TeXMathStream & os, bool overwriteRedefinition) const
{
int num_lines = 0;