Commit Graph

2317 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
b0d1a6b717 Fix bug 409 (Add support for numbered footnotes)
* src/insets/InsetFoot.cpp (updateLabels): number the footnote if
	(1) the footnote counter exists and (2) it is not in a title
	layout

	* lib/layouts/stdcounters.inc: add a footnote counter.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19524 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 20:29:33 +00:00
Jean-Marc Lasgouttes
eca0637e51 compilation warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19523 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 20:12:52 +00:00
Abdelrazak Younes
4e7e580f54 I forget this in rev 19515.
* InsetInclude: loadIfNeeded()
- make it non anonymous (used in loadChildDocuments()).
- now return the loaded buffer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 19:40:54 +00:00
Richard Heck
236badeac0 Fix update bug when leaving a wide inset with up or down arrow.
Override notifyCursorLeaves() in InsetText to force update when
inset was wide. Should be removed if and when wide is.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19511 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 17:23:42 +00:00
Jean-Marc Lasgouttes
ded1c011f2 * inset/InsetTabular.cpp (doDispatch): LFUN_MOUSE_PRESS: let Text::dispatch
do the work, unless we really have a reason not to (fixes bug 4133)

	* mathed/InsetMathNest.cpp (lfunMousePress): refactor the code to use
	BufferView::mouseSetCursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 15:38:32 +00:00
Alfredo Braunstein
bc0a64efc3 * DocIterator.h (forwardPosNoDescend): remove method
* DocIterator.cpp (forwardPos, backwardPos): move the 'flat' part to...
* CursorSlice.{h,cpp} (forwardPos, backwardPos, at_end, at_begin): new methods, the first two are part of their DocIterator homonym
* Text2.cpp (setFont): receive CursorSlice arguments as the function is not recursive, adapt
* Text.cpp:
* lyxfind.cpp (findNextChange):
* insets/InsetCollapsable.cpp: adapt



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19500 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 13:36:19 +00:00
Alfredo Braunstein
f1923a7b35 fix compilation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19499 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 13:11:49 +00:00
Martin Vermeer
2bd998c29e Prepare for inset configurability
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19498 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 12:13: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
José Matox
ca81b43f03 Fix bug 518 (thanks to Jean Marc and Martin for the help)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19455 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 13:25:36 +00:00
André Pönitz
2caa98bee0 disable some tests for standard C++ features; add a line counting stream for lates output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19446 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 08:57:17 +00:00
André Pönitz
5d80a87ceb merge {mathed,insets,graphics}/Makefile.am into src/Makefile.am
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19424 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-11 10:32:36 +00:00
André Pönitz
67e61a3956 enable building of shared libraries. reduces final linktime. also combine boost stuff into a single library
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19410 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 22:33:54 +00:00
Lars Gullik Bjønnes
5ae54ddafb Get rid of a few warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19409 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 20:14:54 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Jean-Marc Lasgouttes
35fa399edd Syncronize with 1.5. This stuff was uncommitted in y tree actually.
* src/BufferView.cpp (workAreaDispatch): set selection status here

	* src/Text3.cpp (dispatch):
	* src/InsetTabular.cpp (doDispatch): and not here


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 10:21:09 +00:00
Martin Vermeer
cf96711fc9 fix bug 580: reading of some ill-formed tables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19390 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 08:05:10 +00:00
Bo Peng
3ac3578e2d Fix Bug 4053: Update other controls allows invalid listings parameters to be passed in listings-related dialogs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19224 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-27 18:17:00 +00:00
Abdelrazak Younes
1007714d2e Properly fix bug 3258.
* InsetTabular: 
  - remove the is_deleted_ boolean
  - dispatch(): remove the call to updateDialog at the end

* ControlTabular::initialiseParams(): connect to the current tabular if found.

* QTabular::update_contents(): initialiseParams() each time.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19112 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-18 09:55:33 +00:00
Jürgen Spitzmüller
3993a0498b * src/insets/Inset.h: fix encoding of author names
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19110 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-18 09:30:38 +00:00
Abdelrazak Younes
01891912bc fix std declaration.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19102 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-17 17:33:36 +00:00
Abdelrazak Younes
4863cfdf78 Fix this bug:
1) create a doc
2) insert an ert inset
3) right-click the inset
4) new window
5) delete the ert inset: BOOM! 

