Commit Graph

142 Commits

Author SHA1 Message Date
Richard Heck
856b01b6da Comments on the caching mechanism.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35113 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-10 14:26:34 +00:00
Richard Heck
2203d7aa0a Fix some bugs in the bibinfo caching mechanism. Comments to follow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35112 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-10 14:12:48 +00:00
Richard Heck
2a6109e972 Minor cleanup. We don't need the deleted call, as that is done at the
beginning of updateBuffer() anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35104 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-09 17:14:45 +00:00
Richard Heck
e992140685 More work toward speeding up the bibfile caching stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35103 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-09 17:01:51 +00:00
Richard Heck
06445c964e Next step in fixing problems noted by Vincent: Remove magic boolean from
updateMacros().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35000 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 21:58:54 +00:00
Richard Heck
2f78698fbd First step towards fixing some issues noted by Vincent. We record in the
Buffer whether we are exporting or not, rather than rely upon isClone(),
which could be adapted to other purposes. And, of course, someone might
choose locally to disable cloning....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34999 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 21:51:33 +00:00
Richard Heck
b8d43b05bc Support for exporting math as images with XHTML. The next step is to
allow this as a fallback. E.g., if we're unable to export as MathML,
then we try to export as an image.

There are several ways, I am sure, in which this implementation is not
ideal.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34993 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 13:19:52 +00:00
Pavel Sanda
88635c7e77 Buffer::getAutosaveFilename -> Buffer::getAutosaveFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34243 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:33 +00:00
Pavel Sanda
594849bb4e Next header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33981 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:06:16 +00:00
Richard Heck
42a2a0f289 Cheap fix for #6554. When we save a Buffer to a new location, we check
the included insets and make sure that the files they reference are
still where they are supposed to be.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33686 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-09 03:25:47 +00:00
Richard Heck
d65020b293 s/updateLabels/updateBuffer/g, per a suggestion of Abdel's.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33613 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-03 22:13:45 +00:00
Abdelrazak Younes
377cdd5f6c Transfer LyXfunc code to GuiApplication::dispatch() and getStatus(). Now
a lot of simplification is possible. Except some instability period...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 16:11:13 +00:00
Jürgen Spitzmüller
a61eeb1fb2 Allow to switch buffer languages via the menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33366 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:15:00 +00:00
Jürgen Spitzmüller
7bbd67eb26 * Implement updateLabels in mathed and add the MathRef insets to the references cache.
This fixes bug #1560.

The diverse setBuffer / updateLabels calls need auditing. See FIXMEs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33249 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 17:37:22 +00:00
Abdelrazak Younes
9eabfb51ac Buffer: Pimpl private methods and fix a few constness issue.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33227 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 18:39:08 +00:00
Abdelrazak Younes
a4e56ba613 Buffer: Pimpl gui_ and remove unused code. support/SignalSlot* should
probably go also as we agreed that if we need signal/slot in src/ we'll
directly use Qt's.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33224 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 14:32:39 +00:00
Abdelrazak Younes
d9f22c0233 Get rid of mostly unused methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33223 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 14:13:04 +00:00
Abdelrazak Younes
11474f6b89 Get rid of Buffer::setReadOnly() pseudo signal.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33222 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 13:31:07 +00:00
Richard Heck
caa4e94bf0 Get rid of some magic booleans in updateLabels() and related routines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33110 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-20 19:42:12 +00:00
Richard Heck
ce87e6767c Check the bibliography cache only when we really need to do so. This (a)
prevents weirdness that might happen if the .bib file were to change
during updateLabels(), (b) prevents even further weirdness that might
happen if it changed during the output routines, and (c) ought to avoid
slowness caused by the repeated calls to QFileInfo::refresh() needed to
check the cache status.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32972 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 16:29:26 +00:00
Jürgen Spitzmüller
7a7ab8f14b Add an option to assure that all aux files are maintained when using the includeonly feature, so that the
page numbering and the references of the master file are maintained in the included children (bug 1005).

I made this optional since some people use \includeonly to save compilation time, but a proper aux file update
needs a full compilation of the complete master prior to the compilation of the \includeonly master.

Hence, a new buffer param is introduced (file format change). 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32936 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 13:25:41 +00:00
Abdelrazak Younes
cda980db51 Fix multipart document background compilation. I am not fully satisfied with this solution (see FIXME in Buffer::clone()). There might be some memory leaks...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32910 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 14:47:47 +00:00
Richard Heck
012be55afd Move the collection of citations and sorting routines into BiblioInfo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32887 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 16:40:41 +00:00
Vincent van Ravesteijn
d95aaa0e5b Move reloadBuffer from GuiView to Buffer.
This fixes bug #6314: reloading master document makes emergencies of modified children.

Now also the version control handling could be moved to Buffer as well, and the hack in ensureBufferClean is removed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32875 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 02:15:56 +00:00
Vincent van Ravesteijn
570f96bc6e Add a boolean to GuiWorkArea::redraw to indicate whether the metrics must be updated. The current test "lyx_view_ != guiApp->currentView() || lyx_view_->currentWorkArea() != this" is not enough, especially not if the buffer is changed and buffer->changed() is called. Moreover, there are a lot of combinations of updateMetrics() followed by buffer->changed(), these can now be replaced by one call to buffer->changed(bool).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32874 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 02:03:54 +00:00
Tommaso Cucinotta
5da4ccb931 Implemented the "Current Buffer" & "Current (Master) Document" scopes in the Advanced Find and Replace feature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32678 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 18:40:18 +00:00
Abdelrazak Younes
bea0925f8c Converter: add a safe guard to Alerts because those cannot be called from another thread. The whole Alert system must be rethought I am afraid.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32585 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-18 22:59:59 +00:00
Abdelrazak Younes
4ed0169064 Detach Buffer preview and update preview in a new thread. Only for Qt4.4 users. This new feature can be disabled by setting EXPORT_in_THREAD to 0 in GuiView.cpp.
Two things are missing (but are fixable):
- the lack of feedback of the background latex compilation
- the error list is not shown in case of compilation error.

