Commit Graph

164 Commits

Author SHA1 Message Date
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
Uwe Stöhr
0a7567ce3b - add entry to FORMATS file for Stefan's format change (Richards to 296 change is still not correctly listed)
- add support for hyerlink targets - fileformat changed
  (For Hyperlink.cpp I still need help to get rid of the strings and chars and use docstrings and char_type instead!)

Can anyone please open the changed Hyperlink.ui with a Qt 4.2 designer or below, save it and commit? Thanks. (Otherwise you cannot compile it.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21347 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 17:37:43 +00:00
Stefan Schimanski
1231489798 * dynamic macros as described in http://1stein.org/download/dynmacro.pdf
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:13:07 +00:00
Stefan Schimanski
9d9c5959f3 * file format 298 to convert macro definitions with optional parameters into ERT. This is still just an empty convertion, waiting for Uwe to find time to implement it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21326 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:03:51 +00:00
Uwe Stöhr
bb46fe5f0e fileformat change for my previous commit: Albanian and lower Sorbian support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21273 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 22:38:36 +00:00
André Pönitz
9be03a87f9 start some work on file dialogs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21238 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 16:32:20 +00:00
André Pönitz
b99433e73b cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21157 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 21:41:17 +00:00
Richard Heck
2f4d0ae27e Remove methods marked for removal from InsetCommandParams. Yeah, we can do that now. ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21154 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 18:51:04 +00:00
Richard Heck
4064d2c468 InsetInclude becomes an InsetCommand.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21149 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 15:02:15 +00:00
Bo Peng
f8836d8b12 Embedding: remove the embeddingChanged signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21105 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 19:08:53 +00:00
Bo Peng
7063b33b1b Remove the manifest section of the .lyx file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 18:06:00 +00:00
Enrico Forestieri
eb9b8ef0cc Fix bug 4287
* src/Buffer.cpp (Buffer::save): also replace the ':' character
	in the mangled filename as this it is illegal on Windows.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21102 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 17:57:13 +00:00
André Pönitz
f934b86850 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 10:50:56 +00:00
André Pönitz
fbb3abfeac cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21085 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 17:35:27 +00:00
André Pönitz
ee005614a3 saner borderline between buffer and exporter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21080 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:51:13 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
André Pönitz
0e08bc5e16 start using FileName::exists()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21044 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 19:29:32 +00:00
Abdelrazak Younes
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +00:00
Abdelrazak Younes
55beda376a Refactor Undo/Redo framework into an Undo class owned by a Buffer. This reduces header dependencies from Undo.h which was including lots of stuff previously. This also solves the bug where undo/redo were reset upon buffer switching. Now, each buffer has a truly independant undo/redo architecture.
In the future, when Cursor has been fixed to work correctly with multiple views of the same Buffer, we could transfer the Undo owner from Buffer to Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 11:51:17 +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
Abdelrazak Younes
f357fb955f Use InsetCode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20938 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:11:10 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
Uwe Stöhr
ed43dea031 fileformat change to 294 for Pavel's PDFOptions cleanup in r20881
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20933 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-12 23:51:56 +00:00
Bo Peng
353aacab4b InsetInfo: lyx2lyx support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20905 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:56:34 +00:00
Abdelrazak Younes
a9c2a907c0 Remove "DocIterator.h" header dependencies in Buffer.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20901 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 12:48:24 +00:00
Uwe Stöhr
a9b5b1ff9a Fileformat incremented to 293 due to yesterdays' support for japanese-plain (r20831)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-08 23:40:23 +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
André Pönitz
bb3f2d34be second try
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20722 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 22:27:31 +00:00
Uwe Stöhr
474a0beb2b Buffer.cpp: compile fix
scons_manifest.py: dito

André, please check if you can compile before you commit

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20721 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 22:22:40 +00:00
Uwe Stöhr
2492def7da provide wrap tables based on the current wrap float implementation
file format increased to 290


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20713 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 21:07:01 +00:00
Martin Vermeer
d21a3bb445 Index as collapsible, preserving existing feature set
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20699 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 13:38:19 +00:00
André Pönitz
df2318f823 move some buffere related stuff from callback.cpp tpo Buffer.cpp.
simpler code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20694 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 11:00:18 +00:00
Abdelrazak Younes
52cb6e770b Remove unneeded changed() and closing() delegates.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20668 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 19:42:14 +00:00
André Pönitz
b847b8c7df the delegate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 18:27:20 +00:00
Abdelrazak Younes
f0402e69c6 Fix some issues with buffer closing.
* Switch WorkAreaManager to std::list instead of vector.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20664 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 14:39:48 +00:00
Abdelrazak Younes
8c95397b21 Buffer::pimpl_: replace scoped_ptr with a simple pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20657 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 09:16:54 +00:00
Abdelrazak Younes
5249b74e5b Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20656 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 09:12:13 +00:00
Abdelrazak Younes
4ce0961b5a Replace Buffer' changed() and closing() signals with a WorkAreaManager before Andre erase everything :-)
The resulting source code is not much bigger actually.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20654 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 09:00:08 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Richard Heck
0787ade6c0 This is the first part of a cleanup of how we handle the InsetCommand hierarchy. This part starts to disentangle the type of the inset from the command that a single instance of the inset represents. This involves two sorts of changes:
(i) The file format is changed, so that command insets are represented as:
    \begin_inset CommandInset insetype
    LatexCommand command
    ...
    \end_inset
This involves some lyx2lyx and changes to the readInset() routine in factory.cpp
(ii) The InsetCommand and InsetCommandParams classes also have to be changed, as the command name was used in these classes for various purposes for which the inset type ought really to be used.
Further clean-up to come.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20544 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-27 18:24:18 +00:00
Uwe Stöhr
b7d0510502 Fileformat increased to 287: support for optional arguments of package wrapfig that is used for wrap floats
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20462 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-24 13:43:58 +00:00
Uwe Stöhr
011459ce46 - increase fileformat to 286: this has been forgotten in Pavel's PDF-support patch
(besides this, note that the fileformat change to 285 is not yet documented in FORMAT)

- lyx2lyx/lyx_1_6.py: fix routine to revert the PDF-support stuff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20448 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-23 12:39:31 +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
b6bed295a3 Somehow this got missed when (partially) fixing the recursive include problem.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20267 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-14 01:03:55 +00:00
Bo Peng
e2d5893eab Embedding: move manifest to .lyx file, as a separate section between header and body
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20212 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-11 14:23:12 +00:00
Bo Peng
3189e7b5dd Embedding: prepare to read/write manifest in .lyx file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20186 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-10 03:54:02 +00:00
Uwe Stöhr
17112f655d Helge's wrapfig patch:
- Format incremented to 284
- LaTeX-package wrapfig is now used instead of flotflt for wrap floats (this allows us to implement now also a table wrap float)

(the optional overhang argument of wrapfig will be implemented later)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20185 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-09 23:47:22 +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
Martin Vermeer
2e5355e4c2 Convert CharStyle to Flex also in file format
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20138 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 13:01:29 +00:00
Bo Peng
726c8660f0 Fix another prompt for externally-modified bug with writeAs()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20107 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-06 15:54:17 +00:00
Edwin Leuven
1fd0174c09 compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 15:16:24 +00:00
Bo Peng
21ae0cc324 Fix bug 4193 Revert ask for saving file before closing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20039 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 15:03:50 +00:00
Bo Peng
22ce34e5d5 Move two minizip functions from filetools.cpp to its own file minizip/zipunzip.cpp, covered by minizip's original license
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20025 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-03 21:09:11 +00:00
Abdelrazak Younes
af06ed5ff1 Transfer current_font and real_current_font from Text to Cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19999 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 13:35:48 +00:00
José Matox
b3d5000a64 Increment file format due to the embedded feature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19938 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 09:46:14 +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
Enrico Forestieri
821bdfbc8d Save the right timestamp and checksum of an opened file.
* src/Buffer.cpp (Buffer::readFile): save timestamp and checksum
	of the original disk file, and not those of the file converted
	to current format.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19916 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 14:50:12 +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
Abdelrazak Younes
1356543c45 The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
* Buffer:
- get rid of cursor_ and anchor_
- ~Buffer(): update the labels of its master buffer before closing
- closing(): pass the Buffer address.

* BufferView():
- BufferView(): needs a valid Buffer (should be const in the future.
- most of the change is about removing all test of buffer_ nullity.
- resize(): deleted.
- setBuffer(): deleted.

* Application:
- newLyXView(): simplification
- updated design description in Application.h

* Gui/GuiImplementation: remove all WorkAreas and BufferView creation/Deletion. Workareas are directly handled by  LyXView/GuiView and BufferView is created/delete by WorkArea.

* LyXView/GuiView: implement the new design

What is not working yet:
- the close tab button: it is implemented but does not show up.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19686 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 07:33:46 +00:00
Richard Heck
cd772c60a5 Biblio.{h,cpp} --> BiblioInfo.{h,cpp}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19660 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-20 17:04:36 +00:00
Richard Heck
b3bff4232a Improvements to the citation dialog UI. It is now possible to search particular fields (author, title, etc) and to filter keys by entry types (article, book, etc).
The changes are essentially of three types. 

First, the std::maps previously used here for storing BibTeX data have become full-fledged classes and so what were previously just a bunch of functions have now become methods of these new  classes. This leads to a lot of minor changes in other files, to adapt to the  new signature. The changes in insets/ are mostly of this kind.

Second, there are some slightly more substantial changes in src/insets/InsetBibtex.cpp. We now store lists of the field names and entry types that have been used.

Finally, there are the changes to the citation UI. These are mostly straightforward, though adding the new functionality exposed some inadequacies in the previous code that also had to be fixed.

One other change: BibTeX keys are now docstring. This solves some Unicode issues.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19657 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-20 16:30:02 +00:00
Martin Vermeer
3c504502bf Further inset configurability, moving charstyle stuff to collapsable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19640 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 23:26:07 +00:00
Martin Vermeer
dc2a40e7e9 Partial merge of CharStyle and InsetLayout stuff, first part
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19621 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-17 15:38:58 +00:00
Richard Heck
5bb22d9498 Re-write of the BibTeX representation. The main change is that we now have
a structure representing field->value instead of just a single string with
all the data. The data structures are defined in src/Biblio_typedefs.h, and
the main changes are to the parser code in src/insets/InsetBibtex.cpp.

-src/Biblio_typedefs.h
 Contains typedefs for new representation. Separating them out limits how much 
 gets #include'd by other files, and also resolves a circularity problem with
 Buffer.h.

-src/Biblio.{h,cpp}
 Signature changes and massive simplifications to routines that report
 BibTeX data, since we now have an articulate representation.

-src/insets/InsetBibtex.{h,cpp}
 Re-write the parser code so we store a key->value map of the BibTeX data
 rather than just one long string. This is the main work.

-src/frontends/controllers/ControlCitation.{h,cpp}
-src/insets/InsetBibitem.{h,cpp}
-src/insets/InsetCitation.cpp
 Adaptations and simplifications.

-src/insets/Inset.h
-src/Buffer.{h,cpp}
-src/insets/InsetInclude.{h,cpp}
 Signature changes.

-src/Makefile.am
-development/scons/scons_manifest.py
 Add src/Biblio_typedefs.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-16 01:59:20 +00:00
Abdelrazak Younes
eb14ee5e22 * Buffer.cpp: load all child documents in one go where it makes sense. This has the advantage to call updateLabels() only once for the master buffer. We can think of maintaining a child document list in the future.
* Biblio.cpp: fillWithBibKeys(): ditto.

* InsetInclude.cpp: loadIfNeeded(): set the parent name in any case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19586 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-15 08:55:36 +00:00
Richard Heck
8a221dc70c Move the lyx::biblio namespace into src/. Also make changes to how the BibTeX
information is acquired. This involves (i) moving the bulk of fillWithBibKeys() 
into Biblio.cpp, (ii) introducing a virtual method Inset::fillWithBibKeys() that,
by default, does nothing, and (iii) over-riding this method in the insets that do
need to do something.

This is all preparatory for a more substantial re-working of the BibTex code,
which should follow shortly.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19565 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-14 16:50:51 +00:00
Alfredo Braunstein
6e34079211 This implements selection of current cursor position (and main selection) \
in the view source panel

* Buffer.cpp (getSourceCode, writeLaTeXSource): fix sync between output and texrow
* frontends/controllers/ControlViewSource.{h,cpp} (getRows): new method to get the current selection in term of latex rows
* frontends/qt4/QViewSource.{h,cpp}: make a selection in the ViewSource widget



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19503 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 14:24:49 +00:00
André Pönitz
8613a2f29e fix crash after assertion when using %s with integer arguments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19472 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 18:58:59 +00:00
José Matox
f130c13c7b Increase the file format, now every \\begin_deeper has a corresponding \\end_deeper.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19461 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 14:56:49 +00:00
André Pönitz
31d782b820 shuffle (la)texstream around a bit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19460 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 14:54:54 +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
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
691a1be431 Remove cruft from config.h
* src/support/tempname.cpp: move code about HAVE_MKSTEMP here (only user)

	* src/pch.h:
	* src/Buffer.cpp:
	* configure.ac: remove all traces of utime.h and HAVE_UTIME

	* config/lyxinclude.m4: remove WITH_WARNING define (which be rendered useless in 
	a future commit from christian)

	* development/scons/SConstruct: try to update.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 09:04:41 +00:00
Bo Peng
95dbcd40f9 Enable File -> Revert when the file is externally modified, rename this menu item to File -> Revert to saved, and check if the .lyx file has been externally modified when a buffer is saved. (Bugs 3766 and 4114)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19380 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-09 20:46:22 +00:00
Jean-Marc Lasgouttes
525cd4c51e * src/support/gzstream,cpp:
* src/support/gzstream.h: re-introduce the stream we were using in
	1.4.x. The boost iostream solution produces unreadable streams
	on windows and we do not know why currently.

	* src/support/Makefile.am:
	* src/Buffer.cpp:
	* src/Lexer.cpp:
	* development/scons/scons_manifest.py: adapt.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19271 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-01 15:16:44 +00:00
Abdelrazak Younes
ada0bd00f0 more std declaration fixes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-17 17:40:44 +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
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
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
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
Dov Feldstern
a529b7e6e7 lyx2lyx to convert the language of spaces surrounding text in a foriegn
language to be in the paragraph's language. This is necessary due to format
change 259, but the language was forgotten in lyx2lyx back then. It's important
for Bidi documents.

(fixes bug http://bugzilla.lyx.org/show_bug.cgi?id=3789)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18766 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-13 19:12:38 +00:00
Bo Peng
dad101c2e3 Add --Separator-- environment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18764 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-13 15:09:28 +00:00
Bo Peng
6551f0afa8 lyx2lyx support for unrecognizable listings parameter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18763 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-13 14:38:34 +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
5e6391a04a fix bug 3723:
* src/Buffer.cpp (read): clear listings params.

* src/frontends/qt4/QDocument.cpp: whitespace

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18507 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 12:32:08 +00:00
Jürgen Spitzmüller
ce3eeaea1c l10n work:
* src/Buffer.cpp: 
	- make view-source string translatable

* src/frontends/controllers/ControlToc.h:
	- make getGuiName public

* src/frontends/qt4/TocWidget.cpp:
	- use getGuiName for the combo.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18505 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 09:20:35 +00:00
Richard Heck
4318b4def2 Partial fix for bug 1474 (crashes on recursive includes) and complete fix for
bug 3659 (crash when file contains only an InsetInclude). 

Added checks for self-inclusion. The reason this is not a complete fix is that
recursive input could arise from something other than self-inclusion. Checking
for that will be much more complicated, however.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18445 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-21 15:34:29 +00:00
Abdelrazak Younes
961db56ed8 Temptatively fix bug 3546 by testing for more exceptionm types and by unifying the possible errors. I think the reason why we did not have a crash on windows is because we don't use wchar_t and the related basic_filebuf etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18366 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-16 10:39:41 +00:00
José Matox
04e3cd2297 Add file format change to support the standard font size for ext* family of textclasses
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 23:31:47 +00:00
Martin Vermeer
fd70aabcc8 Add charstyles Alert and Structure to beamer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18322 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 19:56:05 +00:00
Michael Schmitt
8684c07664 output changes by means of xcolor and soul
- when exporting with pdflatex 
  - when exporting with latex and dvipost is not available
rename two colors (strikeout => deletedtext, newtext => addedtext)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18284 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-13 15:17:57 +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
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