]> git.lyx.org Git - lyx.git/log
lyx.git
9 years agoDisable branches insert menu if read only
Scott Kostyshak [Wed, 19 Feb 2014 21:58:31 +0000 (16:58 -0500)]
Disable branches insert menu if read only

9 years agoDisable custom insets insert menu if read only
Scott Kostyshak [Wed, 19 Feb 2014 21:58:29 +0000 (16:58 -0500)]
Disable custom insets insert menu if read only

Before, if a document was read only and had no custom insets
defined, the submenu would be enabled.

9 years agoSubmenus now expand even if all items are disabled
Scott Kostyshak [Fri, 21 Feb 2014 15:26:36 +0000 (10:26 -0500)]
Submenus now expand even if all items are disabled

As stated in the Apple HIG[1] (via JMarc):

  Ensure that a submenu’s title is undimmed even when all its commands
  are unavailable. As with menu titles, it’s important for users to be
  able to view a submenu’s contents, even if none of them are
  available in the current context.

[1]
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6

9 years agoClear empty selections in GuiView after dispatch
Scott Kostyshak [Wed, 25 Jun 2014 20:50:31 +0000 (16:50 -0400)]
Clear empty selections in GuiView after dispatch

Empty selections can cause confusing behavior for a few reasons:

(1) some functions behave differently depending on whether there is a
selection. If I press delete, nothing happens (where I expect the
character or inset before the cusor to be deleted). If I toggle bold or
emphasize nothing happens (where if there is no selection the entire
word is toggled). There are other LyX functions that depend on whether
there is a selection or not. Further, I wonder if any part of LyX's code
assumes that if there is a selection it is non-empty.

(2) menu options are incorrectly set. For example, the scissors icon.

For remaining empty selection issues, see #9222.

For more information, see:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184758.html

9 years agoFix compilation warnings on windows.
Jean-Marc Lasgouttes [Mon, 28 Jul 2014 07:46:13 +0000 (09:46 +0200)]
Fix compilation warnings on windows.

9 years agoFix beamer block conversion when arguments are in multiple ERTS.
Juergen Spitzmueller [Sun, 27 Jul 2014 09:30:25 +0000 (11:30 +0200)]
Fix beamer block conversion when arguments are in multiple ERTS.

Fixes second part of #9208.

9 years agoAdd beamer-resenumerate (from our wiki) to the list of safe modules for argment conve...
Juergen Spitzmueller [Sun, 27 Jul 2014 08:23:17 +0000 (10:23 +0200)]
Add beamer-resenumerate (from our wiki) to the list of safe modules for argment conversion, since it is safe.

Fixes part of #9208.

9 years agoWhitespace
Jean-Marc Lasgouttes [Sat, 26 Jul 2014 14:29:23 +0000 (16:29 +0200)]
Whitespace

9 years agoWhitespace only
Jean-Marc Lasgouttes [Fri, 25 Jul 2014 20:35:08 +0000 (22:35 +0200)]
Whitespace only

9 years agoMake it compilable under cmake again after the merge from str-metrics
Kornel Benko [Fri, 25 Jul 2014 20:03:59 +0000 (22:03 +0200)]
Make it compilable under cmake again after the merge from str-metrics

9 years agoRename rowpainter.* to RowPainter.*
Jean-Marc Lasgouttes [Fri, 25 Jul 2014 19:55:08 +0000 (21:55 +0200)]
Rename rowpainter.* to RowPainter.*

This is the convention for files that define classes.

9 years agoMerge remote-tracking branch 'features/str-metrics'
Jean-Marc [Fri, 25 Jul 2014 18:10:55 +0000 (20:10 +0200)]
Merge remote-tracking branch 'features/str-metrics'

This branch implements string-wise metrics computation. The goal is to
have both good metrics computation (and font with proper kerning and
ligatures) and better performance than what we have with
force_paint_single_char. Moreover there has been some code
factorization in TextMetrics, where the same row-breaking algorithm
was basically implemented 3 times.

Globally, the new code is a bit shorter than the existing one, and it
is much cleaner.  There is still a lot of potential for code removal,
especially in the RowPainter, which should be rewritten to use the new
Row information.

The bugs fixed and caused by this branch are tracked at ticket #9003:
http://www.lyx.org/trac/ticket/9003

What is done:

