]> git.lyx.org Git - lyx.git/log
lyx.git
10 years agoReintroduce the code related to InsetEnvSeparator
Jean-Marc Lasgouttes [Mon, 30 Jun 2014 09:45:24 +0000 (11:45 +0200)]
Reintroduce the code related to InsetEnvSeparator

This commits (tries to) reintroduce properly the code that was reverted at the beginning of this branch. This had to be done because these patches interefered with the big refactoring of TextMetrics.cpp.

This commit reintroduces the changes to TextMetrics.cpp contained in c668ebf6c85dbfea9 and 061509bf.

10 years agoRemove obsolete code to handle Hebrew and Arabic characters
Jean-Marc Lasgouttes [Fri, 13 Jun 2014 14:33:58 +0000 (16:33 +0200)]
Remove obsolete code to handle Hebrew and Arabic characters

This is handled by Qt now.

Note that a small optimization (do not draw text that is to the left
of WorkArea) is removed because it cannot be guaranteed to be exact
anymore. It was probably not very useful anyway, and would become
useless once the RowPainter is rewritten to use Row information.

Update 00README_STR_METRICS_BRANCH.

10 years agoDo not split words at selection boundary
Jean-Marc Lasgouttes [Fri, 23 May 2014 16:59:53 +0000 (18:59 +0200)]
Do not split words at selection boundary

The display of partially-selected word is now done in a new Painter::text method
which displays the string twice with different clip settings. This allows to
catter for the case where Color_selectiontext is not black.

Morover, the code that uses unicode override characters to force the
direction of a string is moved to lstrings.h.

Fixes: #9116
10 years agoFix breaking of loooong word in RTL languages
Jean-Marc Lasgouttes [Mon, 19 May 2014 09:35:15 +0000 (11:35 +0200)]
Fix breaking of loooong word in RTL languages

Moreover, breaks row at insets when there is no suitable separator.

Also make the code of Row::shorten_if_needed somewhat simpler by using
iterators and factoring the code.

Fixes: #9120
10 years agoFix positionning of cursor
Jean-Marc Lasgouttes [Wed, 14 May 2014 15:46:43 +0000 (17:46 +0200)]
Fix positionning of cursor

The old implementation of Row::Element::pos2x and x2pos did not work
correctly with Arabic text, because characters can have shapes that
depend on context.

This new implementation leverages QTextLayout in a simplified way,
since only one word is added to the layout.

This allows to make Row::Element::x2pos more readable.

Fixes: #9115.
10 years agoRemove support for LyXRC::force_paint_single_char
Jean-Marc Lasgouttes [Wed, 14 May 2014 13:36:44 +0000 (15:36 +0200)]
Remove support for LyXRC::force_paint_single_char

This workaround is not necessary anymore, and it complicates the code.

The variable itself will be removed after the landing of the branch on
master.

10 years agoUpdate description of what has been done in the branch.
Jean-Marc Lasgouttes [Mon, 12 May 2014 09:02:22 +0000 (11:02 +0200)]
Update description of what has been done in the branch.

10 years agoRemove debug code from TextMetrics
Jean-Marc Lasgouttes [Fri, 2 May 2014 13:55:10 +0000 (15:55 +0200)]
Remove debug code from TextMetrics

After this, it is possible to remove one parameter to getPosNearX.

10 years agoSpeed-up drawing when text is not justified.
Jean-Marc Lasgouttes [Fri, 2 May 2014 13:03:20 +0000 (15:03 +0200)]
Speed-up drawing when text is not justified.

Do not cut strings at separators in RowPainter when text is not
justified. This speeds-up painting by reducing the number of strings
to draw.

Do also a modest cleanup of paintChar (remove dubious optimization).

10 years agoImplement a better solution for painting of RTL text
Jean-Marc Lasgouttes [Wed, 30 Apr 2014 14:15:31 +0000 (16:15 +0200)]
Implement a better solution for painting of RTL text

Instead of relying on character range (Hebrew or Arabic) or character
direction, use RLO unicode character (Right-to-Left override) to force
painting in the direction indicated by the current font. This should
be as close as we can to the old LyX behavior (and requires less
code).

