Commit Graph

27 Commits

Author SHA1 Message Date
Pavel Sanda
a5cb2afc1b Next headers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33976 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:38:05 +00:00
Vincent van Ravesteijn
e3c9fa3d0d Compare:\n- Fix the doubly added first snake. \n- Fix the behaviour when comparing two the same files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33184 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-24 00:55:08 +00:00
Vincent van Ravesteijn
562f1da9c9 Fix the Compare feature. The compl_vector class shouldn't be accessed twice in one statement as it might happen that the vectors are reallocated, such that the references are not correct anymore.
(P.S. Compare this to the fact that you're not supposed to refer to x and ++x in one statement.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33137 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 18:58:55 +00:00
Vincent van Ravesteijn
ec96bbe429 Try to fix an assert coming from "gcc vector-index checks".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33052 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-16 00:22:15 +00:00
Jean-Marc Lasgouttes
acefad32e4 Kill warning and avoid double arithmetic. Vincent, I hope I did not break something...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33048 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-15 16:32:05 +00:00
Vincent van Ravesteijn
aa2fac50eb Compare: Actually abort the process when cancel is pressed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33020 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-14 00:56:55 +00:00
Vincent van Ravesteijn
d378b5d8ee Compare: Add a statusbar to the dialog and show a message every second. The message now shows at which recursion level the algorithm is and which D-path it is currently processing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33018 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-14 00:41:47 +00:00
Vincent van Ravesteijn
ce6aa0d8d3 CaMeLbUmP all function names, private or not.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32957 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 21:55:11 +00:00
Vincent van Ravesteijn
715b1303da Optimize DocRange::length(). Thanks Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32938 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 13:55:42 +00:00
Vincent van Ravesteijn
fd0dfe1b79 Readd comment and squeeze warning.
Is gcc quiet too now ?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32937 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 13:54:06 +00:00
Vincent van Ravesteijn
93510f741c Use the operator[] to get and set the values of the compl_vector.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32935 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 13:17:10 +00:00
Vincent van Ravesteijn
43c8de8138 Cosmetics mainly: Rename math.h to cmath, reorder some includes, remove some includes and remove some superfluous "lyx::".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32934 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 12:37:50 +00:00
Tommaso Cucinotta
50a69279ee Let trunk compile.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32932 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 10:27:00 +00:00
Vincent van Ravesteijn
c3d5ba4e91 Remove some debug info that renders trunk uncompilable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32931 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 00:17:40 +00:00
Vincent van Ravesteijn
9cfebdb969 Compare feature part 3: Implement the find_middle_snake algorithm.
The feature should now be up and running, although it might have some performance issues. Please test with small changes :S as it scales quadratic with the size of a single change. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32930 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 00:09:48 +00:00
Vincent van Ravesteijn
1fe4ff8ef3 Add a vector class that can be referenced with both positive and negative indices. It is internally represented as two vectors, one for non-zero indices and one for negative indices. In this way, the vector can grow in both directions. If an index is not available in the vector, the default value is returned. If an object is put in the vector beyond its size, the empty spots in between are also filled with the default value.
I hope I'm not reinventing the wheel too much here. This might change anyway if this appears to be a performance bottleneck. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32929 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 00:06:02 +00:00
Vincent van Ravesteijn
6bb8b55156 Compare: cosmetics and comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32928 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 23:59:33 +00:00
Vincent van Ravesteijn
c49dea81a9 Compare: simplify the step functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32927 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 23:56:46 +00:00
Vincent van Ravesteijn
28b0075b11 No more magic booleans. The word of Andre is spreading.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32926 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 22:58:20 +00:00
Vincent van Ravesteijn
68edfdafc3 Unify traverse_snake_back and traverse_snake_forw and make it more general for future purposes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32922 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 21:17:10 +00:00
Vincent van Ravesteijn
5477b5a570 Small optimization in Compare::Impl::equal().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32916 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 16:58:55 +00:00
Vincent van Ravesteijn
f223e4ff63 Minor changes in Changes.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32914 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 16:51:51 +00:00
Richard Heck
fed94f72d5 Make gcc happy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32681 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-30 22:17:39 +00:00
Vincent van Ravesteijn
28dab69a0e Compare feature take two.
With this patch, we can recursively walk through the document. The document is split around a middle snake and each part is processed further. The snakes are added to the output document as well as the added and deleted parts.

Now, the only thing left is to commit the implementation of the find_middle_snake function.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32591 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-19 18:15:20 +00:00
Abdelrazak Younes
1ff6b1122b Fix gcc warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31830 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-02 15:20:36 +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
Vincent van Ravesteijn
18483e6362 Adds the threaded Compare class, which will eventually do the comparison between two documents.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31734 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-25 10:43:16 +00:00