This commit replace the static hideDialog signal which was in effect shared by all views with a direct call to Dialog::hide().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19094 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-17 09:20:39 +00:00
Abdelrazak Younes
4a53fa6e01 Allow unicode in Layout names.
* Layout.h:
  - name_, obsoleted_by_, depends_on_ are now docstrings.

All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:39:08 +00:00
Bo Peng
5ead210b1c add a few 'experimental parameters' to insetListingsParameters.cpp. This is pretty safe so I just commit it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-10 18:57:32 +00:00
Abdelrazak Younes
6c15c36495 This patch revert part of the code changed in revision 18825. This is needed because there is no lyx_view_ when exporting at the command-line: LFUN_BUFFER_CHILD_OPEN uses LyXView::loadLyXFile() in GUI mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19029 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-10 15:07:00 +00:00
Jean-Marc Lasgouttes
ae9dad1770 remove obsolete references to saveSelection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19024 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-10 10:54:42 +00:00
Jean-Marc Lasgouttes
625a4b7849 * insets/InsetExternal.cpp (InsetExternalParams): use the first
defined template as default instead of RasterImage (bug 3983)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19013 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-09 10:56:49 +00:00
Bo Peng
252ec84acd Remove all saveSelection calls and unify theSelection().setSelection. This is the common, housekeeping part of JMarc's and my patches. Fixes of bug 3877 will come later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19003 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-06 17:03:45 +00:00
Bernhard Roider
b8b66e8278 Fix uninitialized var introduced in http://www.lyx.org/trac/changeset/18966
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18976 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-03 18:58:02 +00:00
Bernhard Roider
3525573f40 Fix Bug 3947: BibTeX allows parentheses in the key (even if the whole entry is delimited by parentheses)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18966 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-02 18:01:27 +00:00
Jürgen Spitzmüller
8b9972cbba Fix bug 2753: LyX doesn't support paths and filenames with parentheses
* src/frontends/qt4/QBibtex.cpp:
* src/frontends/qt4/QExternal.cpp:
* src/frontends/qt4/QGraphics.cpp:
* src/frontends/qt4/QInclude.cpp:
	- remove path validator

* src/support/filetools.{cpp,h}:
	- new validator for exporting LaTeX files

* src/insets/ExternalSupport.cpp:
* src/insets/InsetBibtex.cpp:
* src/insets/InsetGraphics.cpp:
* src/insets/InsetInclude.cpp:
	- use validator when exporting a LaTeX file

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18897 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-26 16:55:42 +00:00
Uwe Stöhr
d8993d2d6c - Fileformat change: rename "arabic" to "arabic_arabtex"
- Split the language Arabic into "arabic_arabi" that uses the arabi-package and "arabic-arabtex" that uses the arabTeX-package to typeset Arabic. This is needed because both packages have some advantages over the other people need.
(This change is a consequence of a long and fruitful discussion with Mostafa, Dov, and me.)

Patch by Dov and me.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18887 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-26 00:11:03 +00:00
Jürgen Spitzmüller
bcf64dd11c Fix bug 1749. CAUTION: lyx2lyx not fully working yet (see FIXMEs).
* development/FORMAT: 
	- document file format change

