Commit Graph

762 Commits

Author SHA1 Message Date
André Pönitz
83b326d204 avoid evalutation of lyxerr arguments unless really needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17675 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-01 10:09:49 +00:00
Jean-Marc Lasgouttes
139168b5f2 * src/text3.C (dispatch): revert previous fix to 3143
* src/text.C (breakParagraph): setCursor does not set current_font when
	applied to a CursorSlice (fixes bug 3143)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17654 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-30 20:41:38 +00:00
Jean-Marc Lasgouttes
c8c2671c50 fix uninitialized variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17590 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-27 12:51:47 +00:00
Abdelrazak Younes
7c9f34d0b5 fix MSVC warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17567 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-26 10:33:27 +00:00
Georg Baum
925c17c058 Get rid of LyXRC::font_norm_type, since it is no longer needed for arabic
support.
LyXRC::font_norm stays for now, since it is still used for the kbmap stuff.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17566 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-26 08:24:38 +00:00
Michael Schmitt
9b7bd6a910 * src/text.C: fix bug #2810
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17557 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-25 17:11:30 +00:00
Abdelrazak Younes
b3bbfeb2fd Fix bug 3226:
* text.C
  - LyXText::getPossibleLabel(): cleanup and add the caption case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17453 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-16 11:36:36 +00:00
Abdelrazak Younes
bf61ecc2de Support code for advanced Toc management and bug correction.
* buffer.h:
  - structureChanged(): new boost signal. I intend to use that also when a text is changed in a section or caption item.

* buffer_funcs.C:
  - updateLabels(): emit Buffer::structureChanged() after TocBackend is updated.
  - checkBufferStructure(): new method for updating the TocBackend if needed.

* LyXView:
  - updateToc(): new slot for Buffer::structureChanged() signal.

* text.C:
  - call checkBufferStructure() whenever text is added or erased.

* TocBackend.[Ch]:
  - updateItem(): new method to update a specific item (called from checkBufferStructure()).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17413 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 11:23:41 +00:00
Michael Schmitt
67528d1b3b * src/text.C: turn another C-style cast into a static cast
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17274 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 17:27:06 +00:00
Michael Schmitt
56cef9e559 * src/text.C: use static_cast rather than C-style cast
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17268 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 08:30:20 +00:00
José Matox
76c3d964df Convert lyxaccents to unicode (most of the work comes from Georg)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17144 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-11 23:52:07 +00:00
Bo Peng
8b56166641 Persistent-selection (and fix bug 3162)
* src/CutAndPaste.h/C: add selectionBuffer to save selected text
	* src/text3.C: proper handling of paste
	* src/lyxfind.C: save selection
	* src/BufferView.C: save selection
	* src/text.C: save selection
	* src/cursor.C: save selection
	* src/insets/insettabular.C: save selection
	* src/mathed/InsetMathGrid.C: save selection
	* src/mathed/InsetMathHull.C: save selection
	* src/mathed/InsetMathNest.C: save selection


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-02 03:10:15 +00:00
Georg Baum
cc04805782 fix another crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16930 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:08:13 +00:00
Georg Baum
e4bc56a27e Do not attempt to output characters of empty paragraphs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16924 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 09:40:04 +00:00
Georg Baum
8b90b75501 * src/text.C
(LyXText::currentState): Unicode debugging aid: Display UCS4 code
	point in devel builds


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16910 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 19:17:59 +00:00
Michael Schmitt
77427d620a * src/lyxtext.h:
* src/text.C: rename acceptOrRejectChange() to acceptOrRejectChanges() because it can handle many changes within the given selection; add acceptChanges() and rejectChanges()

* src/text3.C:
* src/BufferView.C: adjust

* src/insets/insettext.C: accept/rejectChanges() become wrapper methods that call LyXText::acccept/rejectChanges

* src/text2.C: add assertion

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 22:28:15 +00:00
Michael Schmitt
f4cc84d5a6 * src/lyxtext.h: add enum ChangeOp (ACCEPT/REJECT); add deleteEmptyParagraphMechanism()
* src/text.C:
* src/text3.C:
* src/BufferView.C: adjust

* src/insets/insettext.C: acceptChanges() / rejectChanges(): fix pars_size bug introduced in previous commit; call deleteEmptyParagraphMechanism()

* src/text2.C: track changes in DEPM (I am not sure about whether this is actually useful; time will tell..); add deleteEmptyParagraphMechanism(pit_type, pit_type, bool)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16858 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 21:18:36 +00:00
Michael Schmitt
2e09a925a5 * src/lyxtext.h:
* src/BufferView.C:
* src/text3.C:
* src/text.C: merge methods acceptChange() and rejectChange() to acceptOrRejectChange() because they share a lot of tricky code

* src/text.C: yet another revision of acceptOrRejectChange()

* src/paragraph.C:
* src/paragraph.h:
* src/paragraph_pimpl.C:
* src/paragraph_pimpl.h:
* src/insets/insettabular.C:
* src/insets/insettabular.h:
* src/insets/insettext.C:
* src/insets/insettext.h:
* src/insets/insetbase.h: pass BufferParams to acceptChanges() and rejectChanges() (needed for paragraph merging)

