From 01ceec9cfed9c29163430c96d7d2cc34907d961c Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Wed, 7 May 2008 23:40:59 +0000 Subject: [PATCH] Codingstyle. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24675 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 3 ++- src/Text3.cpp | 3 ++- src/insets/InsetGraphics.cpp | 15 ++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 7bbeba7aef..cd573f6022 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -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(); diff --git a/src/Text3.cpp b/src/Text3.cpp index aed8fc83b9..27bc623520 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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(); diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 40354e85ff..62edf121f1 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -959,16 +959,16 @@ void InsetGraphics::getGraphicsGroups(Buffer const & b, std::set & ids) if (it->lyxCode() == GRAPHICS_CODE) { InsetGraphics & ins = static_cast(*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(*instmp); - return &ins; + return static_cast(instmp); } } // namespace lyx -- 2.39.5