Commit Graph

20422 Commits

Author SHA1 Message Date
Juergen Spitzmueller
040fb73b9c Do not hardcode polyglossia-only languages 2012-06-08 12:54:57 +02:00
Uwe Stöhr
ceb180cebd GuiDocument.cpp: some languages only work with polyglossia, therefore enable non-TeX fonts when one of them is used as document language 2012-06-08 05:39:00 +02:00
Uwe Stöhr
2872f35a51 - FORMAT: document latest change
- tex2lyx/text.cpp: fix a comment
2012-06-08 02:42:22 +02:00
Uwe Stöhr
7eca5d94d1 - support a bunch of new languages (fileformat change)
- tex2lyx support for
  - fontspec fonts
  - polyglossia
2012-06-08 02:37:36 +02:00
Juergen Spitzmueller
a4ea17e0e9 Restore default output format after tex fonts switch (#8191) 2012-06-07 21:27:01 +02:00
Jean-Marc Lasgouttes
c7549c1b54 Fix bug #8027: Edit->Paste Special->... does not replace selected text
Delete the selection before all paste-like lfuns. This was previoulsy done
only for LFUN_PASTE, the others at best unset the selection.
2012-06-07 18:14:17 +02:00
Jean-Marc Lasgouttes
0ef36860c3 Handle sending a FuncRequest object to lyxerr
* Implement the corresponding operator<<

  * Use it in a couple new places
2012-06-07 17:21:49 +02:00
Richard Heck
9e678569ad Typo. 2012-06-06 18:20:02 -04:00
Richard Heck
b7ac2d69e7 Allow LyX format to be written to View>Source window. 2012-06-05 10:24:15 -04:00
Richard Heck
cfc43d772d Move TexRow stuff near where it is used. 2012-06-05 10:24:15 -04:00
Jean-Marc Lasgouttes
bcd6990eca Revert "Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly""
This is becoming crazy :)

This reverts commit 5b531b56ef.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
9a3b6733c0 Revert "Second tentative fix to #8159: Undo doesn't restore environment depth correctly"
Did not mean to commit that.

