Commit Graph

23154 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
d0a318c742 We do not use <boost/scoped_array.hpp> anymore
The code using it  was removed at 81959251.
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
5ee778af75 Remove support/metahash.h
It turns out that it did not take off since introduced in 2011. It is better to remove it and the associated boost headers (extract.sh was run against boost 1.60 to do the update).

Since we will move away from several boost classes when transitioning to C++11, it is good to start by removing lesser used ones.
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
68a1f9a44e Do not use of boost::tokenizer
It is easier to use instead getVectorFromString for the use we have of this tokenizer. The two places are environment.cpp (path stuff) and qt_helpers (file fileters). The new code is much shorter.

This allow to remove boost/tokenizer.hpp and friends from our boost tree.
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
87d4ce0ff7 Remove boost/format support
Only ChkTex.cpp used it, whereas the rest of our code uses the simpler bformat.
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
b639056981 Remove declaration of classes that do not exist
Some headers contain
  class Foo;
whereas there is no class Foo.

The list of class statements is given by
  classes=`git grep  '^\(class\|struct\) [a-zA-Z_:]*;' src | sed 's/^.* \(.*\);/\1/'|sort -u`

The ones that are useless are:
  for c in $classes ; do grep -r "\\<$c\\>" src| grep -vq '^[^:]*:\(class\|struct\) [a-zA-Z_:]*;' || echo "$c"; done
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
7628f0bf97 \\pagebreak is a fragile command in general
As such, it shall be protected in moving arguments, such as sections.

Fixes bug #10092.
2016-05-29 17:55:45 -04:00
Jean-Marc Lasgouttes
282fe102f3 Fix getStatus for math-mutate and math-display
Those two functions used two different hackish and buggy
implementation to know when the function is disabled. Replace that by
asking the containing inset whether it accepts inserting display math
inset.

Fixes bug #10033.
2016-05-29 17:55:45 -04:00
Stephan Witt
b8be856f79 Remove unused include file. 2016-05-29 17:55:45 -04:00
Stephan Witt
3a2fc1595b Correct path names were to look for RPM based dictionaries for hunspell on Linux. 2016-05-29 17:55:44 -04:00
Jean-Marc Lasgouttes
26308c1d6b Disable LFUN_INSET_DISSOLVE in tabulars
When in a tabular cell, "this" is just a lone InsetText, while cur.inset() is the whole tabular. This makes a big difference, especially when one wants to count cells.

Fixes bug "9954.
2016-05-29 17:55:44 -04:00
Guillaume Munch
4002c6af72 fix #9826: Outline disclosure of subsection content disappears one second after
doubleclicking content item.

This is only meant as a workaround. See #6675 for more general issues regarding
unwanted collapse of the tree view.
2016-05-29 17:55:44 -04:00
Georg Baum
cfa0eea4b9 Fix compiler warnings 2016-05-29 17:55:44 -04:00
Georg Baum
d2e3a201b9 Do not redefine WINVER
Compiling different parts of the sources with different WINVER may lead to
subtle and hard to detect problems. Better use the same value everywhere.
The existing error message suggests that this was wanted anyway, and it
fixes a compiler warning when cross-compiling for mingw on linux. Our code
does not require a specific value, only a minimum value of 0x5000, which
means the resulting executable will require at least Windows 2000.
2016-05-29 17:55:44 -04:00
Georg Baum
d5d2aa9de9 Fix compiler warnings
Only the ones I understand (DWORD is always unsigned). There are more:

