Move a couple routines from InsetFlex to InsetCollapsable so the CustomPars

and ForcePlain tags will work not just with InsetFlex but all InsetCollapsables.
Thanks to Jurgen and JMarc for reminding me I'd meant to do this.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28340 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-02-03 21:12:59 +00:00
parent 6d90ee1f40
commit ac4e461898
7 changed files with 11 additions and 32 deletions

View File

@ -162,6 +162,8 @@ InsetLayout Phantom
Font
Color phantomtext
EndFont
CustomPars false
ForcePlain true
End
InsetLayout Listings
@ -213,8 +215,8 @@ InsetLayout Index
Size Small
EndFont
MultiPar false
# CustomPars false
# ForcePlain true
CustomPars false
ForcePlain true
NeedProtect true
End
@ -277,7 +279,7 @@ InsetLayout OptArg
Color collapsable
Size Small
EndFont
# MultiPar false
MultiPar false
End
InsetLayout Info

View File

@ -175,6 +175,12 @@ private:
///
Dimension dimensionCollapsed() const;
///
/// should paragraphs be forced to use the empty layout?
virtual bool forcePlainLayout(idx_type = 0) const
{ return getLayout().forcePlainLayout(); }
/// should the user be allowed to customize alignment, etc.?
virtual bool allowParagraphCustomization(idx_type = 0) const
{ return getLayout().allowParagraphCustomization(); }
docstring labelstring_;
///
mutable Box button_dim;

View File

@ -60,10 +60,6 @@ private:
void validate(LaTeXFeatures &) const {}
///
bool showInsetDialog(BufferView *) const;
///
virtual bool forcePlainLayout(idx_type = 0) const { return true; }
///
virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
/// should paragraph indendation be omitted in any case?
bool neverIndent() const { return true; }
///

View File

@ -51,18 +51,6 @@ protected:
private:
Inset * clone() const { return new InsetFlex(*this); }
// FIXME The following two routines should be moved to InsetCollapsable.
// That will allow the redeclarations of these routines to be removed
// from its subclasses, such as InsetERT. But it will also require us
// to rework stdinsets.inc, to make sure we get the right behavior from
// the subclasses.
/// should paragraphs be forced to use the empty layout?
virtual bool forcePlainLayout(idx_type = 0) const
{ return getLayout().forcePlainLayout(); }
/// should the user be allowed to customize alignment, etc.?
virtual bool allowParagraphCustomization(idx_type = 0) const
{ return getLayout().allowParagraphCustomization(); }
///
std::string name_;
};

View File

@ -40,10 +40,6 @@ private:
int latex(odocstream &, OutputParams const &) const;
/// should paragraph indendation be omitted in any case?
bool neverIndent() const { return true; }
/// should paragraphs be forced to use the empty layout?
virtual bool forcePlainLayout(idx_type = 0) const { return true; }
/// should the user be allowed to customize alignment, etc.?
virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
///
void addToToc(DocIterator const &);
///

View File

@ -39,19 +39,14 @@ private:
docstring name() const { return from_ascii("OptArg"); }
/// return an message upon editing
docstring editMessage() const;
/// Standard LaTeX output -- short-circuited
int latex(odocstream &, OutputParams const &) const;
/// Standard plain text output -- short-circuited
int plaintext(odocstream &, OutputParams const &) const;
/// Standard DocBook output -- short-circuited
int docbook(odocstream &, OutputParams const &) const;
///
virtual bool forcePlainLayout(idx_type = 0) const { return true; }
/// Write out to the .lyx file
void write(std::ostream & os) const;
/// should paragraph indendation be ommitted in any case?
bool neverIndent() const { return true; }
///

View File

@ -76,10 +76,6 @@ private:
/// show the phantom dialog
bool showInsetDialog(BufferView * bv) const;
///
bool allowParagraphCustomization(idx_type = 0) const { return false; }
///
bool forcePlainLayout(idx_type = 0) const { return true; }
///
bool neverIndent() const { return true; }
///
int latex(odocstream &, OutputParams const &) const;