If this code works as intended, it will be possible to remove a lot of
code from Encodings.cpp.

10 years agoDraw right-to-left text string-wise using Qt
Jean-Marc Lasgouttes [Thu, 10 Apr 2014 14:37:21 +0000 (16:37 +0200)]
Draw right-to-left text string-wise using Qt

We rely on Qt built-in unicode support for handling Arabic and Hebrew
compose characters. This allows to avoid to use our homegrown
machinery.

This  should provide a nice speedup at a low cost and
will eventually allow us to get rid of:
 * most of our Arabic/Hebrew machinery in Encodings.cpp,
 * Paragraph::transformChar,
 * and probably more.

10 years agoFix various selection-related problems
Jean-Marc Lasgouttes [Fri, 21 Mar 2014 10:56:42 +0000 (11:56 +0100)]
Fix various selection-related problems

All these problems are related to what happens at the extreme points of rows

 * since VIRTUAL elements have a width but no contents, they have to
   be treated specially at some places. It would have been better to
   avoid testing for them explicitly, but I did not find a way.

 * Improve and cleanup the code in breakRow and fix in passing a crash
   when clicking on the right of an incomplete MARGIN_MANUAL
   paragraph.

 * improve the computation of row width in TextMetrics::computeRowMetrics.

 * handle properly the case where a position if not found on the row
   in both cursorX and getPosNearX (actually, this happens when
   selecting).

 * Some code cleanup and comments.

10 years agoFix bug #9040: In RtL documents end-of-paragraph marker shifts the row display
Jean-Marc Lasgouttes [Thu, 20 Mar 2014 10:00:14 +0000 (11:00 +0100)]
Fix bug #9040: In RtL documents end-of-paragraph marker shifts the row display

The fact that the bug was still present in the features/str-metrics
branch comes from a goof in the initial implementation of 'virtual'
row elements (completion and end-of-par markers). Now that this is
corrected, everything works as it should.

The fact that the bug is present in master is due to some other reason
that is not useful to investigate now.

10 years agoUpdate README and do a small code cleanup
Jean-Marc Lasgouttes [Mon, 3 Mar 2014 14:29:37 +0000 (15:29 +0100)]
Update README and do a small code cleanup

10 years agoChange getColumnNearX to getPosNearX
Jean-Marc Lasgouttes [Fri, 20 Dec 2013 13:02:31 +0000 (14:02 +0100)]
Change getColumnNearX to getPosNearX

The semantics was bad: the old implementation would return pos - row.pos(), and then all user of the function had to re-add row.pos().

10 years agoSmall fixes to cursor positioning.
Jean-Marc Lasgouttes [Fri, 20 Dec 2013 11:12:27 +0000 (12:12 +0100)]
Small fixes to cursor positioning.

Two small fixed to Row::Element::x2pos:
* fix position for elements that are not strings
* make rounding match the old code

10 years agoMore fixes to cursorX
Jean-Marc Lasgouttes [Fri, 18 Oct 2013 15:55:30 +0000 (17:55 +0200)]
More fixes to cursorX

In Row::Element::pos2x, handle the boundaries in a cleaner way.

10 years agoSome fixes related to RTL text
Jean-Marc Lasgouttes [Wed, 19 Mar 2014 13:44:53 +0000 (14:44 +0100)]
Some fixes related to RTL text

 * fix handling of boundary situations in Row::Elements::x2pos;

 * fix handling of boundary situations in TextMetrics::getColumnNearX;

 * make sure to always use Font::isVisibleRightToLeft instead of Font::isRightToLeft;

 * Improve debug messages.

10 years agoNew reverseRTL implementation
Jean-Marc Lasgouttes [Wed, 19 Mar 2014 13:44:31 +0000 (14:44 +0100)]
New reverseRTL implementation

The old version was a bit complicated and wrong for RtL paragraphs
containing LtR text. THe new one is clearer.

10 years agoFix getColumnNearX for nested insets
Jean-Marc Lasgouttes [Fri, 11 Oct 2013 14:12:20 +0000 (16:12 +0200)]
Fix getColumnNearX for nested insets

The horizontal position of the inset was not taken in account.
The rounding is not always the same as with the old code, but this
is not really important.

