[LyX/master] Remove remaining math cprotection test.

Juergen Spitzmueller spitz at lyx.org
Mon Dec 27 10:24:40 UTC 2021


commit a5b7eeacaa72d8285fbe20cd12932fd533b2cf97
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Dec 27 11:52:25 2021 +0100

    Remove remaining math cprotection test.
    
    We'll see if someone comes up with a reproducible case, and if so,
    whether ordinary protection works here as well.
    
    See #6243
---
 src/Paragraph.cpp |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 369bda0..1bf48f1 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -4120,17 +4120,6 @@ bool Paragraph::needsCProtection(bool const fragile) const
 			continue;
 		if (ins->needsCProtection(maintext, fragile))
 			return true;
-		// Now check math environments
-		InsetMath const * im = ins->asInsetMath();
-		if (!im || im->cell(0).empty())
-			continue;
-		switch(im->cell(0)[0]->lyxCode()) {
-		case MATH_ENV_CODE:
-			// these need cprotection
-			return true;
-		default:
-			break;
-		}
 	}
 
 	return false;


More information about the lyx-cvs mailing list