When fiddling with and checking alignmeng and indentation issues I
really wanted this.

It only works for boot.format now, but that is easy to fix if we
decide to put this patch in.

Opinions?

Index: src/bufferview_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferview_funcs.C,v
retrieving revision 1.58
diff -u -p -r1.58 bufferview_funcs.C
--- src/bufferview_funcs.C      27 Nov 2002 10:30:07 -0000      1.58
+++ src/bufferview_funcs.C      27 Nov 2002 19:13:46 -0000
@@ -175,6 +175,33 @@ string const currentState(BufferView * b
 #endif
        }

+       // The paragraph alignment
+       LyXAlignment align = text->cursor.par()->params().align();
+       LyXAlignment defAlign = text->cursor.par()->layout()->align;
+       if (align == LYX_ALIGN_LAYOUT)
+               align = defAlign;
+
+       boost::format alignFmt(_(", Alignment: %s"));
+       switch (align) {
+       case LYX_ALIGN_BLOCK:
+               alignFmt % _("Block");
+               break;
+       case LYX_ALIGN_LEFT:
+               alignFmt % _("Left");
+               break;
+       case LYX_ALIGN_RIGHT:
+               alignFmt % _("Right");
+               break;
+       case LYX_ALIGN_CENTER:
+               alignFmt % _("Center");
+               break;
+       case LYX_ALIGN_NONE:
+       case LYX_ALIGN_LAYOUT:
+       case LYX_ALIGN_SPECIAL:
+               alignFmt % _("Other");
+               break;
+       }
+       state << alignFmt;

        // The paragraph spacing, but only if different from
        // buffer spacing.

-- 
        Lgb

Reply via email to