Commit Graph

2030 Commits

Author SHA1 Message Date
Stefan Schimanski
e0538043e4 * Nearly a proof that there are useful compiler warnings that a variable is not used,
though in this case the warning was "fixed" before it did its job.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22561 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-14 21:52:57 +00:00
Uwe Stöhr
33c95fc07b rename LFUNs math-nonumber and math-number to what they really do,
fixes bug 2608

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22496 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-11 22:45:19 +00:00
Stefan Schimanski
c4d85b3f1d * fix a crash during undo: cloned MathMacroTemplates need updated child insets which point back to the correct (cloned) template.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22430 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 10:29:47 +00:00
Stefan Schimanski
102638a478 * fix broken default value logic from last cleanup: only show default value if not in edit mode and the given value is empty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22413 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 13:50:21 +00:00
Jean-Marc Lasgouttes
c3ec9ddda0 Disable and check properly the math numbering functions.
* InsetMathHull.cpp (getStatus): disable LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER
	when the equation is not in display mode; add a checkbox as needed.
	(doDispatch): no need to test for dispatch() anymore.

	* InsetMathNest.cpp (getStatus): LFUN_MATH_NUMBER and LFUN_MATH_NONUMBER are not 
	handled by this class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22350 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-03 17:31:12 +00:00
Jean-Marc Lasgouttes
d8eaec5c03 fix compilation warnings: unused parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22347 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-03 15:44:05 +00:00
Stefan Schimanski
04537d8664 * make sure the edit mode is the same in math macros and argument proxy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22292 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:54:39 +00:00
Stefan Schimanski
6a9e5edae3 * setDimCache is superfluous in mathed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22291 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:53:53 +00:00
Stefan Schimanski
7150b0caa3 * moved atom_dim_ to coord cache in the buffer view to make it dependent on the buffer view
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22290 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 10:52:58 +00:00
Enrico Forestieri
1732e5458b Try to improve maintainability by separately checking for the
gather environment.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22288 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-24 02:36:41 +00:00
Stefan Schimanski
455b42f21a * compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22283 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:33:15 +00:00
Stefan Schimanski
f85fccef65 * newlyxcommand support as LaTeX feature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22281 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:32:00 +00:00
Stefan Schimanski
ec996ed828 * \newlyxcommand support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22280 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:31:37 +00:00
Stefan Schimanski
32c8479e5a * perl -e 'while(<>) {sed s/\s+$//; print "$_\n";}' - Xcode's space/tab behaviour sucks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22278 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:28:51 +00:00
Stefan Schimanski
e240dbd5a8 * another monster line
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22277 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:28:24 +00:00
Stefan Schimanski
b2d70163b8 * cosmetic for loops with deep if nestings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22276 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:28:03 +00:00
Stefan Schimanski
9eed503019 * tabs are evil... hopefully I fixed all monster lines now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22275 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:27:42 +00:00
Stefan Schimanski
83b46c7573 * tabs are evil
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22274 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:27:18 +00:00
Stefan Schimanski
926befadd8 * tabs are evil
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22273 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:27:04 +00:00
Stefan Schimanski
3308ebfbf6 * cellDim_ is not needed anymore
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22272 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:26:46 +00:00
Stefan Schimanski
dfb41a2744 * proper labels under the holes in macro templates during editing
* The labels can easily be changed. In fact the whole layout can easily be changed because it's modular. So nothing is final yet...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22271 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:25:51 +00:00
Stefan Schimanski
e5bd44aadc * first tries to make the math macro template more verbose
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22270 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 01:24:34 +00:00
Stefan Schimanski
83980d504c * cosmetic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22267 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 00:49:18 +00:00
Stefan Schimanski
4267ad00cd * math macro toolbar can be made automatic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22265 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 00:47:37 +00:00
Stefan Schimanski
85e37b01b2 * simplify editing logic of math macros by making it purely dynamic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22260 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-22 14:39:47 +00:00
Stefan Schimanski
9ac321f28f * kerning may depend on the BufferView because the metrics of some insets (e.g. math macros) depend on the cursor position in the view
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22259 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-22 14:39:22 +00:00
Enrico Forestieri
51a365d784 Center rows in the gather environment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22250 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 23:15:54 +00:00
Stefan Schimanski
dc9081c208 * first support of multiple BufferViews for macros. There are still problems that somehow the dimension caching is mixed among them.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22245 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:44:37 +00:00
Stefan Schimanski
69d224eb65 * adapt to MacroType
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22244 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:44:20 +00:00
Stefan Schimanski
992ae20115 * add \protect in front of macro with optional arguments because they are fragile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22243 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:43:50 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Stefan Schimanski
ec81fcaddb * compile fix for trunk
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22215 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-19 23:03:26 +00:00
Stefan Schimanski
2495f278ba * at least return a valid template on parse error, but:
FIXME: The macro template does not make sense after this.
  The whole parsing should not be in a constructor which
  has no chance to report failure.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22214 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-19 22:57:22 +00:00
