Commit Graph

21566 Commits

Author SHA1 Message Date
Kornel Benko
39bef61e84 tex2lyx roundtrip: Ignore the lyx-version which created
When comparing the contents of two lyx-files, we should not care about the specific version. Later, this can be extended to also not care whether the file is produced by tex2lyx, lyx2lyx, or LyX.

Modified-By: Vincent van Ravesteijn <vfr@lyx.org>
2013-08-04 15:42:51 +02:00
Juergen Spitzmueller
138bb4d14f Fix the fix to the decimal separator problem with Qt5 2013-07-27 11:18:16 +02:00
Enrico Forestieri
92863de517 Fix Qt5 decimal separator bug
Always use '.' as the decimal separator in the GUI, because we
call setlocale(LC_NUMERIC, "C") in setLocale() (GuiApplication.cpp).
2013-07-26 20:52:44 +02:00
Tommaso Cucinotta
b32ce2cf08 When agreeing to wrap-around, but nothing is found, keep the cursor where it originally was.
Now this is coherent with Advanced F&R.
2013-07-22 23:55:43 +01:00
Tommaso Cucinotta
7081fed380 Fixed a number of bugs in "preserve first case" feature of Advanced F&R (addressing #8383). 2013-07-22 10:39:11 +01:00
Juergen Spitzmueller
8a15fb0593 Fix setting of is_child runparam if grandchildren are involved 2013-07-21 21:33:34 +02:00
Juergen Spitzmueller
2f2841a016 Establish missing connections to change_adaptor 2013-07-21 19:27:57 +02:00
Tommaso Cucinotta
2a86379ea7 Adding wrap-around pop-up question to simple find and replace dialog (fixing enhancement request #1262). 2013-07-21 17:51:53 +01:00
Stephan Witt
bb2a75b778 add frameworks to linker flags for Mac OS X 2013-07-20 21:24:56 +02:00
Juergen Spitzmueller
6445cd9df4 Bug in 'Use non-tex fonts' checkbox auto-toggling (#8717) 2013-07-20 16:15:47 +02:00
Juergen Spitzmueller
98dd9e9b91 Fix encoding problems in citation labels by using docstring (not string) where appropriate 2013-07-20 16:05:52 +02:00
Richard Heck
d938284fb3 Fix logic error that led to bug #8777. I have no idea what I was
previously thinking.
2013-07-20 09:56:34 -04:00
Juergen Spitzmueller
d788d497aa Trivial fix: escape ampersands in file names before pushing to tab header (#8757) 2013-07-19 15:55:56 +02:00
Josh Hieronymus
1dcd6ee5e7 Update system identifier in DOCTYPE of MathML-including exported XHTML.
From Josh Hieronymous.

(cherry picked from commit 4f0c81937537ca3bf92097e266d367290d6419a9)
2013-07-19 09:45:10 -04:00
Juergen Spitzmueller
49c89d838b Fix state of certain language packages (polyglossia, japanese) in children (#8779) 2013-07-18 09:26:56 +02:00
Georg Baum
c3aad9624f Fix tests which were forgotten in c7cdac6561. 2013-07-17 21:08:03 +02:00
Richard Heck
a34ce7ca85 Fix crash reported by Scott on the list. The test on latexname() was
obviously wrong. We want to know if we are in the same layout, and
that is not enough.
2013-07-17 11:09:03 -04:00
Juergen Spitzmueller
6f9a272ca3 Fix toggling of 'misc' font options (bug #8764) 2013-07-17 08:30:42 +02:00
Uwe Stöhr
158571ea00 LaTeXFeatures.cpp: fix bug #8731
- we must assure that the package mhchem is loaded before the package esint
2013-07-16 23:16:09 +02:00
Uwe Stöhr
c7cdac6561 Preamble.cpp: fix bug #8723 2013-07-16 23:07:46 +02:00
Georg Baum
85e635d2e3 Fix failing test caused by 89b2c54c00.
Actually, the old reference was wrong, since it misparsed IPA short cuts as
spaces. I verified that the re-exported .tex is correct.
2013-07-16 22:53:25 +02:00
Scott Kostyshak
5225821242 Prevent zombie processes (#8774)
Using Systemcall::startscript() with Starttype::DontWait used to create
zombie processes, as nobody would collect them. This patch starts those
processes as detached, hence preventing them from becoming zombies.

In addition to #8774, this bug was also reported here:
https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/1096666

Patch from Guy Rutenberg. For reference, see this email thread:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg180034.html
2013-07-16 01:02:28 -04:00
Georg Baum
c0ea37f337 Fix image pasting regression
I introduced a regression in c14b9e67 for pasting images:
If an image is on the clipboard both as PNG and HTML with just an url,
but no plain text, pasting would fail. The reason for this was that
text contents was detected (the HTML code), nd preferred, but actually
pasting it resulted in an empty string, since the HTML import could not
handle the url This error was not checked.
The solution is first to try text paste if both text and image content
is present, and then  try image paste if the text failed.
2013-07-13 22:44:20 +02:00
Juergen Spitzmueller
6e69a61d00 Fix problem with unbalanced braces in XeTeX output (bug #8765) 2013-07-13 22:44:09 +02:00
Juergen Spitzmueller
c2cea31aea Properly nest ulem commands within other font changes
This reverts the wrong fix to #8424 which caused #8733 and fixes both problems properly
2013-07-13 22:43:39 +02:00
Georg Baum
89b2c54c00 Fix wrong space symbols (#8729)
The main part of the fix (unicodesymbols) is from Jürgen. This commit fixes
tree problems:
- \; etc. were also used in text mode, but are math only
- all of those glyphs need to be forced with utf8
- actually, \; etc. are not the correct macros, since the encoded spaces are
  breakable, but the math spaces are all protected. The sapce symbols are not
  defined in the utf8 encodings.
2013-07-13 22:43:31 +02:00
Julien Rioux
73368ed2d9 Fix pdf format conversion
When calling the default converter (convert) we pass the format on the
command line. In LyX we have various pdf, pdf2, pdf3, etc. formats all
representing PDF. We need to strip to trailing digit in the format string
otherwise the format is not understood by convert.
2013-07-13 16:15:13 +02:00
Julien Rioux
096204e23f Fix JPEG format detection
Detect JPEG files using the magic number FF D8 (so-called SOI marker)
instead of the string JFIF, which does not appear in all JPEG files.
2013-07-13 16:14:58 +02:00
Georg Baum
822e171762 Fix inconsistent version in .lyx files (#7951)
LyX, lyx2lyx and tex2lyx produce now all the same version indicator consisting
only of the major and minor version. It is not decided yet whether future
development versions will add a -dev suffix, but for 2.1.0 this change fixes
the inconsistencies.
2013-07-13 16:02:26 +02:00
Pavel Sanda
b76b6575bd Add introduction to cursor related classes, written by JMarc. 2013-07-01 09:52:06 -07:00
Jean-Marc Lasgouttes
878a86ff46 Document the Bidi class a bit
This is from information given by the auther (Dekel Tsur).
2013-06-28 15:18:17 +02:00
Richard Heck
30d3fcd640 Fix bug #8746: Images have to have alt tags. 2013-06-12 17:25:39 -04:00
Vincent van Ravesteijn
d15bc5ef53 Update tex2lyx testcases to latest fileformat 2013-06-04 21:56:51 +02:00
Jean-Marc Lasgouttes
deb6e16e79 Move a Qt workaround to the Qt frontend. 2013-06-04 12:08:36 +02:00
Vincent van Ravesteijn
9a6c402a82 Make sure numeric conversions are not locale dependent
In [19024f72\lyxgit] this line was removed. Later this caused that floats were converted to strings using ','s instead of '.'s. Readding this line fixes this.
2013-06-03 17:58:06 +02:00
Jean-Marc Lasgouttes
a2546357eb Update chunk handling to use new inset
At the same time, rename parse_noweb to parse_chunk.
2013-06-03 12:36:35 +02:00
Pavel Sanda
63c193afef Remove years forgotten files.
http://marc.info/?l=lyx-devel&m=136956959518828&w=2
http://marc.info/?l=lyx-devel&m=120506622513617&w=2
2013-06-03 02:35:32 -07:00
Vincent van Ravesteijn
83399dcb7a PrefsUi: Remove unneeded widths 2013-06-02 23:30:06 +02:00
Richard Heck
bbce65b68e Initialize initial_value_. 2013-06-02 09:41:09 -04:00
Vincent van Ravesteijn
129d43c5c9 Correctly find the gmo files in build dir
The path to the lyx binary is either <build_dir>/bin (CMake) or
<build_dir>/src (autotools). This means the po directory can be found one
directory up.
2013-06-02 15:32:35 +02:00
Juergen Spitzmueller
c9ea13ee99 Bump RC format for commit 8f287f5ffa 2013-06-02 12:06:01 +02:00
Kornel Benko
22d52f5f08 cmake: Use provided gmo-files if platform lacks python or gettext tools.
Running lyx from the build-directory now searches for the gmo-files
first in the build dir and then in source dir
2013-06-02 11:38:27 +02:00
Richard Heck
2374229cc6 Introduce InitialValue tag for counters. Fixes bug #8707. 2013-06-01 17:42:08 -04:00
Juergen Spitzmueller
8f287f5ffa Implement option to set a global default output format for dics with non-tex fonts (#8706) 2013-06-01 16:58:34 +02:00
Juergen Spitzmueller
0972b15ee2 Typo. 2013-06-01 10:26:03 +02:00
Kornel Benko
823ed6cf17 Remove ugly multiple definition hack (Georg)
Enable APPLE again for test_layouts (Missed in commit ...48d3518d6d)
2013-06-01 09:42:36 +02:00
Georg Baum
12554c93d8 Remove ugly multiple definition hack
Since 00387b2a38 it is possible to construct a dummy Messages object
which does not translate at all. With the old gettext implementation, a
Messages object without a defined language would have used a language from
an environment variable. Therefore, the duplicate definition of _() is no
longer needed. This gettext removal was really a good idea!
2013-05-31 22:07:14 +02:00
Juergen Spitzmueller
83d0b3bd1a Re-introduce linebreak after caption, as in LyX 1.6 (#8514) 2013-05-31 16:20:00 +02:00
Juergen Spitzmueller
1e42af6c44 Windows compilation fix 2013-05-31 14:27:39 +02:00
Jean-Marc Lasgouttes
00387b2a38 Fix crash at startup for tex2ylx and lyxclient
This is done by handling explicitly a dummy Message object, where no parsing of mo file is attempted. This avoids in turn that the lyxerr object is used during initialization of a global dummy Message object.
2013-05-31 11:59:52 +02:00
Jean-Marc Lasgouttes
3a985a228c tex2lyx does not use LYXERR, but basic cerr stream 2013-05-31 11:38:41 +02:00
Juergen Spitzmueller
a2b34f66ea revert unintended commit 2013-05-31 11:07:48 +02:00
Juergen Spitzmueller
2c1679e958 Small UI polishment 2013-05-31 10:45:21 +02:00
Stephan Witt
3f59d7e2cc add toFilesystemEncoding for --binary-dir argument 2013-05-31 09:00:28 +02:00
Uwe Stöhr
bf7af9fd07 Package.cpp: correctly quote configure call
- fixes bug #8711
2013-05-31 04:23:40 +02:00
Jean-Marc Lasgouttes
149b574b07 Read the right .gmo files when running in place
With gettext, we have been forced to install .mo files at the right place in order to read them. Now that we have our code, the situation changes.

* Add new method Package::messages_file(code), when returns the right path, depending on whether we are running in place.
* In Messages class use that intead of the existing one.
2013-05-30 22:10:01 +02:00
Vincent van Ravesteijn
a3c864102a CMake: Remove libintl 2013-05-30 22:10:01 +02:00
Jean-Marc Lasgouttes
d7e2705228 Get rid of all traces of libintl.
This requires to re-add some tests in configure.ac.

Note that the code to generate a Makefile in po/ has been kept.
2013-05-30 22:10:01 +02:00
Jean-Marc Lasgouttes
19024f7255 Implement native reading of mo files.
Get the default language by a mix of QLocale and LyXRC::gui_language

Known limitations:
   * encoding is supposed to be UTF-8 (the charset parameter is checked);
   * context is not handled (implemented differently in LyX);
   * plural forms not implemented (not used for now in LyX);.
   * tThe byte endianness of the machine on which the .mo file have been
     built is expected to be the same as the one of the machine where this
     code is run.
2013-05-30 22:10:01 +02:00
Uwe Stöhr
6baa65119b Merge branch 'master' of git.lyx.org:lyx 2013-05-30 18:15:57 +02:00
Uwe Stöhr
f33454b3c7 LaTeXFeatures.cpp: add rsphrase
- also modify the rsphrase.module
- correct naming scheme for the bicaption.module
2013-05-30 18:15:44 +02:00
Richard Heck
1b6c1380bb Revert "version.h: tex2lyx can have the same actual fileformat"
This reverts commit ca66e175c9.
2013-05-30 12:10:27 -04:00
Uwe Stöhr
a2e6fc773a LaTeXFeatures.cpp: add multicol and shapepar 2013-05-30 17:55:21 +02:00
Uwe Stöhr
ca66e175c9 version.h: tex2lyx can have the same actual fileformat
(nothing has been changed that requires the action of tex2lyx)
2013-05-30 17:40:29 +02:00
Richard Heck
8f044f3c95 Patch to convert Sweave chunk paragraphs to insets (bug #8588). Work
by Liviu (C++) and Richard (Python).
2013-05-30 10:20:34 -04:00
Richard Heck
d515ddefc0 Fix bug #8506: Output all references when asked to do so. 2013-05-30 10:00:02 -04:00
Uwe Stöhr
ea2d5947e9 support to set Tibetan as document language
- polyglossia supports http://en.wikipedia.org/wiki/Standard_Tibetan so we can support it too
- fileformat change
2013-05-28 23:40:17 +02:00
Richard Heck
39ea882806 Fix logic of new InsetFlex::updateBuffer() routine from a9614f1. 2013-05-28 09:41:44 -04:00
Juergen Spitzmueller
bfaa84d97f Attempt to fix #8702 2013-05-28 11:45:42 +02:00
Richard Heck
a9614f15d2 We already allowed a counter declaraton for flex insets. We just
didn't do anything with it. So let's do something with it.

Fixes bug #8470.
2013-05-28 00:11:43 -04:00
Juergen Spitzmueller
9992348223 Add FIXME 2013-05-27 18:48:46 +02:00
Juergen Spitzmueller
7e188c515e Catch and report BibTeX/biber errors (#2757) 2013-05-27 17:27:05 +02:00
Juergen Spitzmueller
a9409b4785 InsetArgument: Set ResetsFontEdit to false
This makes the language of arguments adapt to the language of the paragraph, which is what we want.
2013-05-27 11:29:15 +02:00
Julien Rioux
9e50872e50 Add babelbib, bibgerm, chscite, and opcit to LaTeXFeatures.
This way they can be Required by layout or module files and LyX
will insert them in the appropriate location in the preamble.
2013-05-26 21:10:32 +02:00
Georg Baum
b188e74cd6 Remove include test with space
Unfortunately automake does not support file names with spaces for files in
EXTRA_DIST: These file names are put into a shell list, and it is impossible
quote the name in a way that works both with the shell and with make.
Therefore I removed the corresponding test file.
2013-05-26 16:47:17 +02:00
Georg Baum
3ebf1c9bac Fix tex2lyx include output for roundtrip
In roundtrip mode, tex2lyx produces documents with extension lyx.lyx, so that
the original files are not overwritten on re-export. This was not done for
included documents which were converted, and this broke 'make dist'.
2013-05-26 16:07:56 +02:00
Juergen Spitzmueller
83a6107392 Recognize biber warnings/errors/info messages 2013-05-26 16:06:13 +02:00
Uwe Stöhr
e28625160a aa.layout: updated for A&A 8.2 2013-05-26 05:29:24 +02:00
Pavel Sanda
f75becdc4e Years forgotten file 2013-05-25 16:40:19 -07:00
Pavel Sanda
0ce10160da Header cleanup cont. 2013-05-25 16:38:20 -07:00
Stephan Witt
75c631df7f On Mac, moving down a paragraph should place the cursor at the end of the current paragraph
(unless it's already there, in which case it should move to the end of the next paragraph).
Change the preference setting name (mac_like_word_movement to mac_like_cursor_movement)
to better reflect its function.

Patch and description from Bennett Helm
2013-05-25 18:02:21 +02:00
Uwe Stöhr
427aeff90f GuiBox.cpp, InsetBox.cpp: fix some wrong logic
- InsetBox.cpp:
 a framebox without inner box and without a width is \fbox
 a framebox with inner box is also \fbox
 a framebox without inner box and with width is \framebox

- GuiBox.cpp: the width checkbox must be checked if there is width
2013-05-25 15:07:17 +02:00
Uwe Stöhr
472732f92d GuiBox.cpp: addendum to [f04c7711/lyxgit]
- this was forgotten to commit;
(without this we would get invalid LaTeX code when changing in the box dialog a makebox without a width to a minipage and press apply - a makebox required to specify a width, at least an invisible one like "0cm")
2013-05-25 13:52:09 +02:00
Jean-Marc Lasgouttes
f04c7711b0 Fix empty width support for Box inset
* InsetBox and GuiBox: Use proper empty length instead of the broken -9.99col% trick
* some slight changes to the logic of GuiBox to make sure that values are set as needed.
* lengthToWidget(): handle properly the empty length case. All the other related Qt helpers did it already, it was probably an oversight. Also set the default_unit parameter as optional (not needed in this patch actually, but I got carried away :)
* allow generating LaTeX code for an empty length, since some broken code does that.
2013-05-24 15:44:59 +02:00
Jean-Marc Lasgouttes
25ff2f8e2b Improve support for empty lengths
Parse empty string as empty length
Output empty length as empty string when it makes sense (not for LaTeX strings, for example).
2013-05-24 15:44:58 +02:00
Pavel Sanda
f6d505c1ee Years forgotten files. 2013-05-23 22:17:20 -07:00
Pavel Sanda
84c5e67e07 Header cleanup cont. 2013-05-23 22:12:29 -07:00
Georg Baum
952853eb23 Fix layout tests for autotools
This part was forgotten in 6f16814d3b.
2013-05-23 22:00:56 +02:00
Richard Heck
f34394460a Whitespace. 2013-05-23 09:39:16 -04:00
Richard Heck
1230372566 Add support for package options in layout files. E.g.:
PackageOption tipa safe will load tipa with the
 "safe" option, if we load it.
2013-05-23 09:34:40 -04:00
Stephan Witt
0cd85602ed fix whitespace: avoid mixed tabs and spaces 2013-05-23 07:55:09 +02:00
Pavel Sanda
de9d8cc0ba Header cleanup cont. 2013-05-22 19:58:58 -07:00
Pavel Sanda
707b099102 Header cleanup cont. 2013-05-20 18:47:16 -07:00
Vincent van Ravesteijn
b701eea8c8 Update tex2lyx test cases to format 471 2013-05-20 14:39:19 +02:00
Juergen Spitzmueller
a8a2bd463c Force encoding switch when switching from/to CJK, even if we use a customized encoding (#8558) 2013-05-20 13:40:40 +02:00
Juergen Spitzmueller
a78bed06eb revert parts of 53002538 which set wrong local_font 2013-05-20 12:31:46 +02:00
Juergen Spitzmueller
b65d5f2012 Handle secondary babel languages when main language is CJK 2013-05-20 11:07:47 +02:00
Pavel Sanda
4c0ef38200 Header cleanup cont. 2013-05-19 18:07:53 -07:00
Vincent van Ravesteijn
c8d685c665 Fix zombie toolbars (bug 8520)
If there is a new toolbar, it will not be restored by Qt and we need to
initialize it ourselves. However, it is not so easy to find out which
toolbars are restored by Qt and which are not. For this, the setVisible
function of GuiToolbar is 'misused'. If the visibility is set, the toolbar
must have been restored by Qt and we should leave it alone.
2013-05-19 22:17:16 +02:00
Vincent van Ravesteijn
97405fa623 Fix bug 7673 by reverting changes to BufferView::checkDepm
This reverts commit 210a4406 and a part of 5577e877.
2013-05-19 22:17:14 +02:00
Vincent van Ravesteijn
762c4eca57 Increase the uniqueness of the temp directories
Now, the temporary directories are composed of the PID + 8 random
characters. This used to be the PID + 2 random characters.

See also 327f7ed90d.
2013-05-19 14:09:06 +02:00
Vincent van Ravesteijn
327f7ed90d Seed Qt's random generator
LyX uses QTemporaryFile to create a unique temporary directory. This
temporary directory will consist of two random characters and the process
identifier (PID).

Currently, the two random characters are often the same because Qt's
random generator was not seeded. If there are a lot of lyx temporary
directories accumulated, the chance of failing to find a unique temporary
directory is (N/100)%.

The temporary directories can be left behind if either LyX crashes, or
when a file in the temporary directory is opened in another viewer when
LyX closes. This can be a pdf that is viewed in a reader that disallows
the file to be removed while viewing it.
2013-05-19 13:59:45 +02:00
Vincent van Ravesteijn
30f5187070 Disallow to insert an inset without a font
Doing so could lead to an assertion in Paragraph::fontSpan.
2013-05-19 12:48:35 +02:00
Vincent van Ravesteijn
8a40336848 Fix assertion: icon in insetinfo without a font
InsetInfos of the type ICON have a graphics Inset in their paragraph.
These insets were inserted without a font. This lead to an assertion in
Paragraph::fontSpan because the fontlist_ of the paragraph is empty.
2013-05-19 12:48:34 +02:00
Vincent van Ravesteijn
cd802e5cf6 Fix assertion: bibitem inset without a font
Move the cursor in front of a bibitem and press enter.
Paragraph::fixBiblio will insert a new bibitem without a font in the new
paragraph. This will make Paragraph::fontSpan assert because the fontlist_
of the new paragraph is empty.
2013-05-19 12:48:32 +02:00
Vincent van Ravesteijn
d9da8dc2c1 Fix assertion: label copy-paste-as-ref in new par
Because the reference got inserted without specifying a font,
Paragraph::fontSpan fired an assertion because the fontlist_ is empty.
2013-05-19 12:48:31 +02:00
Vincent van Ravesteijn
2d8941eec3 Revert "Fix assertion for InsetInfos of icon types"
Using "Font no_font" in case no font was supplied was wrong. Instantiating a font object without specifying the language lead to a font object having the default_language that is hardcoded to "english". See Language::read().

This caused that there were spurious language changes in the LaTeX output
and made some document uncompilable.

This reverts commit 3619954590.
2013-05-19 12:48:29 +02:00
Julien Rioux
cde541d785 New \cite_engine_type default.
The default citation capability of LaTeX is not a true numerical
citation engine, rather it uses a mixture of labels/numbers. Thus
we now distinguish them: "numerical" always increments the bibitem
counter and uses its value as a numerical citation label, while
"default" only uses the bibitem counter when no label is provided.

LyX file format incremented to 471.
2013-05-16 20:39:23 +02:00
Julien Rioux
9da74fe207 Don't use widest label for numerical citations.
Fixes bug #8513.
2013-05-16 16:10:06 +02:00
Julien Rioux
bfc731de45 Compute and output numbers for numerical citations. 2013-05-16 16:10:05 +02:00
Pavel Sanda
183b188ebe Slowly going through the suggestion made by our headers script.
I tried not to kill "redundant" includes which are actually used
in the header, apology for mistakes.
2013-05-15 22:02:10 -07:00
Kornel Benko
6e992e3544 cmake:
1.) Do not include layout tests on MAC, since the
  linker-option which allows multiple definitions is
  no longer supported.
2.) Indenting made consistent
2013-05-15 11:28:04 +02:00
Stephan Witt
1f41a4fcfd lyx::support::get_document_dir uses QDesktopServices::storageLocation and this is in QT_QTGUI_LIBRARY 2013-05-15 10:24:22 +02:00
Vincent van Ravesteijn
19418730dd Add a special regfile for filetools test on windows 2013-05-15 09:11:25 +02:00
Vincent van Ravesteijn
7a8995f295 check_layout: Add more libraries 2013-05-15 08:08:33 +02:00
Vincent van Ravesteijn
483e0f61e7 GuiAbout: Add missing include 2013-05-15 07:47:02 +02:00
Georg Baum
7bdc34a987 Implement forced local layouts
These should be used if any new style needs to be introduced in the stable
2.1 series: If the ForceLocal flag of the style is set, it will always be
written to the document header, so that even older 2.1 versions can read
and correctly output the document.
2013-05-15 07:19:49 +02:00
Uwe Stöhr
a0030713e9 InsetBox.cpp: remove unnecessary non-ASCII char
- this char made problems when storing the file in Unicode
2013-05-15 00:03:46 +02:00
Vincent van Ravesteijn
6f16814d3b Fix check_layout and adhere casing to other tests
- Fixes cases such that it is the same as check_convert, check_filetools, check_listrings,
- Makes the compilation work on MSVC
2013-05-14 18:52:21 +02:00
Vincent van Ravesteijn
db32d1b155 Only show the configuration of theme icons on X11
Also hide the ui items in the constructor to prevent flickering.
2013-05-14 18:04:17 +02:00
Vincent van Ravesteijn
0b9714f8df Revert "qt5: Fix use of zlib"
This reverts commits ba3332c6 and f96583e8.
2013-05-14 17:34:51 +02:00
Vincent van Ravesteijn
147dcb4cb9 Make the use of system's theme icons configurable
A lyxrc variable is added and a checkbox is added to the LyX->preferences
dialog.
2013-05-14 17:26:06 +02:00
Vincent van Ravesteijn
b1f6ab69f2 Use system's theme icons
On X11 Qt offers the possibility to use the system's icons. To this end,
we must link the "lyx command" to a standard action icon as specified in:

http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
2013-05-14 17:26:06 +02:00
Kornel Benko
f96583e8d2 Fix compilation 2013-05-14 16:23:24 +02:00
Kornel Benko
c8e325afec cmake: Try to make layout-tests available for MSVC too 2013-05-14 15:34:15 +02:00
Vincent van Ravesteijn
ba3332c62d qt5: Fix use of zlib
As Qt5 includes zlib as well, we have to use the same naming convention.
2013-05-14 14:24:12 +02:00
Vincent van Ravesteijn
62d6dcde6e qt5: Only include a single header to fix compilation 2013-05-14 14:19:38 +02:00
Vincent van Ravesteijn
7f123b8610 Fix MSVC warnings 2013-05-14 13:56:31 +02:00
Kornel Benko
ebddec15de Add test for Layout::write() on cmake too
(For now runns only on unix platforms using gcc)
2013-05-14 11:17:50 +02:00
Uwe Stöhr
ef94c42383 GuiMathMatrix.cpp: remove an unused header
- sorry, I accidentally added it in the last commit
2013-05-14 02:26:22 +02:00
Uwe Stöhr
4b7fd9fea2 GuiMathMatrix.cpp: fix bug #7049
- we should not fill the dialog comboBoxes in the .ui-files
2013-05-14 02:19:43 +02:00
Vincent van Ravesteijn
813c00a21f Use [[Context]] for the msgid of some strings 2013-05-13 22:22:04 +02:00
Vincent van Ravesteijn
fec57fe959 Implement the use of [[Context]] for placeholders
When placeholders are used, the context can indicate what will be
substituted for the placeholder (e.g. "%1$s[[date]], %1$s[[time]]).
2013-05-13 22:21:33 +02:00
Georg Baum
b79c88034e Add test for Layout::write()
When running the test, you'll get the following messages:

Testing ../../src/../lib/layouts/siamltex.layout...
Layout.cpp (268): Cannot copy unknown style `Enumerate'
Testing ../../src/../lib/layouts/svglobal.layout...
Cannot delete style `Dedication'
Testing ../../src/../lib/layouts/svjog.layout...
Cannot delete style `Dedication'
Testing ../../src/../lib/layouts/svprobth.layout...
Cannot delete style `Dedication'

These are no errors of Layout::write(), but they indicate problems in the
definition of the layout files.

Kornel, it would be nice if you could do the cmake part.
2013-05-13 21:53:28 +02:00
Julien Rioux
66f44f46c2 Add modifier to jurabib and natbib (author-year) modules. 2013-05-13 20:58:12 +02:00
Julien Rioux
75ffcc8e86 Initialize BibTeXInfo modifier to zero, always. 2013-05-13 20:26:46 +02:00
Richard Heck
8b858d113f Get font sizes working for XHTML. 2013-05-13 12:22:41 -04:00
Richard Heck
c713030edb Get font families working for XHTML. 2013-05-13 11:58:52 -04:00
Richard Heck
b383d04e07 XHTML support for font shapes. 2013-05-13 10:45:12 -04:00
Richard Heck
5cadeed4d7 Rework that way that font tags are handled in XHTML output. We need
to do this in order to handle span tags properly, when they act as
font tags.
2013-05-13 10:45:12 -04:00
Richard Heck
64f0cffbba Rework the way the parsep tag is handled, and introduce comparison
operators for these tags.
2013-05-13 10:45:12 -04:00
Richard Heck
ad56bb7286 Rework how paragraph ids are handled.
Previously, an empty paragraph would always yield something like:
	<div><a id='magicparid-35' /></div>
because we had no way to "defer" the anchor tag. Now this is wrapped
into the div, in effect, and we abandon it all if there's no content.
2013-05-13 10:45:12 -04:00
Richard Heck
c5a707ba74 Reorganize the TagStack objects. 2013-05-13 10:45:12 -04:00
Vincent van Ravesteijn
cba5060e74 Translate build version strings 2013-05-13 12:57:21 +02:00
Vincent van Ravesteijn
ed5585966b Remove the 'running' booleans quit and optional
Reason for this 'cleanup' is the strange "optional = false" lines at the
end of the "case md_item" and "case md_subitem". Then, it is nicer to
directly use the value of the switch to be the running variable and to use
this to determine whether an item is optional and whether we should quit.
2013-05-13 11:37:26 +02:00
Vincent van Ravesteijn
a033b88a37 Fix assert: Do not use translated names as keys
The panels in GuiDocument and GuiPrefs are stored in a map. The keys are
the translated descriptions of these panels. Whenever someone changes the
gui language and reopens the Document Settings pane, LyX asserted because
it could not find the "Child Documents" pane.
2013-05-13 10:00:57 +02:00
Vincent van Ravesteijn
3e65edd729 Add a function to translate QStrings 2013-05-13 10:00:49 +02:00
Vincent van Ravesteijn
03f98402f4 Fix crash with FindAndReplaceUi
In commit bd9e8fecd the currentIndex of the FindAndReplaceAdv Pane was
changed from 0 to 1. Since then LyX crashed when requesting the pane or
when changing LyX preferences.

This patch reverts this, although it is not clear why it would crash
otherwise. It is still committed like this, because LyX is unusable
without.
2013-05-12 16:14:27 +02:00
Lars Gullik Bjønnes
704328d348 Remove ; from end of function definitions 2013-05-12 13:04:18 +02:00
Uwe Stöhr
6cfa7feb6d PageLayoutUi.ui: use a more sensible option name 2013-05-10 18:34:05 +02:00
Uwe Stöhr
1112a17372 GuiMathMatrix.cpp: fix a compiler warning 2013-05-10 13:13:20 +02:00
Jean-Marc Lasgouttes
cc00530743 Remove cruft 2013-05-08 15:12:42 +02:00
Jean-Marc Lasgouttes
151960440e Another try at making the source view dock arrange itself.
The idea is to minimize the size of the form that contains the buttons.

Since I do not really know what I am doing, I will revert if problems occur.
2013-05-07 11:30:46 +02:00
Jean-Marc Lasgouttes
249d96ed94 Small clanup (just move functions around) 2013-05-06 22:50:26 +02:00
Jean-Marc Lasgouttes
68202fdf44 Fix bug 6055: change-next does not work in tables
The problem was just the faulty use of CursorSlice::at_begin/end(), which does not look for end of cell, but end of inset.
2013-05-06 12:29:27 +02:00
Uwe Stöhr
1b32a0502e Revert "tex2lyx/text.cpp: fix a typo spotted by clang"
This reverts commit 055b425b64.

This requires much more work and i don't have time to do this now
2013-05-06 01:54:17 +02:00
Uwe Stöhr
055b425b64 tex2lyx/text.cpp: fix a typo spotted by clang 2013-05-06 01:35:38 +02:00
Uwe Stöhr
72b2c54fae GuiBox.cpp: fix a dialog initialization issue
thanks Jean-Marc for the hint
2013-05-06 01:31:04 +02:00
Tommaso Cucinotta
bd9e8fecd3 Automatic horiz/vert switch also for Advanced Tab (completing e3677975). 2013-05-05 15:09:53 +01:00
Tommaso Cucinotta
e36779755e Automatic horiz/vert switch of layout when docking Advanced F&R pane top-bottom/left-right (copying 49c2450f). 2013-05-05 14:08:40 +01:00
Pavel Sanda
49c2450f3f Add layout intelligence to View Source pane (bug #8653).
View Source pane layout now automatically switches between horizontal
and vertical design when docked in vertical or horizontal way.

Original idea and patch from Edwin.

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg178801.html

Note: the long standing-fight with too bulky minimal QTextEdit size
is now solved via ViewSourceUi.sizePolicy=Ignored.
2013-05-04 23:05:51 -07:00
Richard Heck
030326466f Set "dryrun" to true for XHTML copying routine. This suppresses
the production of images, etc, making copying even the entire
User's Guide and almost instantaneous operation.
2013-05-04 08:30:56 -04:00
Pavel Sanda
dae6ca73df ViewSourceUi.ui layout was broken 2013-05-04 01:09:07 -07:00
Richard Heck
5636646134 Don't consider unnumbered sections for tocdepth. 2013-05-03 17:49:19 -04:00
Richard Heck
8e23cfdbdc Minor cleanup. 2013-05-02 21:23:11 -04:00
Richard Heck
b4e2a65d50 The update here needs doing no matter what.
This fixes a bug introduced in db358a4315.
2013-05-02 21:21:24 -04:00
Richard Heck
9c749331a0 Re-rename. The last renaming broke monolithic compilation. 2013-05-02 15:21:19 -04:00
Richard Heck
edd127f993 Make strings used in various assertions non-static. 2013-05-02 15:21:19 -04:00
Jean-Marc Lasgouttes
ea6240b785 Even more llvm/clang warnings
Remove lyxview_ member of lyx::Action, fix a prototype in TexStream and comment out a Cursor function.
2013-05-02 19:22:10 +02:00
Jean-Marc Lasgouttes
623d2f9530 More llvm/clang warnings
This is mostly unused private class members.

There are also a few unused functions that got #if'ed out. I never know in this case whether the code should be nuked.
2013-05-02 18:27:32 +02:00
Jean-Marc Lasgouttes
bd2e7480b1 A first batch of potential bugs spotted by llvm/clang
There are more warnings left, but these are the easiest to fix. And some of them are real bugs (assignments with == instead of =).
2013-05-02 16:38:25 +02:00
Pavel Sanda
154319d063 Remove some header leftovers based on Scott's script hints.
False positive rate of hints is quite high. Although the includes can be
technically removed (due to other includes) they logically belong to the
header.
2013-05-02 00:30:16 -07:00
Georg Baum
5c63944ec2 Don't ask for creating branches on copying
As discussed on the list. This gets rid of the unwanted message boxes when
copying the complete Userguide.
2013-05-01 13:51:39 +02:00
Jean-Marc Lasgouttes
fb0827f8bb Small changes to Poor man's profiler
* report results in milliseconds instead of microseconds
* report total time spent in block, additionally to mean time
* cause compilation error with --enable-stdlib-debug
2013-04-30 16:43:29 +02:00
Jean-Marc Lasgouttes
21c5bbec71 Fix bug #8627: Command line switches to change branch do not appear to work
Move the handling of branch-(de)activate(master) to Buffer. This code was moved to Bufferview in [3a03e71c/lyxgit] because a cursor was necessary to call Undo::recordUndoFullDocument(). However, it turns out that the undo code is already prepared to handle an empty cursor (and do nothing in this case).

Therefore we do that and move the branch code to Buffer where it belongs.

Note that there was a bug in the previous code that broke undo support: recordUndo should always be called _before_ doing any change.
2013-04-29 17:24:28 +02:00
Vincent van Ravesteijn
3619954590 Fix assertion for InsetInfos of icon types
InsetInfo inserted insets in its text without specifying a font. This
caused the fonlist to be incomplete and firing the assertion.
2013-04-28 21:47:37 +02:00
Vincent van Ravesteijn
88eae06611 Fix FontIterator to not access pos >= par.size()
An iterator is typicall incremented passed the valid data into the 'end'
state. However, if this means that other functions are called with invalid
parameter, we should fix this.

This explains why fontSpan was called with pos==size() while this was not
expected to happen.

This patch reverts partly f5ad0c128a (Jean-Marc Lasgouttes; Get rid of
annoying warning message).
2013-04-28 19:12:16 +02:00
Vincent van Ravesteijn
e115b006e6 Make sure MarkAsExporting is deleted before buffer
This fixes a crash when cutting something.
2013-04-28 18:51:21 +02:00
Vincent van Ravesteijn
ea118f2da5 Make staticbuffer static again
Otherwise the number of internal buffers in incremented on each cut
action.
2013-04-28 18:51:20 +02:00
Richard Heck
68408556c7 Clean up comments a bit. 2013-04-28 12:08:30 -04:00
Richard Heck
76c96c22ac Another assertion that got changed wrongly.
I've read back through that patch, and everything else looks good.
2013-04-27 18:12:27 -04:00
Richard Heck
d79225ae98 Remove all messages to user related to assertions. We'll just use
a basic message which is defined in lassert.cpp now.
2013-04-27 17:52:55 -04:00
Kornel Benko
06d72d6ca0 Use doctring as LBUFFER() etc parameters 2013-04-27 21:38:01 +02:00
Kornel Benko
07ca50d905 Strings as parameters to LASSERT should not be translatable.
But empty strings are even worse.
2013-04-27 21:13:32 +02:00
Jean-Marc Lasgouttes
d243e53f54 Another assertion that got transformed in 1b1f8dd2 2013-04-27 20:14:43 +02:00
Jean-Marc Lasgouttes
f5ad0c128a Get rid of annoying warning message 2013-04-27 20:01:02 +02:00
Jean-Marc Lasgouttes
418e884680 Fix assertion related to cursor anchor. 2013-04-27 11:19:19 +02:00
Richard Heck
78652c98c8 Remove assertion accidentally added during the audit. 2013-04-26 10:42:45 -04:00
Richard Heck
1b1f8dd235 Audit all the LASSERT calls, and try to do something sensible at
each failure.

There are several places I was not sure what to do. These are marked
by comments beginning "LASSERT:" so they can be found easily. At the
moment, they are at:

Author.cpp:105: // LASSERT: What should we do here?
Author.cpp:121: // LASSERT: What should we do here?
Buffer.cpp:4525:        // LASSERT: Is it safe to continue here, or should we just return?
Cursor.cpp:345:         // LASSERT: Is it safe to continue here, or should we return?
Cursor.cpp:403:         // LASSERT: Is it safe to continue here, or should we return?
Cursor.cpp:1143:                // LASSERT: There have been several bugs around this code, that seem
CursorSlice.cpp:83:     // LASSERT: This should only ever be called from an InsetMath.
CursorSlice.cpp:92:     // LASSERT: This should only ever be called from an InsetMath.
LayoutFile.cpp:303:                     // LASSERT: Why would this fail?
Text.cpp:995:           // LASSERT: Is it safe to continue here?
2013-04-25 17:27:10 -04:00
Richard Heck
62df59cde4 Add additional LASSERT-type macros for dealing with various kinds
of situations.
2013-04-25 17:22:07 -04:00
Richard Heck
88d9f08806 Add a bunch of comments about the different exceptions. 2013-04-25 17:22:07 -04:00
Richard Heck
6c983d6cd1 Simplify code a bit: If we only accept CITE_CODE, there is no need
to pass it.
2013-04-25 17:22:07 -04:00
Richard Heck
6e25ae3272 Default font for an InsetLayout should be to inherit everything.
Fixes bug #8610.
2013-04-25 17:08:59 -04:00
Richard Heck
7ade656670 Just a bit of renaming. 2013-04-25 17:08:58 -04:00
Vincent van Ravesteijn
262f58ddc3 Fix the size of the hAlign combobox in GuiTabular
The default sizeAdjustPolicy is AdjustToContentsOnFirstShow. As the
combobox is initially filled with all items, it will not change size if we
later remove the 'At Decimal Separator' item.
2013-04-25 22:35:56 +02:00
Jean-Marc Lasgouttes
77bf805155 Fix bug #3199: change-next may leave empty lines behind
Using Cursor::setCursor or even BufferView::setCursor is often a bad
idea since it does not run DEPM. In this case (and other cases in
f&replace code) it is better to use BufferView::mouseSetCursor (which
should maybe be renamed...).
2013-04-25 15:37:15 +02:00
Jean-Marc Lasgouttes
a6325095c4 Fix bug #8633: change tracking: paragraph break is restored by undo
A recordUndo call was missing in this case.
2013-04-25 11:06:11 +02:00
Vincent van Ravesteijn
6f8a74791b Adjust CMake for Qt5 2013-04-23 21:45:49 +02:00
Scott Kostyshak
4e6932e44f Fix ChkTeX error reporting (#8639)
ChkTeX errors from a previous run are now cleared from the
error list if ChkTeX exits with no error.
2013-04-22 15:51:36 -04:00
Scott Kostyshak
b75ecdfaf0 GuiRef: only enable "Group" CB if non-empty refs 2013-04-22 15:39:16 -04:00