Commit Graph

21401 Commits

Author SHA1 Message Date
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
Scott Kostyshak
21d1f97cad GuiRef: do not insert a category as a ref
Before, if a user had "Group" checked in GuiRef and double-clicked
on a category, that category would be inserted as a (broken)
reference. Now, when a category is double-clicked, nothing happens.
2013-04-22 15:39:16 -04:00
Scott Kostyshak
647ae51a46 GuiRef: do not hide labels that start with ':'
If a label starts with ':' and 'Group' is checked,
the label is now shown under "<No prefix>" instead of
not shown.

Note that labels starting with ':' can be valid in LaTeX.
2013-04-22 15:39:16 -04:00
Scott Kostyshak
9887dd48ca GuiRef: only show "<No prefix>" if non-empty
If "Group" is checked, "<No prefix>" is shown only if there exists a
label with no prefix. Before, it was shown even when it was empty and
even when there were no labels at all.
2013-04-22 15:39:16 -04:00
Georg Baum
85b3db19af Fix bug #8636
This was a simple logic error that crept in during refactoring:
If the format does not match, and the converted file has been read,
the string must not be read.
2013-04-21 21:34:10 +02:00
Georg Baum
928dc03324 Fic crash for repeated pasting from complex docs
Using a cloned buffer was an idea by Richard, and it works well.
2013-04-21 21:16:41 +02:00
Georg Baum
ed2f6a8599 Use MathML on the clipboard for formulas in HTML
This speeds up the copying, and although not many applications understand
MathML currently (MS word is supposed to understand it), their number should
go up in the future.
2013-04-21 21:16:41 +02:00
Uwe Stöhr
0050245151 PrefInputUi.ui: change 2 strings
because all over the docs we refer to the keyboard maps as primary and secondary
2013-04-21 20:20:08 +02:00
Richard Heck
db358a4315 Fix bug found by Scott concerning copying XHTML to clipboard. We
needed to updateMacros() before doing the export, which required a
bit of code massaging.
2013-04-20 21:07:07 -04:00
Juergen Spitzmueller
be0610362d Revert "Fix the zombie toolbar problem (bug #8520)"
This reverts commit d00ec4dece.
2013-04-20 11:42:21 +02:00
Juergen Spitzmueller
f3bb757f97 Revert "avoid redundant toolbar initialization"
This reverts commit 0f26aabeee.

