Commit Graph

202 Commits

Author SHA1 Message Date
Richard Heck
2351615f0a Fix LFUN_LAYOUT_MODULE_ADD: We need to make sure that the module
isn't already added, that its requirements are satisfied, and that
it doesn't conflict with any loaded modules. Mostly, this just
moves existing code into a new routine where we can get at it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26995 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-20 19:48:32 +00:00
Richard Heck
5e505119fa OK, I lied. A little more. Just trying to keep the cleanup separate from
the real stuff.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26925 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 17:29:01 +00:00
Richard Heck
297d5d1f4e Factorize out some of this. Just a bit more cleanup, prior to the patch
I've been promising....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26923 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 17:14:46 +00:00
Richard Heck
8bc9c319d2 Fix bug connected with excluded modules and default modules: We need to make
sure that default modules do not exclude loaded modules and also that loaded
modules do not exclude them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26922 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 15:29:56 +00:00
Uwe Stöhr
4331cbf30f babel handling: revert r26857 and r26858 for the reasons I posted o the list
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26870 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 17:21:18 +00:00
Jürgen Spitzmüller
d45ca67d1d ** fix bug 2114. Fileformat change.
** fix bug 5343 (patch from Richard, prerequisite for the other fix)

* Buffer.cpp:
	- increment format to 343
* src/BufferParams.{cpp,h}:
	- new param \use_default_options that allows to select/deselect
	  the "Other" class options defined in the layout file.
* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/LaTeXUi.ui:
	- add GUI to set \use_default_options, display predefined options in the dialog
	- update dialog correctly on class change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26860 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 09:36:00 +00:00
Abdelrazak Younes
4d4ee5d7a6 Factorize out the hardcoded babel tests. This whole thing is a real mess...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26858 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 07:56:06 +00:00
Abdelrazak Younes
bc8e829ce0 Simplify and optimize a bit the special babel language detection; and add a FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26857 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 07:19:43 +00:00
Uwe Stöhr
d30e01fd08 Support for Mongolian, fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26848 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 23:52:31 +00:00
Uwe Stöhr
19c27c8714 BufferParams.cpp: typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26842 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 12:47:51 +00:00
Richard Heck
2078e09e67 The default modules should be kept in order.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26801 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-07 15:53:05 +00:00
Uwe Stöhr
dfcd6fb7ea make Latvian documents compilable, fixes http://bugzilla.lyx.org/show_bug.cgi?id=5324
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26752 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 19:12:12 +00:00
Uwe Stöhr
8d11bc23be BufferParams.cpp: make Lithuanian documents compilable, fixes http://bugzilla.lyx.org/show_bug.cgi?id=5323
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26746 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 13:42:37 +00:00
Uwe Stöhr
ce09194e43 GuiDocument.cpp, BufferParams.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5294
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26628 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-29 19:33:37 +00:00
Uwe Stöhr
4c48e7746b BufferParams.cpp, LaTeXFeatures.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5291
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26627 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-29 19:18:00 +00:00
André Pönitz
e5ae1a4b75 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26481 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-21 19:27:20 +00:00
Uwe Stöhr
eb963540d4 various listings fixes by Vincent, see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg143302.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26341 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-08 21:51:38 +00:00
Jürgen Spitzmüller
db9885f882 final touch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26207 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:48:24 +00:00
Jürgen Spitzmüller
5da25426f5 * adjust line lengths
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26206 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:30:09 +00:00
Jürgen Spitzmüller
a2906cb877 ** proper implementation of pLaTeX by Tetsuya Makimura and me, fixes many remaining problems and bugs with language "japanese" (bugs 4863, 4290, 4700 and partially 4697) **
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26200 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-18 17:26:09 +00:00
Richard Heck
163d827729 Support for removing "default" modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25917 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 17:46:27 +00:00
Richard Heck
a28c584064 Move the default module loading from makeDocumentClass() to setBaseClass().
This makes the Document>Settings dialog behave better.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25882 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-25 16:48:48 +00:00
Richard Heck
56a35c2c61 Add UseModule tag for layout files. This allows the AMS files, in particular, to "require" the
theorems-ams module, which is what most users will want. A later commit will allow users also
to "exclude" this module, in case they wanted to do that.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25880 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-25 15:51:27 +00:00
Uwe Stöhr
ffa15bc301 BufferParams.cpp: clarify the babel loading logic: treat jurabib the same as hyperref, japanese, and vietnamese
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25707 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-18 22:22:17 +00:00
Jürgen Spitzmüller
ce13748eae Restore 1.5.x babel loading order (bug 5024)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25632 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-15 13:08:27 +00:00
Richard Heck
f854295dab 'Default'-->'Empty' in Bo's recent commit. Default means something else in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25556 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 03:41:56 +00:00
Bo Peng
763ef015ce Improve the local layout feature by better handling of unknown textclass, unknown layouts, and switch between textclasses.
* src/TextClass.h[.cpp]: add addLayoutIfNeeded() and createDefaultLayout()
	* src/Layout.h[.cpp]: add unknown_ to mark if a layout is a default layout for an unknown one.
	* src/LayoutFile.cpp: add addDefaultClass and change addLayoutFile to addLocalLayout.
	* src/Text.cpp: add unknown layouts that are not recognizable by a new textclass.
	* src/frontends/qt4/GuiToolbar.cpp: display (unknown) for unknown layouts.
	* src/frontends/qt4/GuiDocument.cpp: restore 'browse layout' button.
	* src/frontends/qt4/ui/LaTeXUi.ui: restore 'browse layout' button.
	* src/CutAndPaste.cpp: do not convert unknown layouts from pasted text
	* src/BufferParams.cpp: add a default textclass when a document with unknown textclass is loaded.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25555 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 02:43:02 +00:00
