]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
LFUN to toggle branch inversion status, now available from the
[lyx.git] / src / insets / InsetTabular.cpp
index 7728a1abd46cd502a645fc830c484fda263394cc..0834f1a68fa13384e88c4b72e37ecb07e21b1283 100644 (file)
@@ -45,6 +45,8 @@
 #include "Paragraph.h"
 #include "ParagraphParameters.h"
 #include "ParIterator.h"
+#include "TexRow.h"
+#include "texstream.h"
 #include "TextClass.h"
 #include "TextMetrics.h"
 
@@ -2685,8 +2687,7 @@ void Tabular::TeXRow(otexstream & os, row_type row,
 void Tabular::latex(otexstream & os, OutputParams const & runparams) const
 {
        bool const is_tabular_star = !tabular_width.zero();
-       TexRow::RowEntry pos = TexRow::textEntry(runparams.lastid,
-                                                                                        runparams.lastpos);
+       RowEntry pos = TexRow::textEntry(runparams.lastid, runparams.lastpos);
 
        //+---------------------------------------------------------------------
        //+                      first the opening preamble                    +
@@ -2993,6 +2994,13 @@ docstring Tabular::xhtmlRow(XHTMLStream & xs, row_type row,
                        continue;
 
                stringstream attr;
+               
+               Length const cwidth = column_info[c].p_width;
+               if (!cwidth.zero()) {
+                       string const hwidth = cwidth.asHTMLString();
+                       attr << "style =\"width: " << hwidth << ";\" ";
+               }
+               
                attr << "align='";
                switch (getAlignment(cell)) {
                case LYX_ALIGN_LEFT: