Commit Graph

21236 Commits

Author SHA1 Message Date
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