Abdelrazak Younes
9439b6e6e0 * get rid of support::absolutePath()
* remove FileName.h inclusion from filetools.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22188 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 16:04:46 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
86506a80eb Simplify FileName::tempName().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22163 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 09:52:36 +00:00
Abdelrazak Younes
4020357dd2 Transfer tempName() implementation to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22161 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 07:52:38 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Pavel Sanda
fceb0d93ba Add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22068 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-10 19:50:12 +00:00
Jürgen Spitzmüller
61e1643821 Support for \slash and \nobreakdash-
* src/lfuns.h:
* src/Text3.cpp:
* src/insets/InsetMathNest.cpp:
* src/insets/insetCollapsable:
	- new LFUN_SPECIALCHAR_INSERT
	- nuke LFUN_HYPHENATION_POINT_INSERT, 
	  LFUN_LIGATURE_BREAK_INSERT,
	  LFUN_DOTS_INSERT,
               LFUN_END_OF_SENTENCE_PERIOD_INSERT,
	  LFUN_MENU_SEPARATOR_INSERT
	  (functions now handled as arguments of the above)

* src/insets/InsetSpecialChar.{cpp,h}:
	- implement \slash and \nobreakdash-

* src/Buffer.cpp:
	- increment format to 307.
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion methods for SpecialChar \slash{} and
	  SpecialChar \nobreakdash-
* development/FORMAT:
	- document file format change

* lib/ui/stdmenus.inc:
* lib/ui/classic.ui:
	- add new SpecialChars to the menus, adapt lfuns to new scheme

* lib/bind/aqua.bind:
* lib/bind/cua.bind:
* lib/bind/emacs.bind:
* lib/bind/fi/menus.bind:
* lib/bind/mac.bind:
* lib/bind/menus.bind:
* lib/bind/sciword.bind:
* lib/bind/xemacs.bind:
	- add shortcuts for new SpecialChars, adapt lfuns to new scheme

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-06 11:04:56 +00:00
André Pönitz
2506e0d643 assimilate BOOST_CURRENT_FUNCTION
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21867 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 21:10:35 +00:00
André Pönitz
5a4a9484d1 potential compile fix for Kornel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21861 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 17:57:06 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
André Pönitz
150cf11651 hand-crafted LyXErr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21849 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 22:12:03 +00:00
Abdelrazak Younes
f07105d0e5 * FileName:
- removeFile(): replace unlink
- copyTo(): add 'overwrite' parameter.

* getcwd.cpp: simplify.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 09:01:49 +00:00
André Pönitz
caf732d4c4 use strfwd.h if possible
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21833 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-27 20:51:20 +00:00
Uwe Stöhr
12f7869ac0 support for \linebreak:
- fileformat change
- tex2lyx support
- rename LFUN_BREAK_LINE to LFUN_NEW_LINE because this is what the lfun does and to avoid confusions
- new menu entry
- new shortcut C-S-Return

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21778 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:34:37 +00:00