../../src/Server.cpp: In member function ‘bool lyx::LyXComm::pipeServer()’:
../../src/Server.cpp:280:10: warning: enumeration value ‘CONNECTING_STATE’ not handled in switch [-Wswitch]
   switch (pipe_[i].state) {
             ^
     ../../src/Server.cpp:347:8: warning: ‘success’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             && status == pipe_[i].iobuf.length()) {
             ^
2016-05-29 17:55:44 -04:00
Georg Baum
26526b13c5 Properly check for windres
Use the standard way to check for the resource compiler, as e.g.
libtool does it: AC_CHECK_TOOL does already provide some cross compiling
magic, and we do also get an error now at configure time if windres is not
found.
2016-05-29 17:55:43 -04:00
Stephan Witt
d5fb80ed87 Remove special code for Qt5 to manage HiDPI. It's not needed anymore and leads to strange icon scaling problems in mixed resolution environment.
For reference see the screen shots in bug tracker ticket #10114.
2016-05-29 17:55:43 -04:00
Guillaume Munch
ee18af67cd Show review toolbar when outputting changes
"Output changes" alters the preamble even in the absence of tracked
changes. Therefore, not being able to notice when it is activated can possibly
yield hard-to-debug compilation failures.
2016-05-29 17:55:43 -04:00
Georg Baum
fddaa6adeb Make windres configurable
The windres program is typically not called windres for cross compilation.
Now you can call configure with the argument
	WINDRES=x86_64-w64-mingw32-windres
in order to use the windres program on a standard debian installation.
2016-05-29 17:55:43 -04:00
Georg Baum
08afc52c4c Configure included iconv with autotools
The included iconv should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included iconv or not.
cmake does already support that.

eilseq.m4 was taken from the original libiconv 1.14 package.
2016-05-29 17:55:43 -04:00
Georg Baum
637fbb7ac9 Use c-style cast as in original
static_cast does not work
2016-05-29 17:55:43 -04:00
Georg Baum
127e5b1955 Add forgotten zlib includes
I forgot this in 9b822b25ae5. Also remove a comment that is no longer true.
2016-05-29 17:55:43 -04:00
Georg Baum
d5f2bad461 Mingw-w64 build fixes for long long
On mingw-w64, long long (64bit wide) is larger than long (32bit wide).
Therefore we need some more specializations for string, docstring,
otextstream and << overloaded ostream functions. The configuration code
is by me, the source code changes by Shankar Giri Venkita Giri (bug 10053).
2016-05-29 17:55:43 -04:00
Shankar Giri Venkita Giri
88b68ee004 Fix return types for mingw-w64
This is needed for warning-free compilation with mingw-w64, and does not hurt
for other build configurations. Patch by Shankar Giri Venkita Giri (bug 10053).
2016-05-29 17:55:43 -04:00
Georg Baum
78e17b1579 Configure included zlib with autotools
The included zlib should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included zlib or not.
cmake does already support that.

zconf.h.in was taken from the original zlib 1.2.8 package. The generation of
zconf.h was made equivalent to the one generated by cmake.
2016-05-29 17:55:43 -04:00
Guillaume Munch
3465bf4baf typo 2016-05-29 17:55:42 -04:00
Guillaume Munch
395d9e09e2 Disable certain change tracking commands when there are no changes
Fix TODO
2016-05-29 17:55:42 -04:00
Guillaume Munch
4154e088b0 GuiChanges: provide feedback when there are no more changes
Remove FIXMEs: date and time localisation
2016-05-29 17:55:42 -04:00
Guillaume Munch
6d4e6aad24 Automatically show the review toolbar if the document has tracked changes
(#8738)

For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
2016-05-29 17:55:42 -04:00
Guillaume Munch
9a09fe38bd getInnerText() 2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
1639abb8ed Let getPosNearX take horizontal scrolling into account
If we do not do that, it is not possible to position the cursor after
a long inset with the mouse.

To do this, it is necessary to add the pit information to the Row
object. This is a good idea in any case, and will allow to simplify
some code later on.

Fixes bug #10094.
2016-05-29 17:55:42 -04:00
Guillaume Munch
27607b76f5 TocWidget: clean-up the timer logic
The timer logic introduced to solve bug #7138 was not entirely reliable; in
particular it resulted in spurious updates (noticeable by the treeview
collapsing just after one opens a branch, in particular).

This commit cleans up the timer logic. I followed the original design decision
of having an immediate update followed by a delayed update. Now the updates are
appropriately compressed and done after a delay of 2s (as can be noticed with
the treeview still collapsing, unfortunately, but after a more predictable
delay...).
2016-05-29 17:55:42 -04:00
Guillaume Munch
2f9d323396 TocWidget: Fix perf regression
4d1ad336 fixed #9754 but caused perf issues by cancelling the gains of having a
timer (introduced after #7138). This introduces in GuiToc::enableView() a
lightweight check of whether the widget should be updated. The logic is inspired
from GuiViewSource::enableView().
2016-05-29 17:55:42 -04:00
Guillaume Munch
0e740018ff Whitespace 2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
5aa342ed75 Fix cursor position after redo
When document settings are modified, a command
  inset-forall Branch inset-toggle asign
is run to open as needed all branches. At the end of the said loop,
the cursor is reset to where it was. However, the cur_after undo
element member is not set because it already had a value.

To make this work as expected, it is necessary in LFUN_INSET_FORALL to
reset the cursor before ending the undo group and to insert a dummy
recordUndo call.

Fixes bug #10097.
2016-05-29 17:55:42 -04:00
Guillaume Munch
c47bfee231 Amend d7d4f65b
Thanks Richard
2016-05-29 17:55:42 -04:00
Guillaume Munch
e3540f33e1 Simplify class structure in TocBackend
Deriving from std::vector to provide helper functions appears a touch
excessive. Use typedef instead and move helper functions to the base class. New
header Toc.h provided to replace forward-declarations.

Remove TocIterator which is useless.
2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
d48d426c72 Rename InsetMathHull::isTable to allowsTabularFeatures
The old name conflicted with the newly introduced Inset::isTable.

Now the meaning is as follows.
* Inset::isTable() is true when the inset is composed of lines and columns
* InsetMathHull::allowsTabularFeatures is true when the current type of hull allows for tabular-like functions.
2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
a879bc2575 Fix horizontal scrolling in full-width collapsable insets
While a one paragraph large collapsable inset (containing for example a tabular) could be very wide and trigger horizontal scrolling, the code that makes collapsable insets wide when they contain several paragraphs would actually make them narrower in this case.

Typical example is a wide tabular and a caption in a table float, where horizontal scrolling would not trigger.
2016-05-29 17:55:42 -04:00
Guillaume Munch
6bd70011e9 LyXToolBox: a QToolBox with minimum size management
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.
2016-05-29 17:55:41 -04:00
Stephan Witt
6799032e77 factor out lookup of loaded hunspell checkers and use it to reduce file system accesses when checking for available dictionaries 2016-05-29 21:17:08 +02:00
Juergen Spitzmueller
8ed362fda7 Implement some forgotten context menu items for arguments
* Dissolve context menu
* Label toggle (for conglomerate-styled arguments)

Fixes: #10150
2016-05-29 12:32:53 +02:00
Richard Heck
0e1834f2d9 Updates to splitting of consecutive environments.
From Enrico.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
625e7609f0 Cleanup bv-dependent variables in InsetCollapsable
It makes sense to group all the variables in a common struct instead of having four maps.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
1ec605cbb2 amend 5b7be5eb (typo+spacing) 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
d8f6e65ec7 Make inset-select-all select all cells only in tables
inset-select-all has 3 levels
1. select current cell
2. select all cells
3. select inset from outside.

The second level makes sense for tables (text and math), but not for things like a math fraction.

Introduce a new method Inset::isTable() that allows to detect this case properly and skip level 2.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
fd3a41e035 Change mouse cursor on tabular selection zones
This is done by implementing the clickable method. It is not possible yet to have the usual left and down arrows, because Qt does not implement them as far as I can see.

Factor the code that triggers row/column selection and fix the logic. Now it is possible to select also at the right of the tabular inset.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
fd6ae3539b Fix display of InsetCollapsable with split views
When several bufferviews exist for the same inset, the data that depends on the view width have to be BufferView-dependent. While this is the case for several mutable members of InsetCollapsable, some were missing.

This commit makes button_dim_ (renamed from button_dim) and openinlined_ bv-dependent.

Get rid of the hitButton function.

Remove the bv-independent geometry() method and implement editable() explicitely instead.

Fixes bug #9756.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
f23a8fed80 whitespace only 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
ffe1d53cdb Pass a BufferView to Inset::clickable 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
890a1efe47 Make monolithic build code portable to Mac OS
"echo -e" is definitely not portable. Use a plain loop instead.

Also use the automake silent rule mechanism to make the generation of monolithic source files visible.
2016-05-28 17:43:01 -04:00