* Make TextMetrics methods operate on Row objects: breakRow and
  setRowHeight instead of rowBreakPoint and rowHeight.

* Change breakRow operation to operate at strings level to compute
  metrics The list of elements is stored in the row object in visual
  ordering, not logical. This will eventually allow to get rid of the
  Bidi class.

* rename getColumnNearX to getPosNearX (and change code accordingly).
  It does not make sense to return a position relative to the start of
  row, since nobody needs this.

* Re-implement cursorX and getPosNearX using row elements.

* Get rid of lyxrc.force_paint_single_char. This was a workaround that
  is not necessary anymore.

* Implement proper string metrics computation (with cache). Remove
  useless workarounds which disable kerning and ligatures.

* Draw also RtL text string-wise. This speeds-up drawing.

* Do not cut strings at selection boundary in RowPainter. This avoids
  ligature/kerning breaking in latin text, and bad rendering problems
  in Arabic.

* Remove homebrew Arabic and Hebrew support from Encoding.cpp. We now
  rely on Qt to do handle complex scripts.

* Get rid of LyXRC::rtl_support, which does not have a real use case.

* Fix display of [] and {} delimiters in Arabic scripts.

9 years agoFix bad use of undo kind in Tabular inset.
Jean-Marc [Sat, 19 Jul 2014 22:50:24 +0000 (00:50 +0200)]
Fix bad use of undo kind in Tabular inset.

9 years agoremove branch documentation
Jean-Marc [Fri, 25 Jul 2014 18:01:04 +0000 (20:01 +0200)]
remove branch documentation

9 years agoFix logic error for spacing of RTL rows
Jean-Marc [Thu, 24 Jul 2014 22:10:10 +0000 (00:10 +0200)]
Fix logic error for spacing of RTL rows

The code referred to vpos (the visible position) instead of pos, the logical one.
This can lead to using the wrong font when computing spaces width.

9 years agoFix display of parenthesis in arabic
Jean-Marc [Mon, 21 Jul 2014 21:57:10 +0000 (23:57 +0200)]
Fix display of parenthesis in arabic

Actually the workaround that is used to show parenthesis in the right direction
is not needed any more, since this is part of the unicode bidi writing algorithm.

This fixes at the same time the use of [] or  as delimiters in arabic, which was wrong on screen.

Note that there is a problem with hebrew, but this will require a fileformat change.

9 years agoBetter algorithm for forcing bidi drawing
Jean-Marc [Sun, 20 Jul 2014 22:19:50 +0000 (00:19 +0200)]
Better algorithm for forcing bidi drawing

The use of RLO/LRO overrides to force text orientation was really hackish and the way it was done caused dropped letters in Mac OS X (for some unknown reasons).

This new approach is much cleaner, except that it relies on features not advertised in documentation
but present at least from Qt 4.5 to Qt 5.3:
* TextFlag enum values TextForceLeftToRight and TextForceRightToLeft, which are strong versions
  of QPainter::setLayoutDirection; they are passed as a parameter of QPainter::drawText.

* QTextLayout::setFlags method, which is required to pass the above flags to QTextLayout.

The unicode override method is still used to draw strings Mac OS X because, for some reason, the direction was not really enforced in this case.

9 years agoavoid qt4 variable names in cmake build
Kornel Benko [Mon, 21 Jul 2014 06:49:05 +0000 (08:49 +0200)]
avoid qt4 variable names in cmake build

9 years agoRevert optimization where several words are drawn at the same time
Jean-Marc Lasgouttes [Sun, 20 Jul 2014 16:54:31 +0000 (18:54 +0200)]
Revert optimization where several words are drawn at the same time

This can only be done where splitting of string is identical in row breaking and display. It will be possible to reintroduce this when row painting uses the tokenized row information.

9 years agoavoid qt4 variable names
Stephan Witt [Sun, 20 Jul 2014 16:16:36 +0000 (18:16 +0200)]
avoid qt4 variable names

9 years agoUpdate autotools for building with Qt5.
Enrico Forestieri [Sat, 19 Jul 2014 01:34:28 +0000 (03:34 +0200)]
Update autotools for building with Qt5.

The option --enable-qt5 allows configuring for Qt5. The default is Qt4.
Nothing special is done with respect to Qt4, apart from pulling in the
correct libraries. Indeed, other than the core and gui libraries, now
also the concurrent and widgets libraries are needed.