Enrico Forestieri
1e801d0361 Fix bug 2721
http://bugzilla.lyx.org/show_bug.cgi?id=2721


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25409 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-01 12:46:46 +00:00
Jean-Marc Lasgouttes
d3bf7155b8 rewrap long lines
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25404 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-30 11:02:21 +00:00
Jürgen Spitzmüller
d7eaaba900 ** support for CJK font argument. File Format change **
* src/BufferParams.{cpp,h}:
	- new param fontsCJK (font_cjk).

* src/output_latex.cpp:
	- use fontsCJK param.

* src/Buffer.cpp:
	- increase file format

* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/FontUi.ui:
	- GUI for the CJK font param

* lib/lyx2lyx/lyx_1_6.py:
	- remove font_cjk param on reversion.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25135 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:18:34 +00:00
Richard Heck
3e28f0fc57 Add some constness where we can.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24883 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-22 14:02:35 +00:00
Uwe Stöhr
b2b4cb1fe3 BufferParams.cpp: fix the order for page sizes, fileformat change is needed, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4868
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24792 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-15 22:54:13 +00:00
Uwe Stöhr
2a18b2a5cc BufferParams.cpp: follow Jürgen's advice to load subfig after \PassOptionsToPackage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24753 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-13 20:46:49 +00:00
Uwe Stöhr
842587a1a6 BufferParams.cpp: load the subfig package conditionally to make it work with the caption package
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24746 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-13 01:23:50 +00:00
Enrico Forestieri
c4bcdf837a Make it less ugly and safer, as when adding to the preamble one doesn't
have to check whether \makeatletter has already been added or not.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24713 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-10 22:35:17 +00:00
Jürgen Spitzmüller
764b5cf859 support for default master document.
file format change.

