]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetTabular.cpp
Possible fix for the mystery crash, which is bug #9049.
[features.git] / src / insets / InsetTabular.cpp
index ac8e723d87cfc3f4a3acf5b970713ba703be1c1c..2a9c7e64b7a983f2b35150d7342b5d9f3c664814 100644 (file)
@@ -6442,4 +6442,21 @@ string InsetTabular::params2string(InsetTabular const & inset)
 }
 
 
+void InsetTabular::setLayoutForHiddenCells(DocumentClass const & dc) {
+       for (Tabular::col_type c = 0; c < tabular.ncols(); ++c) {
+               for (Tabular::row_type r = 0; r < tabular.nrows(); ++r) {
+                       if (!tabular.isPartOfMultiColumn(r,c) &&
+                           !tabular.isPartOfMultiRow(r,c))
+                               continue;
+
+                       ParagraphList & parlist = tabular.cellInset(r,c)->paragraphs();
+                       ParagraphList::iterator it = parlist.begin();
+                       ParagraphList::iterator const en = parlist.end();
+                       for (; it != en; ++it)
+                                       it->setLayout(dc.plainLayout());
+               }
+       }
+}
+
+
 } // namespace lyx