case LFUN_GRAPHICS_GROUPS_UNIFY: {
LASSERT(lyx_view_, /**/);
- if (argument.empty() || !lyx_view_->buffer()) break;
+ if (argument.empty() || !lyx_view_->buffer())
+ break;
//view()->cursor().recordUndoFullDocument(); let inset-apply do that job
InsetGraphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument);
lyx_view_->buffer()->markDirty();
case LFUN_SET_GRAPHICS_GROUP: {
InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur);
- if (!ins) break;
+ if (!ins)
+ break;
cur.recordUndoFullDocument();
if (it->lyxCode() == GRAPHICS_CODE) {
InsetGraphics & ins = static_cast<InsetGraphics &>(*it);
InsetGraphicsParams inspar = ins.getParams();
- if (!inspar.groupId.empty()) {
+ if (!inspar.groupId.empty())
ids.insert(inspar.groupId);
- }
}
}
string InsetGraphics::getGroupParams(Buffer const & b, std::string const & groupId)
{
- if (groupId.empty()) return string();
+ if (groupId.empty())
+ return string();
Inset & inset = b.inset();
InsetIterator it = inset_iterator_begin(inset);
InsetIterator const end = inset_iterator_end(inset);
InsetGraphics * InsetGraphics::getCurrentGraphicsInset(Cursor const & cur)
{
Inset * instmp = &cur.inset();
- if (instmp->lyxCode() != GRAPHICS_CODE) instmp = cur.nextInset();
- if (!instmp || instmp->lyxCode() != GRAPHICS_CODE) return 0;
+ if (instmp->lyxCode() != GRAPHICS_CODE)
+ instmp = cur.nextInset();
+ if (!instmp || instmp->lyxCode() != GRAPHICS_CODE)
+ return 0;
- InsetGraphics & ins = static_cast<InsetGraphics &>(*instmp);
- return &ins;
+ return static_cast<InsetGraphics *>(instmp);
}
} // namespace lyx