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
bool close = false;
odocstream::pos_type const len = os.tellp();
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
if (running_font.language()->lang() == "farsi")
os << "\\beginL{}";
else
virtual bool isFreeSpacing() const { return false; }
///
virtual bool allowEmpty() const { return false; }
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()
/// is this an inset that can be moved into?
/// FIXME: merge with editable()
virtual bool isFreeSpacing() const { return layout_->freespacing; }
/// Don't eliminate empty paragraphs
virtual bool allowEmpty() const { return layout_->keepempty; }
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:
virtual bool forceLTR() const { return layout_->forceltr; }
protected:
void registerEmbeddedFiles(Buffer const &, EmbeddedFiles &) const;
///
void updateEmbeddedFile(Buffer const &, EmbeddedFile const &);
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 &);
///
protected:
InsetGraphics(InsetGraphics const &);
///
///
static bool isCompatibleCommand(std::string const & s)
{ return s == "href"; }
///
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());
private:
virtual Inset * clone() const {
return new InsetHyperlink(params());
///
static int displayMargin() { return 12; }
///
static int displayMargin() { return 12; }
+
+ /// Force inset into LTR environment if surroundings are RTL?
+ virtual bool forceLTR() const { return true; }
protected:
InsetMathHull(InsetMathHull const &);
protected:
InsetMathHull(InsetMathHull const &);