Commit Graph

62 Commits

Author SHA1 Message Date
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
Uwe Stöhr
ae0f514870 support for the Vietnamese languages
fileformat increased to 291

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20738 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-04 23:20:39 +00:00
Uwe Stöhr
6081aa09fa BufferParams.cpp: add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20591 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 15:16:45 +00:00
Uwe Stöhr
c57143d682 BufferParams.cpp: change the package loading to:
former                  now
needed packages         needed packages
---                     babel
hyperref                hyperref
LyX-specific stuff      LyX-specific stuff
user preamble           user preamble
babel                   ---

This is needed because hyperref should be loaded after babel but has to be loaded before the LyX-specific stuff. The LyX-specific stuff has to be loaded before the user preamble.

It shouldn't harm to load babel before the user preamble, I even think this is an advantage because many packages need the loaded babel for  translations and the users are able to change babel translation.

The new scheme compile fine with all LyX docs and my German math manual. When you have an example where this scheme doesn't work, please shout!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20508 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-25 21:20:57 +00:00
Uwe Stöhr
39de8e95a4 BufferParams.cpp: whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20432 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 12:55:12 +00:00
Uwe Stöhr
9c59de3c67 PDFOptions.cpp: clean up the appearance of the parameters in the LaTeX-output
BufferParams.cpp: move the hyperref call to the right position

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20431 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 12:53:22 +00:00
Uwe Stöhr
f675f011be PDF-support patches by Pavel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20429 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 11:39:19 +00:00
André Pönitz
1b79e53ffe cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20392 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 22:42:16 +00:00
André Pönitz
3ff14b8300 Pavel Sanda's "PDFOptions" patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20389 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 22:31:18 +00:00
Richard Heck
e020bc1806 Fulfill promise to Andre: TextClass_ptr --> TextClassPtr.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20349 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-18 17:46:14 +00:00
Richard Heck
3ddc46bab0 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20266 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-13 22:25:37 +00:00
Richard Heck
411b7abcfa Fix crash when layout file cannot be read due to failure to call makeTextClass() in that case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20153 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:50:09 +00:00
Richard Heck
ec29fd3461 Revert accidental commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20152 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:49:37 +00:00
Richard Heck
aebd5ebaf9 Fix crash when layout file cannot be read due to failure to call makeTextClass() in that case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20150 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:46:02 +00:00
Richard Heck
8947e56702 Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20008 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 15:46:03 +00:00
Richard Heck
d7a33bc841 This patch continues 19964. It takes advantage of the work there to simplify a few things elsewhere. First, in ControlDocument::dispatchParams(), we're setting the TextClass and then dispatching the BufferParams, which sets it again now. So we can get rid of the first call. This, however, requires loading the TextClass somewhere other than LFUN_TEXTCLASS_APPLY, which I do in BufferParams::setBaseClass(), which is when you'd actually need to do it. So I've moved some of the loading logic there. (It seemed a good idea to make setBaseClass() return whether it was successful, then, though this isn't used at the moment.)
That makes another simplification both possible and desirable. For some reason, whenever you change the Document Class combobox in Document Settings, LyX tries to read whatever you choose _before_ you try to hit "Apply". Why? I see no good reason. You get the warning earlier that way, but maybe you weren't going to try to load it anyway and were going to change your mind. So I have removed that behavior, in which case you'll get the warning when you try to apply the parameters. This means we can also remove ControlDocument::loadTextclass().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 04:03:24 +00:00
Bo Peng
cc6fe67c35 Embedding feature patch 3: basic gui support
*  lib/ui/stdmenus.inc: add menu item embedded files
	*  src/BufferParams.cpp: set default embedded status to false
	*  src/EmbeddedFiles.h|cpp: add a few member functions
	*  src/frontends/qt4/Dialogs.cpp: add embedding dialog
	*  src/frontends/qt4/GuiEmbeddedFiles.h|cpp: embedding dialog
	*  src/frontends/qt4/ui/EmbeddedFilesUi.ui: embedding dialog
	*  src/frontends/controllers/ControlEmbeddedFiles.h|cpp: embedding dialog control
	*  src/frontends/qt4/Makefile.am: build system update
	*  src/frontends/controllers/Makefile.am
	*  development/scons/scons_manifest.py


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19953 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 15:42:35 +00:00
Bo Peng
692363bbca Embedding patch two: read/write embedded files'
*  src/insets/InsetGraphics.h
	*  src/insets/InsetExternal.cpp
	*  src/insets/InsetGraphics.cpp
	*  src/insets/InsetInclude.cpp
	*  src/insets/Inset.h
	*  src/insets/InsetInclude.h
	*  src/insets/InsetExternal.h: register embedded files
	*  src/EmbeddedFiles.h|cpp: core of embedded files
	*  src/Buffer.h|cpp: read/write embed file
	*  src/BufferParams.h|cpp: embedded flag
	*  src/Makefile.am
	*  po/POTFILES.in
	*  development/scons/scons_manifest.py: build system updates


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19924 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 20:46:42 +00:00
Richard Heck
8a947f63da This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.