Additional changes:

 * improve debug output of rows

 * remove Bidi& argument of the RowPainter constructor, since it is always
   an empty Bifi that is passed. This means that the Bidi class is not
   used at all any more in TextMetrics.cpp. The only remaining user is
   RowPainter.

10 years agoFix line breaking algorithm
Jean-Marc Lasgouttes [Tue, 23 Jul 2013 14:24:01 +0000 (16:24 +0200)]
Fix line breaking algorithm

Break words longer than the screen width. The code is more complicated
than I would like, but I have no better idea right now.

Implement properly the notion of a row broken by a display inset. This is useful in different places.

Also fix a bug with last line of a paragraph spotted by Kornel.

10 years agoHandle boundary in getColumnNearX (and more)
Jean-Marc Lasgouttes [Sun, 21 Jul 2013 18:22:32 +0000 (20:22 +0200)]
Handle boundary in getColumnNearX (and more)

Use proper font everywhere for end-of-par marker

Fix getColumnNearX for RTL text and for centered/right-justified paragraphs.

Let computeRowMetrics update the row width.

10 years agoRe-implement getColumNearX using row elements
Jean-Marc Lasgouttes [Sun, 21 Jul 2013 18:22:32 +0000 (20:22 +0200)]
Re-implement getColumNearX using row elements

The code is now so much shorter that it is scary... Expect that
further changes will be necessary

Cursor boundary is not handled yet.

10 years agoGet rid of ugly font metrics workarounds.
Jean-Marc Lasgouttes [Sun, 21 Jul 2013 10:24:08 +0000 (12:24 +0200)]
Get rid of ugly font metrics workarounds.

Now we have proper ligatures and kerning on screen...

10 years agoConvert cursorX() and computeRowMetrics() to the new scheme
Jean-Marc Lasgouttes [Wed, 17 Jul 2013 22:25:08 +0000 (00:25 +0200)]
Convert cursorX() and computeRowMetrics() to the new scheme

* convert cursorX to new scheme; old computation is still there for the sake of comparison.

* use Row to compute separator width in computeRowMetrics; again, the old code is retained for now.

* Get rid of rowWidth()

10 years agoSmall Inset isXXX methods cleanup
Jean-Marc Lasgouttes [Thu, 18 Jul 2013 08:55:52 +0000 (10:55 +0200)]
Small Inset isXXX methods cleanup

 * rename isStretchableSpace to isHfill
 * inline a trivial method
 * remove InsetIPAMacro::isLineSeparator, which has the same value as default.

10 years agoImplement proper handling of RtL in Rows
Jean-Marc Lasgouttes [Tue, 16 Jul 2013 22:59:34 +0000 (00:59 +0200)]
Implement proper handling of RtL in Rows

Now the row elements are sorted according to RtL/LtR.

Some additional cleanup.

10 years agoStore in the Row object the list of elements it contains
Jean-Marc Lasgouttes [Tue, 25 Jun 2013 12:57:09 +0000 (14:57 +0200)]
Store in the Row object the list of elements it contains

* Row now contains a vector of Elements
* replace Row::dump by a proper << operator
* the width is updated as elements are added
* breakRow is reimplmented to use this infrastructure

10 years agoImplement real string width computation
Jean-Marc Lasgouttes [Tue, 25 Jun 2013 06:18:25 +0000 (08:18 +0200)]
Implement real string width computation

Important features:
* widths are cached in a map
* old behavior is still used when lyxrc.force_paint_single_char is true.

10 years agoAdd a readme file describing the state of the branch
Jean-Marc Lasgouttes [Tue, 18 Jun 2013 08:18:32 +0000 (10:18 +0200)]
Add a readme file describing the state of the branch

10 years agoChange TextMetrics::rowHeight to setRowHeight
Jean-Marc Lasgouttes [Fri, 14 Jun 2013 17:24:29 +0000 (19:24 +0200)]
Change TextMetrics::rowHeight to setRowHeight

This new function takes a row as parameter.

Also, add direct access to Row::dim_

10 years agoCleanup TextMetrics::rowBreakPoint.
Jean-Marc Lasgouttes [Thu, 13 Jun 2013 22:01:49 +0000 (00:01 +0200)]
Cleanup TextMetrics::rowBreakPoint.

