]> git.lyx.org Git - features.git/commitdiff
Codingstyle.
authorPavel Sanda <sanda@lyx.org>
Wed, 7 May 2008 23:40:59 +0000 (23:40 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 7 May 2008 23:40:59 +0000 (23:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24675 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/Text3.cpp
src/insets/InsetGraphics.cpp

index 7bbeba7aef521276c6e4fc9aa6e244291ee83f6f..cd573f6022372885f1ee6d20535ef900d3fbdde4 100644 (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();
index aed8fc83b93bfbdf4f96a7b3180947eef009bce1..27bc623520259a0b50e06be4e7900a33a8896f1e 100644 (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();
 
index 40354e85ffc8466c82496d0bbbff0cf28e2f784d..62edf121f19fda37be992130e99041d389d35df0 100644 (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