9 years agoFix build on FreeBSD.
Enrico Forestieri [Wed, 16 Jul 2014 20:25:49 +0000 (22:25 +0200)]
Fix build on FreeBSD.

Notified by Raphael Kubo da Costa.

9 years agodo not strip binary for packaging by default; improved name of disk image
Stephan Witt [Wed, 16 Jul 2014 20:25:25 +0000 (22:25 +0200)]
do not strip binary for packaging by default; improved name of disk image

9 years agoAdd forward search command for qpdfview.
Enrico Forestieri [Sun, 13 Jul 2014 18:08:43 +0000 (20:08 +0200)]
Add forward search command for qpdfview.

Also update docs explaining how to activate reverse search in qpdfview.

9 years agoAdd some postscript and pdf viewers for Unix and Windows.
Enrico Forestieri [Sun, 13 Jul 2014 17:59:31 +0000 (19:59 +0200)]
Add some postscript and pdf viewers for Unix and Windows.

For Windows: AcroRd32 and gsview (both 32 and 64 bit versions).
For Unix: qpdfview.

Qpdfview is a nice alternative to Okular for KDE users and a superior
alternative to Evince for Gnome users, due to its complete synctex
support. It only depends on Qt libraries for the graphical interface.

9 years agoUse getent instead of grepping /etc/passwd.
Enrico Forestieri [Sun, 13 Jul 2014 12:39:05 +0000 (14:39 +0200)]
Use getent instead of grepping /etc/passwd.

Forthcoming versions of cygwin will use a different mechanism for
obtaining passwd/group information based on /etc/nsswitch.conf.
Thus, it will not be guaranteed that the files /etc/passwd and
/etc/group even exist. The recommended way for obtaining those
info is by using the getent command, which already works in
current versions.

9 years agoRevert 6a5aa1ca
Enrico Forestieri [Sat, 12 Jul 2014 17:52:12 +0000 (19:52 +0200)]
Revert 6a5aa1ca

That commit is obsoleted by 5bd14af8.

9 years agoFix bug #9193: Spacing modification not exact
Enrico Forestieri [Sat, 12 Jul 2014 17:12:08 +0000 (19:12 +0200)]
Fix bug #9193: Spacing modification not exact

The conversion from floating point to string performed by
boost:lexical_cast does not allow specifying a precision and,
for example, values such as 0.9 are resturned as 0.899999976.
The standard C++ way for performing the conversion is using
std::ostringstream which is exempt from this problem, even if
less efficient. For the sake of accuracy, boost::lexical_cast
is ditched in favor of the ostrinsgstream implementation.
In C++11 another option would be using std::to_string, but I
think it is not as efficient as the boost way and not worth
implementing through #ifdef's.
Incidentally, this patch would have also fixed #9190 and all
similar cases involving the use of convert<string>(float|double).

9 years agoFix compatibility issue with 64-bit cygwin.
Enrico Forestieri [Fri, 11 Jul 2014 14:49:10 +0000 (16:49 +0200)]
Fix compatibility issue with 64-bit cygwin.

9 years agoFix scale parameter for fonts.
Enrico Forestieri [Fri, 11 Jul 2014 14:12:08 +0000 (16:12 +0200)]
Fix scale parameter for fonts.

When a font is scaled by a certain percentage in the document settings,
LyX was outputting a ridiculous parameter value. For example, if the
font is scaled 90%, the corresponding parameter was "scaled=0.899999976".
The patch avoids this and, in the previous case, one gets "scaled=0.9".
This is not only cosmetic, because in roundtrip conversions the parameter
would be continuosly changing.

This commit and b60b505f should be backported to the 2.1.x branch, where
reimporting with tex2lyx an exported document produces wrong results
(also in version 2.1.0).

9 years agoFix import of latex documents with scaled fonts.
Enrico Forestieri [Fri, 11 Jul 2014 09:21:45 +0000 (11:21 +0200)]
Fix import of latex documents with scaled fonts.

9 years agoFix make check.
Enrico Forestieri [Fri, 11 Jul 2014 09:14:02 +0000 (11:14 +0200)]
Fix make check.

9 years agoSupport new languages in tex2lyx
Georg Baum [Thu, 10 Jul 2014 20:15:34 +0000 (22:15 +0200)]
Support new languages in tex2lyx

