Commit Graph

10 Commits

Author SHA1 Message Date
André Pönitz
ed858d73e5 use bald pointers in clone()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19920 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 18:03:17 +00:00
Jean-Marc Lasgouttes
601a8e0192 Rewrite the label numbering code.
* buffer_funcs.cpp (updateLabels): new function taking a buffer and
	a ParIterator as arguments. This one is used to update labels
	into an InsetText. Cleanup the code to reset depth. Call setLabel
	for each paragraph, and then updateLabel on each inset it contains.
	(setCaptionLabels, setCaptions): removed.
	(setLabel): use Counters::current_float to make caption paragraphs
	labels.

	* insets/Inset.h (updateLabels): new virtual method, empty by
	default; this numbers the inset itself (if relevant) and then all
	the paragraphs it may contain.

	* insets/InsetText.cpp (updateLabels): basically calls
	lyx::updateLabels from buffer_func.cpp.

	* insets/InsetCaption.cpp (addToToc): use the label constructed by
	updateLabels.
	(computeFullLabel): removed.
	(metrics, plaintext): don't use computeFullLabel.
	(updateLabels): new method; set the label from
	Counters::current_float.

	* insets/InsetWrap.cpp (updateLabels):
	* insets/InsetFloat.cpp (updateLabel): new method; sets
	Counters::current_float to the float type.

	* insets/InsetBranch.cpp (updateLabels): new method; the numbering
	is reset afterwards if the branch is inactive. (bug 2671)

	* insets/InsetNote.cpp (updateLabels): new method; the numbering
	is reset after the underlying InsetText has been numbered.
	(bug 2671)

	* insets/InsetTabular.cpp (updateLabels): new method (also handles
	longtable)

	* insets/InsetListings.cpp (updateLabels): new method; mimics what
	is done for Floats (although Listings are not floats technically)

	* insets/InsetInclude.cpp (getScreenLabel): in the listings case,
	use the computed label.
	(updateLabels): new method; that either renumbers the child
	document or number the current listing.

	* LyXFunc.cpp (menuNew): do not updateLabels on empty documents
	(why do we do that at all?)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19482 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 21:43:58 +00:00
Jean-Marc Lasgouttes
4ba4d701f7 Remove background_color_ in Insets: it takes a lot of unnecessary memory,
especially in math where each equation has many insets.

	* src/Insets.cpp: remove background_color_ member
	(setBackgroundColor): remove
	(backgroundColor): make virtual

	* insets/InsetBranch.cpp:
	* insets/InsetNote.cpp: move color setting code from setButtonLabel to 
	backgroundColor.

	* insets/InsetBox.cpp (setButtonLabel): remove call to setBackgroundColor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18750 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 13:45:49 +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
Abdelrazak Younes
2640b21228 * Inset and derivatives: insetName() -> name()
* InsetMath::name(): deleted.

* buffer_funcs.cpp:setCaptions() fix potential bug by using docstring copy instead of reference while using Inset::name.





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18119 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-30 14:39:09 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
André Pönitz
51fbea02a8 Remove InsetOld
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18087 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 12:32:14 +00:00
André Pönitz
42123ab8a7 rename LCursor->Cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 14:56:30 +00:00
André Pönitz
39e79d8602 rename LyXLex into Lexer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 11:30:54 +00:00
Bo Peng
c8d00ed127 Rename insets/insetxxx to insets/InsetXxx, part 2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 01:25:51 +00:00