Commit Graph

215 Commits

Author SHA1 Message Date
Abdelrazak Younes
2a96bf93b2 remove std::
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24411 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-21 08:31:41 +00:00
Abdelrazak Younes
61c4dc2af8 Fix some outline bugs:
http://bugzilla.lyx.org/show_bug.cgi?id=4686
http://bugzilla.lyx.org/show_bug.cgi?id=4703

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24410 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-21 08:22:52 +00:00
Abdelrazak Younes
8098065d59 Release compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24275 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-15 17:26:19 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
André Pönitz
11a0458d3f next try...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24100 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 23:06:22 +00:00
André Pönitz
2012beb58e revert last patch. there's something wrong, possibly unrelated to this
patch, but as this was rather largish...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24099 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 22:44:33 +00:00
André Pönitz
7677e9487c simplify Lexer use a bit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24098 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 22:14:45 +00:00
André Pönitz
f9b81e51e9 remove remaining MailInsets.
please check your favourite insets, I am sure I broke _something_...



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24006 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-27 22:26:24 +00:00
André Pönitz
22fa3ab061 fix compiler warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23979 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 18:53:18 +00:00
Richard Heck
a9302220c2 Fix my fixme.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23977 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 17:11:49 +00:00
Richard Heck
40f58da65a Another buffer pointer fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23976 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 17:02:24 +00:00
Jürgen Spitzmüller
c876a2e7c7 Merge the two linebreak insets into one.
* src/Buffer.cpp:
	- file format change to 324
* development/FORMAT:
	- document file format change

* src/insets/InsetNewline.{cpp,h}:
	- the former two separate derivates are now merged into one inset
	  with proper Params and Mailer. This simplifies the structure and allows for
	  switching between the two kinds.

* src/Text3.cpp:
	- The newline insets are now being generated with 
	   newline-insert [newline|linebreak]

* src/factory.cpp:
* src/Text.cpp:
	- Newline inset is now a proper inset with opening and closing tag.

* src/FuncCode.h:
* src/LyXAction.cpp:
* src/Text3.cpp:
* src/insets/InsetCollapsable.cpp:
* src/insets/InsetTabular.cpp:
* src/mathed/InsetMathGrid.cpp:
* src/mathed/InsetMathHull.cpp:
	- remove LFUN_NEW_LINE, LFUN_LINE_BREAK,
	  add LFUN_NEWLINE_INSERT

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion and reversion routines for newline insets.

* lib/ui/stdmenus.inc:
* lib/ui/stdcontext.inc
	- adapt menu and add context menu to switch between newpage variants.

