John Levon <[EMAIL PROTECTED]> writes: | On Mon, Oct 21, 2002 at 04:17:51PM +0200, Andre Poenitz wrote: > >> Concerning coding style (i.e. whitespace and braces) the current code is in >> pretty good shape. It's certainly much better than a few years ago. And we >> were talking about this kind of stylistic issues. > | // set the correct parindent | if (row->pos() == 0) { | if ((layout->labeltype == LABEL_NO_LABEL | || layout->labeltype == LABEL_TOP_ENVIRONMENT | || layout->labeltype == LABEL_CENTERED_TOP_ENVIRONMENT | || (layout->labeltype == LABEL_STATIC | && layout->latextype == LATEX_ENVIRONMENT | && ! row->par()->isFirstInSequence())) | && align == LYX_ALIGN_BLOCK | && !row->par()->params().noindent() | // in tabulars and ert paragraphs are never indented! | && (!row->par()->inInset() || |!row->par()->inInset()->owner() || | (row->par()->inInset()->owner()->lyxCode() != |Inset::TABULAR_CODE && | row->par()->inInset()->owner()->lyxCode() != |Inset::ERT_CODE)) | && (row->par()->layout() != tclass.defaultLayout() || | bview->buffer()->params.paragraph_separation == | BufferParams::PARSEP_INDENT)) { | x += font_metrics::signedWidth(parindent, | tclass.defaultfont()); | } else if (layout->labeltype == LABEL_BIBLIO) { | // ale970405 Right width for bibitems | x += bibitemMaxWidth(bview, tclass.defaultfont()); | } | } > | This doesn't match any kind of coding style I want to subscribe to.
Whitespace-wise it is ok (mostly). It is the mammoth if-clause that is the problem... something begs to: - be broken out into local variables - be broken out into helper functions - be completely rewritten -- Lgb