mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
NeedCProtect -1 also for InsetLayouts
This commit is contained in:
parent
2306082787
commit
a716fb96b5
@ -1578,6 +1578,7 @@ InsetLayout Flex:Only
|
|||||||
EndArgument
|
EndArgument
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
CustomPars false
|
CustomPars false
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Uncover
|
InsetLayout Flex:Uncover
|
||||||
@ -1599,6 +1600,7 @@ InsetLayout Flex:Uncover
|
|||||||
EndArgument
|
EndArgument
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
CustomPars false
|
CustomPars false
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Visible
|
InsetLayout Flex:Visible
|
||||||
@ -1620,6 +1622,7 @@ InsetLayout Flex:Visible
|
|||||||
EndArgument
|
EndArgument
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
CustomPars false
|
CustomPars false
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Invisible
|
InsetLayout Flex:Invisible
|
||||||
@ -1641,6 +1644,7 @@ InsetLayout Flex:Invisible
|
|||||||
EndArgument
|
EndArgument
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
CustomPars false
|
CustomPars false
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Alternative
|
InsetLayout Flex:Alternative
|
||||||
@ -1668,6 +1672,7 @@ InsetLayout Flex:Alternative
|
|||||||
EndArgument
|
EndArgument
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
CustomPars false
|
CustomPars false
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Beamer_Note
|
InsetLayout Flex:Beamer_Note
|
||||||
@ -1703,6 +1708,7 @@ InsetLayout Flex:ArticleMode
|
|||||||
LabelString Article
|
LabelString Article
|
||||||
MultiPar true
|
MultiPar true
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:PresentationMode
|
InsetLayout Flex:PresentationMode
|
||||||
@ -1714,6 +1720,7 @@ InsetLayout Flex:PresentationMode
|
|||||||
LabelString Presentation
|
LabelString Presentation
|
||||||
MultiPar true
|
MultiPar true
|
||||||
ResetsFont true
|
ResetsFont true
|
||||||
|
NeedCProtect -1
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
@ -405,9 +405,17 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass,
|
|||||||
case IL_NEEDPROTECT:
|
case IL_NEEDPROTECT:
|
||||||
lex >> needprotect_;
|
lex >> needprotect_;
|
||||||
break;
|
break;
|
||||||
case IL_NEEDCPROTECT:
|
case IL_NEEDCPROTECT: {
|
||||||
lex >> needcprotect_;
|
string val;
|
||||||
|
lex >> val;
|
||||||
|
nocprotect_ = false;
|
||||||
|
needcprotect_ = false;
|
||||||
|
if (val == "-1")
|
||||||
|
nocprotect_ = true;
|
||||||
|
else if (val == "1" || val == "true")
|
||||||
|
needcprotect_ = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case IL_NEEDMBOXPROTECT:
|
case IL_NEEDMBOXPROTECT:
|
||||||
lex >> needmboxprotect_;
|
lex >> needmboxprotect_;
|
||||||
break;
|
break;
|
||||||
|
@ -223,6 +223,8 @@ public:
|
|||||||
bool isNeedProtect() const { return needprotect_; }
|
bool isNeedProtect() const { return needprotect_; }
|
||||||
///
|
///
|
||||||
bool needsCProtect() const { return needcprotect_; }
|
bool needsCProtect() const { return needcprotect_; }
|
||||||
|
///
|
||||||
|
bool noCProtect() const { return nocprotect_; }
|
||||||
/// Protection of some elements such as \ref and \cite
|
/// Protection of some elements such as \ref and \cite
|
||||||
/// in \mbox (needed by commands building on soul or ulem)
|
/// in \mbox (needed by commands building on soul or ulem)
|
||||||
bool isNeedMBoxProtect() const { return needmboxprotect_; }
|
bool isNeedMBoxProtect() const { return needmboxprotect_; }
|
||||||
@ -419,6 +421,8 @@ private:
|
|||||||
///
|
///
|
||||||
bool needcprotect_ = false;
|
bool needcprotect_ = false;
|
||||||
///
|
///
|
||||||
|
bool nocprotect_ = false;
|
||||||
|
///
|
||||||
bool needmboxprotect_ = false;
|
bool needmboxprotect_ = false;
|
||||||
/// should the contents be written to TOC strings?
|
/// should the contents be written to TOC strings?
|
||||||
bool intoc_ = false;
|
bool intoc_ = false;
|
||||||
|
@ -551,6 +551,8 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
|
|||||||
rp.pass_thru_chars += il.passThruChars();
|
rp.pass_thru_chars += il.passThruChars();
|
||||||
if (!il.noPassThruChars().empty())
|
if (!il.noPassThruChars().empty())
|
||||||
rp.no_pass_thru_chars += il.noPassThruChars();
|
rp.no_pass_thru_chars += il.noPassThruChars();
|
||||||
|
if (il.noCProtect())
|
||||||
|
rp.no_cprotect = true;
|
||||||
if (!il.newlineCmd().empty())
|
if (!il.newlineCmd().empty())
|
||||||
rp.newlinecmd = il.newlineCmd();
|
rp.newlinecmd = il.newlineCmd();
|
||||||
rp.par_begin = 0;
|
rp.par_begin = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user