Collect properly all strings to compute string metrics

Some changes with respect to existing code
 - end of paragraph font is now the one of the text
 - words longer than a line are not broken anymore. I think this is not useful  if we have horizontal scrollbar

Other than that, the code is still compatible with rowWidth and friends.

10 years agoRevert temporarily changes related to InsetSeparator
Jean-Marc Lasgouttes [Wed, 25 Jun 2014 10:39:58 +0000 (12:39 +0200)]
Revert temporarily changes related to InsetSeparator

This is to avoid many conflicts with the str-metrics branch.

10 years agoRemove an incorrect/expired FIXME
Scott Kostyshak [Mon, 23 Jun 2014 12:03:44 +0000 (08:03 -0400)]
Remove an incorrect/expired FIXME

Both Richard and JMarc think it is incorrect. See
  https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184758.html

10 years agoCMake: full path of an include needed for ver <3.0
Scott Kostyshak [Sun, 22 Jun 2014 00:43:06 +0000 (20:43 -0400)]
CMake: full path of an include needed for ver <3.0

10 years agoCmake tests: Optimizing the cmake configuration time
Kornel Benko [Sat, 21 Jun 2014 19:15:54 +0000 (21:15 +0200)]
Cmake tests: Optimizing the cmake configuration time

The configuration time suffers mostly on checking, which of the export tests
is to be reverted.
1.) There is a new configuration flag now, "LYX_ENABLE_EXOPRT_TESTS.
   If not set (default) no export tests are created.
2.) If set, then the optimization halves the time needed for creation of tests.

The effect on my side:
        a.) Until now the time was:        ~ 26 seconds
        b.) The optimized time is now:     ~ 16 seconds
        c.) With not enabled export tests: ~  5 seconds

10 years agoctests: Use regular expressions
Kornel Benko [Thu, 19 Jun 2014 19:04:18 +0000 (21:04 +0200)]
ctests: Use regular expressions

10 years agoUpdate ctests to reflect inputenc changes
Scott Kostyshak [Thu, 19 Jun 2014 14:26:15 +0000 (10:26 -0400)]
Update ctests to reflect inputenc changes

There were changes to inputenc and luainputenc that are now
released in Tex Live 2014 that affect several exports. Some
exports that produced good PDFs now fail. Others that produced
incorrect PDFs (with gibberish) now correctly fail. Several
IEEEtran-* exports failed before and now export correct PDFs.

For more information, see

  http://tug.org/pipermail/tex-live/2014-May/035338.html
  https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184435.html

10 years agoFix a comment
Scott Kostyshak [Thu, 19 Jun 2014 05:34:17 +0000 (01:34 -0400)]
Fix a comment

10 years agoGive more tips in beamer-article.lyx
Scott Kostyshak [Thu, 19 Jun 2014 05:44:15 +0000 (01:44 -0400)]
Give more tips in beamer-article.lyx

10 years ago* sk.po: spellcheck changes
Kornel Benko [Wed, 18 Jun 2014 13:51:27 +0000 (15:51 +0200)]
* sk.po: spellcheck changes

10 years agoFix license string according to http://spdx.org/licenses/.
Pavel Sanda [Tue, 17 Jun 2014 16:50:28 +0000 (09:50 -0700)]
Fix license string according to http://spdx.org/licenses/.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184749.html

10 years agoOn Linux show in crash message box the backtrace
Peter Kümmel [Sat, 7 Jun 2014 09:12:31 +0000 (11:12 +0200)]
On Linux show in crash message box the backtrace

10 years agoSelect word on double click even when at boundary
Scott Kostyshak [Fri, 13 Jun 2014 13:43:26 +0000 (09:43 -0400)]
Select word on double click even when at boundary

