mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
remove some compability code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6314 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1583baeb34
commit
aaa02999f2
@ -1,6 +1,13 @@
|
|||||||
|
2003-03-02 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
|
* buffer.C (readInset): remove compability code for old Figure and
|
||||||
|
InsetInfo insets
|
||||||
|
|
||||||
2003-03-02 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2003-03-02 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* buffer.C: ws changes
|
* buffer.C: ws changes
|
||||||
|
(readInset):
|
||||||
|
|
||||||
* BufferView_pimpl.C: ditto
|
* BufferView_pimpl.C: ditto
|
||||||
* author.C: ditto
|
* author.C: ditto
|
||||||
* buffer.h: ditto
|
* buffer.h: ditto
|
||||||
|
12
src/buffer.C
12
src/buffer.C
@ -1135,7 +1135,6 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par,
|
|||||||
inset = new InsetParent(inscmd, *this);
|
inset = new InsetParent(inscmd, *this);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bool alreadyread = false;
|
|
||||||
if (tmptok == "Quotes") {
|
if (tmptok == "Quotes") {
|
||||||
inset = new InsetQuotes;
|
inset = new InsetQuotes;
|
||||||
} else if (tmptok == "External") {
|
} else if (tmptok == "External") {
|
||||||
@ -1144,16 +1143,8 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par,
|
|||||||
inset = new InsetFormulaMacro;
|
inset = new InsetFormulaMacro;
|
||||||
} else if (tmptok == "Formula") {
|
} else if (tmptok == "Formula") {
|
||||||
inset = new InsetFormula;
|
inset = new InsetFormula;
|
||||||
} else if (tmptok == "Figure") { // Backward compatibility
|
|
||||||
// inset = new InsetFig(100, 100, *this);
|
|
||||||
inset = new InsetGraphics;
|
|
||||||
} else if (tmptok == "Graphics") {
|
} else if (tmptok == "Graphics") {
|
||||||
inset = new InsetGraphics;
|
inset = new InsetGraphics;
|
||||||
} else if (tmptok == "Info") {// backwards compatibility
|
|
||||||
inset = new InsetNote(this,
|
|
||||||
lex.getLongString("\\end_inset"),
|
|
||||||
true);
|
|
||||||
alreadyread = true;
|
|
||||||
} else if (tmptok == "Note") {
|
} else if (tmptok == "Note") {
|
||||||
inset = new InsetNote(params);
|
inset = new InsetNote(params);
|
||||||
} else if (tmptok == "Include") {
|
} else if (tmptok == "Include") {
|
||||||
@ -1193,7 +1184,8 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par,
|
|||||||
inset = new InsetFloatList;
|
inset = new InsetFloatList;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inset && !alreadyread) inset->read(this, lex);
|
if (inset)
|
||||||
|
inset->read(this, lex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inset) {
|
if (inset) {
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2003-03-02 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
|
* insetnote.[Ch] (InsetNote): remove unused constructor
|
||||||
|
|
||||||
2003-02-28 Alfredo Braunstein <abraunst@libero.it>
|
2003-02-28 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
* insetgraphics.C: added include "format.h"
|
* insetgraphics.C: added include "format.h"
|
||||||
|
@ -59,26 +59,6 @@ Inset * InsetNote::clone(Buffer const &, bool same_id) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This constructor is used for reading old InsetInfo
|
|
||||||
InsetNote::InsetNote(Buffer const * buf, string const & contents,
|
|
||||||
bool collapsed)
|
|
||||||
: InsetCollapsable(buf->params, collapsed)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
|
|
||||||
Paragraph * par = inset.paragraph();
|
|
||||||
LyXFont font(LyXFont::ALL_INHERIT, buf->params.language);
|
|
||||||
|
|
||||||
// Since XForms doesn't support RTL, we can assume that old notes
|
|
||||||
// in RTL documents are written in English.
|
|
||||||
if (font.language()->RightToLeft())
|
|
||||||
font.setLanguage(default_language);
|
|
||||||
|
|
||||||
lyx::pos_type pos = 0;
|
|
||||||
buf->insertStringAsLines(par, pos, font, rtrim(contents, "\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
string const InsetNote::editMessage() const
|
string const InsetNote::editMessage() const
|
||||||
{
|
{
|
||||||
return _("Opened Note Inset");
|
return _("Opened Note Inset");
|
||||||
|
@ -26,8 +26,6 @@ public:
|
|||||||
InsetNote(InsetNote const &, bool same_id = false);
|
InsetNote(InsetNote const &, bool same_id = false);
|
||||||
///
|
///
|
||||||
Inset * clone(Buffer const &, bool same_id = false) const;
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
||||||
/// constructor with initial contents
|
|
||||||
InsetNote(Buffer const *, string const & contents, bool collapsed);
|
|
||||||
///
|
///
|
||||||
string const editMessage() const;
|
string const editMessage() const;
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user