- ucs4_to_qchar(): add a FIXME and an assertion
* GuiFontMetrics: replace the table based cache with two QHash based cache. With this change, the speed overhead is not negligible (exact same score with the UserGuide test) and the required additional memory is minimal (maybe one or two megabytes).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16132 a592a061-630c-0410-9148-cb99ea01b6c8
- add constants instead of hard-coded values.
- add assertions and comments for out of range values.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16126 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=2900
The only drawback is that it requires about 20Mo extra-memory when loading the UserGuide. If it turns out to be too much, we can switch to a QHash based solution instead of a table.
* dimension.[Ch]:
- Dimension(LyXFont const, char_typec): new ctor
- set(LyXFont const & font, char_type c): new method.
* frontends/FontMetrics.h:
- width(char_type): is now a pure virtual method.
* GuiFontMetrics:
- CharMetrics: new structure;
- the metrics cache now also cache ascent and descent. This is especially useful for mathed.
* MathSupport.[Ch]:
- mathed_char_dim(): deleted. We now use Dimension::set() directly instead.
* rowpainter.C: fixe empty space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16124 a592a061-630c-0410-9148-cb99ea01b6c8
* src/buffer.C
(Buffer::save): Only try to make a backup if the buffer file already
exists. The try ... catch mechanism is fine, but when it was
introduced ot was overseen that copying a file could not only fail
because the destination dir does not exist, but also because the
source does not exist.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16121 a592a061-630c-0410-9148-cb99ea01b6c8
This pointer was one reason for the Mac crashes because it not always had
the same value as the application_ smart pointer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16119 a592a061-630c-0410-9148-cb99ea01b6c8
../../../../src/frontends/qt4/GuiView.C:142: warning: comparison between signed and unsigned integer expressions
../../../../src/frontends/qt4/GuiView.C:144: warning: comparison between signed and unsigned integer expressions
../../../../src/frontends/qt4/GuiView.C:146: warning: comparison between signed and unsigned integer expressions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16113 a592a061-630c-0410-9148-cb99ea01b6c8
Part 2: avoid pure virtual function,
if (theApp)
theApp->unregisterSocketCallback(fd_);
does not help, we've tested it!
Without a Mac it is hard to find a better solution
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16110 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyx_main.C
(easyParse): decrement the loop variable only when remove > 0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16107 a592a061-630c-0410-9148-cb99ea01b6c8
* lyxtext.h/text2.C:
- LyXText::getPitNearY(): this is non const anymore. The CoordCache will be updated automatically if the paragraph is not found in there.
- LyXText::checkInsetHit(): this is non const anymore because of the above.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16104 a592a061-630c-0410-9148-cb99ea01b6c8