]> git.lyx.org Git - features.git/commitdiff
* Paragraph.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 18 Jun 2009 06:52:38 +0000 (06:52 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 18 Jun 2009 06:52:38 +0000 (06:52 +0000)
- we do not output alignment begin for the default alignment,
  so we must not output the end tag (bug 5995)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30151 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index dcf7cfae7ea2fed98602a4a48b9eeb2c6d75084b..74d22f5ce3b504b8426d5ca65331f92bfc256621 100644 (file)
@@ -1866,7 +1866,12 @@ int Paragraph::Private::endTeXParParams(BufferParams const & bparams,
 {
        int column = 0;
 
-       switch (params_.align()) {
+       LyXAlignment const curAlign = params_.align();
+
+       if (curAlign == layout_->align)
+               return column;
+
+       switch (curAlign) {
        case LYX_ALIGN_NONE:
        case LYX_ALIGN_BLOCK:
        case LYX_ALIGN_LAYOUT:
@@ -1886,7 +1891,7 @@ int Paragraph::Private::endTeXParParams(BufferParams const & bparams,
        InsetCode code = owner_->ownerCode();
        bool const lastpar = runparams.isLastPar;
 
-       switch (params_.align()) {
+       switch (curAlign) {
        case LYX_ALIGN_NONE:
        case LYX_ALIGN_BLOCK:
        case LYX_ALIGN_LAYOUT: