mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
add support for hspell; fix \framebox
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@6541 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f40673b9af
commit
31a37ba49b
@ -1,3 +1,8 @@
|
||||
2003-03-07 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* QPrefs.C:
|
||||
* QPrefSpellcheckerModule.ui: Add 'hspell' option.
|
||||
|
||||
2003-03-12 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* QParagraph.C (apply): do not reset vfill spacing to 'none' when
|
||||
|
@ -188,10 +188,7 @@ void QPrefs::apply()
|
||||
|
||||
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
|
||||
|
||||
if (spellmod->spellCommandCO->currentItem() == 0)
|
||||
rc.isp_command = "ispell";
|
||||
else
|
||||
rc.isp_command = "aspell";
|
||||
rc.isp_command = fromqstr(spellmod->spellCommandCO->currentText());
|
||||
|
||||
// FIXME: remove isp_use_alt_lang
|
||||
rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
|
||||
@ -441,8 +438,13 @@ void QPrefs::update_contents()
|
||||
|
||||
QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
|
||||
|
||||
item = (rc.isp_command == "ispell") ? 0 : 1;
|
||||
spellmod->spellCommandCO->setCurrentItem(item);
|
||||
QString const tmp = qt_(rc.isp_command);
|
||||
for (int i = 0; i < spellmod->spellCommandCO->count(); ++i) {
|
||||
if (spellmod->spellCommandCO->text(i) == tmp) {
|
||||
spellmod->spellCommandCO->setCurrentItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// FIXME: remove isp_use_alt_lang
|
||||
spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
|
||||
// FIXME: remove isp_use_esc_chars
|
||||
|
@ -193,6 +193,12 @@
|
||||
<string>aspell</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property>
|
||||
<name>text</name>
|
||||
<string>hspell</string>
|
||||
</property>
|
||||
</item>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>spellCommandCO</cstring>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
MathFrameboxInset::MathFrameboxInset()
|
||||
: MathNestInset(2)
|
||||
: MathNestInset(3)
|
||||
{}
|
||||
|
||||
|
||||
@ -25,40 +25,53 @@ MathInset * MathFrameboxInset::clone() const
|
||||
|
||||
void MathFrameboxInset::metrics(MathMetricsInfo & mi) const
|
||||
{
|
||||
MathFontSetChanger dummy(mi.base, "textnormal");
|
||||
w_ = mathed_char_width(mi.base.font, '[');
|
||||
MathNestInset::metrics(mi);
|
||||
dim_ = cell(0).dim();
|
||||
dim_ += cell(1).dim();
|
||||
dim_.w += 2 * w_ + 4;
|
||||
dim_ += cell(2).dim();
|
||||
dim_.w += 4 * w_ + 4;
|
||||
metricsMarkers2(5); // 5 pixels margin
|
||||
}
|
||||
|
||||
|
||||
void MathFrameboxInset::draw(MathPainterInfo & pi, int x, int y) const
|
||||
{
|
||||
MathFontSetChanger dummy(pi.base, "textnormal");
|
||||
pi.pain.rectangle(x + 1, y - ascent() + 1, width() - 2, height() - 2,
|
||||
LColor::black);
|
||||
x += 5;
|
||||
|
||||
drawStrBlack(pi, x, y, "[");
|
||||
x += w_;
|
||||
cell(0).draw(pi, x, y);
|
||||
x += cell(0).width();
|
||||
drawStrBlack(pi, x, y, "]");
|
||||
x += w_ + 4;
|
||||
|
||||
drawStrBlack(pi, x, y, "[");
|
||||
x += w_;
|
||||
cell(1).draw(pi, x, y);
|
||||
x += cell(1).width();
|
||||
drawStrBlack(pi, x, y, "]");
|
||||
x += w_ + 4;
|
||||
|
||||
cell(2).draw(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
void MathFrameboxInset::write(WriteStream & os) const
|
||||
{
|
||||
os << "\\framebox";
|
||||
if (cell(0).size())
|
||||
os << '[' << cell(0) << ']';
|
||||
os << '{' << cell(1) << '}';
|
||||
os << '[' << cell(0) << ']';
|
||||
if (cell(1).size())
|
||||
os << '[' << cell(1) << ']';
|
||||
os << '{' << cell(2) << '}';
|
||||
}
|
||||
|
||||
|
||||
void MathFrameboxInset::normalize(NormalStream & os) const
|
||||
{
|
||||
os << "[framebox " << cell(0) << ' ' << cell(1) << ']';
|
||||
os << "[framebox " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ public:
|
||||
void write(WriteStream & os) const;
|
||||
/// write normalized content
|
||||
void normalize(NormalStream & ns) const;
|
||||
///
|
||||
mode_type currentMode() const { return TEXT_MODE; }
|
||||
private:
|
||||
/// width of '[' in current font
|
||||
mutable int w_;
|
||||
|
@ -1119,8 +1119,9 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
|
||||
|
||||
else if (t.cs() == "framebox") {
|
||||
cell->push_back(createMathInset(t.cs()));
|
||||
parse(cell->back().nucleus()->cell(0), FLAG_OPTION, mode);
|
||||
parse(cell->back().nucleus()->cell(1), FLAG_ITEM, mode);
|
||||
parse(cell->back().nucleus()->cell(0), FLAG_OPTION, MathInset::TEXT_MODE);
|
||||
parse(cell->back().nucleus()->cell(1), FLAG_OPTION, MathInset::TEXT_MODE);
|
||||
parse(cell->back().nucleus()->cell(2), FLAG_ITEM, MathInset::TEXT_MODE);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -34,11 +34,16 @@ What's new
|
||||
o the personal dictionaries are always correctly written out
|
||||
o "Accept" button became "Ignore All" for clarity
|
||||
|
||||
- add support for the hspell spell-checker for hebrew [Qt only]
|
||||
|
||||
- updated russian interface localisation
|
||||
|
||||
** Bug fixes
|
||||
|
||||
- fix loading of included files that are under revision control
|
||||
|
||||
- fix support for \framebox macro: the argument is handled as text,
|
||||
and a second optional argument is now supported
|
||||
|
||||
- fix building of xforms dialogs' source on SMP machines [Bug #944,
|
||||
xforms only]
|
||||
|
Loading…
Reference in New Issue
Block a user