mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Use forceLTR instead of inset codes in order to determine whether an inset
should be surrounded by external \L{} in bidi text. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21458 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31617cf92a
commit
7bf4f48a4a
@ -723,14 +723,10 @@ void Paragraph::Private::latexInset(Buffer const & buf,
|
||||
bool close = false;
|
||||
odocstream::pos_type const len = os.tellp();
|
||||
|
||||
if ((inset->lyxCode() == GRAPHICS_CODE
|
||||
|| inset->lyxCode() == MATH_CODE
|
||||
|| inset->lyxCode() == HYPERLINK_CODE
|
||||
|| (inset->asInsetCollapsable()
|
||||
&& inset->asInsetCollapsable()->forceLTR()
|
||||
// ERT is an exception, since it doesn't go to output
|
||||
&& inset->lyxCode() != ERT_CODE))
|
||||
&& running_font.isRightToLeft()) {
|
||||
if (inset->forceLTR()
|
||||
&& running_font.isRightToLeft()
|
||||
// ERT is an exception, it should be output with no decorations at all
|
||||
&& inset->lyxCode() != ERT_CODE) {
|
||||
if (running_font.language()->lang() == "farsi")
|
||||
os << "\\beginL{}";
|
||||
else
|
||||
|
@ -164,6 +164,8 @@ public:
|
||||
virtual bool isFreeSpacing() const { return false; }
|
||||
///
|
||||
virtual bool allowEmpty() const { return false; }
|
||||
/// Force inset into LTR environment if surroundings are RTL?
|
||||
virtual bool forceLTR() const { return false; }
|
||||
|
||||
/// is this an inset that can be moved into?
|
||||
/// FIXME: merge with editable()
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
virtual bool isFreeSpacing() const { return layout_->freespacing; }
|
||||
/// Don't eliminate empty paragraphs
|
||||
virtual bool allowEmpty() const { return layout_->keepempty; }
|
||||
/// Force inset into LTR environment if surroundings are RTL
|
||||
/// Force inset into LTR environment if surroundings are RTL?
|
||||
virtual bool forceLTR() const { return layout_->forceltr; }
|
||||
|
||||
protected:
|
||||
|
@ -82,6 +82,8 @@ public:
|
||||
void registerEmbeddedFiles(Buffer const &, EmbeddedFiles &) const;
|
||||
///
|
||||
void updateEmbeddedFile(Buffer const &, EmbeddedFile const &);
|
||||
/// Force inset into LTR environment if surroundings are RTL?
|
||||
virtual bool forceLTR() const { return true; }
|
||||
protected:
|
||||
InsetGraphics(InsetGraphics const &);
|
||||
///
|
||||
|
@ -56,6 +56,8 @@ public:
|
||||
///
|
||||
static bool isCompatibleCommand(std::string const & s)
|
||||
{ return s == "href"; }
|
||||
/// Force inset into LTR environment if surroundings are RTL?
|
||||
virtual bool forceLTR() const { return true; }
|
||||
private:
|
||||
virtual Inset * clone() const {
|
||||
return new InsetHyperlink(params());
|
||||
|
@ -120,6 +120,9 @@ public:
|
||||
|
||||
///
|
||||
static int displayMargin() { return 12; }
|
||||
|
||||
/// Force inset into LTR environment if surroundings are RTL?
|
||||
virtual bool forceLTR() const { return true; }
|
||||
|
||||
protected:
|
||||
InsetMathHull(InsetMathHull const &);
|
||||
|
Loading…
Reference in New Issue
Block a user