This patch adds the backend. The ModuleList class holds a list of the available modules, which are retrieved from lyxmodules.lst, itself generated by configure.py. There are two LFUNs available: modules-clear and module-add, which do the obvious thing; you can test by typing these into the minibuffer, along with the name of one of the available modules: URL (a CharStyle), Endnote (a Custom Inset), and---with the spaces---End To Foot (View>LaTeX and look at the user preamble), which are themselves in lib/layouts. There are some others, too, that allow theorems to be added to classes like article and book.

The GUI will come next.

Issues: (i) The configure.py script could be improved. It'd be nice, for example, if it tested for the presence of the LaTeX packages a particular module needs. But this would mean re-working the LaTeX script, and I don't know how to do that. Note that at present, the packages are ignored. This will change shortly. (ii) I've used std::string in LyXModule, following what seemed to be a precedent in TextClass. If some of these should be docstrings, please let me know, and I'll change them. (iii) There is at present no distinction between LaTeX and DocBook modules. Should there be? That is: Should there be modules that are available when the document class is a LaTeX class and others that are available only when it is DocBook? Or should there just be one set of modules? Each module can of course indicate for what it is suitable in its description.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19893 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 17:59:49 +00:00
Richard Heck
6e93e77f22 This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.

This first patch does some reworking of the infrastructrue. We need to distinguish between the TextClass that a particular document is using and the layout of that document, since modules, in particular, can modify the layout. The solution adopted here is to add a TextClass pointer to BufferParams, which will hold the layout. The layout itself is then constructed from the TextClass the document is using. At present, this is completely trivial, but that will change when modules are added.

The pointer in question is a boost::shared_ptr. This is needed because CutAndPaste saves a copy of the layout with each cut or copied selection. We cannot assume the selection vanishes when the document is closed, so there are two options: (i) keep a list of all the layouts that have ever been used by any document; (ii) used some kind of smart pointer. The latter seems preferable, as the former would waste memory. More importantly, the use of a smart pointer allows modules to be modified on disk and then reloaded while LyX is running, and it will eventually allow the same for layout files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19756 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 16:41:13 +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
Jürgen Spitzmüller
3154def278 * src/BufferParams.cpp (writeEncodingPreamble):
- correct encoding check.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19171 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-23 16:46:26 +00:00
Michael Schmitt
7f74d469a4 * src/Author.h:
* src/Changes.cpp:
	* src/support/userinfo.cpp:
	* src/Paragraph.cpp:
	* src/Changes.h:
	* src/Buffer.cpp:
	* src/Paragraph.h:
	* src/BufferParams.cpp: do not save the name of authors
	in LyX documents, who have not made a single change in 
	change tracking mode


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19019 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-09 20:52:34 +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
Uwe Stöhr
e077e53a13 BufferParams.cpp: correct wrong previous commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 22:31:49 +00:00
Uwe Stöhr
31c99e6b37 Fixes for Farsi:
- Bufferparams.cpp: set correct font encoding for Farsi
- lib/languages: define quotation marks for Farsi

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18858 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 22:23:37 +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
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
Jürgen Spitzmüller
bd997f2cb9 * src/BufferParams.{cpp, h}
* src/graphics/PreviewLoader.cpp:
	- make member writeEncodingPreamble void.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18543 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 12:25:53 +00:00
Jürgen Spitzmüller
d2d31b9130 Fix bug 3522.
* src/BufferParams.{cpp,h} (writeLaTeX): 
	- move inputenc generation to an own function, 
	   writeEncodingPreamble

* src/graphics/PreviewLoader.cpp (startLoading):
	- use the inputenc command and encoding of the buffer
	  by using the aforementioned new function.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18538 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 07:43:15 +00:00
