Commit Graph

344 Commits

Author SHA1 Message Date
Georg Baum
4736356bf9 fix remaining bits of bug #6709
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36718 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-04 16:43:41 +00:00
Georg Baum
7edd656f21 Fix inserting subscript/superscript with nonempty selection by creating a dedicated lfun:
inset-insert simply swallows the selection, while box-insert, note-insert etc.
put the selection inside the new inset.
As a side effect the toolbar icons get better names, as requested by Uwe.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36451 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 20:09:08 +00:00
Georg Baum
dea050cb93 fix bug 3008: Add subscript/superscript inset for text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36424 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 17:00:12 +00:00
Richard Heck
13fa0dda1b Fixed bug #7037. Don't need these updateBuffer() calls.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36339 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 15:54:51 +00:00
Vincent van Ravesteijn
c5b9664476 Remove the name parameter from string2params and params2string. We can always derive the name with insetName(params.code()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35891 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 00:25:28 +00:00
Vincent van Ravesteijn
573500dd04 Remove unneccessary uses of dynamic_cast from the code.
A dynamic_cast is necessary when:

- the object to be casted is from an external library because we can't add Qxxx::asXxxx() to Qt e.g.:
    * QAbstractListModel to GuiIdListModel,
    * QValidator to PathValidator,
    * QWidget to TabWorkArea,
    * QWidget to GuiWorkArea;

- the object is to be casted from an interface to the implementing class, because the Interface does not know by whom it is implemented:
    * ProgressInterface to GuiProgress,
    * Application to GuiApplication.

A dynamic_cast can be replaced by:
  - already existing as***Inset() functions, e.g.:
    * asHullInset(),
    * asInsetMath()->asMacro(),
    * asInsetText();

  - a static_cast when we are sure this can't go wrong, e.g.:
    * we are sure that CellData::inset->clone() is an InsetTableCell,
    * in cases where we explicitly check it->lyxCode().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35855 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 15:03:51 +00:00
Vincent van Ravesteijn
ba19e8b5dd Fix bug #1839: Ctrl+arrows don't move to next/prev table cell.
Patch from Punyashloka Biswal.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35812 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 01:18:48 +00:00
Vincent van Ravesteijn
f35d1a2a4c Fix bug #6869: Crash when unindenting empty lines in listings inset.
- Remove some duplicated code;
- Do not call par.getChar(0) when the par is empty.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35702 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-18 10:48:29 +00:00
Richard Heck
3af1fa5abb I am basically trying here to get rid of random calls to
processUpdateFlags. This one is easy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35650 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-14 14:47:33 +00:00
Richard Heck
6a80ce62ca DispatchResult::update() ==> DispatchResult::screenUpdate()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35631 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 17:28:55 +00:00
Abdelrazak Younes
d8981b13ae * Get rid of LFUN_TOC_INSERT: we use LFUN_INSET_INSERT "toc".
* Fix usage of "inset-insert type" without CommandInset arguments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35345 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-12 07:56:08 +00:00
Abdelrazak Younes
a648c39b70 Get rid of LFUN_LINE_INSERT: we use LFUN_INSET_INSERT "line".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35344 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-12 07:01:24 +00:00
Uwe Stöhr
0e7ab29f49 InsetLine: support for the LaTeX command \rule; kick out the hardcoded \lyxline; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35299 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-07 00:41:00 +00:00
Jean-Marc Lasgouttes
e4f2484cb5 Implement LFUN_SPELLING_REMOVE (patch from switt)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35055 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-05 20:10:40 +00:00
Richard Heck
5577e877bb Try to move all updateBuffer() calls to a central location. We now use
DispatchResult to store a flag that tells us whether we need a buffer
update or not. 

So: If you find a missing one, go to an appropriate place in the
dispatch and call cur.forceBufferUpdate() or, if you don't have a cursor
but do have a DispatchResult, call dr.forceBufferUpdate().

There is one remaining call I could not move, in
TextMetrics::redoParagraph. But this looks like an emergency call when
the macro context has not been set. There are also a couple calls that
are connected with buffer creation that I commented out, since the same
call is done again almost immediately. But I'm not positive about those.

Now the nice thing would be to do the same for updateMacros().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34826 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-09 14:37:00 +00:00
Richard Heck
0e14f379f3 Rename a couple routines. This will avoid confusion with a forthcoming
patch.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34816 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-08 20:04:35 +00:00
Richard Heck
319ca06167 Rename LFUN_OPTIONAL_INSERT as LFUN_ARGUMENT_INSERT.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34597 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-04 22:53:44 +00:00
Richard Heck
8480d1dd9a Rename InsetOptArg as InsetArgument.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34596 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-04 22:44:58 +00:00
Richard Heck
b0097bcddb Introduce a new "RequiredArgs" tag for layouts. This functions much as
the OptionalArgs tag does and is implemented by the now misnamed
InsetOptArgs, except that its content gets wrapped in "{}" rather than
"[]". Required arguments do not actually have to be provided, but they
are always output. 

This will allow e.g. beamer's Block environment to be implemented
without ERT.

Documentation to follow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34591 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-04 21:50:08 +00:00
Vincent van Ravesteijn
3417702346 * FuncStatus: unify naming of functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34160 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-16 10:51:20 +00:00
Vincent van Ravesteijn
108a67ed43 Make Cursor::anchor_ private and make an access function Cursor::realAnchor() to stress the fact that this is thus not the normalAnchor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 18:16:07 +00:00
Richard Heck
b79d8e5e2d Make members of FuncRequest private, per the FIXME there. Again, this is
basically a massive renaming, with no real changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34106 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 19:00:42 +00:00
Richard Heck
4c7a5d0024 This is just a giant renaming of member variables in FuncRequest,
preparatory to making them private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34105 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 18:15:17 +00:00
Vincent van Ravesteijn
bb69584112 Introduce InsetPreview.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33890 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-28 13:47:50 +00:00
Vincent van Ravesteijn
69f46cf1b2 Use LASSERT instead of BOOST_ASSERT.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33889 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-28 13:20:57 +00:00
Richard Heck
75454ca8c5 Disable lists of floats we don't know how to generate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33635 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-05 23:47:33 +00:00
Richard Heck
d65020b293 s/updateLabels/updateBuffer/g, per a suggestion of Abdel's.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33613 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-03 22:13:45 +00:00
Abdelrazak Younes
377cdd5f6c Transfer LyXfunc code to GuiApplication::dispatch() and getStatus(). Now
a lot of simplification is possible. Except some instability period...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 16:11:13 +00:00
Jürgen Spitzmüller
707935ab23 * store the full Language in WordLangTuple.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33378 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 11:26:49 +00:00
Jürgen Spitzmüller
a61eeb1fb2 Allow to switch buffer languages via the menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33366 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:15:00 +00:00
Jean-Marc Lasgouttes
b4d588e78a cleanup handling of LFUN_REGEXP_MODE ; cleanup Text::getStatus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33363 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 11:19:48 +00:00
Vincent van Ravesteijn
61eecb8a44 Expand the string "regexp" to something user will better be able to understand.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33250 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 19:56:12 +00:00
Vincent van Ravesteijn
f68fcc98a9 Fix bug #6477: LFUN_OUTLINE_* don't work anymore.
This code was erroneously killed in r33050.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33229 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-26 16:57:29 +00:00
Jürgen Spitzmüller
3a714c6057 * ADD LFUN_SPELLING_ADD and LFUN_SPELLING_IGNORE (bug 6102).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33089 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-19 08:21:56 +00:00
Pavel Sanda
17e2928374 Kill LFUN_OUTLINE_DRAGMOVE.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg157155.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33050 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-15 19:13:24 +00:00
Vincent van Ravesteijn
2a257eca85 Fix bug #6426: Language not set correctly when inserting an Inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32750 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-03 01:13:55 +00:00
Vincent van Ravesteijn
b3128dc63b Fix second part of bug #6400: After selecting a word by double-clicking it, extending the selection by a single mouse-click should also select only whole words.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32580 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-18 14:18:10 +00:00
Uwe Stöhr
83b1c48846 replace links to bugzilla with links to trac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32469 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-11 00:59:10 +00:00
Abdelrazak Younes
882e2eeb7b InsetCommand ctor: Pass 'Buffer *'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31902 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 16:10:34 +00:00
Abdelrazak Younes
82c7e15e64 Uniformize Inset construction (passing Buffer * everywhere). Lots of cleanup to do still...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31901 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 15:53:21 +00:00
Abdelrazak Younes
ff4460603e Make Buffer argument mandatory in most of the InsetMath based class... boring work...
Math manual loads and save correctly it seems but expect some instability period.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31898 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 11:45:46 +00:00
Enrico Forestieri
a1a34443ef Fix bug #5530: LyX expansion in math-macro overwritten by default one.
This patch initializes the buffer_ member of a MathHull inset in most
(but not all) cases. The problems with buffer_ should be greatly
allievated now, but there still can be some corner case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31873 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-06 15:18:48 +00:00
Vincent van Ravesteijn
0152d08232 These shouldn't be there as they have nothing to do with the layout of the Inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31794 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-29 22:13:48 +00:00
Vincent van Ravesteijn
71d29d14b7 Text3.cpp: fix unintended fall-throughs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31793 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-29 22:08:05 +00:00
Vincent van Ravesteijn
6e8312d1a4 Move (part of) LFUN_DISSOLVE_INSET into InsetText.
- put the InsetFlex specific part into InsetFlex,
- honor the argument given to the LFUN also for normal Insets as the description already stated,
- fix bug #6285: context menu action goes to the wrong inset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31756 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-26 23:49:43 +00:00
Abdelrazak Younes
1cd45c2ae1 Transfer all keyboard related code and actions from LyXFunc to GuiApplication. Part of it should be transfered later to GuiView and BufferView. This code can probably be simplified a lot...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31518 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-04 20:58:20 +00:00
Abdelrazak Younes
b20e92dd24 Header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31459 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-23 19:53:37 +00:00
Abdelrazak Younes
66dc054c6f * Transfer LFUN_SERVER_GOTO_FILE_ROW to GuiView and clean it up a bit.
* Add a recenter() call to BufferView::setCursorFromRow() in order to get the screen centered around the found position.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31455 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-23 13:45:58 +00:00
Abdelrazak Younes
1d7d54a4a7 Move LFUN status check to where they belong.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31378 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-12 21:12:24 +00:00
Vincent van Ravesteijn
c11f031df6 Fix bug #5991: Select function in environments.
C-M-a now selects the contents of an inset, if the whole inset is already selected, it will jump out the inset and selects everything in that inset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31200 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-22 14:44:08 +00:00