Commit Graph

21357 Commits

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