* lib/bind/*.bind:
	- adapt to new lfuns.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 08:10:01 +00:00
Abdelrazak Younes
8946ff512d Fix some issues with cursor settings with mouse button3 (text3:LFUN_MOUSE_RELEASE), simplify and correct InsetCollapsable mouse events.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23957 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 21:44:30 +00:00
Abdelrazak Younes
fb25ff1819 Cleanup mouse/selection/context-menu interactions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23944 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 10:54:38 +00:00
Jürgen Spitzmüller
d2a4c97ab8 Merge the diverse newpage insets into one.
* src/Buffer.cpp:
	- file format change to 323
* development/FORMAT:
	- document file format change

* src/insets/InsetNewpage.cpp:
	- the former four separate derivates are now merged into one inset
	  with proper Params and Mailer. This simplifies the structure and allows for
	  switching between the various kinds.

* factory.cpp:
	- The newpage insets are now being generated with 
	   newpage-insert [newpage|pagebreak|clearpage|cleardoublepage]

* src/Text.cpp:
	- Newpage inset is now a proper inset with opening and closing tag.

* src/FuncCode.h:
* src/LyXAction.cpp:
* src/Text3.cpp:
* src/insets/InsetCollapsable.cpp:
	- remove LFUN_PAGEBREAK_INSERT, LFUN_CLEARPAGE_INSERT
	  and LFUN_CLEARDOUBLEPAGE_INSERT

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion and reversion routines for newpage insets.

* lib/ui/stdmenus.inc:
	- adapt menu and add context menu to switch between newpage variants.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23942 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 09:26:03 +00:00
Jürgen Spitzmüller
bb51488435 * src/BufferView.cpp:
* src/Text3.cpp:
	- fix LFUN_INSET_SETTINGS so that it also works at cursor position.

* LyXAction.cpp:
	- doxy.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23923 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-24 14:12:19 +00:00
Jürgen Spitzmüller
39cf72b803 * src/Text3.cpp:
- disallow comments and greyedout notes inside commands (sections etc.)
	  This fixes bug 4180 partially (the change is still possible via the dialog).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23917 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-24 13:20:06 +00:00
Jürgen Spitzmüller
f2e8cd3cd9 *** File Format Change: UI and enhancement for InsetSpace ***
* src/insets/InsetSpace.{cpp,h}:
	- merge in HFill inset, add support for dotfill, hrulefill,
	  hspace and hspace*
* src/insets/InsetHFill.{cpp,h}:
	- remove

* src/frontends/qt4/GuiHSpace.{cpp,h}:
* src/frontends/qt4/ui/HSpaceUi.ui:
* src/frontends/qt4/GuiView:
	- new GUI for Space insets.

* src/insets/Inset.{cpp,h}:
* src/insets/InsetCode.h:
* src/insets/InsetCollapsable.cpp:
* src/insets/InsetCommandParams.cpp:
	- remove HFILL_CODE and LFUN_HFILL_INSERT, add SPACE_CODE where necessary,
	  new Inset member isStretchableSpace() to indicate HFill and friends.

* Buffer.cpp: 
	- increase format to 319
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion/reversion routines
* development/FORMAT:
	- document file format change

* src/Makefile.am:
* src/frontends/qt4/Makefile.am:
* development/scons/scons_manifest.py:
	- deal with UI changes.

* src/LyXAction.cpp:
	- remove LFUN_HFILL_INSERT

* src/LyXFunc.cpp:
	- handle space dialog.

* src/factory.cpp:
* src/Paragraph.cpp (isHFill):
* src/Text.cpp:
* src/Text3.cpp:
* src/TextMetrics.cpp:
	- adapt to changes

* lib/ui/classic.ui:
* lib/ui/stdmenus.ui:
	- add HSpace dialog, remove HFill.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23787 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-17 09:23:43 +00:00
André Pönitz
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +00:00
Richard Heck
a01cb111a0 Change the interface to a paragraph's layout. We still store a LayoutPtr, but now privately, and make a Layout const & available to clients.
The need for a LayoutPtr arises from the fact that (a) we do not want to give our clients a Layout &, since we do not want them to be able to change our Layout; but (b) we also need to be able to change which layout is ours. So we cannot store a Layout const &. Or so it seems to the compiler.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23522 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 21:31:27 +00:00
Richard Heck
f401ce5d29 Changes LayoutList from a vector<LayoutPtr> to a vector<Layout>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23519 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 20:01:30 +00:00
Abdelrazak Younes
a4d5b78430 Transfer and bug fix LFUN_BUFFER_BEGIN/END_SELECT to BufferView.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23512 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 15:39:30 +00:00
Richard Heck
592f951ba0 Kill indexing into the list of layouts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23505 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 05:59:21 +00:00
Pavel Sanda
701367b4c5 Remove the rest of LFUN_THEOREM_INSERT.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23471 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-05 08:58:58 +00:00
Jean-Marc Lasgouttes
0320d29531 fix some compiler warnings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23443 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:04:59 +00:00
Abdelrazak Younes
7cd9525197 rev 23399: the fix was not fully correct because labels are not editable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23400 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-02 18:49:49 +00:00
Abdelrazak Younes
6bf2052227 * Outline(): fix undo/redo for promote/demote
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23379 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-02 09:17:10 +00:00
Abdelrazak Younes
6b10b7fd33 * outline(): demote/promote all subsections for outline in/out.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23378 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-02 08:53:34 +00:00
Abdelrazak Younes
78d63575ca revert revision 23324 and implement a better more general fix in Cursor::insert().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23325 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 15:36:48 +00:00
Abdelrazak Younes
f6e471fc8d Fix InsetQuotes creation. Not very clean but it does the job. Andre, I think we should require the Buffer at construction for all insets that needs it. A base InsetBuffer class comes to mind.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23324 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 15:24:37 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
André Pönitz
1cca0a86bd API cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23295 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 23:03:26 +00:00
André Pönitz
db8c16d554 progress on buffer-reference-in-insets. beware of instabilities...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23289 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 20:43:16 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
0fb8f3fba1 mostly s/Paragraph::layout(...)/Paragraph::setLayout(...)/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23159 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 16:45:38 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Stefan Schimanski
8527a08903 * simplify notifyCursorLeaves logic: We now only call it from strategic
places, i.e.
  - BufferView::setMouseCursor,
  - BufferView::mouseEventDispatch
  - LyXFunc::dispatch
  Before it was called from several dispatch handlers in the middle of the
  dispatch process. Because the cursor might get invalidated, this is
  not a good idea. We had plenty of crashes and odd behaviours because
  of this as nobody really understood those cases.

  This fixes (at least) #2069 and #4163.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 20:45:18 +00:00
Abdelrazak Younes
2ed1153c8c Text::dispatch(): Make sure the cursor is visible before doing anything.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23127 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 12:22:28 +00:00
Abdelrazak Younes
6564e9bb4e Fix this bug:
1. scroll a bit so that the cursor is not visible anymore
2. hit the keyboard arrow keys to move the cursor or type something

The problem was that TextMetrics::parMetric() automatically creates a new parmetrics on const access. This was needed in the old architecture but I don't think anymore.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23126 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 11:07:41 +00:00
Richard Heck
a8317afc4b This is the first of a series of commits that will make InsetLayout a real class.
In this commit, we do the minimal amount of work necessary to protect our data.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23116 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 02:32:52 +00:00
Dov Feldstern
deb86513df Fix typing of digits in RTL text, which was broken way back during the Font/Language separation (r21240).
The problem was that when typing a digit in RTL text, the language was being 
switched to LTR, which is wrong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23037 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-16 18:39:20 +00:00
Abdelrazak Younes
371ed5aff5 * doInsertInset(): cosmetics
* Text::dispatch(): call updateLabels() where it makes sense.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22972 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 12:10:18 +00:00
Richard Heck
040f3431e7 Fix bug 4037 and related problems. The patch has been cleaned up a bit
from the one posted to the list.

The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization(). 
A lot of the changes just adapt to this change.

The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.

There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 17:31:07 +00:00
Dov Feldstern
11a6b3c4c7 visual mode for bidi cursor movement
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22929 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:52:45 +00:00
Abdelrazak Younes
bd8cba506f * doInsertInset(): return early.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 10:45:49 +00:00
André Pönitz
225bf49cf9 some refactoring.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22890 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 10:41:49 +00:00
Stefan Schimanski
cf333f5ab4 * Support for graphics pasting (with most code in the frontend's GuiClipboard)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22762 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-03 10:43:03 +00:00
Stefan Schimanski
f85fccef65 * newlyxcommand support as LaTeX feature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22281 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:32:00 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Abdelrazak Younes
96d2d6fc50 * LyXFunc::dispatch(): invert BufferView::dispatch() and cursor::dispatch() calling.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22227 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 10:42:59 +00:00
Bo Peng
8d7ea1ceaa Add buffer name/path/class to InsetInfo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22213 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-19 18:09:00 +00:00
Jürgen Spitzmüller
8672364e1e * fix bug 4055, overdue patch from Stefan Schimanski:
"The idea of the beforeDispX/Y_ variables in the Cursor is to hold the position
of the cursor on screen before the lyxfunc is dispatched. But to get this the
metrics must be valid. It's updated in Cursor::dispatch before the dispatch
loop.
After inserting/deleting stuff (like when deleting the selected text before
inserting the alpha) the metrics are invalid. But the handler for the alpha
calls Cursor::dispatch after the deletion and hence the crash with your second
patch.

Here is a patch fixing that:

The beforeDispatchXY variable do not belong into the Cursor::dispatch because
Cursor::dispatch is often called "manually" by many handlers to some followup
action. So this logic must go somewhere else where it is sure that is not
updated after the metrics got invalidated."

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22193 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 18:13:02 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Jürgen Spitzmüller
61e1643821 Support for \slash and \nobreakdash-
* src/lfuns.h:
* src/Text3.cpp:
* src/insets/InsetMathNest.cpp:
* src/insets/insetCollapsable:
	- new LFUN_SPECIALCHAR_INSERT
	- nuke LFUN_HYPHENATION_POINT_INSERT, 
	  LFUN_LIGATURE_BREAK_INSERT,
	  LFUN_DOTS_INSERT,
               LFUN_END_OF_SENTENCE_PERIOD_INSERT,
	  LFUN_MENU_SEPARATOR_INSERT
	  (functions now handled as arguments of the above)

* src/insets/InsetSpecialChar.{cpp,h}:
	- implement \slash and \nobreakdash-

* src/Buffer.cpp:
	- increment format to 307.
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion methods for SpecialChar \slash{} and
	  SpecialChar \nobreakdash-
* development/FORMAT:
	- document file format change

* lib/ui/stdmenus.inc:
* lib/ui/classic.ui:
	- add new SpecialChars to the menus, adapt lfuns to new scheme

* lib/bind/aqua.bind:
* lib/bind/cua.bind:
* lib/bind/emacs.bind:
* lib/bind/fi/menus.bind:
* lib/bind/mac.bind:
* lib/bind/menus.bind:
* lib/bind/sciword.bind:
* lib/bind/xemacs.bind:
	- add shortcuts for new SpecialChars, adapt lfuns to new scheme

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-06 11:04:56 +00:00
André Pönitz
2506e0d643 assimilate BOOST_CURRENT_FUNCTION
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21867 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 21:10:35 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Uwe Stöhr
12f7869ac0 support for \linebreak:
- fileformat change
- tex2lyx support
- rename LFUN_BREAK_LINE to LFUN_NEW_LINE because this is what the lfun does and to avoid confusions
- new menu entry
- new shortcut C-S-Return

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21778 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:34:37 +00:00
Uwe Stöhr
97aa558cac support for \pagebreak:
- rename former "pagebreak" to "newpage" since it produces a \newpage
- new LFUN
- menu entry
- tex2lyx support
- fileformat change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21732 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 02:10:00 +00:00
André Pönitz
d5fc2425a9 consolidate showDialog() incarnations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21662 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 00:39:15 +00:00
Abdelrazak Younes
bdf33a2a32 Fix mouse selection drawing by brute force.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21655 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 18:17:19 +00:00
Abdelrazak Younes
926abae753 Simplify single par drawing:
* ParagraphMetrics::computeRowSignature(): Integrate row's dimensions and selection status in the row signature.
* TextMetrics::drawParagraph(): compute the row signature here and rely on that to decide if a redraw is needed or not.
* BufferView::Private: get rid of the ViewMetricsInfo member. Just keep the ScreenUpdateStrategy.
* BufferView::draw(): full screen update even for singlePar case because the row signature will detect if something needs to be redrawn.
* Text3.cpp: get rid of hack following architecture update.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21650 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 11:27:03 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
f46454fb7a Avoid unnecessary redraw when selecting text.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21629 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 18:01:04 +00:00
Abdelrazak Younes
3ab1031f97 Fix wrong setting of language when only font change is requested.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21610 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-14 15:07:08 +00:00
Martin Vermeer
979239a248 Make URL a standard inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21576 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 10:03:16 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Jürgen Spitzmüller
ddbcee01ac * src/BufferView.cpp:
- move the LFUN_OUTLINE_*'s out of here ...
* src/Text3.cpp:
	- to this place. This fixes a crash (bug 4330).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21475 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 17:13:43 +00:00
Abdelrazak Younes
e660f44001 Current update architecture doesn't need multiParSel() special case anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21467 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 09:34:16 +00:00
Dov Feldstern
ddd82f7aa4 Getting rid of LTR bias --- part 3/4
This is a continuation of r21128, r21244


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21448 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 19:41:16 +00:00
Abdelrazak Younes
c1afc30a8a Fix bug 4317 and update comment WRT current situation of trunk.
http://bugzilla.lyx.org/show_bug.cgi?id=4317

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21435 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 12:04:47 +00:00
André Pönitz
09b7e6e60a some std::string -> filename changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21404 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 17:37:37 +00:00
Abdelrazak Younes
d45d7de8c3 Further cleanup of collapsable insets. The layouts are now properly read and applied.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21392 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 21:27:41 +00:00
Abdelrazak Younes
c5f981f34c Fix initial numbering of foot notes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21385 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 18:19:45 +00:00
Stefan Schimanski
1231489798 * dynamic macros as described in http://1stein.org/download/dynmacro.pdf
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:13:07 +00:00
André Pönitz
41f6e7ee54 unbreak font panel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21272 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 22:03:59 +00:00
Dov Feldstern
b4372a37d9 Getting rid of LTR bias --- part 2/?
This is a continuation of r21128. This round fixes the "Word" movement
functions and LFUNS.

Behavior should remain unchanged by this fix.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21244 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 20:35:57 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
1026a87b72 * InsetList: introducing find() and count()
* Paragraph:
- erase numberOfOptArgs() and bibitem()
- move onlyText() to Private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21180 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-24 15:32:43 +00:00
Abdelrazak Younes
92908b6ecf I forgot to commit this in 21167.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21170 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-24 08:40:38 +00:00
Dov Feldstern
662b58497e Getting rid of LTR bias --- part 1/?
This is the first patch in a series meant to remove LTR bias from the code.
Currently, there are many places in the code where "right" and "left" are used,
but where we actually mean "forward" and "backwards" --- which is the same 
thing in LTR text, but not in RTL/Bidi text.

See full details in http://permalink.gmane.org/gmane.editors.lyx.devel/97550.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21128 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 22:18:52 +00:00
André Pönitz
f934b86850 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 10:50:56 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
Richard Heck
e158e07c29 InsetCommandParams() now takes an InsetCode rather than a string.
These changes are just adaptations to the new signature.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21072 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-19 17:22:55 +00:00
Abdelrazak Younes
55beda376a Refactor Undo/Redo framework into an Undo class owned by a Buffer. This reduces header dependencies from Undo.h which was including lots of stuff previously. This also solves the bug where undo/redo were reset upon buffer switching. Now, each buffer has a truly independant undo/redo architecture.
In the future, when Cursor has been fixed to work correctly with multiple views of the same Buffer, we could transfer the Undo owner from Buffer to Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 11:51:17 +00:00
Bo Peng
4385c156e2 Allow the input of an InsetInfo using command buffer (e.g. "info-insert menu paste"). Document this change in InsetInfo.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20961 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-14 00:47:52 +00:00
Uwe Stöhr
7075eaadef The huge URL patch:
- rename the lfun to href-insert.png
- rename the files to Hyperlink...
- the former URLUi produces now \href commands (hyperref)

Only missing thing is the lyx2lyx conversion routine - this will be done by Richard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 19:06:09 +00:00
Martin Vermeer
1ecd2189f2 Dissolve CharStyle initial implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20944 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 12:59:44 +00:00
Martin Vermeer
ee038db36d Safer code for allowMultiPar(), thx Angus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20939 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:14:49 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
Bo Peng
62c98f2ffc InsetInfo: add InsetInfo (core)
* src/insets/Inset.cpp: add InsetInfo
	* src/insets/Inset.h
	* src/insets/InsetInfo.cpp
	* src/insets/InsetInfo.h
	* src/LyXAction.cpp: add LFUN_INFO_INSERT
	* src/lfuns.h
	* src/BufferView.cpp: 
	* src/factory.cpp
	* src/Text3.cpp: insert InsetInfo with selected text
	* development/scons/scons_manifest.py: build tools update
	* src/Makefile.am


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20904 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:52:00 +00:00
Abdelrazak Younes
a800da1bfe initial support for shift + right-mouse-click selection.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20903 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:46:53 +00:00
Martin Vermeer
04ee2d87fc Introduce allowMultiPar()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20898 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 10:13:45 +00:00
Abdelrazak Younes
9a458ec6e9 Move private part of BufferView to a private implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20896 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 09:59:01 +00:00
Martin Vermeer
74d5587268 Oops
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20889 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-10 13:42:34 +00:00
Martin Vermeer
0f4d519108 A saner way to reset paragraphs to default when inserting inset around selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20888 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-10 13:25:37 +00:00