This is the last feature for today. Promised.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24540 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-28 16:38:56 +00:00
André Pönitz
b35b731fbf move citation enums into header of their own
remove biblio:: namespace


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24385 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-20 15:00:11 +00:00
Richard Heck
8a69ffd3bf Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got everything, but this does compile, and it seems to work at least reasonably well. Any problems should of course be reported to the list.
For the record, this developer is sorry that the problems with this code were not noticed much earlier. It's not fun to do so much work and then have it all reverted.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24373 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-20 03:08:11 +00:00
Bo Peng
76d272da30 Embedding: revert embedding options and extra_embedded_files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24328 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-18 17:06:03 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
André Pönitz
e1453ef687 lexer cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24134 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-05 21:24:57 +00:00
Enrico Forestieri
fd0e789dea Only add \makeatletter and \makeatother to the preamble when actually needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24068 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-31 01:26:57 +00:00
Uwe Stöhr
30663a8019 Fileformat change.
Provide only one Japanese language that is encoding independent, patch partly by Koji Yokata.
This fixes http://bugzilla.lyx.org/show_bug.cgi?id=4597

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24053 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-29 23:25:40 +00:00
Richard Heck
700af7e701 Add support for document-local layout information. GUI is to follow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23913 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-24 12:31:07 +00:00
André Pönitz
6b28f08ff2 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-21 21:47:37 +00:00
Bo Peng
0f9a8fcad4 Add use_bundled_format rc entry to allow creation of new buffers in bundled format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23768 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 22:41:54 +00:00
André Pönitz
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +00:00
Bo Peng
48f9225e27 Embed: allow the use of embedded layout and class (.cls, .sty) files.
* src/EmbeddedFiles.h|cpp: add validate() function to validate loaded .lyx file.
	* src/LayoutFile.h|cpp: add Layout_Type parameter to addLayoutFile to load an embedded layout.
	* src/BufferParams.h|cpp: read layout from temp directory, then local directory.
	* src/frontends/qt4/GuiDocument.cpp: handle embedded layout type
	* src/LyXFunc.cpp: handle embedded layout when a layout is re-read.
	* src/Buffer.cpp: validate after a buffer is read. handle exceptions properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23667 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-11 18:31:38 +00:00
Bo Peng
932998494b Embedding: add option \extra_embedded_files to buffer params. This increase
LyX file format to 318. The Embedded files panel of document settings has
been simplied, with working add and remove buttons. Note that bease BufferParams
lacks buffer path information, extraEmbeddedFiles are vector<string>, instead
of EmbeddedFileList (as previously planned).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23606 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 23:04:14 +00:00
Richard Heck
6edb3984bf BaseClassList --> LayoutFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23532 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:53:21 +00:00
Richard Heck
9dfbadcb2c Improve handling of local layout files. There are two bugs here that still need fixing, though: 4593 and 4594.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23372 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-01 16:32:16 +00:00
Richard Heck
2b3bd7b5f4 This is the last of the commits that hopes to enforce the distinction between "layout files" and "document classes" that was introduced by the modules code. For the most part, these changes just refactor code from TextClass between: (a) a TextClass base class; (b) a LayoutFile subclass, which represents the information in a .layout file; and (c) a DocumentClass subclass, which represents the layout information associated with a Buffer---a LayoutFile plus Modules. Methods from TextClass have been apportioned between the three classes depending upon what is needed where, and signatures have been changed where necessary so that the right kind of class is required.
At this point, there are no simple TextClass objects in the main LyX code, and it is impossible to create them, since the TextClass constructor is protected. Only LayoutFile and DocumentClass objects can be constructed, and for the most part these are constructed only by their respective containers: BaseClassList and DocumentClassBundle. There is an exception: LayoutFile does have a public default constructor, but if anyone knows how to make it go away, please do.

There will be one or two more commits along these lines, but these will be simple renamings. For example, BaseClassList should be LayoutFileList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23343 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 02:45:33 +00:00
Richard Heck
2c382f2f47 More work towards type safety regarding TextClass's. A couple bugs have been fixed here, too, discovered along the way.
Note that we no longer rely upon BaseClassList to be sorted. This would allow layout descriptions---such as "article (AMS)"---to be translated, and the ordering of the list in Document>Settings will then follow the translations.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23334 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 21:04:55 +00:00
Richard Heck
224e6ad0a3 baseclasslist --> BaseClassList singleton. Prep for further type safety.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23322 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 14:49:01 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
Richard Heck
b2475f6625 Replace boost::shared_ptr<TextClass> with a global cache of sorts of the TextClass's used by Buffers---or, more strictly, constructed by BufferParams::makeTextClass(). The action is in TextClass.{h,cpp}.
I've left the typedef in TextClassPtr.h. At the moment, it's kind of silly. But I've left it mostly because it helps to identify where the TextClass's stored in the TextClassBundle are used, and maybe it'd be worth having some sort of strong typedef like the one for BaseClassIndex here.