I forgot that this was part of the file format update as well.
Also fix a mixup of "english" and "uppersorbian".

9 years agoMissing file format bis from 0c3b88e3
Georg Baum [Thu, 10 Jul 2014 19:59:17 +0000 (21:59 +0200)]
Missing file format bis from 0c3b88e3

9 years agoGet rid of rtl_support preference
Jean-Marc Lasgouttes [Wed, 9 Jul 2014 18:12:06 +0000 (20:12 +0200)]
Get rid of rtl_support preference

This variable was introduced to guard against any bad consequence of the then-new right-to-left
languages support. Let's be bold and get rid of it altogether!

Now right to left support is always enabled.

9 years agoRemove LyXRC option force_paint_single_char
Jean-Marc Lasgouttes [Tue, 8 Jul 2014 21:12:09 +0000 (23:12 +0200)]
Remove LyXRC option force_paint_single_char

It was not honored anymore.

9 years agoMove some text from the readme file to relevant source files
Jean-Marc Lasgouttes [Mon, 30 Jun 2014 13:55:30 +0000 (15:55 +0200)]
Move some text from the readme file to relevant source files

9 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.

9 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.

9 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
9 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
9 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.
9 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.

9 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.

9 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.

9 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).

9 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.

9 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.

9 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.

9 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.

9 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

9 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().

9 years agoRemove unneeded swap() (thanks Jean-Marc)
Georg Baum [Mon, 7 Jul 2014 19:16:10 +0000 (21:16 +0200)]
Remove unneeded swap() (thanks Jean-Marc)

std::swap() does exactly the same thing, and avoiding code duplication is
always good.

9 years agoFix a bunch of small performance issues spotted by cppcheck
Jean-Marc [Sat, 5 Jul 2014 17:13:10 +0000 (19:13 +0200)]
Fix a bunch of small performance issues spotted by cppcheck

Most of these are about passing const strings parameters as references.

9 years agoFix possible bug spotted by cppcheck
Jean-Marc [Sat, 5 Jul 2014 17:12:09 +0000 (19:12 +0200)]
Fix possible bug spotted by cppcheck

I am not sure what this locking is really about, but the new code seems to be the right thing to do.

9 years agoFix typo spotted by cppcheck
Jean-Marc [Sat, 5 Jul 2014 16:01:19 +0000 (18:01 +0200)]
Fix typo spotted by cppcheck

9 years agoMark some singletons with FIXME THREAD
Georg Baum [Sat, 5 Jul 2014 13:20:54 +0000 (15:20 +0200)]
Mark some singletons with FIXME THREAD

9 years agoMake GraphicsConverter threadsafe
Georg Baum [Sat, 5 Jul 2014 13:11:24 +0000 (15:11 +0200)]
Make GraphicsConverter threadsafe

build_script() was already threadsafe, since it used a TempFile, and the
counter was basically not needed, but the new solution makes this obvious
and has the additional advantage that TempFile constructs the real output
file, not a dummy without extension which is not needed.

9 years agoFix uncodable author warning
Georg Baum [Sat, 5 Jul 2014 12:49:51 +0000 (14:49 +0200)]
Fix uncodable author warning

The old code was not threadsafe, and the restriction to one message box per
author name did not work if more than two authors were uncodable.

9 years agoFix LaTeXFeatures::useLayout() recursion test
Georg Baum [Sat, 5 Jul 2014 12:37:55 +0000 (14:37 +0200)]
Fix LaTeXFeatures::useLayout() recursion test

It was broken in two ways: It was not threadsafe, and it did never detect
any recursion, since the counter was decremented for each non-recursive call
and never incremented again.

9 years agoMake LaTeX export threadsafe.
Georg Baum [Sat, 5 Jul 2014 12:23:43 +0000 (14:23 +0200)]
Make LaTeX export threadsafe.

This is one of the more important threadsafety issues because of export in
thread and simultanous view source. The solution is ugly, but a better one
(see FIXME) would require major rework. These static variables should not
have been used in the first place IMHO.

9 years agoSupport for Swiss German (old spelling)
Juergen Spitzmueller [Sat, 5 Jul 2014 11:38:55 +0000 (13:38 +0200)]
Support for Swiss German (old spelling)