Now when double clicking on a boundary of a word, the
word is selected. This also causes single-letter words
to now be selected (fixes #9159).

10 years agoFix checkmark on current entry for InsetSeparator context menu
Jean-Marc Lasgouttes [Fri, 13 Jun 2014 08:30:25 +0000 (10:30 +0200)]
Fix checkmark on current entry for InsetSeparator context menu

The code supposed to do that contained a typo and was not completely correct.

10 years agoFrench documentation files: port today's changes
Uwe Stöhr [Thu, 12 Jun 2014 23:27:19 +0000 (01:27 +0200)]
French documentation files: port today's changes

10 years agoAdd comment and fix a typo
Scott Kostyshak [Thu, 12 Jun 2014 21:34:04 +0000 (17:34 -0400)]
Add comment and fix a typo

10 years agoCmake build: Symplify use of linking optional libraries found via find_package
Kornel Benko [Thu, 12 Jun 2014 17:02:29 +0000 (19:02 +0200)]
Cmake build: Symplify use of linking optional libraries found via find_package

10 years agoApple has builtin native spell checker, no need to warn for missing Aspell, hunspell...
Stephan Witt [Thu, 12 Jun 2014 12:55:56 +0000 (14:55 +0200)]
Apple has builtin native spell checker, no need to warn for missing Aspell, hunspell or Enchant

10 years agoCmake tests: Added parser_tools test to the lyx2lyx group tests
Kornel Benko [Thu, 12 Jun 2014 07:07:57 +0000 (09:07 +0200)]
Cmake tests: Added parser_tools test to the lyx2lyx group tests

10 years agoCmake build: Use LYX_USE_QT to determine if QT uses X11
Kornel Benko [Thu, 12 Jun 2014 05:52:45 +0000 (07:52 +0200)]
Cmake build: Use LYX_USE_QT to determine if QT uses X11

10 years agoCmake build: Added magic library to some link commands.
Kornel Benko [Thu, 12 Jun 2014 05:49:17 +0000 (07:49 +0200)]
Cmake build: Added magic library to some link commands.

Needed due to the use of magic_(open|load|error|file|close) after recent changes.

10 years agoMake binary file detection more robust.
Enrico Forestieri [Wed, 11 Jun 2014 21:04:39 +0000 (23:04 +0200)]
Make binary file detection more robust.

The magic library can detect the charset used by a file. While this
detection is not full proof, actually the library seems to be infallible
as regards the binary nature of a file. So, use libmagic for the detection
and fallback to the previous method if the library is not installed or
its database cannot be loaded.

10 years agoSet the default locale at startup.
Enrico Forestieri [Wed, 11 Jun 2014 16:23:44 +0000 (18:23 +0200)]
Set the default locale at startup.

On startup, the default locale is "C", meaning that all system
functions assume an ascii codeset. The environment's locale
settings should be selected by calling setlocale(LC_ALL,"").
This is done by Qt during the QCoreApplication initialization
but this inizialization is never performed for batch processing
and, as a result, LyX is not able to process files whose names
contain non-ascii characters. This is not an issue on Windows,
where the file names are always stored as UTF-16, so the call is
only performed for unix-like platforms (this also includes cygwin,
due to its own filenames management that allows using characters
which are forbidden to native programs).

10 years agoFix thinko in loop detection
Georg Baum [Mon, 9 Jun 2014 20:06:58 +0000 (22:06 +0200)]
Fix thinko in loop detection

10 years agoFix wrong "externally modified" message
Georg Baum [Mon, 9 Jun 2014 11:17:40 +0000 (13:17 +0200)]
Fix wrong "externally modified" message

This was a regression of 10364082c835.

10 years agoRemove unsafe method FileName::tempName()
Georg Baum [Mon, 9 Jun 2014 11:05:50 +0000 (13:05 +0200)]
Remove unsafe method FileName::tempName()

FileName::tempName() created a new temp file name by using qt to create a
temporary file with a unique name, and then deleting that file and returning
the name. This was unsafe, since other processes or even other threads of the
running LyX could create files with the same name between deletion and then
using the temp name.
This is fixed by using the TempFile class instead. As a side effect, a few
cases where the temp files were not deleted after usage were fixed as well.
The only place that is still unsafe is createTmpDir().

10 years agoDon't double delete by making TempFile noncopyable
Georg Baum [Mon, 9 Jun 2014 10:59:47 +0000 (12:59 +0200)]
Don't double delete by making TempFile noncopyable

The compiler generated copy constructor and assignment operator are wrong.
This could easily be fixed by implementing them manually, but a) they are
not needed, and b) the semantics would be unclear (should the copy point
to a new temp file or not?), so it is better to forbid them.

