is commented out, so that the documentclass is queried every time instead of
using the layout_ cache. For now I have kept the setLayout calls, but they are
inoperant.
Other changes:
* remove non-const usePlainLayout methods
* move InsetCollapsable::allowSpellCheck and allowMultiPar to InsetText
* move InsetCollapsable::isFreespacing and forceLTR to Inset
Freespacing support could be moved to insettext, but I have to check who
uses it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30549
a592a061-630c-0410-9148-
cb99ea01b6c8
virtual void cursorPos(BufferView const & bv,
CursorSlice const & sl, bool boundary, int & x, int & y) const;
- ///
- virtual bool isFreeSpacing() const { return false; }
- ///
- virtual bool allowEmpty() const { return false; }
+ /// Allow multiple blanks
+ virtual bool isFreeSpacing() const { return getLayout().isFreeSpacing(); }
+ /// Don't eliminate empty paragraphs
+ virtual bool allowEmpty() const { return getLayout().isKeepEmpty(); }
/// Force inset into LTR environment if surroundings are RTL?
- virtual bool forceLTR() const { return false; }
+ virtual bool forceLTR() const { return getLayout().isForceLtr(); }
/// Where should we go when we press the up or down cursor key?
virtual bool idxUpDown(Cursor & cur, bool up) const;
InsetBranchParams const & params() const { return params_; }
///
void setParams(InsetBranchParams const & params) { params_ = params; }
- ///
- virtual bool usePlainLayout() { return false; }
/** \returns true if params_.branch is listed as 'selected' in
\c buffer. This handles the case of child documents.
}
-bool InsetCollapsable::allowMultiPar() const
-{
- return getLayout().isMultiPar();
-}
-
-
void InsetCollapsable::resetParagraphsFont()
{
Font font(inherit_font, buffer().params().language);
docstring toolTip(BufferView const & bv, int x, int y) const;
///
docstring name() const { return from_ascii("Collapsable"); }
+#if 0
///
InsetLayout const & getLayout() const { return *layout_; }
+#endif
///
void setLayout();
/// (Re-)set the character style parameters from \p tc according
/// to name()
void setLayout(DocumentClass const * const tc);
///
- virtual bool usePlainLayout() { return true; }
- ///
void read(Lexer &);
///
void write(std::ostream &) const;
Geometry geometry(BufferView const & bv) const;
/// Returns the geometry disregarding auto_open_
Geometry geometry() const;
- /// Allow spellchecking, except for insets with latex_language
- bool allowSpellCheck() const { return !forceLTR(); }
///
bool allowMultiPar() const;
///
///
InsetCode lyxCode() const { return COLLAPSABLE_CODE; }
- /// Allow multiple blanks
- virtual bool isFreeSpacing() const { return getLayout().isFreeSpacing(); }
- /// Don't eliminate empty paragraphs
- virtual bool allowEmpty() const { return getLayout().isKeepEmpty(); }
- /// Force inset into LTR environment if surroundings are RTL?
- virtual bool forceLTR() const { return getLayout().isForceLtr(); }
///
virtual bool usePlainLayout() const { return true; }
/// Is this inset's layout defined in the document's textclass?
///
virtual bool forcePlainLayout(idx_type cell = 0) const;
///
- virtual bool usePlainLayout() { return true; }
- ///
void addPreview(graphics::PreviewLoader &) const;
/// lock cell with given index
ParagraphList const & paragraphs() const;
///
bool insetAllowed(InsetCode) const { return true; }
- ///
- bool allowSpellCheck() const { return true; }
+ /// Allow spellchecking, except for insets with latex_language
+ bool allowSpellCheck() const { return !forceLTR(); }
///
virtual bool isMacroScope() const { return false; }
///
- virtual bool allowMultiPar() const { return true; }
+ virtual bool allowMultiPar() const { return getLayout().isMultiPar(); }
/// Update the counters of this inset and of its contents
virtual void updateLabels(ParIterator const &);