I need to check whether the textClass_ member of InsetCollapsable is needed now. I think not.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23232 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 19:31:31 +00:00
Richard Heck
4c6180d209 Try to make the distinction between base classes and text classes clearer in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23198 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:59:49 +00:00
Richard Heck
69de04feac Restore Andre's TextClassIndex, but now in the form of BaseClassIndex. It seems worth distinguishing more clearly than we do at the moment between TextClass's and BaseClass's. The latter correspond to *.layout files; the former are based upon *.layout files but may be modified by modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23197 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:29:40 +00:00
Richard Heck
c7afa2d658 More cleanup from Andre.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23194 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:44:11 +00:00
Richard Heck
ebd4f002af Andre's s/getBaseClass/baseClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23191 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:12:41 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Richard Heck
4ab6f265e9 Add support for column separation in page margins. Fixes bug 3337.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23059 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 05:24:48 +00:00
Jürgen Spitzmüller
ebc4649508 Fix a crash following the input of an invalid paragraph separation value in the document settings dialog (bug 4556).
* src/frontends/qt4/GuiDocument.cpp:
	- disallow input of defskip length without actual length value.

* src/BufferParams.cpp (readToken):
	- there might be documents with the invalif "\defskip defskip" param. Reset this to "\defskip medskip".

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23022 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-15 14:13:05 +00:00
Richard Heck
b76e95b942 Fix TextClass::read API. Also some cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22988 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 03:38:08 +00:00
Jean-Marc Lasgouttes
11bea5a763 Use a set<string> instead of a vecctor<string> for list of features. This
allows to simplify the code to some extent.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22734 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-01 15:12:04 +00:00
Jürgen Spitzmüller
f62fbd05d2 * src/BufferParams.{cpp,h}:
- (paperSizeName): add missing paper sizes. Add an argument to the function
	  that returns context-sensitive information (depending on the purpose)
	- (paperSizeName): Do not hardcode "letter" for default paper size (bug 2098).
	- (dvips_options): pass purpose DVIPS to paperSizeName
* src/Converter.cpp:
	- (dvipdfm_options): pass purpose DVIPDFM to paperSizeName.
* src/Format.cpp:
	- (view): pass purpose XDVI to paperSizeName (fix bug 4432).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22664 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-25 12:54:25 +00:00
Pavel Sanda
2eb75da023 PDFoptions: improve the functionality in case the hyperrref is
already loaded by the textclass.

Some corner cases still missing (see fixme and link below).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134643.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22660 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-24 01:20:51 +00:00
Jean-Marc Lasgouttes
0df54152bc Move spacing code around (and fix a bug)
* LaTeXFeatures.cpp (getPackages): remove some specific spacing code;
	move listings support to simplefeatures array.

	* src/Spacing.cpp (writeEnvirBegin, writeEnvirEnd): code factorization
	(writePreamble): new method containing former code from LaTeXFeatures;
	use \setSpacing instead of \setSingleSpacing.

	* src/BufferParams.cpp (validate, writeLaTeX): handle spacing here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22644 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-22 08:41:45 +00:00
Jürgen Spitzmüller
804e912910 Fix hyperref-soul conflict and sanitize hyperref management
* src/BufferParams.cpp:
	- always require hyperref if it's used.
	- only call PDFOptions::writeLaTeX if hyperref is required
	  (and not provided by textclass).
* src/PDFOptions.{cpp,h}:
	- (writeLaTeX): remove unneeded hyper_required argument
* src/LaTeXFeatures.cpp:
	- special definition for pdflatex ct markup when hyperref is used
	  (fix bug 4504).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22629 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-19 11:17:12 +00:00
Richard Heck
7c28905b17 This commit adds some new functionality to the modules stuff. In particular, it introduces the concept of "required" and "excluded" modules: A given module may require one of some list of modules, or it may be incompatible with some other modules. (Complex Boolean combinations are not supported!!) These facts can be noted in the module file, and the UI responds appropriately: Required and excluded modules are noted in the description, and the "Add" button is enabled only if at least one of the required modules has already been selected and no excluded module is selected. Getting this to work involved a fair bit of cleanup of the existing code---including ways Angus, I think, had already pointed out were required---and also involved changing the syntax of the headers of the module files, but in ways that are probably best anyway.
None of the extant modules require any other modules, but the Theorem modules all exclude one another. (See the screenshot.) When I modularize the AMS classes---that is the next task---we'll have requires.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22456 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-09 18:51:02 +00:00
Jürgen Spitzmüller
9e5eebc14c *** Requires tag for classes, layouts and custom insets ***
* src/TextClass{cpp,h}:
	- implement Requires tag for class and InsetLayout.
* src/Layout.{cpp,h}:
	- implement Requires tag for layouts.
	- increase layouts format to 6.