10 years agoImprove file saving strategy
Georg Baum [Mon, 9 Jun 2014 09:08:24 +0000 (11:08 +0200)]
Improve file saving strategy

- The TempFile class guarantees to generate a file name, we are not limited to
  100 tries of a predictable scheme anymore, which could break if LyX
  frequently crashes.
- The temp file name generation has no race condition against another LyX
  instance in the same directory anymore.
- Symlinks survive saving again (regression of 10364082c835).

10 years agoFix typo
Georg Baum [Sat, 7 Jun 2014 19:22:26 +0000 (21:22 +0200)]
Fix typo

10 years agoCmake build: Use LYX_COMBO() to select the qt-version to use.
Kornel Benko [Mon, 9 Jun 2014 08:08:32 +0000 (10:08 +0200)]
Cmake build: Use LYX_COMBO() to select the qt-version to use.

Collaboration with Scott Kostyshak

10 years agoCmake build: Early check for wrong combo values
Kornel Benko [Mon, 9 Jun 2014 08:03:56 +0000 (10:03 +0200)]
Cmake build: Early check for wrong combo values

10 years agoCombine OutlineIn and OutlineOut blocks
Scott Kostyshak [Sat, 7 Jun 2014 04:41:20 +0000 (00:41 -0400)]
Combine OutlineIn and OutlineOut blocks

They differ only by adding/subtracting 1.

10 years agoCmake build: Add combo-values to the list of displayed lyx options
Kornel Benko [Sat, 7 Jun 2014 19:00:46 +0000 (21:00 +0200)]
Cmake build: Add combo-values to the list of displayed lyx options

10 years agoExplain why the binary detection works
Georg Baum [Sat, 7 Jun 2014 15:48:23 +0000 (17:48 +0200)]
Explain why the binary detection works

Extracted from Enricos comment at bug 9146.

10 years agoDocument class file name rule
Georg Baum [Sat, 7 Jun 2014 09:32:15 +0000 (11:32 +0200)]
Document class file name rule

This rule was followed in practice, but not documented so far.

10 years agoCmake build: Select full path to library
Kornel Benko [Sat, 7 Jun 2014 08:49:49 +0000 (10:49 +0200)]
Cmake build: Select full path to library

Testing for QT_USES_X11 links ok now also if the the qt-libraries
are on some non-conform place. (Like self compiled but not installed).

10 years agoFix bug #7954 (now really)
Georg Baum [Sat, 7 Jun 2014 08:50:11 +0000 (10:50 +0200)]
Fix bug #7954 (now really)

Thanks to maciejr we know now what the remaining problem was with bug 7954:
My unicode symbol fallback works fine, the problem was that a font named
"Symbol" is available on OS X, but it does not use the font-specific encoding
we expect: Almost all glyphs are at their unicode code point.
Therefore the bug is fixed by re-enabling the unicode workaround and blocking
the Symbol font on OS X.

10 years agoCmake build: Added convenience macro LYX_COMBO
Kornel Benko [Sat, 7 Jun 2014 08:45:13 +0000 (10:45 +0200)]
Cmake build: Added convenience macro LYX_COMBO

Will be used later to allow selection between multiple alternatives.

10 years agostd::min/max are defined in <algorithm>
Peter Kümmel [Sat, 7 Jun 2014 06:17:20 +0000 (08:17 +0200)]
std::min/max are defined in <algorithm>

handle error in msvc12 when linking against msvc10 libs

10 years agobuild with mingw on Windows and Linux
Peter Kümmel [Sat, 7 Jun 2014 05:59:52 +0000 (07:59 +0200)]
build with mingw on Windows and Linux

10 years agoExpand module names instead of buttons in settings
Scott Kostyshak [Tue, 27 May 2014 21:37:58 +0000 (17:37 -0400)]
Expand module names instead of buttons in settings

Maximizing the document settings window when on the modules pane,
the horizontal space is now given to the module names and so no
scrollbar is needed. Before, even when maximized, a scrollbar was
sometimes needed because the horizontal space was given to the
buttons in the middle, which did not provide an extra benefit.

