* do not lookup the same macro all the time
* only update the representation if anything was changed (this gives a
huge speedup), fixes #2452
* minor cleanup of the code, especially setting up the coordinate
cache. Without this can lead to crashes if the macros do not mention
all the arguments.
* And a last fix included makes sure that the metrics are always in
sync with the drawing. Before it was possible to go into the macro
with the cursor in a way that the metrics were for the viewing mode,
but the drawing was done for editing.
* force the tex2lyx Font class everywhere in tex2lyx. Without this in
TextClass.cpp the tex2lyx Font class was used, but elsewhere the LyX one.
Hence, because of different binary sizes strange segfaults happened because
the inline methods of TextClass used a different binary layout than the
non-inline methods.
José Matox [Thu, 24 May 2007 16:02:42 +0000 (16:02 +0000)]
Updated translations for Norwegian.
Particularly new stuff:
* new menu entries
* TOC dialog
* listings dialog
* Lots of tooltips that was invisible last time
* Random changed texts all over the place
* Import newcommand/providecommand/renewcommand/def macros as MathMacros
if they are compatible (i.e. no optional arguments, no patterns)
* Recursive macros are also imported, but they only work correctly in the
limits of the current macro implementation in LyX
* Fixes http://bugzilla.lyx.org/show_bug.cgi?id=21
Edwin Leuven [Wed, 23 May 2007 22:08:07 +0000 (22:08 +0000)]
- introduces toolbar_toggle lfun
- adds a "toggle math toolbar" and "toggle table toolbar" buttons to the main toolbar
(i also moved "toggle toc" there)
- adds a "toggle math panels" button to the math toolbar
- reshuffles the Big Operators panel to avoid confusion with the sum icon on the math toolbar
- adds some icons
Fix bug 3301 (selecting buttons (e.g. a citation) with the mouse opens dialog)
* insets/InsetExternal.cpp (doDispatch):
* insets/InsetGraphics.cpp (doDispatch):
* insets/InsetInclude.cpp (doDispatch):
* insets/InsetCommand.cpp (doDispatch):
* insets/InsetVSpace.cpp (doDispatch): do not open dialog if a
selection is set.
* insets/InsetRef.cpp (doDispatch):
* insets/InsetCharStyle.cpp (doDispatch): act on mouse release, not
mouse press.
Georg Baum [Tue, 22 May 2007 10:51:38 +0000 (10:51 +0000)]
fix bug 1973 (hopefully)
* src/Text2.cpp
(Text::setCharFont): Assert
(Text::setInsetFont): New, set the font recursively in insets
(Text::setFont): Call setInsetFont instead of setCharFont if needed
Richard Heck [Mon, 21 May 2007 15:34:29 +0000 (15:34 +0000)]
Partial fix for bug 1474 (crashes on recursive includes) and complete fix for
bug 3659 (crash when file contains only an InsetInclude).
Added checks for self-inclusion. The reason this is not a complete fix is that
recursive input could arise from something other than self-inclusion. Checking
for that will be much more complicated, however.
* src/frontends/qt4/QDocument.cpp (validate_listings_params):
* src/frontends/qt4/QListings.cpp (validate_listings_params):
- care for the apply button as well.
Uwe Stöhr [Sun, 20 May 2007 20:35:35 +0000 (20:35 +0000)]
installer:
- fix problem with path with spaces in the Launcher
(thanks to Martin Rauscher for testing)
- add icons and version info to the launcher and the PDF viewer
Richard Heck [Sat, 19 May 2007 19:29:50 +0000 (19:29 +0000)]
Fix for bug 3650. Made changes to the Paragraph::checkBiblio() routine,
which now returns 1 if an InsetBibitem was inserted (and the cursor needs
to be incremented) or -POS if an InsetBibitem was deleted at position POS
(and the cursor needs to be decremented if it was past POS). Otherwise, it
returns 0. Made the corresponding changes in TextMetrics.cpp.
* only antialias the whole polyline or no segment at all
* Sqrt and Root draw their vertical horizontal line with a single line command to make them showup non-antialiased.
Fix for bug 3637, joint work of Bo Peng and myself:
* src/insets/InsetListingsParams.{cpp,h}
- implement getParamValue that returns the value of a listings param
* src/insets/InsetInclude.cpp:
- (getLabelList): pass listings label to the list, if available
- doDispatch: implement changeRefsIfUnique for listing labels
José Matox [Thu, 17 May 2007 21:53:11 +0000 (21:53 +0000)]
Fix a crash which occurs when RTL flag is turned on.
The crash was being caused by the fact that when moving back from the
beginning of the line to the previous line (by pressing RIGHT in an
RTL paragraph, or LEFT in an LTR one), Bidi metrics for the new line
do not yet exist, but an attempt is made to access them.
Basically, this patch was created by trying to "symmetrically" copy
cursorRight (which seems to work well) to cursorLeft (which was
problematic).
José Matox [Thu, 17 May 2007 21:47:32 +0000 (21:47 +0000)]
Fix for a problem reported by some users, where cut & paste of math
insets in RTL paragraphs is garbled because of parentheses being reversed.
See threads http://permalink.gmane.org/gmane.editors.lyx.devel/83938 and
http://thread.gmane.org/gmane.editors.lyx.devel/83345/focus=83637 for
details.
This patch solves this crash (due to an assertion):
1) Open EmbeddedObject.lyx
2) Open Toc
3) Click on section 7.2.2 which is in the second child document
4) assertion.
This commit adds proper support for multi-part documents. With this each child document has access to the _full_ TOC tree (including LOT and LOF). This enables to switch between master and child document using the TOC.
* buffer_funcs.cpp:
- updateLabels(): do not emit Buffer::structureChanged() signal for child document
- checkBufferStructure(): update the structure of the master document.
* ControlToc.cpp: always use the TocBackend of the master document.
* LyXView::connectBuffer(): connect structureChanged() of master document.
* TocBackend:
- TocItem: get rid of child_ member.
- TocBackend::item(): only compare items from the same document.
Georg Baum [Thu, 17 May 2007 08:31:00 +0000 (08:31 +0000)]
Fix files with spaces in converter cache;
Delete cached conversions if the converter changes.
* src/frontends/qt4/QPrefs.cpp
(PrefConverters::update_converter): delete cached files since the
new converter might create different ones
(PrefConverters::remove_converter): ditto
* src/support/convert.cpp
(unsigned long convert<unsigned long>): New template specialization
* src/ConverterCache.h
(ConverterCache::remove_all): New method, removes all cached
conversions of a particular converter
* src/ConverterCache.cpp
(CacheType): Also store source file format
(ConverterCache::Impl::readIndex): Handle files with spaces correctly
(ConverterCache::Impl::writeIndex): ditto
(various): adapt to changed CacheType
Toc navigation doesn't work well with child document. This is the first part of the fix: the Toc item selection is properly done before the location of the child document.
Use case solved by this patch:
1) open EmbeddedObject.lyx
2) open the TOC widget (Uwe says it crashes there but I can't reproduce)
3) try to select an item previous to 6.2.2: crash because of an assertion:
Assertion triggered in bool __cdecl lyx::operator <(const class lyx::CursorSlice
&,const class lyx::CursorSlice &) by failing check "false" in file D:\LyXSVN\ly
x-devel\src\CursorSlice.cpp:106
I think this patch will also solve bug 3616:
http://bugzilla.lyx.org/show_bug.cgi?id=3616
* TocItem::child_: new member for child document; default to false.
* TocBackend::item(): skip DocIterator comparison if item is in child docuemt.
Temptatively fix bug 3546 by testing for more exceptionm types and by unifying the possible errors. I think the reason why we did not have a crash on windows is because we don't use wchar_t and the related basic_filebuf etc.