Commit Graph

662 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
ff20f7ebe9 Allow to use XeTeX and LuaTeX with tex fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36537 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-27 13:43:13 +00:00
Pavel Sanda
f5ad7f949e Kill leading blankspaces in new strings, its weird to encounter them in .po.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36531 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-27 03:04:53 +00:00
Richard Heck
4540c4a18e Final batch of BufferParam renaming.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36525 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:42:53 +00:00
Richard Heck
fc3b06eac8 Rename a bunch of BufferParams to conform to our usual style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36524 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:32:29 +00:00
Richard Heck
7f8b868f4a Fix bug #2607.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36520 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 17:21:17 +00:00
Jürgen Spitzmüller
2dc2e4770b Implement GUI for LuaTeX. File format change due to the renaming of the \use_xetex buffer param.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36500 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 09:42:03 +00:00
Vincent van Ravesteijn
7073502308 Do not overwrite read-only files. We now move the file to the backup directory and write a new file. However, when the file is read-only it now appears as the file is overwritten anyway. Therefore we check wether the file is read-only before moving it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36499 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 04:17:20 +00:00
Vincent van Ravesteijn
3508aaf2db Fix bug #7035: Read-only status and compressed status not set correctly when an autosave or emergency file is loaded, or when the file is been converted by lyx2lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36497 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 02:01:04 +00:00
Vincent van Ravesteijn
3f6e6aff90 Fix also the other occurence of the strange language that was corrected in r36489. Also fix the english.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36491 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-25 14:55:21 +00:00
Pavel Sanda
4d0e8cb5f0 This message looked strange.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36489 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-25 14:37:10 +00:00
Jürgen Spitzmüller
2868ff7a52 add basic LuaTeX backend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36448 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 16:07:42 +00:00
Jürgen Spitzmüller
d165b5ea51 * Buffer.cpp: correctly set the flavor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36444 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 11:53:27 +00:00
Jürgen Spitzmüller
7cbeed2e40 * Introduce polyglossia support (bug 6576).
Please test this.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36433 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 12:10:16 +00:00
Georg Baum
d89bde0652 Load mhchem if it is requested unconditionally, fix some typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36425 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 18:07:04 +00:00
Georg Baum
dea050cb93 fix bug 3008: Add subscript/superscript inset for text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36424 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 17:00:12 +00:00
Vincent van Ravesteijn
b3d7a10410 Call Buffer::saveCheckSum() from Buffer::setFileName(). This fixes the bug that if the user wants to overwrite an already existing file, LyX asks whether he want to overwrite the existing file _and_ whether he wants to overwrite an externally modified file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36376 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-18 17:56:00 +00:00
Vincent van Ravesteijn
1f38406536 Buffer::setFileName() can now be private. The only way to change the filename of a buffer is to save it as a different file using Buffer::saveAs().
Change its parameter type to support::FileName for convenience.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36375 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-18 17:50:33 +00:00
Vincent van Ravesteijn
7bf7fabb13 Correct bug number and typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36329 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 03:22:37 +00:00
Vincent van Ravesteijn
208acbc728 Generalize Buffer::autoSave() for both the threaded as the forked process call. Also move out the resetAutosaveTimers as this is the task of the frontend as the core shouldn't know about any timer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 02:18:12 +00:00
Vincent van Ravesteijn
8e7d7e4295 Move the buffer related part from GuiView::renameBuffer to Buffer::saveAs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36202 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-07 21:26:02 +00:00
Uwe Stöhr
86b99f8f32 GuiTabular: support for multirow offset; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36182 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-07 05:32:28 +00:00
Jean-Marc Lasgouttes
b9b619641b This patch implements proper ERT behaviour for normal layouts.
In particular, it makes paragraph breaks generate single \n in latex output
when ParbreakIsNewline is true

This means that it is not necessary anymore to use newlines to break lines. 
Plain paragraph breaks can be used instead, like is done now in ERT/Listings. 
This is mainly aimed at sweave support.

lyx2lyx support courtesy of Richard Heck



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36163 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-06 15:06:19 +00:00
Vincent van Ravesteijn
38e43ce4ca Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 21:23:26 +00:00
Vincent van Ravesteijn
afa873dc5f Remove the FileName parameter of Buffer::loadLyXFile and friends. Now, getAutosaveFileNameFor and getEmergencyFileNamefor can be removed too. Last, the call to lyxvc.file_found_hook can now be centralized and can be given the correct parameter (d->filename instead of the name of the emergency/autosave file).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36145 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 21:21:01 +00:00
Vincent van Ravesteijn
f226c9d3fc Fix bug #6058: Change tracking and versioning.
Computes a hash value for the authors when using change tracking.

Text.cpp, BufferParams.h, Author.h:
  Change unsigned int to int because the hash values can be negative.

lyx2lyx:
  Allow to convert negative author_ids.