The default sizeType was "Expanding" and is now changed to "Minimum"
for the horizontal spacer above the middle buttons.

10 years agoFix bug #9153 (Using mathpanel to insert matrix creates extra space on top)
Enrico Forestieri [Fri, 6 Jun 2014 14:14:24 +0000 (16:14 +0200)]
Fix bug #9153 (Using mathpanel to insert matrix creates extra space on top)

The code was setting the current index before filling the
combo box items.

10 years agoRefine fix for bug #9151.
Enrico Forestieri [Fri, 6 Jun 2014 13:35:24 +0000 (15:35 +0200)]
Refine fix for bug #9151.

Now the cursor in LyX jumps to the right spot instead of simply the
beginning of the paragraph. This is most useful for branch insets,
for example, which may contain long paragraphs.

10 years agoFix bug #9151 (Wrong reverse search for images and tables).
Enrico Forestieri [Thu, 5 Jun 2014 21:46:18 +0000 (23:46 +0200)]
Fix bug #9151 (Wrong reverse search for images and tables).

If the reverse position corresponds to an inset, its paragraph id
does not follow the main text numbering. Typically, an inset has
only a few paragraph, so that we would jump near the beginning of
the document. In this way we at least jump at the beginning of the
inset.

10 years agoFix bug #9146.
Enrico Forestieri [Thu, 5 Jun 2014 15:33:25 +0000 (17:33 +0200)]
Fix bug #9146.

If LyX does not know about a given file format, it may easily
happen that the format is recognized as "latex" and this causes
bug #9146. This patch limits the check for a latex format to
non-binary files. The strategy for deciding that a file has
binary content is the same as that adopted by the "less" program.

10 years agosk.po: erroneous formats in strings
Kornel Benko [Thu, 5 Jun 2014 11:30:00 +0000 (13:30 +0200)]
sk.po: erroneous formats in strings

10 years agoFix crash when accepting change
Jean-Marc Lasgouttes [Thu, 5 Jun 2014 10:18:09 +0000 (12:18 +0200)]
Fix crash when accepting change

The problem is the use of cursor movement methods to update cursor.
Cursor::forwardPos() steps into insets, which is not always what we
want. The problem here is that there is a math inset just after the
accepted change, and that the cursor steps into it for some reason.

This code is a nightmare anyway.

Fixes: bug #9145
10 years agoFix a regression reported at #9146
Scott Kostyshak [Wed, 4 Jun 2014 17:52:42 +0000 (13:52 -0400)]
Fix a regression reported at #9146

This regression was introduced by me at 8b66f9ce. I did not take
into account that a call to a python script containing $$s is embedded
within a separate python script. Thus, when commandPrep() is called it
only sees the call to the outer python script, and does not see the
$$s contained in that python script. It therefore did not substitute
for it. This fix simply calls commandPrep() directly before writing
the embedded command.