* src/insets/insettext.C: handle end-of-par in acceptChanges() and rejectChanges()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16830 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 21:53:16 +00:00
Michael Schmitt
76ad6628fd * src/text.C: implement rejectChange() as the inverse of acceptChange()
(requires some further testing)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16825 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:25:50 +00:00
Georg Baum
dbfda45b19 Compile fix.
Michael, I guess that you need to retest this code, since the old one did
obviously not do what you intended.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16801 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:52:01 +00:00
Michael Schmitt
c4a10a953c * src/text.C: acceptChange(): complete rewrite; there should be no crashes any more
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16799 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:20:51 +00:00
Michael Schmitt
fb84e1ca52 * src/text.C: move forward when logically deleting character
(previously broken; the cursor was even moved forward if
	the character was physically removed and the next character was
	marked as deleted)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16783 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 16:59:13 +00:00
Abdelrazak Younes
31cbae750d fix cursor movements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16638 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 10:59:18 +00:00
Michael Schmitt
a501ea2ace * src/text.C: replace "[C]" by the more meaningful "[Change tracking]" and support localization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16617 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 22:38:49 +00:00
Georg Baum
fed31122c4 Tell X the selection status also after it is changed by the keyboard, since
we got a consensus on this on the list.
Some calls of haveSelection are still missing, but we need to decide the
"persistent selection" question before those can be implemented properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16572 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 14:44:44 +00:00
Michael Schmitt
ada361536f * src/text.C: fix endless loop in breakParagraph()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16568 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 12:01:26 +00:00
Michael Schmitt
1cdbdc1bdc * src/text.C: check end-of-par BEFORE you accept/reject the rest of the par (I fear this code has to rewritten later)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16521 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 23:10:51 +00:00
Michael Schmitt
895416b103 * src/text.C: first step to sanitize accept/rejectChange
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 23:02:37 +00:00
Michael Schmitt
04b4634213 * src/frontends/qt4/QMathMatrixDialog.C:
* src/kbmap.C:
* src/LaTeXFeatures.C:
* src/text.C: remove superfluous "return" statements

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16483 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 21:51:10 +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
3f9aa10f6a delete unused variable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16457 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-01 10:53:10 +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
ad84c0ce5d delete unused variables.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16443 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-30 15:53:19 +00:00
Edwin Leuven
8005e8a6f6 remove unused vars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16439 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-30 12:39:41 +00:00
Abdelrazak Younes
53ce526058 remove duplicate methods moved to TextMetrics.C.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16438 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-30 11:50:39 +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
Georg Baum
ea81b496be remove useless in_ert variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16411 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-28 10:24:45 +00:00
Georg Baum
1189f55eae convert LyXFont::stateText and LColor::getGUIName to docstring,
saving again some utf8 conversions


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16365 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-21 14:31:19 +00:00
Georg Baum
c6f0c8d0b6 convert author names and status messages to docstring
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16363 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-21 13:58:28 +00:00
Abdelrazak Younes
ceda236931 add an assertion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16347 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-20 14:15:26 +00:00
Abdelrazak Younes
e24bf64c68 * dimension.h: new operator!=() and operator=()
* InsetBase and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim) now returns a bool (true if metrics changed).

* MathData and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim): ditto.

* RenderBase and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim): ditto.

* lyxtext.h/text.C:
  - LyXText::metrics(MetricsInfo & mi, Dimension & dim): ditto.
  - LyXText::redoParagraph(): take into account potential change in inset metrics.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16091 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 15:15:49 +00:00
Michael Schmitt
6994ba59c0 * src/text.C: partial fixes to acceptChange() and
rejectChange(); end-of-par characters are not considered
	for the time being


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16064 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 14:49:35 +00:00
Michael Schmitt
e3f01ff2f0 * src/text.C: remove empty namespace; fix change tracking
in breakParagraph()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16059 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 11:53:33 +00:00
Michael Schmitt
7913b8c652 * src/text.C: fix dissolve-inset when pressing
erase at the end of the inset


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16050 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 00:04:25 +00:00
Michael Schmitt
d4ba38a59c * src/text.C: remove FIXME because inset-dissolve works!
use const_iterator to access paragraph insetlist; add
	FIXME in accept/rejectChange


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16049 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-25 23:30:58 +00:00
Bo Peng
7b031e5d86 Add inset clearpage and cleardoublepage, from Urgas
* src/insets/insetert.C
	* src/text3.C
	* src/lfuns.h
	* src/factory.C
	* src/tex2lyx/text.C
	* src/text.C
	* src/LyXAction.C: add and handle LFUN_CLEARPAGE_INSET and LFUN_CLEARDOUBLEPAGE_INSET
	* src/insets/insetpagebreak.h/C: extend InsetPageBreak
	* lib/lyx2lyx/lyx_1_5.py: file format change
	* lib/ui/stdmenus.ui: add menu items


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16037 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-25 15:09:01 +00:00
Michael Schmitt
d7d9af5fa0 * src/text.C: fix change tracking for backspace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16035 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-25 00:31:44 +00:00
Michael Schmitt
a895406082 * src/text.C: fix end-of-par handling (change tracking);
remove blank lines; add {} around else branch


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16031 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-24 22:12:04 +00:00
Michael Schmitt
3770e1a342 * src/text.C: remove change tracking FIXME
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16020 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-23 22:37:09 +00:00