See also: r30756.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36134 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 18:25:29 +00:00
Stephan Witt
2f10f8edd0 first step to cure the VCS load problem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35985 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-01 22:20:54 +00:00
Stephan Witt
4b57639ad0 after successfuly load of autosave or emergency file the VCS state has to be checked for the original name
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35937 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-30 20:05:55 +00:00
Vincent van Ravesteijn
3bb31a04dd Remove saveCheckSum from Buffer::reload again. Now, the saveCheckSum call is already in Buffer::readFile, so it is not needed here anymore.
Also move the saveCheckSum declaration to the section of functions involving reading/writing. And note that it should be made private.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35925 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 23:51:13 +00:00
Vincent van Ravesteijn
eff06951a9 Centralize preview generation/deletion code to Buffer::updatePreviews and Buffer::removePreviews.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35922 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 20:00:51 +00:00
Vincent van Ravesteijn
c9a91c5474 Relay the ReadStatus all the way up to the GUI also for Buffer::reload().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35908 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 16:26:32 +00:00
Richard Heck
e313d3a12b Move saveCheckSum() call to Buffer::readFile(). Also, remove the
argument from that function. We are always saving the checksum for the
Buffer's file. The argument is a left-over from a time when we did the
wrong thing and saved it for e.g. the emergency file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35890 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-28 22:12:29 +00:00
Kornel Benko
48a8d24328 Make it compilable, missing parentheses
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35859 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 19:38:45 +00:00
Vincent van Ravesteijn
afc87eb625 Let's add one step of security more here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35858 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 17:00:43 +00:00
Vincent van Ravesteijn
07924ac300 Remove some unnecessary static_casts and add two FIXMEs about casts that don't look safe.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35856 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 16:45:21 +00:00
Vincent van Ravesteijn
573500dd04 Remove unneccessary uses of dynamic_cast from the code.
A dynamic_cast is necessary when:

- the object to be casted is from an external library because we can't add Qxxx::asXxxx() to Qt e.g.:
    * QAbstractListModel to GuiIdListModel,
    * QValidator to PathValidator,
    * QWidget to TabWorkArea,
    * QWidget to GuiWorkArea;

- the object is to be casted from an interface to the implementing class, because the Interface does not know by whom it is implemented:
    * ProgressInterface to GuiProgress,
    * Application to GuiApplication.

A dynamic_cast can be replaced by:
  - already existing as***Inset() functions, e.g.:
    * asHullInset(),
    * asInsetMath()->asMacro(),
    * asInsetText();

  - a static_cast when we are sure this can't go wrong, e.g.:
    * we are sure that CellData::inset->clone() is an InsetTableCell,
    * in cases where we explicitly check it->lyxCode().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35855 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 15:03:51 +00:00
Vincent van Ravesteijn
8d10d82392 Buffer: Rename function names:
- rename readFromVC to extractFromVC because this function actually doesn't read anything as compared to readEmergency, readAutosave and so on.

- rename readEmergency and readAutosave to loadEmergency and loadAutosave just like loadLyXFile and loadThisLyXFile. Only in loadThisLyXFile we switch to the actually reading of a file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35854 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 13:27:06 +00:00
Vincent van Ravesteijn
f311377671 Buffer: Make Buffer::readFile() private.
It's strange to have a public interface which has a function loadLyXFile and a function readFile. A user of this class will be confused about the difference.

Therefore, loadThisLyXFile will be next to loadLyXFile to stress that loadThisLyXFile will not load another file ;). I don't know whether all of you like that this function just calls readFile, but it feels good this way. All public paths for loading a file will now go through loadThisLyXFile (i.e. the paths that come from loadLyXFile), while readFile is a pure private function. If this doesn't make sense, just shout.

I think this improves the readability of the class.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35852 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 13:17:10 +00:00
Richard Heck
3e53707570 Little bit of cleanup, motivated by need to squash a warning.
The only substantive change here is moving the markDirty() call into the
first case. If we don't load the file successfully, then there is no
need to mark dirty.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35834 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 15:33:51 +00:00
Vincent van Ravesteijn
80a09f4ea6 Merge readFile and readFile; and readFile and readString.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35832 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 14:14:44 +00:00
Vincent van Ravesteijn
5a30a98346 Buffer.cpp:
Extract convertLyXFormat function that runs LyX2LyX.

(and some compile fixes)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35831 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 13:55:39 +00:00
Vincent van Ravesteijn
5f9b12ec39 Buffer.cpp:
We need to save the checksum of the requested file. Not of the autosave file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35830 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 13:32:38 +00:00
Vincent van Ravesteijn
aab708c594 Buffer.cpp:
- Move the saveCheckSum to both autosave file as emergency file read function.
- Extract the function parseLyxFormat.
- Improve comment about the older LyX format numbers.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35829 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 13:29:50 +00:00
Vincent van Ravesteijn
80a5dd8144 Buffer.cpp:
- Move some lines of code to more proper places.
- Let Buffer::readFile(FileName const &) return ReadStatus as well.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35827 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 13:04:13 +00:00
Vincent van Ravesteijn
375db69d99 Centralize the generation of the emergency and autosave filenames.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35825 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 12:31:22 +00:00
Richard Heck
5cd48620f1 Return early again if there's nothing to do. Also, mark the buffer dirty
only if we manage to read the autosave file successfully.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35824 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 12:24:15 +00:00
Vincent van Ravesteijn
1d55e97b2d Oops.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35823 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 12:19:39 +00:00
Vincent van Ravesteijn
1102636923 FFix warnings in Buffer::readString.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35822 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 12:18:09 +00:00
Richard Heck
1edd77ca30 Lessen indentation by returning early if there's nothing to do.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35821 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 12:14:10 +00:00
Vincent van Ravesteijn
df1c5ef611 Refactor Buffer.cpp: loadLyXFile():
- make a new function readFromVC(),
if the file does not exist, try to extract it from the version control (RCS),

- make a new function readEmergency(),
try to read the emergency file that is associated to the file we are trying to read,

- make a new function readAutosave(),
try to read the autosave file that is associated to the file we are trying to read,

- merge loadLyXFile() and readFileHelper(),
this new function now determines which file to read.

- add more ReadStatus elements to describe failures.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35819 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 11:57:56 +00:00
Vincent van Ravesteijn
75773f3c22 Use Buffer::ReadStatus as a return value for Buffer::loadLyXFile.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35818 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 10:18:42 +00:00