Codingstyle.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24675 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2008-05-07 23:40:59 +00:00
parent 63897c2959
commit 01ceec9cfe
3 changed files with 12 additions and 9 deletions

View File

@ -1465,7 +1465,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
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();

View File

@ -894,7 +894,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_SET_GRAPHICS_GROUP: {
InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur);
if (!ins) break;
if (!ins)
break;
cur.recordUndoFullDocument();

View File

@ -959,16 +959,16 @@ void InsetGraphics::getGraphicsGroups(Buffer const & b, std::set<string> & ids)
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);
@ -1011,11 +1011,12 @@ void InsetGraphics::unifyGraphicsGroups(Buffer const & b, std::string const & ar
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