mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
rename Paragraph::isRightToLeftPar -> isRTL for the sake of consistence
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20031 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6c73681b07
commit
a8ed1add4d
12
src/Bidi.cpp
12
src/Bidi.cpp
@ -88,7 +88,7 @@ void Bidi::computeTables(Paragraph const & par,
|
||||
|
||||
BufferParams const & bufparams = buf.params();
|
||||
pos_type stack[2];
|
||||
bool const rtl_par = par.isRightToLeftPar(bufparams);
|
||||
bool const rtl_par = par.isRTL(bufparams);
|
||||
int lev = 0;
|
||||
bool rtl = false;
|
||||
bool rtl0 = false;
|
||||
@ -198,7 +198,7 @@ bool Bidi::isBoundary(Buffer const & buf, Paragraph const & par,
|
||||
bool const rtl = level(pos - 1) % 2;
|
||||
bool const rtl2 = inRange(pos)
|
||||
? level(pos) % 2
|
||||
: par.isRightToLeftPar(buf.params());
|
||||
: par.isRTL(buf.params());
|
||||
return rtl != rtl2;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ bool Bidi::isBoundary(Buffer const & buf, Paragraph const & par,
|
||||
bool const rtl = font.isVisibleRightToLeft();
|
||||
bool const rtl2 = inRange(pos)
|
||||
? level(pos) % 2
|
||||
: par.isRightToLeftPar(buf.params());
|
||||
: par.isRTL(buf.params());
|
||||
return rtl != rtl2;
|
||||
}
|
||||
|
||||
@ -226,15 +226,13 @@ bool reverseDirectionNeeded(Cursor const & cur)
|
||||
* within a paragraph, and thus avoid situations in which the
|
||||
* cursor gets stuck.
|
||||
*/
|
||||
return cur.bottom().paragraph().isRightToLeftPar(
|
||||
cur.bv().buffer().params());
|
||||
return cur.bottom().paragraph().isRTL(cur.bv().buffer().params());
|
||||
}
|
||||
|
||||
|
||||
bool isWithinRtlParagraph(Cursor const & cur)
|
||||
{
|
||||
return cur.innerParagraph().isRightToLeftPar(
|
||||
cur.bv().buffer().params());
|
||||
return cur.innerParagraph().isRTL(cur.bv().buffer().params());
|
||||
}
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -2394,7 +2394,7 @@ Paragraph::getParLanguage(BufferParams const & bparams) const
|
||||
}
|
||||
|
||||
|
||||
bool Paragraph::isRightToLeftPar(BufferParams const & bparams) const
|
||||
bool Paragraph::isRTL(BufferParams const & bparams) const
|
||||
{
|
||||
return lyxrc.rtl_support
|
||||
&& getParLanguage(bparams)->rightToLeft()
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
///
|
||||
Language const * getParLanguage(BufferParams const &) const;
|
||||
///
|
||||
bool isRightToLeftPar(BufferParams const &) const;
|
||||
bool isRTL(BufferParams const &) const;
|
||||
///
|
||||
void changeLanguage(BufferParams const & bparams,
|
||||
Language const * from, Language const * to);
|
||||
|
@ -521,7 +521,7 @@ void Text::insertChar(Cursor & cur, char_type c)
|
||||
// adjacent character whose direction is the paragraph's
|
||||
// direction; don't touch other properties of the font
|
||||
Language const * lang =
|
||||
(pre_space_rtl == par.isRightToLeftPar(buffer.params())) ?
|
||||
(pre_space_rtl == par.isRTL(buffer.params())) ?
|
||||
pre_space_font.language() : post_space_font.language();
|
||||
|
||||
Font space_font = tm.getDisplayFont(cur.pit(), cur.pos() - 1);
|
||||
|
@ -247,7 +247,7 @@ void Text::number(Cursor & cur)
|
||||
|
||||
bool Text::isRTL(Buffer const & buffer, Paragraph const & par) const
|
||||
{
|
||||
return par.isRightToLeftPar(buffer.params());
|
||||
return par.isRTL(buffer.params());
|
||||
}
|
||||
|
||||
|
||||
|
@ -286,7 +286,7 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos) const
|
||||
bool left = getDisplayFont(pit, pos - 1).isVisibleRightToLeft();
|
||||
bool right;
|
||||
if (pos == par.size())
|
||||
right = par.isRightToLeftPar(bv_->buffer().params());
|
||||
right = par.isRTL(bv_->buffer().params());
|
||||
else
|
||||
right = getDisplayFont(pit, pos).isVisibleRightToLeft();
|
||||
return left != right;
|
||||
@ -303,7 +303,7 @@ bool TextMetrics::isRTLBoundary(pit_type pit, pos_type pos,
|
||||
bool left = font.isVisibleRightToLeft();
|
||||
bool right;
|
||||
if (pos == par.size())
|
||||
right = par.isRightToLeftPar(bv_->buffer().params());
|
||||
right = par.isRTL(bv_->buffer().params());
|
||||
else
|
||||
right = getDisplayFont(pit, pos).isVisibleRightToLeft();
|
||||
return left != right;
|
||||
|
@ -2282,7 +2282,7 @@ int Tabular::TeXRow(odocstream & os, row_type i, Buffer const & buf,
|
||||
shared_ptr<InsetText> inset = getCellInset(cell);
|
||||
|
||||
Paragraph const & par = inset->paragraphs().front();
|
||||
bool rtl = par.isRightToLeftPar(buf.params())
|
||||
bool rtl = par.isRTL(buf.params())
|
||||
&& !par.empty()
|
||||
&& getPWidth(cell).zero();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user