* src/Buffer.cpp: bump format to 275.

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_5.py:
	- conversion and reversion of scaleBeforeRotation param (doesn't work yet!)

* src/insets/InsetGraphicsParams.{cpp,h}: 
	- new param scaleBeforeRotation
* src/insets/InsetGraphics.cpp:
	- swap order of scale and rotate (if scaleBeforeRotation is false)

* src/frontends/qt4/QGraphics.C:
* src/frontends/qt4/QGraphicsDialog.{cpp,h}:
* src/frontends/qt4/ui/GraphicsUi.ui:
	- add checkbox to toggle scaleBeforeRotation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18885 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-25 13:49:51 +00:00
Alfredo Braunstein
c1852732b7 Fix one-by-some bug in tabular selection drawing by appropriately
calling InsetText::drawSelection instead of Text:drawSelection


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18881 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-25 08:19:15 +00:00
Jürgen Spitzmüller
91c6d03678 Fix bug 2520: Make InsetExternal translateable
* po/lyx_pot.py:
	- new function external_l10n: parse external_templates and extract the relevant parts for translation.
* development/scons/SConstruct:
* po/Makefile.in.in:
	- use external_l10n

* src/insets/InsetExternal.cpp:
* src/frontends/qt4/QExternal.cpp: 
	- make eveything translatable

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18866 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-23 07:50:13 +00:00
Alfredo Braunstein
0ebfa36965 const correctness (missed this)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18853 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 13:38:07 +00:00
Alfredo Braunstein
fb963c2587 const correctness
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18852 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 13:33:51 +00:00
Richard Heck
d3003c1022 Polish the Toc and labels updating when loading a child document.
Fix Bug 3860: Toc crash when loading a child documents.

* BufferView::loadLyXFile(): simplify, transfer last part to
  LyXView::loadLyXFile().
  Change return value to Buffer created by load (or 0 if none).
  Ultimately, this should all be moved to buffer_funcs.cpp, as it is no
  longer needed here.

* Buffer::setParentName(): small fix to avoid recursive includes.

* LyXView:
- setBuffer(): properly update the labels and the Toc if this is [LOAD Child
  Document] command. Move buffer connection and disconnection, simplifying
  earlier code.
- loadLyXFile(): get some code from BufferView::loadLyXFile() and from
  LyXFunc::LFUN_BUFFER_CHILD_OPEN, properly handle the child document case.
  There's a lot of overlap with setBuffer() here. This needs cleaning.

* LyXFunc: add optional argument to LFUN_BUFFER_CHILD_OPEN to indicate if
  the document is being opened by LyX itself rather than the user (as on 
  View>DVI, for example).

* LyX: adapt to loadLyXFile() API changes.

* insets/InsetInclude: use LFUN_BUFFER_CHILD_OPEN rather than calling
  loadLyXFile() directly. Make use of new optional argument.

With this in place, the only thing missing for proper multipart document support is to automatically update the parent Buffer when switching from the parent Buffer. This would be very useful when you work with multiple document sharing the same child documents (as I often do).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18825 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-19 14:56:52 +00:00
Abdelrazak Younes
054a35c9a1 header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18790 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 14:52:15 +00:00
Abdelrazak Younes
d14da39009 header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18789 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 14:17:20 +00:00
Abdelrazak Younes
8f0bf62f2c header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18788 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 14:10:26 +00:00
Abdelrazak Younes
77736e8679 header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18783 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 13:47:13 +00:00
Abdelrazak Younes
b025e9a249 Saves some compile time by diminishing Buffer.h header dependencies:
- delete unneeded InsetList.h
- transfer the errorList to the private implementation.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18782 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 13:13:49 +00:00
Stefan Schimanski
98fb638d61 * the old cursor is stored before dispatch and then used after moving
up/down to tell the insets that the cursor left them. The
  notifyCursorLeaves methods can set updateFlags to trigger a redraw.
* leave mathed with cursor up/down and get the math redrawn for the
  decorations



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18773 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-14 20:32:28 +00:00
Bo Peng
985ba3b296 Add bypass validation checkboxes to listings related dialogs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18751 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 17:10:28 +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
Stefan Schimanski
82c2fbf81a * they are conceptionally the same and should be merged
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18743 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 18:29:11 +00:00
Jürgen Spitzmüller
5d8e1d7dc5 * src/insets/insetBranch.cpp (doDispatch):
- remove wrong check, fix bug 3835.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18734 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 05:12:10 +00:00
Bo Peng
c20baf584c Revert rev18728, which is not a good idea
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18729 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 18:06:11 +00:00
Bo Peng
05439b953b Allow prefixing a listings parameter with @ to bypass validation, useful when new parameters are added in a new listings version
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18728 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 13:34:17 +00:00