]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.C
2001-12-28 Lars Gullik Bj�nnes <larsbj@birdstep.com>
[lyx.git] / src / insets / insettabular.C
index d8a6f8212a19911fb5555fe70293a952ed3933ec..6e68763d7d0ce0c7a157d146bf3ee0e8b008d6ff 100644 (file)
@@ -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 << "<informaltable>\n";
                ret++;
        }
-       ret+= tabular->DocBook(buf,os);
+       ret+= tabular->docBook(buf,os);
        if (!master) {
                os << "</informaltable>\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;
 }