Uwe Stöhr
e1d855eb41 BufferParams.cpp: forgot this in last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18275 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-12 00:22:37 +00:00
Uwe Stöhr
40ba4d3630 BufferParams.cpp: the long discussed babel call logic cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18274 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-12 00:13:35 +00:00
Uwe Stöhr
3db8583e2b BufferParams.cpp: only whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18252 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 21:17:22 +00:00
Uwe Stöhr
0d555fa675 BufferParams.cpp: Simplify babel call
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18251 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 21:10:55 +00:00
Bo Peng
4ce743a0a7 Add support for listings package. Two listings command \lstinline, \lstinputlisting and an environment \lstlisting are supported, along with preamble \lstset. \lstinputlisting is implemented through Include dialog, and the other two are implemented with a new inset listings, along with its dialog.
* src/LyXAction.cpp: listing-insert action
	* src/insets/Inset.h,cpp: LISTINGS_CODE
	* src/insets/InsetInclude.cpp: handle \lstinputlisting
	* src/insets/InsetListings.h,cpp: new listings inset
	* src/insets/InsetListingsParams.h,cpp: parameters from listings package
	* src/insets/InsetCommandParams.h,cpp: handle lstinputlisting option
	* src/Bidi.cpp: handle LISTINGS_CODE
	* src/frontends/qt4/ui/TextLayoutUi.ui: update UI
	* src/frontends/qt4/ui/ListingsUi.ui: new dialog
	* src/frontends/qt4/ui/IncludeUi.ui: update UI
	* src/frontends/qt4/QInclude.h,cpp: add lstinputlisting
	* src/frontends/qt4/QDocument.h,cpp: add textedit for preamble listings_params
	* src/frontends/qt4/QListings.h,cpp: new listings inset
	* src/frontends/qt4/Dialogs.cpp: new listings dialog
	* src/frontends/controllers/ControlInclude.h,cpp: add lstinputlisting
	* src/frontends/controllers/ControlListings.h,cpp: new listings inset
	* src/LyXFunc.cpp: handle LISTING_CODE
	* src/Paragraph.cpp: handle LISTING_CODE
	* src/factory.cpp: new listings inset
	* src/CutAndPaste.cpp: handle LISTINGS_CODE
	* src/LaTeXFeatures.cpp: require listings
	* src/Text3.cpp: Handle LISTINGS_CODE
	* src/lfuns.h: add LFUN_LISTING_INSERT
	* src/Buffer.cpp: change lyx file format to 269
	* src/BufferParams.h,cpp: add listings_params to preamble
	* lib/lyx2lyx/LyX.py: lyx2lyx 
	* lib/lyx2lyx/lyx_1_5.py: lyx2lyx
	* lib/ui/stdmenus.inc: new menu item (no shortcut!)
	* src/insets/Makefile.am: update autotools
	* src/frontends/controllers/Makefile.am
	* src/frontends/qt4/Makefile.dialogs
	* src/frontends/qt4/Makefile.am
	* po/POTFILES.in: a few more translatable files.
	* development/scons/scons_manifest.py: scons build system
	* development/FORMAT: document format changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18243 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 19:11:42 +00:00
Uwe Stöhr
c9baa9bd3f BufferParams.cpp: fix bug 3569:
http://bugzilla.lyx.org/show_bug.cgi?id=3569

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18238 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-08 23:53:35 +00:00
Michael Schmitt
038cc70650 change tracking:
introduce 'semantic' TeX commands \lyxinserted and \lyxdeleted in order to decouple change tracking
output from dvipost. Raise user warning if dvipost is not installed (i.e. no changes are shown in TeX output)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18237 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-08 17:46:03 +00:00
Uwe Stöhr
f910f7d6e8 BufferParams.cpp: fix bug 3568:
http://bugzilla.lyx.org/show_bug.cgi?id=3568

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18227 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-07 18:55:14 +00:00
Uwe Stöhr
80b94c6bf5 Georg's patch for bug 3043:
Introduces new encodings for the CJK-languages.
The CJK-languages can now be selected from LyX's menu.
For remaining small problems, see the thread "Help needed for bug 3043" on the devel-list.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18216 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-06 20:26:02 +00:00
Uwe Stöhr
2550861643 fix inputenc handling bug introduced with r18198
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18210 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-06 14:18:40 +00:00
Uwe Stöhr
c5527942f3 set infrastructure to allow not to call babel
This is a part of the fix for bug 3043.
I got the OK from Georg, that this patch doesn't introduce conflicts as it only sets the infrastructure.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18206 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-05 19:18:34 +00:00