9 years agoMake newUnnamedFile() threadsafe
Georg Baum [Sat, 5 Jul 2014 10:58:22 +0000 (12:58 +0200)]
Make newUnnamedFile() threadsafe

9 years agoMake BufferList::fileNames() threadsafe
Georg Baum [Sat, 5 Jul 2014 10:51:40 +0000 (12:51 +0200)]
Make BufferList::fileNames() threadsafe

Using a static variable here was premature optimization: fileNames() is only
called from GuiRef (directly or indirectly), and since this is a dialog the
copying of a FileNameList is not noticeable at all.

9 years agoMake BufferParams::auto_packages() threadsafe
Georg Baum [Sat, 5 Jul 2014 10:39:59 +0000 (12:39 +0200)]
Make BufferParams::auto_packages() threadsafe

9 years agoMake createBufferTmpDir() threadsafe
Georg Baum [Sat, 5 Jul 2014 10:31:12 +0000 (12:31 +0200)]
Make createBufferTmpDir() threadsafe

This must not use thread local storage, since the generated directories are
all in the same parent directory which is unique per running LyX instance.

9 years agoMake DocFileName::mangledFileName() threadsafe
Georg Baum [Sat, 5 Jul 2014 10:22:08 +0000 (12:22 +0200)]
Make DocFileName::mangledFileName() threadsafe

9 years agoMake include and bibitem insets threadsafe
Georg Baum [Sat, 5 Jul 2014 10:09:49 +0000 (12:09 +0200)]
Make include and bibitem insets threadsafe

Using a mutex to ensure that the generated filenames and ids are still unique.

9 years agoMake Formats::isZippedFile() threadsafe
Georg Baum [Sat, 5 Jul 2014 09:55:35 +0000 (11:55 +0200)]
Make Formats::isZippedFile() threadsafe

In this case I use a mutex, so the zip status of files is shared between
threads. This is possible because a deadlock can't happen, and it should give
better performance.

9 years agoFix Tabular::CellData::operator=()
Georg Baum [Sat, 5 Jul 2014 09:44:13 +0000 (11:44 +0200)]
Fix Tabular::CellData::operator=()

Don't create an intermediate copy (found by Jean-Marc).
I doubt that this has anything to do with the mystery crash, but it works, and
following the standard patterns is better anyway.

9 years agoMake preview filename generation threadsafe
Georg Baum [Sat, 5 Jul 2014 09:19:34 +0000 (11:19 +0200)]
Make preview filename generation threadsafe

Threadsafety is ensured by the atomic file name generation in TempFile.

9 years agoMake theWordList() thread safe.
Georg Baum [Fri, 4 Jul 2014 20:19:43 +0000 (22:19 +0200)]
Make theWordList() thread safe.

Without this, you get crashes in a few second when you set the autosave
interval to one second and edit quickly (typing new words etc). The reason
is that the cloned buffer wants to insert words into the word list and
remove them again, but it lives in a different thread.

9 years agoMake WordList noncopyable
Georg Baum [Fri, 4 Jul 2014 19:15:21 +0000 (21:15 +0200)]
Make WordList noncopyable

To avoid unwanted double deletion of d.

9 years agoDon't guess whether autosave succeeded
Georg Baum [Fri, 4 Jul 2014 19:06:49 +0000 (21:06 +0200)]
Don't guess whether autosave succeeded

writeFile() tells whether it could save the file, so use the return value
instead of guessing.

9 years agoFix bug #9162: Missing \use_indices
Georg Baum [Fri, 4 Jul 2014 17:55:44 +0000 (19:55 +0200)]
Fix bug #9162: Missing \use_indices

The lyx2lyx conversion for format 352 was incomplete: It should have been
added the \use_indices setting, but it relied on the fact that the default in
LyX for missing \use_indices is the same as the old format without that
setting used. However, the default might change in the future, and later
lyx2lyx conversions rely on that setting as well.

10 years ago* sk.po: New pdfcomment strings
Kornel Benko [Thu, 3 Jul 2014 15:30:02 +0000 (17:30 +0200)]
* sk.po: New pdfcomment strings

10 years agoCorrected tooltip search string.
Kornel Benko [Thu, 3 Jul 2014 11:52:52 +0000 (13:52 +0200)]
Corrected tooltip search string.

This worked wrong in case where the text contained the string 'tooltip' too.

