Commit Graph

9 Commits

Author SHA1 Message Date
Stefan Schimanski
557521034f * Clear the paragraph metrics cache as well on redraw:
On fullscreen redraw the metrics of all visible paragraphs are
  recreated and stored in the TextMetrics object. If the number of
  paragraphs on screen does not change everything is fine because the
  paragraph metrics cache is just updated. But if the number decreases
  it can happen that old paragraph metrics remain in the cache. If this
  happened because e.g. a paragraph was deleted, it's possible that the
  cached paragraph is longer than the one which is actually at the
  position now. Using the Row objects from the cached paragraphs then
  can trigger accesses to positions which would have been valid in the
  old paragraph, but go over the end of the paragraph which is there
  now. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18841 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-21 06:41:55 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00
Abdelrazak Younes
a64d5ba362 Transfer x2pos() and pos2x from LyXText to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16458 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 11:36:30 +00:00
Abdelrazak Younes
9939a42b80 Compilation fix, again... sorry.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16456 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 10:44:52 +00:00
Abdelrazak Younes
c87fa1927b Compilation fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16455 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 10:41:28 +00:00
Abdelrazak Younes
f1d90e17d8 Transfer getColumnNearX from LyXText to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16454 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 10:33:37 +00:00
Abdelrazak Younes
97a59984b1 Transfer these methods from LyXText to TextMetrics:
- labelEnd()
- rowBreakPoint()
- setRowWidth()
- setHeightOfRow()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16451 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 09:36:55 +00:00
Abdelrazak Younes
b2126408cf This commit do the Model/View separation of the LyXText and Paragraph classes. The separation is mostly complete for the Paragraph class but some more transfer should occur for the LyXText class.
* ParagraphMetrics.[Ch]: new files

* TextMetrics.[Ch]: new files.

* lyxtext.h/text2.C/text3.C: some code transferred to the TextMetrics class.

* paragraph.[Ch]: all screen oriented code transfered to ParagraphMetrics class.

* BufferView:
 - text_metrics_: new TextMetrics cache private member.
 - textMetrics(): new access method.
 - parMetrics(): ditto.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16433 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-29 23:54:48 +00:00