Commit Graph

81 Commits

Author SHA1 Message Date
Abdelrazak Younes
79beb91e3a Sanitize LyX singleton access by getting rid of ref() and cref() methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25597 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-14 08:35:00 +00:00
Pavel Sanda
a7a31dc392 Remove LFUN_BIBITEM_INSERT.
The last GUI trace for using this lfuns is here: http://www.lyx.org/trac/changeset/9966 .

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141812.html



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25588 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-14 01:28:06 +00:00
Pavel Sanda
20b9e0ba93 Remove InsetEnvironment. This is unfinished decade old stuff.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141609.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25479 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-07 16:34:55 +00:00
Pavel Sanda
c077415c87 Next leftover.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25468 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-06 21:22:25 +00:00
Richard Heck
8a64579d9c More cache fixing. Similar fix as for InsetBibtex, and I've renamed the key routine.
Unfortunately, we can't do a one-short fix for InsetCommand, requiring that it take
a Buffer & in the constructor, due to problems in mathed, specifically, here:
void InsetMathHull::label(row_type row, docstring const & label)
{
...
label_[row] = new InsetLabel(p);
if (buffer_)
label_[row]->setBuffer(buffer());
}
If InsetLabel has to have a Buffer, then buffer_ has to be set, which means InsetMathHull needs a Buffer. But then truckloads of these are created in Parser, where we don't really seem to have access to a Buffer.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25137 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:55:34 +00:00
Richard Heck
2ea039ba99 Fix some of the BibTeX cache issues. We need to be able to invalidate the cache when
InsetBibtex's get created and destroyed, or modified.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25136 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:42:53 +00:00
Richard Heck
2a47858dda Fix remaining issues with InsetSpace. The identifier "Space" used in the .lyx
file has been changed to "space" to match the identifier used for the inset in
Inset.cpp and for the dialog in GuiView.cpp.

In future, we will want to get a similar uniformity elsewhere: The identifier
used in the LyX file should match the one used as inset identifier. The easy
way to do this, in the code, is to have insets write themselves this way:
	os << insetName(lyxCode()) << " ";
rather than at present:
	os << "space ";
Similar things could then happen elsewhere. E.g., if the dialog names are in
sync with the inset names, then we could do something like:
	hideDialogs(insetName(lyxCode()), this);
rather than
	hideDialogs("space", this);
and perhaps even put that into the Inset destructor rather than have specific
versions in each inset---with a test for whether there is such a dialog, of
course.

But this is all for later.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25016 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-30 15:38:43 +00:00
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +00:00
Bo Peng
491f30920e InsetInfo: fix an update bug when inserting InsetInfo from minibuffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24326 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-18 15:54:05 +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
efe09aeb50 if we have a buffer we don't need to pass part of it separately...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24132 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-05 20:24:05 +00:00
André Pönitz
383490dde8 code duplication is fun...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24131 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-05 19:27:02 +00:00
André Pönitz
bd5b4ebd32 make InsetRef parser more robust. I wonder, however, how "empty"
reference insets could have been created to begin with...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24104 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-03 18:40:46 +00:00
André Pönitz
640ac2650b this feels more natural...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24008 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-27 23:37:59 +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
3069acd6de remove InsetBoxMailer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24001 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-27 07:26:37 +00:00
André Pönitz
241575ed86 remove InsetVSpaceMailer class
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23992 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-27 00:21:35 +00:00
André Pönitz
ba348ede83 this feels good...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23990 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 23:41:35 +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
Richard Heck
2df6a6a378 Require a buffer on construction of InsetGraphics and InsetExternal. Eventually, this idea should probably be extended to all Insets, one or two at a time.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23950 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 16:08:39 +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
Richard Heck
0894f32bc6 Fix buffer pointer crash. (Another.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23932 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-24 20:32:52 +00:00
Jürgen Spitzmüller
18101eea7b ** add support for protected horizontal fill. FILE FORMAT CHANGE. **
* src/Buffer.cpp:
	- increment file format to 320.

* src/insets(InsetSpace.{cpp, h}:
	- add HFILL_PROTECTED, a protected horizontal fill
	  (LaTeX: \hspace*{\fill})

* src/factory.cpp:
* src/frontends/qt4/GuiHSpace.{cpp, h}:
	- handle the new space type.

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion routine for protected hfill.

* development/FORMAT:
	- document file format change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23805 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-18 12:11:28 +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
75999ba650 make code look a bit more uniform
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23468 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-05 00:21:05 +00:00
André Pönitz
6592d5f199 remove duplicated code (is already in constructor)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23466 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 22:48:40 +00:00
André Pönitz
a694476ac6 try to pass a Buffer & to inset construction if some buffer(param)
access is needed


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23465 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 22:28:18 +00:00
Abdelrazak Younes
da652941d5 factory::readInset(): Set again the buffer for InsetMathHull.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23446 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:38:30 +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
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
e05e2b6b19 (temporarily) add a Buffer * Inset::buffer_ membert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23170 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 22:32:33 +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
2f1699747a * Do not keep pointers to data structures around if you don't know
whether the data structure outlives the pointer:

  InsetLayouts are really owned by the corresponding TextClass. So
  keep the TextClass alive by keeping a TextClassPtr around for the
  pointers lifetime. This fixes Bug #4538.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22782 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-05 10:34:01 +00:00
Abdelrazak Younes
f2f7ec1a05 Cleanup the mess I introduced in rev 22165. This happened frequently lately, I am very sorry!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22167 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 11:46:34 +00:00
Abdelrazak Younes
efbd1d30cb Sanitize the way we use abort() and exit(). With this commit, we should never crash in release mode, even when assertions are enabled. In debug mode, we crash with abort in order to get a useful backtrace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22165 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 11:34:29 +00:00
Uwe Stöhr
397784e853 factory.cpp: fix wrong call of abort() introduced in r22137
(I got:
 factory.cpp(366) : error C2039: 'abort': Is no element of 'lyx::support')

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22140 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-13 22:55:57 +00:00
Peter Kümmel
78caccb1c5 cmake/merge: fix compile, this split conflicts with the others
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22137 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-13 21:57:37 +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
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
André Pönitz
d70c139c2f unneeded
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21888 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-30 22:18:37 +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
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
Abdelrazak Younes
4bf0bed36a Adjust headers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21508 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:34:45 +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
85f80979fc Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
- Getting rid of some unneeded init() methods.
- InsetCollapsable::layout_ is now a const pointer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 00:35:07 +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