10 years agoDocument pdfcomment in LaTeXConfig.lyx
Juergen Spitzmueller [Thu, 3 Jul 2014 09:32:53 +0000 (11:32 +0200)]
Document pdfcomment in LaTeXConfig.lyx

10 years agoAdd support for the pdfcomment package.
Juergen Spitzmueller [Thu, 3 Jul 2014 09:30:56 +0000 (11:30 +0200)]
Add support for the pdfcomment package.

Fixes: #6975.
10 years ago* sk.po: New poster strings
Kornel Benko [Wed, 2 Jul 2014 17:59:09 +0000 (19:59 +0200)]
* sk.po: New poster strings

10 years agoSome comments
Juergen Spitzmueller [Wed, 2 Jul 2014 12:44:38 +0000 (14:44 +0200)]
Some comments

10 years agoSupport for conference posters
Juergen Spitzmueller [Wed, 2 Jul 2014 12:01:28 +0000 (14:01 +0200)]
Support for conference posters

The following poster classes are now supported:

* a0poster
* beamerposter
* sciposter

10 years agoAdd support for the sectionbox and tcolorbox packages.
Juergen Spitzmueller [Wed, 2 Jul 2014 11:48:01 +0000 (13:48 +0200)]
Add support for the sectionbox and tcolorbox packages.

They will be used by the conference poster classes that will be supported in a minute.

10 years agoBabel now supports Swiss German
Juergen Spitzmueller [Wed, 2 Jul 2014 11:19:07 +0000 (13:19 +0200)]
Babel now supports Swiss German

10 years agoPolyglossia now supports Austrian German
Juergen Spitzmueller [Wed, 2 Jul 2014 11:14:11 +0000 (13:14 +0200)]
Polyglossia now supports Austrian German

10 years agoctests: un-invert some tests after updates
Scott Kostyshak [Wed, 2 Jul 2014 01:14:29 +0000 (21:14 -0400)]
ctests: un-invert some tests after updates

David Carlisle fixed some EuropeCV issues and other updates
on TeX Live 2014 fixed a few more exports.

10 years agoMake IconvProcessor::Impl noncopyable
Georg Baum [Tue, 1 Jul 2014 20:23:06 +0000 (22:23 +0200)]
Make IconvProcessor::Impl noncopyable

The compiler-generated copy-constructor and assigment operators would be wrong
for IconvProcessor::Impl, since cd would be copied, and iconv_close() could
thus be called twice on the same descriptor. The old code did work, but now
IconvProcessor::Impl cannot be copied by accident in the future.

10 years agoFix memory leak and assignment operator signature
Georg Baum [Tue, 1 Jul 2014 20:13:54 +0000 (22:13 +0200)]
Fix memory leak and assignment operator signature

The IconvProcessor assignment operator did not delete pimpl_ and used a
non-standard signature. If you want to know why the standard signature is
important, read "Effective C++" by Scott Meyers.

10 years agoThe flush should be done on either branch.
Richard Heck [Sun, 29 Jun 2014 19:40:17 +0000 (15:40 -0400)]
The flush should be done on either branch.

10 years agoUpdate it.po
Enrico Forestieri [Sat, 28 Jun 2014 17:19:35 +0000 (19:19 +0200)]
Update it.po

10 years agoRestore compilation of AEA template for TeX Live
Scott Kostyshak [Sat, 28 Jun 2014 02:38:48 +0000 (22:38 -0400)]
Restore compilation of AEA template for TeX Live

After the previous change this document failed to compile under
TeX Live 2013 and 2014. By using a different bib file, it
compiles. For more information, see
  https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg183786.html

10 years agoAEA.lyx: update format
Scott Kostyshak [Sat, 28 Jun 2014 02:34:46 +0000 (22:34 -0400)]
AEA.lyx: update format

10 years agoWork around MSVC warning
Georg Baum [Thu, 26 Jun 2014 19:05:40 +0000 (21:05 +0200)]
Work around MSVC warning

The statement
if (pos < from + lyxrc.completion_minlength)
triggers a signed vs. unsigned warning. I don't know why this happens, it
could be a MSVC bug, or related to LLP64 (windows) vs. LP64 (unix)
programming model, or the C++ standard might be ambigous in the section
defining the "usual arithmetic conversions". However, using a temporary
variable is safe and works on all compilers.

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.