Commit Graph

10478 Commits

Author SHA1 Message Date
Georg Baum
b02242bfaf Rework InsetCommandParams interface and file storage
* src/insets/insetcommandparams.[Ch]:
	(operator[]): New, access a parameter
	(clear): New, clear all parameters
	(info_): New, stire info about this command
	(cmdname): Rename to name_
	(contents, options, sec_options): Replace with params_. Parameters
	are now stored as docstring.
	(findInfo): New factor for command info for all commands
	(read, write): Use new syntax
	(parameter set and get methods): reimplemenmt for new parameter storage

	* src/insets/insetcommand.h
	(getParam): New, get a parameter
	(setParam): New, set a parameter
	(parameter set and get methods): Adjust to InsetCommandParams changes

	* src/insets/insetbibitem.[Ch]
	(write): Remove, not needed anymore
	(directWrite): ditto

	* src/insets/insetbibitem.C
	(InsetBibitem::read): Use InsetCommand::read

	* src/insets/insetref.C
	(InsetRef::latex): Use new InsetCommandParams interface

	* src/mathed/InsetMathHull.C
	(InsetMathHull::doDispatch): ditto

	* src/text3.C
	(LyXText::dispatch): ditto

	* src/factory.C
	(createInset): Create InsetCommandParams with command name
	(readInset): ditto
	(readInset): Remove error message for bibitem, since bibitem is
	now a normal command inset

	* src/buffer.C: Bump file format number

	* src/frontends/controllers/ControlCommand.[Ch]
	(ControlCommand): take an additional command name parameter

	* src/text.C
	(readParToken): Remove code for \bibitem

	* lib/lyx2lyx/LyX.py: Bump latest file format number

	* lib/lyx2lyx/lyx_1_5.py
	(convert_bibitem, convert_commandparams): new, convert to new format
	(revert_commandparams): new, convert to old format

	* development/FORMAT: document new format

	* many other files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15357 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 21:07:16 +00:00
Abdelrazak Younes
4cc7a7708e This commit fixes a crash when accessing a math inset. This was due to an invalid CursorSlice::text() null pointer accessed in InsetMathNest::cursorPos():
CoordCache & coord_cache = sl.text()->bv()->coordCache();

As you can see, I used this indirection to access the BufferView::CoordCache(). Bad luck, the passed CursorSlice was not completely valid inside a mathed inset, hence the crash. My solution is to pass BufferView to InsetBase::cursorPos() and all its derivative.

* InsetBase::cursorPos(): pass BufferView const &

* bufferview_funcs::coordOffset(): ditto.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15356 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 16:23:27 +00:00
Abdelrazak Younes
52bd213992 More unicode conversion
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15355 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 14:46:45 +00:00
Abdelrazak Younes
5ac136d708 MacOSX compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15354 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 11:58:21 +00:00
Abdelrazak Younes
fb1ffecd0c This commits cuts down LyX::exec2 into two new methods (execBatchCommands() and restoreGuiSession()) and introduce a number of helper private function to sanitize the initialization and exit process; quitLyx() is replaced with LyX::quit(). The Application starting and reset is done directly in priv_exec().
* lyx_cb.[Ch]: delete quitLyX()

* lyx_main.[Ch]
  - lyx_exit(): moved to LyX::earlyExit()
  - prepareExit(), quit(), earlyExit(), execBatchCommands(), initGuiFont(): new LyX methods.
  - LyX::priv_exec(): restructured with above helper methods.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15353 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 08:36:04 +00:00
Jürgen Spitzmüller
a41bb78a0e fix bug 2910:
* src/frontends/qt3/QDocumentDialog.C (updateNumbering): don't include headings
	that have no counter in their label.
* src/frontends/qt3/ui/NumberingModuleBase.ui: show scrollbar when appropriate.

* src/frontends/qt4/QDocumentDialog.C (updateNumbering): don't include headings
	that have no counter in their label.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15352 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 16:21:52 +00:00
Jürgen Spitzmüller
c0a61f6c18 * lib/lyx2lyx/lyx_1_5.py: correct indendation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15349 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 11:41:57 +00:00
Georg Baum
80080dcfae partial compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15348 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 09:53:30 +00:00
Abdelrazak Younes
3a32fff90e Adjust the FIXME texts and Delete commented out setXY() call following Andre comments about it:
The coordcahce is for up/down navigation and vconverting mouseclicks to text positions. It is not for pure display/export which
is what drawT is about. It was a simple oversight not to remove it after some copying from the 'real' draw() method.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15347 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 09:08:05 +00:00
Abdelrazak Younes
0823fb6f86 Fix Toc dialog crash when TOC is empty.
* QToc::update(): return early if no TOC type.