* Buffer:
- create a "cloned buffer" type.
- Transfer LFUN_MASTER_BUFFER_UPDATE, LFUN_MASTER_BUFFER_VIEW, LFUN_BUFFER_UPDATE and LFUN_BUFFER_VIEW to GuiView. This is good itself as these LFUN are GUI oriented.

* GuiView: detach the above LFUNs to a new thread as was already done for autosave. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32584 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-18 22:51:06 +00:00
Abdelrazak Younes
622e3b1e4d For Qt4.4 and up: Detach Buffer autosave into a new thread.
* Buffer: new clone() method. When this new autosave method is used the old autoSave() is not of course.

* GuiView: clone the current document buffer and save it in a new thread.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32512 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-13 21:00:46 +00:00
Richard Heck
69666056ca Cosmetic repairs to my updateLabels() changes, thanks to Andre's
comments. Added comments per Pavel's suggestion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32453 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 13:25:31 +00:00
Richard Heck
025138f30c Minor XHTML fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32378 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-06 22:53:47 +00:00
Richard Heck
996505c2ae This patch introduces an optional argument to Buffer::updateLabels(), so
as to allow us to call the routine when we are preparing for output and
so to do certain things we might not want to do every time. 

This is an abuse of updateLabels(), in a way, but updateLabels() long
ago became the general recurse-through-the-Buffer routine, and to
implement the sort of thing I want to do here in validate(), say, much
of the code in updateLabels()---in particular, the counter-update
code---would have to be duplicated. So I believe this is the best, and
easiest, way to go.

Actual use of the new argument will follow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32318 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-04 03:03:38 +00:00
Pavel Sanda
7cdf1a0be6 Puzzling doxygen output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32175 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-24 11:12:23 +00:00
Richard Heck
70f035b189 This can be a private method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32000 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-15 01:42:49 +00:00
Enrico Forestieri
f83a6cc3af Don't use updateMacros() in the math parser, in order to avoid
performance problems when loading documents with lots of macros.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31907 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 18:47:33 +00:00
Vincent van Ravesteijn
d156d11738 Fix part of bug #6251: When closing a buffer, only close the direct children. All grandchildren will be closed recursively by the children _and_ before it will be close by the grandparent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31797 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-29 23:28:08 +00:00
Vincent van Ravesteijn
bdf69de113 Don't set the read-only flags of the documents. The GuiCompare is modal anyway, so the user shouldn't be able to change something.
This reverts part of r31736.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31737 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-25 13:56:44 +00:00
Vincent van Ravesteijn
7227566e86 Call the Compare thread from the GuiCompare dialog.
Furthermore:
- increase safety, 
- improve error handling,
- minor cleanups,
- set documents to read-only while running the thread.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31736 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-25 13:41:46 +00:00
Tommaso Cucinotta
f3b3f62d5b Added isInternal() method, mapped temporarily on check about ".internal" filename extension (minimum impact on current code).
Replaced various replica of such check with the invocation of the new method.
TocBackend now does not call addToToc() for internal buffers.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31340 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-08 01:29:07 +00:00
Richard Heck
c5487a3682 Move emergencyWrite() from BufferList to Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31056 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 16:34:54 +00:00
Abdelrazak Younes
4916bd41d3 Get rid of Buffer::insertStringAsLines().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30948 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:37:30 +00:00
Jürgen Spitzmüller
e6f922009f * Add possibility to append active branch names to the output file name (#3105).
File format change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30546 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 14:30:08 +00:00
Jürgen Spitzmüller
808dfaabea * Buffer.{cpp,h}:
- rewrite LFUN_BRANCHES_RENAME with an InsetIterator approach.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30464 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-11 08:18:26 +00:00
Jürgen Spitzmüller
5fdd2daa9c * Add ability to rename branches (bug 4128).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30442 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-10 06:49:51 +00:00
Jürgen Spitzmüller
17986e7509 Ease the pain with unknown branches:
* on paste, ask if unknown branches shall be added to the branch list
	  (entails new LFUN_BRANCH_ADD)
	* add a list of undefined branches to the buffer and the GUI

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30419 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-09 09:48:34 +00:00
Abdelrazak Younes
694399b16c Simplify Buffer::spellCheck() by using Paragraph::spellCheck().
Paragrah::isMisspelled() is split in two.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30222 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-22 16:38:11 +00:00
Jürgen Spitzmüller
5a54d11157 * Pop up error dialog if issuing master-buffer-[view|update] and errors occured.
Navigating in such dialogs does not work yet, but at least the user is informed
  at all that LaTeX wasn't succesful.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30209 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-21 12:26:41 +00:00
Jürgen Spitzmüller
9388e76dc0 * Buffer.cpp:
- make LaTeX logfile dialog work for child documents and master-buffer-[view|update]:
	  if there's only a master file log or if the master file log is newer, it is displayed.
* Buffer.h: typo.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30206 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-21 09:44:10 +00:00
Richard Heck
92a69bb790 Basic output routines for HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29950 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-05 17:44:35 +00:00
Vincent van Ravesteijn
aa4c7e7ef5 Fix bug #5879 (try 2): Move the autosave file of a buffer when the filename changes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29507 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 10:21:21 +00:00