From: Jean-Marc Lasgouttes Date: Tue, 2 Apr 2019 07:53:40 +0000 (+0200) Subject: Pass a pit to Text::isRTL(), not a paragraph X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b3cdb691db505757b2bbcaeb1c1c78d2c0267e67;p=features.git Pass a pit to Text::isRTL(), not a paragraph --- diff --git a/src/Text.h b/src/Text.h index a177a83217..f3cd8447f5 100644 --- a/src/Text.h +++ b/src/Text.h @@ -285,7 +285,7 @@ public: /// FIXME: replace Cursor with DocIterator. docstring getPossibleLabel(DocIterator const & cur) const; /// is this paragraph right-to-left? - bool isRTL(Paragraph const & par) const; + bool isRTL(pit_type pit) const; /// bool checkAndActivateInset(Cursor & cur, bool front); diff --git a/src/Text3.cpp b/src/Text3.cpp index 7baf9a8eba..aa527d1c05 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -562,10 +562,10 @@ void Text::number(Cursor & cur) } -bool Text::isRTL(Paragraph const & par) const +bool Text::isRTL(pit_type const pit) const { Buffer const & buffer = owner_->buffer(); - return par.isRTL(buffer.params()); + return pars_[pit].isRTL(buffer.params()); } diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index a29b4dca77..9bb116d360 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -889,7 +889,7 @@ bool TextMetrics::breakRow(Row & row, int const right_margin) const pos_type const end = par.size(); pos_type const pos = row.pos(); pos_type const body_pos = par.beginOfBody(); - bool const is_rtl = text_->isRTL(par); + bool const is_rtl = text_->isRTL(row.pit()); bool need_new_row = false; row.clear();