* QTocDialog::updateGui(): return early of the Type model is empty and disable the outline buttons.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15346 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 08:51:55 +00:00
Jürgen Spitzmüller
77e145a406 Remember the char style label state and make it globally switchable.
* src/buffer: 
	file format incrementation to 251
* src/insets/insetcharstyle.[Ch]:
	- make show_label a param and save its state
	- let all-insets-toggle togle the label in charstyles
* development/FORMAT: 
	document file format change
* lib/lyx2lyx/LyX.py:
	add new file format
* lib/lyx2lyx/lyx_1_5.py:
	remove char style label param on reversion to 250.
	

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15345 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 07:06:41 +00:00
Bo Peng
90cbd48fd3 Scons: remove fast_start feature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15343 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 03:26:14 +00:00
Bo Peng
f3016d70d9 Scons: fix a config.h generation bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15341 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 02:55:04 +00:00
Abdelrazak Younes
562d55989a MacOSX compile fix: The class Point conflicted with a struct defined in MacTypes.h.
* coordcache.[Ch]: put everything in the LyX namespace.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15340 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 22:32:56 +00:00
Abdelrazak Younes
c7e365365e This commit saves the need to check for lyx::use_gui in a number of places.
* lyx_main.h: define "extern bool lyx::use_gui" here.

* NoGuiFontMetrics.h: new class for command-line LyX

* NoGuiFontLoader.h: new class for command-line LyX

* Application.C:
  - theFontMetrics(): returns the above dummy FontMetrics when use_gui is false.
  - theFontLoader(): returns the above dummy FontLoader when use_gui is false.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15339 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 21:47:29 +00:00
Lars Gullik Bjønnes
ebf6773c50 Update to latest from boost 1.34 cvs release branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15337 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 14:37:06 +00:00
Georg Baum
3db6e94596 fix typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15336 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 09:20:25 +00:00
Georg Baum
7affaf47e9 * src/factory.C
(readInset): Add comment about citation commands

	* src/tex2lyx/text.C
	(known_jurabib_commands): remove fullcite since LyX does not know it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15335 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-15 08:32:37 +00:00
Abdelrazak Younes
c585c2421b Add comments WRT to where the function implementations are.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15334 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 19:58:42 +00:00
Abdelrazak Younes
e049e75b6f revert change from previous commit and remove the FontMetrics access completely in order to be sure that bibitemWidest() gives the same bibitem GUI and no-GUI modes (even if that is potentially the wrong one.).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15333 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 15:31:50 +00:00
Abdelrazak Younes
a41282a1d6 Fix crash on LateX export.
* insetbibitem.C:
  - bibitemWidest() don't use theFontMetrics in non GUI mode.
  - Add 3 FIXMEs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15332 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 15:22:08 +00:00
Abdelrazak Younes
d0463cf006 Fix command-line export
* MathFactory.C:
  - initMath(): revert change from r15327 because initSymbols() is needed for proper math parsing.
  - math_font_available(): return false if lyx::use_gui is false.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15331 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 14:15:06 +00:00
Abdelrazak Younes
3cb466603c add some assertions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15330 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 13:15:46 +00:00
Abdelrazak Younes
8623a61193 MacOSX comiplation fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15329 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 12:39:18 +00:00
Michael Schmitt
13b48b7172 * lib/bind/aqua.bind:
* lib/ui/classic.ui:
	* lib/ui/stdmenus.ui: remove tooltips-toggle


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15328 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-14 12:36:19 +00:00
Abdelrazak Younes
dcfd6e5a99 enable buffer-export without loading the GUI.
* lyx_main.C:
  - parse_export(): set lyx::use_gui to false.

* MathFactory.C:
  - initMath(): initSymbols() only if lyx::use_gui is true.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15327 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 21:27:55 +00:00
Abdelrazak Younes
a897cda71c ensure that Application is properly destroyed after at the end of LyX::priv_exec()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15326 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 19:45:10 +00:00
Abdelrazak Younes
c5dd10f93e * GuiApplication: explicitly clear out socket_callbacks_ in the destructor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15325 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 16:48:12 +00:00
Abdelrazak Younes
d37fae169c In order to support multiple LyXView each BufferView needs its own CoordCache. This is what's implemented in this commit.
theCoords is now a thing of the past and all CoordCache accesses are done via BufferView::coordCache() now. I had to modify a number of methods to pass BufferView.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15324 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 16:44:44 +00:00
Georg Baum
255501fa77 Add missing convert<> specialization for unsigned long.
This is needed on OS X.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15323 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 15:35:18 +00:00
Abdelrazak Younes
1271f473f0 WorkArea::processKeySim(): ensure that LyXFunc holds the proper LyXView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15322 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 14:15:31 +00:00
Martin Vermeer
6c77c9ae41 New layout for International Society for Photogrammetry and Remote Sensing
journals

        * lib/layouts/isprs.layout: the layout
        * lib/doc/LaTeXConfig.lyx.in: the documentation



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15319 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 04:59:00 +00:00
Enrico Forestieri
6f62c98e31 Small fix for the last version bump
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15318 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 23:28:20 +00:00
Abdelrazak Younes
e2eb1d9692 * Gui::newView(): cleanup unused arguments.
* qt4/GuiImplementation.h: remove duplicate unused newWorkArea() method definition.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15317 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 22:30:42 +00:00
Abdelrazak Younes
53bbb6ed7a * GuiApplication.C: align Windows with other platform. No more static trick!
* lyx_main:
  - LyX::application_ : new scoped_ptr member containing the Application instance.
  - LyX::priv_exec(): initialize application_.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15316 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 22:02:45 +00:00
