]> git.lyx.org Git - features.git/commitdiff
Do not \cprotect in table cells
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 1 Mar 2024 06:18:28 +0000 (07:18 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 1 Mar 2024 06:18:28 +0000 (07:18 +0100)
src/Paragraph.cpp

index 1d4861e64eb0f6f221055f1d0dd40aff94f1950b..49713a8b9a801c6415a1f617ea36b71134182ca7 100644 (file)
@@ -4284,9 +4284,10 @@ bool Paragraph::isHardHyphenOrApostrophe(pos_type pos) const
 bool Paragraph::needsCProtection(bool const fragile) const
 {
        // first check the layout of the paragraph, but only in insets
+       // and not in tables
        InsetText const * textinset = inInset().asInsetText();
        bool const maintext = textinset
-               ? textinset->text().isMainText()
+               ? textinset->text().isMainText() || inInset().lyxCode() == CELL_CODE
                : false;
 
        if (!maintext && layout().needcprotect) {