On Fri, Oct 08, 2004 at 08:17:25PM +0200, Lars Gullik Bjønnes wrote: > [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: > > | Actually it should be pretty safe to put this code in CVS... but I'll > | hold off on that. > > This patch is a bit nicer, no real changes. >
> ? xmlutils.h File missing. > ? frontends/xforms/FormFloat.loT > Index: ParagraphParameters.C > =================================================================== > RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ParagraphParameters.C,v > retrieving revision 1.44 > diff -u -p -r1.44 ParagraphParameters.C > --- ParagraphParameters.C 5 Oct 2004 12:56:20 -0000 1.44 > +++ ParagraphParameters.C 8 Oct 2004 17:43:31 -0000 > @@ -244,6 +244,7 @@ void ParagraphParameters::read(LyXLex & > } > > > +#ifndef XML_FILE_FORMAT > void ParagraphParameters::write(ostream & os) const > { > ostringstream oss; > @@ -282,6 +283,50 @@ void ParagraphParameters::write(ostream > } > os << rtrim(oss.str()); > } > +#endif > + > + > +#ifdef XML_FILE_FORMAT > +void ParagraphParameters::write(ostream & os) const > +{ > + ostringstream oss; > + > + // Maybe the paragraph has special spacing > + spacing().writeFile(oss, true); > + > + // The labelwidth string used in lists. > + if (!labelWidthString().empty()) > + oss << "<labelwidthstring>" > + << labelWidthString() > + << "</labelwidthstring>\n"; > + > + // Start of appendix? > + if (startOfAppendix()) > + oss << "<start_of_appendix/>"; > + > + // Noindent? > + if (noindent()) > + oss << "<noindent/>"; > + > + // Do we have a manual left indent? > + if (!leftIndent().zero()) > + oss << "<leftindent>" << leftIndent().asString() > + << "</leftindent>"; > + > + // Alignment? > + if (align() != LYX_ALIGN_LAYOUT) { > + int h = 0; > + switch (align()) { > + case LYX_ALIGN_LEFT: h = 1; break; > + case LYX_ALIGN_RIGHT: h = 2; break; > + case LYX_ALIGN_CENTER: h = 3; break; > + default: h = 0; break; > + } > + oss << "<align>" << string_align[h] << "</align>\n"; > + } > + os << rtrim(oss.str()); > +} > +#endif No need of the ostringstream here, just place each parameter in its own line, it is easier to read. And also visually consistent with the document header. I have a patch for the current code that does just that. > > -- > Lgb -- José Abílio Matos LyX and docbook a perfect match. :-)