mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-26 18:07:18 +00:00
Coding style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36938 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3626b46109
commit
41aa051d22
@ -390,7 +390,6 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
string const & everypar,
|
string const & everypar,
|
||||||
int start_pos, int end_pos)
|
int start_pos, int end_pos)
|
||||||
{
|
{
|
||||||
|
|
||||||
BufferParams const & bparams = buf.params();
|
BufferParams const & bparams = buf.params();
|
||||||
ParagraphList const & paragraphs = text.paragraphs();
|
ParagraphList const & paragraphs = text.paragraphs();
|
||||||
Paragraph const & par = paragraphs.at(pit);
|
Paragraph const & par = paragraphs.at(pit);
|
||||||
@ -511,9 +510,8 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
if (par_lang != prev_lang
|
if (par_lang != prev_lang
|
||||||
// check if we already put language command in TeXEnvironment()
|
// check if we already put language command in TeXEnvironment()
|
||||||
&& !(style.isEnvironment()
|
&& !(style.isEnvironment()
|
||||||
&& (pit == 0 ||
|
&& (pit == 0 || (priorpar->layout() != par.layout()
|
||||||
(priorpar->layout() != par.layout() &&
|
&& priorpar->getDepth() <= par.getDepth())
|
||||||
priorpar->getDepth() <= par.getDepth())
|
|
||||||
|| priorpar->getDepth() < par.getDepth())))
|
|| priorpar->getDepth() < par.getDepth())))
|
||||||
{
|
{
|
||||||
if (!lang_end_command.empty() &&
|
if (!lang_end_command.empty() &&
|
||||||
@ -533,20 +531,19 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
// the previous one, if the current language is different than the
|
// the previous one, if the current language is different than the
|
||||||
// outer_language (which is currently in effect once the previous one
|
// outer_language (which is currently in effect once the previous one
|
||||||
// is closed).
|
// is closed).
|
||||||
if ((lang_end_command.empty() ||
|
if ((lang_end_command.empty() || par_lang != outer_lang)
|
||||||
par_lang != outer_lang) &&
|
&& !par_lang.empty()) {
|
||||||
!par_lang.empty()) {
|
|
||||||
// If we're inside an inset, and that inset is within an \L or \R
|
// If we're inside an inset, and that inset is within an \L or \R
|
||||||
// (or equivalents), then within the inset, too, any opposite
|
// (or equivalents), then within the inset, too, any opposite
|
||||||
// language paragraph should appear within an \L or \R (in addition
|
// language paragraph should appear within an \L or \R (in addition
|
||||||
// to, outside of, the normal language switch commands).
|
// to, outside of, the normal language switch commands).
|
||||||
// This behavior is not correct for ArabTeX, though.
|
// This behavior is not correct for ArabTeX, though.
|
||||||
if (!runparams.use_polyglossia &&
|
if (!runparams.use_polyglossia
|
||||||
// not for ArabTeX
|
// not for ArabTeX
|
||||||
(par_language->lang() != "arabic_arabtex" &&
|
&& par_language->lang() != "arabic_arabtex"
|
||||||
outer_language->lang() != "arabic_arabtex") &&
|
&& outer_language->lang() != "arabic_arabtex"
|
||||||
// are we in an inset?
|
// are we in an inset?
|
||||||
runparams.local_font != 0 &&
|
&& runparams.local_font != 0
|
||||||
// is the inset within an \L or \R?
|
// is the inset within an \L or \R?
|
||||||
//
|
//
|
||||||
// FIXME: currently, we don't check this; this means that
|
// FIXME: currently, we don't check this; this means that
|
||||||
@ -554,9 +551,7 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
// doesn't seem to hurt (though latex will complain)
|
// doesn't seem to hurt (though latex will complain)
|
||||||
//
|
//
|
||||||
// is this paragraph in the opposite direction?
|
// is this paragraph in the opposite direction?
|
||||||
runparams.local_font->isRightToLeft() !=
|
&& runparams.local_font->isRightToLeft() != par_language->rightToLeft()) {
|
||||||
par_language->rightToLeft()
|
|
||||||
) {
|
|
||||||
// FIXME: I don't have a working copy of the Arabi package, so
|
// FIXME: I don't have a working copy of the Arabi package, so
|
||||||
// I'm not sure if the farsi and arabic_arabi stuff is correct
|
// I'm not sure if the farsi and arabic_arabi stuff is correct
|
||||||
// or not...
|
// or not...
|
||||||
@ -749,7 +744,8 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
case LATEX_ENVIRONMENT: {
|
case LATEX_ENVIRONMENT: {
|
||||||
// if its the last paragraph of the current environment
|
// if its the last paragraph of the current environment
|
||||||
// skip it otherwise fall through
|
// skip it otherwise fall through
|
||||||
if (nextpar && (nextpar->layout() != par.layout()
|
if (nextpar
|
||||||
|
&& (nextpar->layout() != par.layout()
|
||||||
|| nextpar->params().depth() != par.params().depth()))
|
|| nextpar->params().depth() != par.params().depth()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -763,8 +759,7 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
|
|
||||||
if (par.allowParagraphCustomization()) {
|
if (par.allowParagraphCustomization()) {
|
||||||
if (!par.params().spacing().isDefault()
|
if (!par.params().spacing().isDefault()
|
||||||
&& (runparams.isLastPar || !nextpar->hasSameLayout(par)))
|
&& (runparams.isLastPar || !nextpar->hasSameLayout(par))) {
|
||||||
{
|
|
||||||
if (pending_newline) {
|
if (pending_newline) {
|
||||||
os << '\n';
|
os << '\n';
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user