Commit Graph

32598 Commits

Author SHA1 Message Date
Scott Kostyshak
0ce8bee57f 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.
2014-07-01 21:18:14 -04:00
Georg Baum
c9c20dc23b 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.
2014-07-01 22:23:06 +02:00
Georg Baum
0e8fea0705 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.
2014-07-01 22:17:07 +02:00
Richard Heck
c2de96d2ed The flush should be done on either branch. 2014-06-29 15:40:52 -04:00
Enrico Forestieri
09dddb0959 Update it.po 2014-06-28 19:19:35 +02:00
Scott Kostyshak
bb250e4d95 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
2014-06-27 22:42:13 -04:00
Scott Kostyshak
e76707d9d5 AEA.lyx: update format 2014-06-27 22:42:13 -04:00
Georg Baum
2896fe1bd0 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.
2014-06-26 21:05:40 +02:00
Jean-Marc Lasgouttes
9ba97a85f0 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
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
79014c7551 More fixes to cursorX
In Row::Element::pos2x, handle the boundaries in a cleaner way.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
8649ac7fe6 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.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
443a453427 New reverseRTL implementation
The old version was a bit complicated and wrong for RtL paragraphs
containing LtR text. THe new one is clearer.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
059de2d04c 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.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
6258cebb77 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.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
ff608f46fd 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.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
f215bb3b92 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.
2014-06-25 17:55:30 +02:00
Jean-Marc Lasgouttes
01c9bcb432 Get rid of ugly font metrics workarounds.
Now we have proper ligatures and kerning on screen...
2014-06-25 17:55:16 +02:00
Jean-Marc Lasgouttes
35d47698c6 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()
2014-06-25 17:54:27 +02:00
Jean-Marc Lasgouttes
d32f76f7fe Small Inset isXXX methods cleanup
* rename isStretchableSpace to isHfill
 * inline a trivial method
 * remove InsetIPAMacro::isLineSeparator, which has the same value as default.
2014-06-25 17:54:26 +02:00
Jean-Marc Lasgouttes
b2eba66083 Implement proper handling of RtL in Rows
Now the row elements are sorted according to RtL/LtR.

Some additional cleanup.
2014-06-25 17:54:26 +02:00
Jean-Marc Lasgouttes
452fb60359 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
2014-06-25 17:54:26 +02:00
Jean-Marc Lasgouttes
8539f756ed 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.
2014-06-25 17:54:15 +02:00
Jean-Marc Lasgouttes
b044696d59 Add a readme file describing the state of the branch 2014-06-25 17:53:35 +02:00
Jean-Marc Lasgouttes
cf31077932 Change TextMetrics::rowHeight to setRowHeight
This new function takes a row as parameter.

Also, add direct access to Row::dim_
2014-06-25 17:53:34 +02:00
Jean-Marc Lasgouttes
fe8c3b4348 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.
2014-06-25 17:53:34 +02:00
Jean-Marc Lasgouttes
edcedf3324 Revert temporarily changes related to InsetSeparator
This is to avoid many conflicts with the str-metrics branch.
2014-06-25 17:53:09 +02:00
Scott Kostyshak
c62a53b78b 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
2014-06-23 08:03:44 -04:00
Scott Kostyshak
78b7045ed8 CMake: full path of an include needed for ver <3.0 2014-06-21 20:43:06 -04:00
Kornel Benko
7bc0a6f388 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
2014-06-21 21:15:54 +02:00
Kornel Benko
c9a6939ebb ctests: Use regular expressions 2014-06-19 21:04:18 +02:00
Scott Kostyshak
e11ae599ea 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
2014-06-19 10:26:15 -04:00
Scott Kostyshak
7ae0700c7e Fix a comment 2014-06-19 10:26:01 -04:00
Scott Kostyshak
8c5be96164 Give more tips in beamer-article.lyx 2014-06-19 01:44:15 -04:00
Kornel Benko
d553ec88bb * sk.po: spellcheck changes 2014-06-18 15:51:27 +02:00
Pavel Sanda
0eb94a3e61 Fix license string according to http://spdx.org/licenses/.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184749.html
2014-06-17 09:50:28 -07:00
Peter Kümmel
2f17858115 On Linux show in crash message box the backtrace 2014-06-14 11:25:25 +02:00
Scott Kostyshak
bcbc162665 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).
2014-06-13 10:48:49 -04:00
Jean-Marc Lasgouttes
01ba22efff Fix checkmark on current entry for InsetSeparator context menu
The code supposed to do that contained a typo and was not completely correct.
2014-06-13 10:30:25 +02:00
Uwe Stöhr
8cb15c218b French documentation files: port today's changes 2014-06-13 01:27:19 +02:00
Scott Kostyshak
5594b43d2c Add comment and fix a typo 2014-06-12 17:56:57 -04:00
Kornel Benko
3b14de740d Cmake build: Symplify use of linking optional libraries found via find_package 2014-06-12 19:02:29 +02:00
Stephan Witt
e67e37d759 Apple has builtin native spell checker, no need to warn for missing Aspell, hunspell or Enchant 2014-06-12 14:55:56 +02:00
Kornel Benko
1b3e4c73f8 Cmake tests: Added parser_tools test to the lyx2lyx group tests 2014-06-12 09:07:57 +02:00
Kornel Benko
207cd7a1b7 Cmake build: Use LYX_USE_QT to determine if QT uses X11 2014-06-12 07:52:45 +02:00
Kornel Benko
2b0511510a Cmake build: Added magic library to some link commands.
Needed due to the use of magic_(open|load|error|file|close) after recent changes.
2014-06-12 07:49:17 +02:00
Enrico Forestieri
f439609304 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.
2014-06-11 23:04:39 +02:00
Enrico Forestieri
82faa66192 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).
2014-06-11 18:23:44 +02:00
Georg Baum
f76d6997b7 Fix thinko in loop detection 2014-06-09 22:06:58 +02:00
Georg Baum
f792e70d0a Fix wrong "externally modified" message
This was a regression of 10364082c8.
2014-06-09 13:17:40 +02:00
Georg Baum
f09a9fe2e6 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().
2014-06-09 13:05:50 +02:00