From a7bfe9d7f1c112e4d502aaa9e7262f1866d723f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 1 Mar 2001 20:05:38 +0000 Subject: [PATCH] cleanup indent git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1658 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_parinset.C | 119 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/src/mathed/math_parinset.C b/src/mathed/math_parinset.C index 5f89fec97a..ae43ae750f 100644 --- a/src/mathed/math_parinset.C +++ b/src/mathed/math_parinset.C @@ -178,73 +178,72 @@ MathParInset::Metrics() while (data.OK()) { cx = data.GetChar(); if (cx >= ' ') { - string s = data.GetString(); + string const s = data.GetString(); mathed_string_height(data.fcode(), size(), s, asc, des); if (asc > ascent) ascent = asc; if (des > descent) descent = des; limits = false; mathed_char_height(LM_TC_CONST, size(), 'y', asc, des); - } else - if (MathIsInset(cx)) { - MathedInset * p = data.GetInset(); - p->SetStyle(size()); - p->Metrics(); - if (cx == LM_TC_UP) { - asc += (limits) ? p->Height() + 4: p->Ascent() + - ((p->Descent()>asc) ? p->Descent() - asc + 4: 0); - } else - if (cx == LM_TC_DOWN) { - des += ((limits) ? p->Height() + 4: p->Height() - p->Ascent() / 2); - } else { - asc = p->Ascent(); - des = p->Descent(); - } - if (asc > ascent) ascent = asc; - if (des > descent) descent = des; - if (cx!= LM_TC_UP && cx!= LM_TC_DOWN) - limits = p->GetLimits(); - data.Next(); - } else - if (cx == LM_TC_TAB) { - int x, y; - data.GetIncPos(x, y); - if (data.IsFirst() || cxp == LM_TC_TAB || cxp == LM_TC_CR) { - if (ascentSetStyle(size()); + p->Metrics(); + if (cx == LM_TC_UP) { + asc += (limits) ? p->Height() + 4: p->Ascent() + + ((p->Descent()>asc) ? p->Descent() - asc + 4: 0); + } else if (cx == LM_TC_DOWN) { + des += (limits ? p->Height() + 4 : p->Height() - p->Ascent() / 2); + } else { + asc = p->Ascent(); + des = p->Descent(); + } + if (asc > ascent) ascent = asc; + if (des > descent) descent = des; + if (cx!= LM_TC_UP && cx!= LM_TC_DOWN) + limits = p->GetLimits(); + data.Next(); + } else if (cx == LM_TC_TAB) { + int x; + int y; + data.GetIncPos(x, y); + if (data.IsFirst() || cxp == LM_TC_TAB || cxp == LM_TC_CR) { + if (ascent < df_asc) ascent = df_asc; + tb = x; + } + data.setTab(x - tb, tab); + tb = x; + ++tab; + limits = false; + data.Next(); + } else if (cx == LM_TC_CR) { + if (tb > 0) { + int x; + int y; + data.GetIncPos(x, y); + if (data.IsFirst() || cxp == LM_TC_TAB || cxp == LM_TC_CR) { + if (ascent < df_asc) ascent = df_asc; tb = x; - ++tab; - limits = false; - data.Next(); - } else - if (cx == LM_TC_CR) { - if (tb > 0) { - int x, y; - data.GetIncPos(x, y); - if (data.IsFirst() || cxp == LM_TC_TAB || cxp == LM_TC_CR) { - if (ascent