X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettabular.C;h=6e68763d7d0ce0c7a157d146bf3ee0e8b008d6ff;hb=b922cdd796f9e4b9a46a79808cdee596e04903eb;hp=d8a6f8212a19911fb5555fe70293a952ed3933ec;hpb=ff36293942a2c10913ae8775bfdc53562d0fc128;p=lyx.git diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index d8a6f8212a..6e68763d7d 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -34,6 +34,7 @@ #include "BufferView.h" #include "undo_funcs.h" #include "lyxlength.h" +#include "ParagraphParameters.h" #include "frontends/Dialogs.h" #include "frontends/Alert.h" @@ -1188,22 +1189,24 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, int InsetTabular::latex(Buffer const * buf, ostream & os, - bool fragile, bool fp) const + bool fragile, bool fp) const { - return tabular->Latex(buf, os, fragile, fp); + return tabular->latex(buf, os, fragile, fp); } -int InsetTabular::ascii(Buffer const * buf, ostream & os, int) const +int InsetTabular::ascii(Buffer const * buf, ostream & os, int ll) const { - // This should be changed to a real ascii export - return tabular->Ascii(buf, os); + if (ll > 0) + return tabular->ascii(buf, os, (int)parOwner()->params().depth(), + false,0); + return tabular->ascii(buf, os, 0, false,0); } int InsetTabular::linuxdoc(Buffer const * buf, ostream & os) const { - return tabular->Ascii(buf,os); + return tabular->ascii(buf,os, (int)parOwner()->params().depth(), false, 0); } @@ -1222,7 +1225,7 @@ int InsetTabular::docbook(Buffer const * buf, ostream & os) const os << "\n"; ret++; } - ret+= tabular->DocBook(buf,os); + ret+= tabular->docBook(buf,os); if (!master) { os << "\n"; ret++; @@ -1674,15 +1677,16 @@ static void checkLongtableSpecial(LyXTabular::ltType & ltt, { if (special == "dl_above") { ltt.topDL = flag; - flag = true; + ltt.set = false; } else if (special == "dl_below") { ltt.bottomDL = flag; - flag = true; + ltt.set = false; } else if (special == "empty") { ltt.empty = flag; - flag = false; + ltt.set = false; } else if (flag) { ltt.empty = false; + ltt.set = true; } } @@ -2448,7 +2452,8 @@ bool InsetTabular::copySelection(BufferView * bv) true, true); ostringstream sstr; - paste_tabular->Ascii(bv->buffer(), sstr); + paste_tabular->ascii(bv->buffer(), sstr, + (int)parOwner()->params().depth(), true, '\t'); bv->stuffClipboard(sstr.str().c_str()); return true; }