one more helper method in Bufferparams

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-09-17 15:39:58 +00:00
parent 947ab6eaea
commit 870564775b
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-09-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* bufferparams.C (hasClassDefaults): new method. Returns true if
the buffer parameters correspond to known class defaults
2001-09-17 Angus Leeming <a.leeming@ic.ac.uk> 2001-09-17 Angus Leeming <a.leeming@ic.ac.uk>
* XFormsView.C (show): set minimum size to the main window. * XFormsView.C (show): set minimum size to the main window.

View File

@ -177,7 +177,8 @@ void BufferParams::writeFile(ostream & os) const
} }
void BufferParams::useClassDefaults() { void BufferParams::useClassDefaults()
{
LyXTextClass const & tclass = textclasslist.TextClass(textclass); LyXTextClass const & tclass = textclasslist.TextClass(textclass);
sides = tclass.sides(); sides = tclass.sides();
@ -189,6 +190,19 @@ void BufferParams::useClassDefaults() {
} }
bool BufferParams::hasClassDefaults() const
{
LyXTextClass const & tclass = textclasslist.TextClass(textclass);
return (sides == tclass.sides()
&& columns == tclass.columns()
&& pagestyle == tclass.pagestyle()
&& options == tclass.options()
&& secnumdepth == tclass.secnumdepth()
&& tocdepth == tclass.tocdepth());
}
void BufferParams::readPreamble(LyXLex & lex) void BufferParams::readPreamble(LyXLex & lex)
{ {
if (lex.getString() != "\\begin_preamble") if (lex.getString() != "\\begin_preamble")

View File

@ -113,6 +113,9 @@ public:
/// ///
void useClassDefaults(); void useClassDefaults();
///
bool hasClassDefaults() const;
/// ///
VSpace const & getDefSkip() const { return defskip; } VSpace const & getDefSkip() const { return defskip; }