]> git.lyx.org Git - features.git/blobdiff - src/Paragraph.cpp
Change the signature of forceEmptyLayout(), so that we can pass a cell index with...
[features.git] / src / Paragraph.cpp
index c81e472cdca7fa7648b027f616105b52f6b1a60f..18b73346b99ec300d158ba9af4b940d90d97a503 100644 (file)
@@ -1619,22 +1619,31 @@ void Paragraph::setBeginOfBody()
 bool Paragraph::forceEmptyLayout() const
 {
        Inset const * const inset = inInset();
-       return inset && inInset()->forceEmptyLayout();
+       if (!inset)
+               return true;
+       // FIXME At present, this is wrong for table cells
+       return inset->forceEmptyLayout();
 }
 
 
 bool Paragraph::allowParagraphCustomization() const
 {
-       return inInset() && inInset()->allowParagraphCustomization(0);
+       Inset const * const inset = inInset();
+       if (!inset)
+               return true;
+       // FIXME At present, this is wrong for table cells
+       return inset->allowParagraphCustomization();
 }
 
 
 namespace {
+       // FIXME
        // This is a hack based upon one in InsetText::neverIndent().
        // When we have a real InsetTableCell, then we won't need this
        // method, because InsetTableCell will return the right values,
-       // viz: InsetTableCell::useEmptyLayout() should return true, but
-       // InsetTableCell::forceEmptyLayout() should still return false.
+       // viz: InsetTableCell::useEmptyLayout() should return true, and
+       // InsetTableCell::forceEmptyLayout() should still return true
+       // unless the width has been set.
        //
        // The #include "insets/InsetText.h" can also be removed then.
        bool inTableCell(Inset const * inset)
@@ -1651,7 +1660,7 @@ bool Paragraph::useEmptyLayout() const
 {
        Inset const * const inset = inInset();
        return inset && 
-               (inTableCell(inset) || inInset()->useEmptyLayout());
+               (inTableCell(inset) || inset->useEmptyLayout());
 }