10 years agoDetect binary EPS files correctly (bug #9146)
Georg Baum [Wed, 4 Jun 2014 19:52:45 +0000 (21:52 +0200)]
Detect binary EPS files correctly (bug #9146)

The Adobe EPS file format specification (TN-5002, currently available at
http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf) specifies
a binary version of EPS files with integrated preview, sometimes also called
DOS EPS binary files. LyX 2.0 did recognize these files unreliably by
extension, but since f4eae12d they are misdetected as latex (bug #9146).
This change adds proper detection for these files using the officially
documented binary header.

10 years agoUse a different naming scheme, per Enrico's suggestion.
Richard Heck [Wed, 4 Jun 2014 16:46:42 +0000 (12:46 -0400)]
Use a different naming scheme, per Enrico's suggestion.

10 years agoFlush stream more often to help figure out where the mystery crash
Richard Heck [Tue, 3 Jun 2014 17:35:18 +0000 (13:35 -0400)]
Flush stream more often to help figure out where the mystery crash
originates.

10 years ago* sk.po
Kornel Benko [Wed, 4 Jun 2014 10:33:36 +0000 (12:33 +0200)]
* sk.po

10 years agoPer a suggestion of JMarc's, first write the saved file to a
Richard Heck [Tue, 3 Jun 2014 14:42:07 +0000 (10:42 -0400)]
Per a suggestion of JMarc's, first write the saved file to a
temporary name, then move it to its real location if we succeed.
This prevents our over-writing the existing file with a corrupt
one.

10 years agosk.po: Some shortcuts + new strings
Kornel Benko [Sun, 1 Jun 2014 10:00:34 +0000 (12:00 +0200)]
sk.po: Some shortcuts + new strings

10 years agoRemove superfluous conversion
Juergen Spitzmueller [Sat, 31 May 2014 08:46:49 +0000 (10:46 +0200)]
Remove superfluous conversion

10 years agoWhitespace
Juergen Spitzmueller [Sat, 31 May 2014 08:33:46 +0000 (10:33 +0200)]
Whitespace

10 years agoFix compilation on Solaris after last boost upgrade.
Enrico Forestieri [Thu, 29 May 2014 20:31:16 +0000 (22:31 +0200)]
Fix compilation on Solaris after last boost upgrade.

10 years agoCleanup seminar.layout after the upgrade to format 50.
Enrico Forestieri [Thu, 29 May 2014 20:07:37 +0000 (22:07 +0200)]
Cleanup seminar.layout after the upgrade to format 50.

10 years agoAdd missing bits of layout file format update
Georg Baum [Thu, 29 May 2014 19:25:08 +0000 (21:25 +0200)]
Add missing bits of layout file format update

This is needed so that the new format number is actually used. Since the
conversion is a noop I did not update the layout files (more updates will
come).

10 years agoUpdate layouts with separators to format 50
Georg Baum [Thu, 29 May 2014 19:22:15 +0000 (21:22 +0200)]
Update layouts with separators to format 50

10 years agoInclude lyx2lyx test in tarball
Georg Baum [Thu, 29 May 2014 13:13:59 +0000 (15:13 +0200)]
Include lyx2lyx test in tarball

10 years agoMake layout test compile
Georg Baum [Thu, 29 May 2014 13:07:07 +0000 (15:07 +0200)]
Make layout test compile

10 years agoExecute lyx2lyx unit test when running tests
Georg Baum [Thu, 29 May 2014 12:57:05 +0000 (14:57 +0200)]
Execute lyx2lyx unit test when running tests

Actually lyx2lyx has a tiny unit test. Add it to the autotools test machinery
and fix it: Since nobody knew about it the test was of course broken.

10 years agoFix the fix
Georg Baum [Thu, 29 May 2014 12:44:38 +0000 (14:44 +0200)]
Fix the fix

MAC-style (pre-OS X) line ends were not recognized anymore

10 years agoAdd layout tag that determines if/when a paragraph can be indented.
Juergen Spitzmueller [Thu, 29 May 2014 12:10:32 +0000 (14:10 +0200)]
Add layout tag that determines if/when a paragraph can be indented.

Fixes: #7327, #7458, #8670
10 years agoAdd some SVG versions of self-made icons found here on my box
Juergen Spitzmueller [Thu, 29 May 2014 11:32:09 +0000 (13:32 +0200)]
Add some SVG versions of self-made icons found here on my box

10 years agoDo not corrupt documents without newline at EOF
Georg Baum [Thu, 29 May 2014 11:15:07 +0000 (13:15 +0200)]
Do not corrupt documents without newline at EOF

trim_eol() assumes that a line always ends either with \n, \r, or \r\n.
This assumption is always valid except for the last line of a document, since it
may miss the trailing newline. LyX does not create such documents, bu they may
result from automatic creation tools, and LyX can read them, so lyx2lyx should
be able to read them as well.

10 years agoAvoid processing multiple times the same paragraph when converting latex arguments.
Enrico Forestieri [Thu, 29 May 2014 09:05:34 +0000 (11:05 +0200)]
Avoid processing multiple times the same paragraph when converting latex arguments.

10 years agoFix an off-by-one error in the reversion of beamer documents.
Enrico Forestieri [Thu, 29 May 2014 08:55:30 +0000 (10:55 +0200)]
Fix an off-by-one error in the reversion of beamer documents.