* src/Paragraph.cpp:
	- request required features for paragraph layouts.
* src/LaTeXFeatures.cpp:
	- add some packages needed by modules.
	- remove Preamble method for InsetLayout. This is now done
	  in InsetFlex::validate.
* src/BufferParams.cpp (validate):
	- request required features for the class.
* src/insets/InsetLayout.h:
	- new member "requires".
* src/insets/InsetFlex.{cpp,h}:
	- implement validate method and request required features and preamble snippets.

* lib/layouts/*.{layout,module,inc}:
	- increase layouts format to 6.
	- use Requires tags in some modules (more can be done later).

* lib/doc/Customization.lyx:
	- document Requires tag.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22414 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 16:59:10 +00:00
Richard Heck
0fce3ff6bd Pass by const reference. Thanks Andre and Peter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22405 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-06 18:17:25 +00:00
Richard Heck
ef86256c39 Remove commented out code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22402 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-06 17:23:19 +00:00
Richard Heck
9a7cd29f5b Rationalize the handling of makeTextClass().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22388 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 17:04:56 +00:00
Richard Heck
80e98c5b71 Implement checks for available modules both in BufferParams and in the gui.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22387 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 16:56:30 +00:00
Jean-Marc Lasgouttes
6376641f4e Move part of Buffer::validate into a new method BufferParams::validate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22146 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-14 14:51:47 +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
André Pönitz
cbaca4a129 fix typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22071 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-10 23:14:09 +00:00
Jürgen Spitzmüller
35cb68ba14 * src/BufferParams.cpp (readToken):
- initialize pair<bool, lyx::textclass_type> pp.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21939 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-03 16:42:43 +00:00
Jürgen Spitzmüller
433eda2cca * src/BufferParams.cpp (readToken):
- fix assertion introduced with rev. 21800 (bug 4395).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21925 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 17:59:53 +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
Abdelrazak Younes
c886bc68c2 * FileName:
- introduce changeExtension(): the goal is to replace progressively the one in filetools.cpp
- get rid of internal_path() checking for Win32 as the path is always normalized with slashes with QFileInfo.

* BufferParams: get rid of filepath member. This was used only once and was fixing a path in BufferParam was wrong anyway.

* Buffer::filePath(): always regenerate instead of caching it in BufferParams.

 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21847 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 15:25:07 +00:00
Bo Peng
3f30fe7421 If there exists a local layout file, use the local copy instead of the system one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21800 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 15:45:54 +00:00
Jürgen Spitzmüller
fa07bad49c * LaTeXFeatures.cpp (useLanguage):
- require the CJK package for CJK languages.
* BufferParams.cpp (writeEncodingPreamble):
	- load CJK package if required.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21652 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 12:37:18 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
André Pönitz
437693005c *sigh*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21408 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 18:30:05 +00:00
André Pönitz
09df753df4 pimpl not needed here
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 23:42:27 +00:00
André Pönitz
a8cd9a4b8f cosmetics. mainly replace #include "dostring.h" by #include "strfwd.h"
in header files when possible. Adjust .cpp files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 22:17:22 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
André Pönitz
3b3ac62e58 create some helper functions in FileName
cosmetics;


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-17 22:21:50 +00:00
Uwe Stöhr
7075eaadef The huge URL patch:
- rename the lfun to href-insert.png
- rename the files to Hyperlink...
- the former URLUi produces now \href commands (hyperref)

Only missing thing is the lyx2lyx conversion routine - this will be done by Richard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 19:06:09 +00:00
Uwe Stöhr
0b6fa6ef30 BufferParams.cpp: - load the japanese package only when japanese is not already provided.
- fix japanese babel handling

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20929 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 23:31:16 +00:00
Uwe Stöhr
392ddbfdbd BufferParams.cpp: babel must be loaded even when there is no given language parameter, due to the Japanese support package that does this later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20880 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 23:03:14 +00:00
Uwe Stöhr
1484691640 BufferParams.cpp: empty the encodings when the Japanese plain encodings are used to prevent that inputenc is used (according to the suggestion by JMarc)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20879 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 22:26:17 +00:00
Uwe Stöhr
71ea6e7a8b BufferParams.cpp: next step for proper traditional Japanese support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20861 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 00:59:16 +00:00