Martin Vermeer
21316375fe Support for optional arguments for environments. No material format change.
* src/buffer.C
	(BufferList bufferlist;): bump version

	* src/output_latex.C
	TexEnvironment: add optarg for environments

	* lib/lyx2lyx/lyx_1_5.py: add converters

	* development/FORMAT: document



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15315 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 20:21:14 +00:00
Abdelrazak Younes
1384e32430 fix formatting issue.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15314 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 20:03:09 +00:00
Georg Baum
0891c2e99a Replace crash on startup with a memory leak.
* src/frontends/qt[34]/GuiApplication.C
	(lyx::frontend::Application * createApplication): Don't return the
	address of a temporary, but use the new operator.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15313 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 19:40:04 +00:00
Georg Baum
b0297263df Work around a gcc bug on systems where wchar_t is not used as lyx::char_type
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15312 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 19:18:17 +00:00
Georg Baum
bd8fc3aed3 compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15311 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 16:50:47 +00:00
Abdelrazak Younes
eedd7bd25f ensure that theLyXFunc is set to the proper LyXView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15310 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 15:23:49 +00:00
Abdelrazak Younes
6b256d52c4 preliminar support for multiple LyXView.
* LyXFunc: new setLyXView() method

* LyXView::dispatch(): call LyXFunc::setLyXView() before lyx::dispatch()

What remains to be done is to ensure that every call to lyx::dispatch that is LyXView dependant is replaced with LyXView::dispatch().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15308 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 14:58:57 +00:00
Georg Baum
7f93cfe8e9 Fix bug 2901: Add menu entry for numbered formulas
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15307 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 14:49:19 +00:00
Abdelrazak Younes
83ffa28e77 This commit is purely mechanical and get rid of lyx_gui.[Ch].
Only qt4 is guaranted to compile and work. I did not remove gtk and qt3 lyx_gui.C because they might be needed for reference to complete the header declarations in "GuiApplication.C".

 - lyx_gui::use_gui transfered to lyx::use_gui in lyx_main.C
 - all remaining lyx_gui functions transfered to Application and corresponding GuiApplication implementations. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15306 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 14:10:13 +00:00
Georg Baum
79c876d4c3 Convert labels to unicode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15305 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 10:50:45 +00:00
Georg Baum
1116d23a0e Remove unused declarations of writeFileAscii
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15304 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 06:54:30 +00:00
Abdelrazak Younes
3b21b04e9c * LyX class (lyx_main.[Ch]):
- new buffer_list_ member and accessors
  - implementation of theBufferList() extern function

* Application: remove everything related to BufferList

* lyx_cb.C: test for lyx::use_gui before using theApp.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15303 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 22:30:31 +00:00
Michael Schmitt
1b5f5e58ed Change tracking:
* src/paragraph.h: remove enum ChangeTracking;
	remove default parameters for insertChar and insertInset
	* src/BufferView.h: constify getCurrentChange()
	* src/changes.h: make Change constructor explicit
	* src/insets/*.C: 
	* src/*.C: adjust accordingly; add FIXMEs


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15302 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 20:01:32 +00:00
Georg Baum
34b7650cbb Introduce wide streams. This fixes the remaining problems of plain text
export (e.g. the ToC) and the navigate menu.

	* src/insets/insetbase.h
	(InsetBase::plaintext): output to a docstream
	(InsetBase::textString): ditto

	* src/mathed/TextPainter.h
	(TextPainter::show): ditto

	* src/support/docstream.[Ch] New file and string streams for
	docstring. The file streams convert to UTF8 on the fly.

	* many more files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15301 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 19:40:50 +00:00
Georg Baum
86c320d9ba Remove unused stuff. To anybody who moves functions around:
Please don't forget to clean up includes and using directives.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15300 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 18:54:47 +00:00