It turned out this breaks session.
2013-04-20 11:40:40 +02:00
Uwe Stöhr
d750b6610f fix some more typos spotted by Yuri 2013-04-19 23:26:58 +02:00
Georg Baum
60448bf681 Whitespace 2013-04-19 21:34:05 +02:00
Vincent van Ravesteijn
cd88c51cce Pass the binary dir to the configure script to find tex2lyx
When using CMake, the binary files are stored in <build-dir>/bin. LyX can't fin tex2lyx with the current code. So, we have to point configure.py to explicitly look in the binary dir.
2013-04-19 20:31:30 +02:00
Georg Baum
c14b9e67bc Implement paste from LaTeX and HTML (bug #3096)
As discussed on the list. No automatic contents detection is done, the user
needs to use the special paste menu instead. I used the new TempFile class
for safe temporary file handling.
The documentation would go into section 2.2 of UserGuide.lyx, but I am not
allowed to edit that document.
2013-04-14 19:45:36 +02:00
Georg Baum
db0ba3a3c6 Add class for threadsafe temp file handling
FileName::tempName() is not thread safe, since the QTemporaryFile object is
immediately deleted after creating it. Therefore, another thread could create
the same temporary file in the time span before the user of FileName::tempName()
recreates it. This is not as theoretical as it may look: I observed that
repeated creation and deletion of QTemporaryFile objects always use the same
name.
This problem is solved by the new class TempFile which should be used like
QTemporaryFile itself.
2013-04-14 18:22:42 +02:00
Enrico Forestieri
f6ca8350cd Fix bug #8631: Python detection unfinished 2013-04-14 13:44:59 +02:00
José Matos
2be29006ad sgml: ignore paragraphs named *dummy*
dummy is the name given in the latex backend to simple (usually single) paragraphs and since dummy is not a docbook element it is acceptable to ignore it. It is a reasonal compromise.
2013-04-14 11:34:47 +01:00
Pavel Sanda
fb16e5cca1 Make parameter more readable. 2013-04-13 21:56:52 -07:00
Georg Baum
f4eae12d60 Improve LaTeX format detection
libmime is a bit lacking here.
2013-04-12 22:31:48 +02:00
Georg Baum
0613a218aa Also put HTML on the clipboard when copying
The HTML export is now mature enough so that it can be used to transfer
formatted text to the clipboard. This enhances interoperability e.g. with
office applications.
2013-04-12 22:12:47 +02:00
Richard Heck
19554dda4e Remove useless test and add comment. 2013-04-11 21:43:01 -04:00
Richard Heck
0c61991c9a Do less indenting. 2013-04-11 21:41:52 -04:00
Richard Heck
b447587aa9 Remove obsolete comment. 2013-04-11 21:07:57 -04:00
Richard Heck
f6fceea317 Const. 2013-04-11 15:56:41 -04:00
Tommaso Cucinotta
7779d46920 Replacing git status --porcelain along with output parsing, with a simple git ls-files.
git ls-files tells me straight whether or not a file-name is in the repo.
I cannot say the same of git status --porcelain.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-11 02:04:25 +01:00
Tommaso Cucinotta
34dfe2d71e Avoid check mistakenly current folder for .git/.svn/.CVS, when going up the path checking for parents. 2013-04-11 02:04:24 +01:00
Georg Baum
ceb2303e2b Remove partial support for non-buffer files in VCS
This reverts a small part of 0526eb9d and gets rid of the double calls of
SVN::findFile() and GIT::findFile(). Please note that git detection does
currently not work because of 26dd4d0c.
2013-04-10 22:31:38 +02:00
Jean-Marc Lasgouttes
ec962dea20 Fix another faulty signature 2013-04-08 15:18:04 +02:00
Juergen Spitzmueller
15fe9fe7b4 Fix plaintext header definition 2013-04-08 11:09:45 +02:00
Juergen Spitzmueller
d288b2d628 Revert "Do not pass thru argument of pass-thru layout literally"
This reverts commit 4564c88469.

The bug is actually elsewhere.
2013-04-08 11:07:02 +02:00
Juergen Spitzmueller
4564c88469 Do not pass thru argument of pass-thru layout literally 2013-04-08 08:26:49 +02:00
Tommaso Cucinotta
6a3792bdbb Let non-ASCII chars within regexp insets match their occurrence within TEXT, rather than MATHS (seems the most recurrently needed scenario).
See also: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177747.html
2013-04-07 23:35:32 +01:00
Jean-Marc Lasgouttes
a88e5cbf74 Fix bug #8370: crash when searching for next change
Cursor::backwardPos() may enter in a nested inset, while CursorSlice::backwardPos() will not.
2013-04-07 14:22:37 +02:00
Richard Heck
72aee2a9c5 Add a FIXME.
(cherry picked from commit 4363ff2a93aa82ce2bcdc36351f0c041aff9f5bd)
2013-04-06 18:09:08 -04:00
Tommaso Cucinotta
26dd4d0c15 Now LyX correctly asks to retrieve non-existing file from GIT repo only if the file is actually registered in repo.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-06 16:12:06 +01:00
Tommaso Cucinotta
6ea1479252 Just refactoring patch 5e5115c3 in simpler terms. 2013-04-04 00:50:02 +01:00
Tommaso Cucinotta
5e5115c376 Fixed issue #8543 also for advanced search (cursor moved at proper end of selection before starting Find Advanced operation). 2013-04-04 00:43:36 +01:00
Uwe Stöhr
6d4cde435d BufferParams.cpp: fix bug #6813
- varioref needs to be loaded after babel to know what languages it has to use
2013-04-02 23:53:27 +02:00
Scott Kostyshak
2427e9b57a Remove exclamation mark from "String not found!"
When using 'find' and a string is not found, this is not an error or a
surprising event. It is often expected (e.g. after searching through
the whole document for a certain string eventually you will get this
message). The exclamation mark should be reserved for messages that
are unexpected or that need extra attention, such as errors.
2013-04-01 15:33:41 -04:00
Georg Baum
0d7702e5e6 Delete temp file after usage 2013-04-01 12:24:24 +02:00
Kornel Benko
415343d19b Advanced search: Allow faster searching for normal (non-regular) strings
Setting variable 'par_as_string_nolead' also in case we are ignoring format,
drastically accelerates the search.
2013-04-01 10:16:45 +02:00
Georg Baum
274b3caff2 Fix most important case of bug #8205
Since a complete solution requires some refactoring, I fixed the bug for the
most important case: The main document language is only supported by
polyglossia. If any other language than the main one is only supported by
polyglossia the bug is still there.
2013-03-31 23:48:05 +02:00
Georg Baum
7462381a27 Fix layout write bugs found by tests 2013-03-31 18:17:40 +02:00
Georg Baum
7cf8b9da78 Implement writing of layouts
This will be needed for layout forward compatibility, and could also be used
for a layout editor. Writing was only implemented for styles, not for complete
layout files (text class). I rarely made use of default values for missing
variables which exist in read(), so the output it a bit verbose (but more safe
against future changes). Also, some things like CopyStyle are never written for
obvious reasons.
2013-03-31 15:33:26 +02:00
Vincent van Ravesteijn
ea7d36912b Use setSectionResizeMode from qt_helpers
This is needed to compile with Qt5.
2013-03-30 12:41:08 +01:00
Scott Kostyshak
d42c5fcd23 Exit with error if required filename is not given
This is a second attempt to fix the problem described in
6df4a7bb (2c2c1767 reverted the first attempt).

The solution here is more general: if we get to a certain point
in the code and there is no filename, an error is given.

The following command now gives an error:

  lyx -e pdf2

And the following command continues to not give an error:

  lyx myfile.lyx -e pdf
2013-03-30 00:01:39 -04:00
Scott Kostyshak
70eddf2c30 Give an error message when LyX cannot load a file
Before, the following commands correctly exited with code 1, but now
a reason for exiting is also given:

  lyx -e pdf2 doesNotExist
  lyx doesNotExist -e pdf2
2013-03-29 23:58:43 -04:00
Scott Kostyshak
2c2c17675d Revert "Exit with error if no filename given to -e switch"
This reverts commit 6df4a7bb40.

As Vincent points out, this commit is not correct. For one reason,
it would incorrectly exit with error for the following syntax:

lyx myfile.lyx -e pdf

I will look for a correct solution to the problem specified in the
message of the reverted commit.
2013-03-29 11:20:23 -04:00
Scott Kostyshak
6df4a7bb40 Exit with error if no filename given to -e switch
Before, 'lyx -e pdf2' would give no error and would exit with 0. A use
case is if a user has in a bash script the following command:

lyx -e pdf2 "${mylxyfile}" || exit 1

where 'lyx' is mispelled as 'lxy' and thus yields an empty
string. If LyX does not exit with an error, the script continues where
the user probably intends for it to stop.
2013-03-29 01:57:29 -04:00
Scott Kostyshak
cc138f6e68 Remove an empty line to make style consistent 2013-03-29 01:57:29 -04:00
Jean-Marc Lasgouttes
3231ab7d70 Putenv requires a char *, for some reason. 2013-03-28 14:03:43 +01:00
Richard Heck
5fbbd863db Remove "List of" from outliner dropdown. 2013-03-28 08:33:21 -04:00
Richard Heck
4a6efbb102 Implement XHTML output for InsetPrintNomencl. 2013-03-27 21:30:48 -04:00
Richard Heck
62d1e762c7 Remove debugging code. 2013-03-27 21:30:47 -04:00
Richard Heck
410c716bf7 Add Nomenclature to the TOC. 2013-03-27 20:03:32 -04:00
Richard Heck
79f428d201 Use InsetLayout to get the tag type for TOC-like things. 2013-03-27 20:03:32 -04:00
Richard Heck
df1af5df47 Update the XHTML output for InsetFloatList. We'll now use an
InsetLayout to style it.
2013-03-27 20:03:32 -04:00
Richard Heck
1f6f5d2d53 Minor code simplification. 2013-03-27 18:36:01 -04:00
Richard Heck
d3feabfc86 Remove the "arrow" from the XHTML TOC. I think I put it there near
the beginning, when the titles themselves were not being used as
links. Now they are, so it is not needed.
2013-03-27 18:28:25 -04:00
Richard Heck
d3f6e28e35 Use the TOC:Listings layout to hold CSS information for it. 2013-03-27 18:22:20 -04:00
Richard Heck
ad6250f1a6 A little bit more cleaning up. 2013-03-27 17:19:47 -04:00
Richard Heck
2d34e48869 Re-order things a little bit. 2013-03-27 17:17:57 -04:00
Richard Heck
050142de1b Factor common code from TOC updates. 2013-03-27 17:16:34 -04:00
Richard Heck
597fdbf22f Allow for the possibility of an "InsetLayout TOC". 2013-03-27 17:06:38 -04:00
Richard Heck
5286ce6dfe Get lists of listings working for XHTML output. Fixes bug #8602. 2013-03-27 16:59:40 -04:00
Richard Heck
4df02801a6 Links between citations and bibliography entries were broken in XHTML
output, due to failure to clean the ids in the new citation stuff.

I've solved this by allowing the citation format information to contain
keys of the form "clean:key". This signals that we are to apply the
html::cleanAttr() function to the key before returning it. I.e., we
strip non-alphanumeric stuff, basically.
2013-03-27 15:59:36 -04:00
Richard Heck
54cff4129f Forgot to include "u" as a font tag. 2013-03-27 15:46:06 -04:00
Richard Heck
c56d524cd6 Use master buffer's setting for math output type. 2013-03-27 14:51:27 -04:00
Richard Heck
7a6b717f5e Continuing here will crash us. This shouldn't be an issue, but
it seems worth doing something sensible.
2013-03-27 14:46:22 -04:00
Richard Heck
82b8723654 Handle other text ranges in XHTML output. 2013-03-27 13:51:26 -04:00
Richard Heck
dd7d76cc6c Disable extractFunctions() for MathML and HTML output.
I'm not sure there was all that much benefit to doing this, but
if so then it could be re-enabled, if we fixed extractFunctions().
2013-03-27 12:05:00 -04:00
Richard Heck
ff91db5ece Add some notes about problems with extractFunctions(). 2013-03-27 12:01:44 -04:00
Richard Heck
56796c2a9e Implement math-as-HTML output for InsetMathExFunc. 2013-03-27 11:41:29 -04:00
Richard Heck
15fd8d7400 Fix bug #8608: Don't output index entries from notes, etc. 2013-03-25 17:36:21 -04:00
Richard Heck
ca03f8cf7b Should also use doing_output here. Oversight in previous commit. 2013-03-25 17:36:21 -04:00
Vincent van Ravesteijn
cb93f034d4 Add an LFUN for continuous spell checking
This fixes the first part of #8589.
2013-03-24 20:28:37 +01:00
Vincent van Ravesteijn
a31df78133 Do not sort formats in BufferParams::exportableFormats
We only need to sort the formats when it is really necessary, i.e. for GUI
purposes.

This also prevents 11000 requests for translation everytime the toolbars
are updated.
2013-03-24 18:06:32 +01:00
Vincent van Ravesteijn
755a14a5d1 Remove unused typedef 2013-03-24 18:06:31 +01:00
Vincent van Ravesteijn
367126bf24 Add a WIN32 equivalent for gettimeofday
This function does not really returns the "time of day", but it will suffice to evaluate elapsed times.
2013-03-24 16:47:07 +01:00
Vincent van Ravesteijn
2662386077 Small simplification 2013-03-24 16:47:03 +01:00
Richard Heck
1928bb9ed1 Don't abbreviate titles in TOC. 2013-03-24 09:39:41 -04:00
Richard Heck
d2e947d585 Fix bug #8603: We want unabbreviated TOC entries here. 2013-03-24 09:34:36 -04:00
Richard Heck
1c0100d3b1 Silly mistake here in earlier commit. 2013-03-24 09:34:36 -04:00
Richard Heck
7dac3a2715 Fix bug #8604: Forgot not to escape the caption string in listings. 2013-03-23 10:05:56 -04:00
Richard Heck
cca2d4c927 Crush warning. 2013-03-23 09:14:44 -04:00
Richard Heck
a93a8cd393 Fix a few more translation probelms for XHTML output. 2013-03-23 09:10:35 -04:00
Scott Kostyshak
8831e4a11f InsetGraphics: add a layoutName method
Now when using inset-forall, "Graphics" can be used
to refer to all Graphics insets.
2013-03-23 05:35:09 -04:00
Georg Baum
c61ef8b205 Support \caption* (bug #3209)
This was a low hanging fruit which would have to wait for a long time because
of a file format change if it was not implemented before 2.1.
2013-03-22 22:23:38 +01:00
Jean-Marc Lasgouttes
11e0d941a2 Implement inset-select-all in mathed 2013-03-22 14:42:47 +01:00
Jean-Marc Lasgouttes
7d698b43a8 More documentation for the poor man's profiler 2013-03-22 11:23:48 +01:00
Jean-Marc Lasgouttes
4663618cfd A poor man's profiler.
The use of this profiler is trivial:

 * #include <support/pmprof.h>

 * in the block one wants to profile, add
   PROFILE_THIS_BLOCK(some_identifier)

 * At the end of the execution, statistics will be sent to standard error.
2013-03-22 10:30:48 +01:00
Uwe Stöhr
9aeb084a22 tex2lyx: we support now \framebox without options
-> this is \fbox

- also update the tex2lyx example file result
2013-03-22 02:00:25 +01:00
Uwe Stöhr
22ad7e4369 support for \mbox and \fbox
- fileformat change
- it was a pity that LyX did not yet support a simple rectangular frame without a defined width but LyX did this for e.g. oval frames
- \fbox and \mbox often occur in TeX files and can now be imported
2013-03-22 01:33:58 +01:00
Georg Baum
cb5dd33475 Split pdf format as discussed on the list
Previously, the format used for included pdf files was the same as for
document export via ps2pdf. This caused unwanted conversion routes, e.g.
export via odt->pdf instead of dvi->ps->pdf.
I renamed the format for included graphics and not for exported documents,
since otherwise the command line syntax for export would change. This would
require more adaptions for the users, since with the chosen solution the
custom converters are almost always changed correctly in prefs2prefs(),
so that only custom external templates need manual adjustement.
2013-03-21 20:13:02 +01:00
Juergen Spitzmueller
0f26aabeee avoid redundant toolbar initialization 2013-03-20 13:59:25 +01:00
Juergen Spitzmueller
d00ec4dece Fix the zombie toolbar problem (bug #8520) 2013-03-20 13:01:48 +01:00
Georg Baum
450159174b Update test references 2013-03-19 21:24:51 +01:00
Scott Kostyshak
ccd46cbe8e GuiTabular: disabling is now done on textChanged()
Before, it was done on editingFinished(). The new behavior is more
intuitive because it is easier for the user to see how editing the box
is connected with enabling/disabling the other widgets. Before, the user
would not get instant feedback and would have to click away before the
connection is revealed. This new behavior is less efficient, however,
because checkEnabled() is called after every keystroke.
2013-03-19 14:48:20 -04:00
Scott Kostyshak
429b39bc0c GuiTabular: LC and ED should both be disabled
Previously, only columnWidthED was disabled.
2013-03-19 12:25:38 -04:00
Richard Heck
3057bce3f2 Fix bug #8587 properly, by using local language for translation. 2013-03-19 11:30:36 -04:00
Uwe Stöhr
c669b6f4d2 tex2lyx: support for Iwona fonts
- also correct the support for the Kurier fonts. Thanks to our cleaner implementation, some code can now go.
2013-03-19 01:18:38 +01:00
Uwe Stöhr
575d98664a Merge branch 'master' of git.lyx.org:lyx 2013-03-19 00:57:50 +01:00
Uwe Stöhr
f08f5821ec support for the Iwona fonts
- the support for Iwona is exactly the same as for the Kurier fonts
- fileformat change
2013-03-19 00:57:37 +01:00
Richard Heck
6dac777dbc Don't try to show the status message if we are busy.
Intended to fix #8523.
2013-03-18 19:49:33 -04:00
Richard Heck
fbe9e96b5e Make things a little better with respect to bug #8587.
Is it possible to figure out the current language from within
an InsetRef? If so, how?
2013-03-18 19:47:17 -04:00
Richard Heck
2c75ad0294 Allowing direct, read-write access to the references cache just seems
like a bad idea.
2013-03-18 19:32:30 -04:00
Richard Heck
27e27db147 Add FIXME concerning bug #8599. 2013-03-18 19:31:04 -04:00
Richard Heck
9548274f39 I'm not absolutely sure about this, but it seems to me as if we
need the master buffer here, too: in looking up fonts during XHTML
output.

I'm half tempted to pass the master buffer to these routines, though
there are times, I think, when we want the actual buffer: e.g., when
looking up branches.
2013-03-18 18:56:38 -04:00
Richard Heck
096de4d82c We don't need to reset counters we aren't using. 2013-03-18 18:46:08 -04:00
Richard Heck
b3ceb89efc Fix bug #8598. We need to use the masterBuffer's counters in the
XHTML output routines.
2013-03-18 18:45:09 -04:00
Richard Heck
5f0e82b72d Fix bug #8597: Output only (ref) for \eqref, not: equation (ref). 2013-03-18 18:09:22 -04:00
Vincent van Ravesteijn
41843646b7 Fix monolithic build 2013-03-18 20:42:28 +01:00
Juergen Spitzmueller
3ab2798b6e Powerdot updates
* Powerdot now also uses the native overlay item arguments
* a list option argument is finally available
* \pause natively supported (like in beamer)
* support for \onslide (via InsetFlex)
* support for \twocolumn

File format change.
2013-03-18 13:36:56 +01:00
Juergen Spitzmueller
370bbbc7f2 Old beamer frames bite the dust
With this commit, old beamer frames are converted to new ones. The old styles are removed (including the infamous \lyxframe).

This should be tested with as much beamer documents as possible (I have already done so), also, tex2lyx now probably produces invalid LyX files.
2013-03-16 12:52:00 +01:00
Georg Baum
257edda49a Fix output of getCaptionAsPlaintext() 2013-03-15 21:16:40 +01:00
Richard Heck
6633a93b6d Forgot the crucial piece of the last commit!! 2013-03-12 13:12:45 -04:00
Richard Heck
3f748c79c3 Add a for_search member to OutputParams, and use it to limit what
work we do when calling plaintext() for the purpose of generating
material for the advanced search function.

Here again, not only were we parsing BibTeX files, since Julien's
(sensible) introduction of plaintext output for that inset, but we
were in fact writing (to disk) complete plaintext output for
included files every time we did such a search.
2013-03-12 12:45:15 -04:00
Richard Heck
e2155d3d58 Create a new DocumentClass for any cloned Buffer.
Uwe says that this fixes #8425.
2013-03-11 10:01:32 -04:00
Richard Heck
872c71ffa6 Try again to fix Kornel's slowness problem. The previous attempt was
worth doing, as we were creating too much output for tooltips anyway.
But we need to ignore BibTeX insets altogether, as the collection of
the references, etc, is too slow.
2013-03-09 12:42:56 -05:00
Richard Heck
65b74b9a1d Fix bug #8580: Do not include material in the XHTML TOC that is not
also included in the output.
2013-03-08 16:38:45 -05:00
Richard Heck
86994bf753 Add a member to TocItem that tells us whether the item in question
is included in output.
2013-03-08 16:38:18 -05:00
Richard Heck
bb36296275 Remove unused code. 2013-03-08 16:22:01 -05:00
Richard Heck
ecef54500d Introduce max_length parameter for plaintext() output routines,
so we can write a limited amount when using this for TOC and
tooltip output.

This should solve the problem with slowness that Kornel noticed,
which was caused by our trying to write an entire plaintext
bibliography every time we updated the TOC. We did that because
he had a bibliography inside a branch, and we use plaintext for
creating the tooltip that goes with the branch list.

Other related bugs were fixed along the way. E.g., it turns out
that, if someone had an InsetInclude inside a branch, then we would
have been writing a *plaintext file* for that inset every time we
updated the TOC. I wonder if some of the other reports of slowness
we have received might be due to this kind of issue?
2013-03-08 15:12:58 -05:00
Richard Heck
f6480263e5 Whitespace. 2013-03-04 18:12:11 -05:00
Richard Heck
e987952664 Fix stupid mistake that led to bug #8574. 2013-03-04 18:07:48 -05:00
Georg Baum
df4f08862e Remove confusing warning
I added it because of a misunderstanding. If the encoding is really set too
late, to_utf8() in the Token constructor would probably fail, but a non-empty
putback buffer is no problem, since it was always created via to_utf8() ->
from_utf8().
2013-03-04 19:50:49 +01:00
Juergen Spitzmueller
9b0f907871 Minor UI polishment 2013-03-02 16:23:51 +01:00
Juergen Spitzmueller
0f48953a7d Re-Introduce translatable line breaks in tool tips
Real line breaks in (recent?) designer are not recognized by lyx_pot.py
2013-03-02 14:30:56 +01:00
Juergen Spitzmueller
dc7029dbf7 Small tweaks to the new pref pane(s) 2013-03-02 14:15:11 +01:00
Juergen Spitzmueller
a4a610221a Split the overcrowded and chaotic UI pref pane into two (#7524) 2013-03-02 12:24:32 +01:00
Juergen Spitzmueller
3861fa1cb4 Maths packages: Further GUI improvements 2013-03-02 10:03:08 +01:00
Juergen Spitzmueller
e53b5972c3 Improve math packages GUI 2013-03-01 15:59:37 +01:00
Georg Baum
97bc443584 Fix regression of f2d2b7c
Thanks Scott for finding the relevant change set!
2013-02-28 22:23:23 +01:00
Georg Baum
ea4bbece46 Forgotten files.
Kornel, it looks like the cmake update tests method misses these.
2013-02-28 21:06:45 +01:00
Kornel Benko
74e9f2eb38 Adapt tex2lyx testcases to format 464 2013-02-28 13:19:04 +01:00
Kornel Benko
2639734157 Missed in previous commit. Added handling of package cancel to the new lyx-format 464 2013-02-27 13:14:59 +01:00
Kornel Benko
8f36aef17a Added "cancel" to the GUI handled list of LaTeX packages.
Generalized convert_use_???() and revert_use_???() routines in lyx2lyx.
2013-02-27 13:12:03 +01:00
Georg Baum
6e2d8cf10a Fix sideset keyboard short cuts
\sideset1 can't be entered via keyboard, so I renamed the commands.
2013-02-26 21:38:27 +01:00
Richard Heck
a4fa1a8f7b Continuing in this case invites disaster. So let's try returning. 2013-02-24 15:34:08 -05:00
Georg Baum
efaae780db Fix regression of 5261ae6a2
Somehow I overlooked that \sideset also supports nonscript arguments for
left and right. This is now fixed, although I do not like the toolbar names.
If somebody knows something better, please improve.
2013-02-24 21:23:50 +01:00
Georg Baum
284f991519 Forgot this in f2d2b7cc7d 2013-02-24 19:43:13 +01:00
Georg Baum
f650c242d0 Found one more nested if to remove 2013-02-24 19:12:56 +01:00
Georg Baum
4ad910c3a6 Try to fix MSVC compile error
We did hit again the MSVC limit of 128 nested if clauses. This change reduces
the number of nested if clauses by 6 which is hopefully enough.
2013-02-24 19:00:17 +01:00
Georg Baum
f2d2b7cc7d Fix some texl2yx accent bugs
This fixes bug #8554 and some recently introduced busg:
- Encodings::fromLaTeXCommand() can now handle all combining characters,
  not only the one letter ones
- The remainder returned from Encodings::fromLaTeXCommand() must never be
  thrown away in tex2lyx, but output as ERT
- No special case for combining diacritical marks needed anymore in parse_text()
- No special cases for accents and IPA combining diacritical marks needed
  anymore in parse_text()
- special tipa short cuts may only be recognized if the tipa package is loaded
- Use requirements returned by Encodings::fromLaTeXCommand() instead of
  hardcoded registering of tipa and tipax
- Get rid of the name2 variable in parse_text(): We must use name, otherwise
  the extra stuff that might have been put into name vanishes
2013-02-24 15:44:16 +01:00
Juergen Spitzmueller
41060c9723 Allow to specify default argument for layout/inset argments
This default argument is inserted iff no inset argument is present. This is useful particularly for mandatory arguments that need to have a sensible default value.
2013-02-24 11:29:21 +01:00
Georg Baum
48c9926d87 Fix bug #8552
tex2lyx skips LyX preamble code only if it thinks that the file was created
by LyX (i.e. special comments are found). I don't like that, but this is
how it works and therefore the special comment neds to be added if the
theorem commands are to be skipped. This header makes also the temporary
setting of in_lyx_preamble obsolete, which caused skipping of user preamble
commands, which were not re-added by LyX.
2013-02-22 22:21:56 +01:00
Georg Baum
b59547ebd5 Improve texl2yx refstyle support
- Convert prettyref to the autopackage mechanism
- Do not load refstyle automatically if some refstyle preamble code of LyX
  is found, since LyX will only load the package if an actual reference
  command is used. This is needed for mixed refstyle/prettyref documents.
- Only recognize refstyle commands if refstyle was detected in the preamble
- Only recognize prettyref commands if prettyref was detected in the preamble
- Add a mixed refstyle/prettyref test case
2013-02-22 21:59:23 +01:00
Jean-Marc Lasgouttes
aa3bbfc984 Fix parsing of literate chunks (bug 7838)
* use verbatimStuff for parsing chunks and make try to follow closely the sweave sytax constraints.
 * merge the two cases for parsing << (noweb or quote)
 * \verb|ff| requires that its parameter is on a single line.
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
e5a9199927 Improvements to Parser::verbatimStuff
* return a Parser:Arg pair to indicate whether parsing was successful
 * add new parameter to restrict parsing to the current line
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
683050d4f9 Some fixes to parsing in tex2lyx
* put_almost_back and putback are actually the same thing
* add Parser::dropPosition
* deparse on Parser::popPosition
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
0082d183b3 Fix confusing behavior in search when changing directions (bug 8543) 2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
05a4c7f908 Typo 2013-02-22 10:50:49 +01:00
Uwe Stöhr
22101c1044 tex2lyx/text.cpp: whitespace only 2013-02-22 01:21:17 +01:00
Uwe Stöhr
2ba1360509 tex2lyx/text.cpp: logic fix for previous commit
- continue; is here not necessary
2013-02-22 01:18:45 +01:00
Uwe Stöhr
a47e61e666 tex2lyx: support further characters
- support for Cyrillic characters
- support for \textifsymbol and \ascii (fixes bug #8556)
- support for \ding
- tex2lyx/text.cpp: correct an indentation and use "name2" because "name" is already defined in this clause
2013-02-22 01:11:30 +01:00
Richard Heck
c4bed8dbe8 Don't convert --- and -- to entities in XHTML listings output.
Fixes bug #8561.
2013-02-21 18:12:53 -05:00
Uwe Stöhr
8254e84f8f Merge branch 'master' of git.lyx.org:lyx 2013-02-21 23:13:57 +01:00
Uwe Stöhr
e7c75296d6 tex2lyx/text.cpp: correction for TIPA character support
- for all TIPA characters the tipa and tipx package must always be registered because these characters are also allowed outside a TIPA inset
- include \textvertline because we again reached the maximum number of if statements allowed by MSCV (so safe at least one for now)
2013-02-21 23:13:05 +01:00
Georg Baum
84e176851d Add a note about ERT environment
The LyX file format only supports one CJK font mapping per document.
Therefore all CJK environments which use a different mapping than the main
one are output in ERT. THis is now explained in the test case, and also the
converion to ERT is improved (although it is still wrong e.g. for paragraphs).
2013-02-21 22:31:22 +01:00
Georg Baum
eb53c60a8f Complete the NoInsetLayout format change 2013-02-21 21:57:59 +01:00
Richard Heck
eb90ac0988 Do not try to load or copy included files when we are in a comment
or doing a dryrun. We skipped some of this before, but not all of it,
which led to bug #8557.
2013-02-21 11:38:36 -05:00
Kornel Benko
7b7f268552 tex2lyx tests: Sort test files 2013-02-20 12:43:36 +01:00
Georg Baum
9f93983b61 Extend unicodesymbols force flag
As suggested by Günter Milde.
2013-02-19 22:19:10 +01:00
Kornel Benko
b353a0b037 Adapt tex2lyx testcases to new format 2013-02-19 15:44:11 +01:00
Jean-Marc Lasgouttes
30cbe535c3 Make annoying debug message optional 2013-02-19 13:48:48 +01:00