This reverts commit 8f01556236.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
992eae2524 Typos 2012-06-05 12:22:13 +02:00
Jean-Marc Lasgouttes
8f01556236 Second tentative fix to #8159: Undo doesn't restore environment depth correctly
In this version, the idea is to record undo at the place where the document is modified, which is definitely cleaner.

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-05 11:32:56 +02:00
Jean-Marc Lasgouttes
5b531b56ef Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b.
2012-06-05 11:32:56 +02:00
Richard Heck
8b2aab9b3d Style. 2012-06-04 13:42:46 -04:00
Richard Heck
7ef8df460a Fix crash reported by Tommaso:
http://marc.info/?l=lyx-devel&m=133876924408431&w=2
The problem here is that the copy_params() routine in FindAndReplace.cpp
created a new DocumentClass, but it never updated its Buffer to reflect
that new DocumentClass. So its Paragraphs still contained points to the
Layouts in the old DocumentClass which, since ead697d4b6, gets garbage
collected once it is no longer needed. So the Layout doesn't exist, and
we crash.
2012-06-04 13:39:24 -04:00
Richard Heck
1078dba130 Fix crash reported by Scott. Forgot to change some pointers to
shared_ptr.
2012-06-04 13:04:26 -04:00
Jean-Marc Lasgouttes
ad7deaabeb Fix bug #7956: Assertion When Trying to Paste Into Table
For some unknown reason, the paste code likes to call Cursor::setSelection(), which is not appropriate here since we are not trying to set a selection at this point.
2012-06-04 17:05:43 +02:00
Juergen Spitzmueller
af59dffeda Add missing undo recording.
This adds a change of the printindex type (with multiple indices) to the undo stack and marks the buffer dirty on that action (bug #8182)
2012-06-03 10:31:38 +02:00
Richard Heck
ead697d4b6 Deal with memory issue reported some time ago in connection with DocumentClass
objects. The problem that led to the leak is that these objects can be held in
memory long after the Buffer that created them is gone, mostly due to their
use in the CutStack. So they were previously held in a storage facility, the
DocumentClassBundle. Unfortunately, they were now being created too often,
especially by cloning. It's not really a leak, because they're accessible, but
we weren't ever destroying them.

This new approach uses a shared_ptr instead.

Thanks to Vincent for pointing out const_pointer_cast.
2012-05-31 12:34:29 -04:00
Richard Heck
03da96e0f7 Minor cleanup: We should use the usual conventions for
InsetLayout names.
2012-05-31 12:24:08 -04:00
Richard Heck
be89d37bd4 Properly initialize variable. This should fix the problem
reported here:
	http://marc.info/?l=lyx-devel&m=133775786222603&w=2
by Scott.
2012-05-31 12:04:09 -04:00
Pavel Sanda
262c2e95a9 Tabular.ui: Moving Latex argument field to column section.
Forgotten patch from John Tapsell.

Documentation moved from UI to User Guide.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173987.html

This was here for ages, no need to rush into branch.
2012-05-31 15:36:33 +02:00
Pavel Sanda
f692181917 Fix #8180: Page break on current row can't be unchecked.
Patch from John Tapsell
2012-05-31 13:56:07 +02:00
Juergen Spitzmueller
ab3491adef Fix crash when removing last converter (bug 8178) 2012-05-29 14:21:29 +02:00
Juergen Spitzmueller
9fc92f783c Load bibtopic after hyperref (bug #8005) 2012-05-29 13:25:30 +02:00
Richard Heck
c1e3d795f6 A few more small optimizations noted along the way. 2012-05-28 18:21:22 -04:00
Jean-Marc Lasgouttes
a756403301 "Performance" fixes suggested by cppcheck
While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
2012-05-28 22:42:44 +02:00
Juergen Spitzmueller
6ddcfb87e4 Fix macro termination in IPA inset if next character uses a TIPA shortcut 2012-05-26 16:36:24 +02:00
Pavel Sanda
1b1f9d05d9 compile fix 2012-05-26 10:16:20 +02:00
Vincent van Ravesteijn
655a4f5515 Fix painting of hidden tabbar on gtk
When there is a single document open, the tabbar gets hidden. The only and selected tab is still visible though as a break in the line delining the tabwidget. To fix this we paint the tabwidget ourselves and remove the presence of the hidden tab.
2012-05-25 19:17:48 +02:00
Vincent van Ravesteijn
4c3a97d96e Fix bug #8170: Crash when client disconnects unexpectedly
When the socket does not exist anymore, we should not try to access it. In
trying to do so, std::map will create a new shared_ptr but this pointer
doesn't point at anything. To prevent this, we explicitly check whether
the socket is available.
2012-05-24 13:55:41 +02:00
Richard Heck
9d983562fe Style. 2012-05-23 08:53:14 -04:00
Vincent van Ravesteijn
d20cb73b87 Fix bug #8166: Crash on clicking away from empty last paragraph
This reverts the previous fix in [0a33374c/lyxgit] and fixes it
differently.

We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
2012-05-23 08:02:40 +02:00
Vincent van Ravesteijn
0a33374c0d Fix bug #8166: Crash on clicking away from empty paragraph
We rely on the 'or' operator to prevent us from calling
'notifyCursorLeaves' if one of the two cursors is broken. This doesn't
work when using the '|' operator. The compiler 'optimizes' the code in
such a way that we always call notifyCursorLeaves anyway. Using the '||'
operator fixes this.
2012-05-23 01:31:43 +02:00
Jean-Marc Lasgouttes
e3854bb59b Tentative fix to #8159: Undo doesn't restore environment depth correctly
The undo range is extended to encompass all the paragraph after the end that
are a non-zero depth. The reason is that these paragraphs may see their depth
reduced if the last paragraph sees its depth reduced.

Note that there is a memory cost, since we store paragraphs than may not be
modified in practice. This may matter for some pathological files (people
putting all their document at depth 1 for a weird reason?)

I tried to be careful, but this can introduce new bugs. Please test.
2012-05-22 22:18:34 +02:00
Pavel Sanda
255b218ce3 Just comment 2012-05-22 15:54:26 +02:00
Richard Heck
cd05753107 Forgot to change format in LyXRC.cpp. 2012-05-22 08:58:40 -04:00
Richard Heck
288c1e0faa Add "nice" flag for converters, addressing final problem with bug #4624. 2012-05-22 08:56:05 -04:00
Lars Gullik Bjønnes
fb3ecca01c TextMetrics.cpp: comment out addressBreakPoint function
Only user of this function is code that has been commented out, comment
out this function as well.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-05-20 11:08:20 +02:00
Juergen Spitzmueller
ab1434dce3 If a file is saved as, reset its master if it has any, thus preventing a crash (bug 8161) 2012-05-19 10:16:28 +02:00
Pavel Sanda
436cb86ff1 * doxy 2012-05-17 19:12:27 +02:00
Vincent van Ravesteijn
30475664d3 Allow an unnamed buffer to be saved with the same name
The check whether fname != oldname does not work for unnamed buffers.
Therefore, we check explicitly whether the Buffer that already exists with
the same name isn't really the buffer we are trying to save.
2012-05-14 15:26:51 +02:00
Richard Heck
d89158df2a We need to clean the HTML id before writing it. 2012-05-14 08:30:04 -04:00
unknown
b17250d7eb Fix bug #7641: Freeze when removing itemized first paragraph
Text::outerFont looks recursively for paragraphs before the current one
which has a lower depth. If such a paragraph cannot be found, depthHook
and outerHook return the current paragraph. As such, we end up in an
infinite loop. So, if we find a par_depth that was the same as the
previous one, we apparently can't find a suitable paragraph and we should
quit the loop.
2012-05-14 14:24:53 +02:00
Enrico Forestieri
93ebb7a863 Fix bug #7982: LyX does not work if working directory a hard disk drive like D:\
In this case, the working dir has already a slash at the end.
Appending another one would result in a path ending with a double slash,
which has a special meaning when used in TEXINPUTS (all subdirs would
be recursively scanned). So, avoid doing that.
2012-05-14 13:08:30 +02:00
Richard Heck
207d7e4ada Fix bug #8156.
We want the key as id, not the label (which is optional).
We also need a kind of namespace for the citation ids.
We should also clean the id tag before using it.
2012-05-13 14:00:44 -04:00
Richard Heck
319e35188a Style. 2012-05-13 13:40:22 -04:00
Georg Baum
de00ce40aa Forgot the test case for bug #8116. 2012-05-13 18:54:14 +02:00