mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
return to 1.1.6 behaviour for ascii export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4110 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0b81a7631e
commit
4d6b99e865
@ -294,7 +294,7 @@ int InsetFormula::latex(Buffer const *, ostream & os, bool fragile, bool) const
|
|||||||
|
|
||||||
int InsetFormula::ascii(Buffer const *, ostream & os, int) const
|
int InsetFormula::ascii(Buffer const *, ostream & os, int) const
|
||||||
{
|
{
|
||||||
#if 1
|
#if 0
|
||||||
TextMetricsInfo mi;
|
TextMetricsInfo mi;
|
||||||
par()->metricsT(mi);
|
par()->metricsT(mi);
|
||||||
TextPainter tpain(par()->width(), par()->height());
|
TextPainter tpain(par()->width(), par()->height());
|
||||||
@ -304,7 +304,7 @@ int InsetFormula::ascii(Buffer const *, ostream & os, int) const
|
|||||||
metrics();
|
metrics();
|
||||||
return tpain.textheight();
|
return tpain.textheight();
|
||||||
#else
|
#else
|
||||||
WriteStream wi(os, false);
|
WriteStream wi(os, false, true);
|
||||||
par_->write(wi);
|
par_->write(wi);
|
||||||
return wi.line();
|
return wi.line();
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#include "math_support.h"
|
#include "math_support.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "Painter.h"
|
#include "Painter.h"
|
||||||
|
#include "textpainter.h"
|
||||||
|
#include "Lsstream.h"
|
||||||
#include "LaTeXFeatures.h"
|
#include "LaTeXFeatures.h"
|
||||||
#include "support/LAssert.h"
|
#include "support/LAssert.h"
|
||||||
|
|
||||||
@ -199,21 +201,39 @@ void MathHullInset::draw(Painter & pain, int x, int y) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void MathHullInset::metricsT(TextMetricsInfo const & mi) const
|
void MathHullInset::metricsT(TextMetricsInfo const &) const
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
if (display()) {
|
||||||
|
MathGridInset::metricsT(mi);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ostringstream os;
|
||||||
|
WriteStream wi(os, false, true);
|
||||||
|
write(wi);
|
||||||
|
width_ = os.str().size();
|
||||||
ascent_ = 1;
|
ascent_ = 1;
|
||||||
descent_ = 0;
|
descent_ = 0;
|
||||||
width_ = normalName(objtype_).size();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathHullInset::drawT(TextPainter & pain, int x, int y) const
|
void MathHullInset::drawT(TextPainter & pain, int x, int y) const
|
||||||
{
|
{
|
||||||
pain.draw(x, y, normalName(objtype_).c_str());
|
#if 0
|
||||||
MathGridInset::draw(pain, x, y);
|
if (display()) {
|
||||||
|
MathGridInset::drawT(pain, x, y);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ostringstream os;
|
||||||
|
WriteStream wi(os, false, true);
|
||||||
|
write(wi);
|
||||||
|
pain.draw(x, y, os.str().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
string MathHullInset::label(row_type row) const
|
string MathHullInset::label(row_type row) const
|
||||||
|
@ -31,9 +31,9 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int x, int y) const;
|
void draw(Painter &, int x, int y) const;
|
||||||
///
|
///
|
||||||
//void metricsT(TextMetricsInfo const & st) const;
|
void metricsT(TextMetricsInfo const & st) const;
|
||||||
///
|
///
|
||||||
//void drawT(TextPainter &, int x, int y) const;
|
void drawT(TextPainter &, int x, int y) const;
|
||||||
///
|
///
|
||||||
string label(row_type row) const;
|
string label(row_type row) const;
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user