This is in preparation of some changes to be made in this function, now the change will only have to be done once...
# HG changeset patch # User Dov Feldstern <[EMAIL PROTECTED]> # Date 1226857640 -7200 # Node ID 8b73bd1b76ee5a0bd85b66dfcd4dbd3862cf7361 # Parent 1791e3372c7978e2bffb6fb59d4f6105f71bf7bc get rid of code duplication between overloaded versions of isRTLBoundary This is in preparation of some changes to be made in this function, now the change will only have to be done once... diff -r 1791e3372c79 -r 8b73bd1b76ee src/TextMetrics.cpp --- a/src/TextMetrics.cpp Fri Nov 14 10:05:07 2008 +0000 +++ b/src/TextMetrics.cpp Sun Nov 16 19:47:20 2008 +0200 @@ -321,15 +321,9 @@ if (pos == 0) return false; - Paragraph const & par = text_->getPar(pit); + Font const & left_font = displayFont(pit, pos - 1); - bool left = displayFont(pit, pos - 1).isVisibleRightToLeft(); - bool right; - if (pos == par.size()) - right = par.isRTL(bv_->buffer().params()); - else - right = displayFont(pit, pos).isVisibleRightToLeft(); - return left != right; + return isRTLBoundary(pit, pos, left_font); }
