Commit Graph

203 Commits

Author SHA1 Message Date
Michael Schmitt
5a0176a6eb drop linuxdoc support (part 5)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14822 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-23 12:43:46 +00:00
Georg Baum
28ef49f2d9 * src/buffer.C
(Buffer::errorList): simplify

	* src/buffer.h
	emptyErrorList_ move to buffer.C and make it static const

	* src/lyx_main.C
	(LyX::exec2): Use for_each instead of for loop


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14667 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-14 09:33:49 +00:00
Abdelrazak Younes
c5a4f61f33 This commit creates a error_lists map member inside the Buffer class.
I had no choice but to use string for the map key. This is
because the only information that could be passed to the controller is a
string.

With this new architecture, persistent error lists are now possible.

* Buffer
  - errorList_, addError(),  : deleted
  - std::map<std::string, ErrorList> errorLists_ : new member
  - errorList(std::string const & type): associated accessors

* buffer_funcs.C
  - bufferErrors(Buffer const & buf, TeXErrors const & terr): now needs a third errorList argument
  - bufferErrors(Buffer const & buf, ErrorList const & el): deleted.

* Converter
  - convert(): now needs an ErrorList argument instead of filling the Buffer errorList member directly.
  - runLaTeX(): ditto
  - scanLog(): ditto

* CutAndPaste.C
  - pasteParagraphList(): ditto
  - pasteSelection(): ditto

* lyxtext.h/text.C
  - readParagraph(): ditto
  - LyXText::read(): ditto

* importer:
  - Importer::Import(): ditto

* BufferView_pimpl.C
  - loadLyXFile(): send the Buffer::errors() signal instead of calling LyXView::showErrorList() directly.

* exporter.C
  - Export(): send the Buffer::errors() signal instead of calling LyXView::showErrorList() directly in lyxfunc.C

* ControlErrorList.C
  - initialiseParams(): translation operation transfered here from LyXView::showErrorList().

* LyXView.C
  - LoadLyXFile(): add a showErrorList("Parse") call.
  - showErrorList(): simplified due to code transferred to the ControlErrorList.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14652 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-13 16:16:43 +00:00
Bo Peng
3002118616 Add more controls to the view-source dialog.
* src/buffer.[nC]: can write full source, separaet/rename makeXXXFile.
	* src/graphics/PreviewLoader.C: rename maleLaTeXFile to writeLaTeXSource
	* src/frontends/qt3/QViewSourceDialog.h, ui/QViewSourceDialogBase.ui,
		QViewSource.[hC], QViewSourceDialog.[hC]: qt3 frontend
	* src/frontends/qt4/QViewSource.[hC], ui/QViewSourceUi.ui,
		QViewSourceDialog.[hC]: qt4 frontend
	* src/frontends/controllers/ControlViewSource.[hC]: controller


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14539 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-04 13:59:12 +00:00
Abdelrazak Younes
00c37e4781 This commit transfer the ErrorList handling from LyXView to Buffer. It also removes the need for the error signal and simplify the kerbel <-> frontend communication. I think it should speed-up _significantly_ the latex compilation for example in case of problematic files.
TODO 1: All occurrences of "LyXView::showErrorList()" in the "kernel" should be replaced by a boost signal emission (Buffer::errors()). This signal is already connected to this showErrorList() slot.

TODO 2: The ErrorList mechanism is used wrongly in a number of place, most notably in "Converter.C". Instead of replacing the ErrorList in the "Buffer" class, the "Converter" class should maintain its own list instead and connect directly to the LyXView::showErrorList() slot.

Buffer:
* errorList_: new private member and associated access methods.
* setErrorList(): new accessor method.
* addError(): apend an error to the errorList_.
* error(): deleted.
* errors(): new boost signal, unused for now. Shall be used instead of LyXView::showErrorList().

LyXView:
* getErrorList(), addError(), errorlist_, errorConnection_: deleted.
* errorsConnection_: new boost connection for the Buffer::errors() signal.

lyx_main.C:
* LyX::exec2(): manually print all errors.

BufferView.h: remove unneeded ErrorList forward declaration.

BufferView::pimpl::menuInsertLyXFile(): delete Buffer::error() connection and add a FIXME comment

text.C: Use Buffer::addError() instead of Buffer::error() signal emission.

ControlErrorList.C: get the ErrorList from the Buffer instead of LyXView


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14467 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-15 22:43:37 +00:00
Georg Baum
ff4b3ba8fc Prevent automatic opening of child docs because of natbib labels
* src/insets/insetinclude.h
	(updateBibfilesCache): adjust comment
	(getBibfilesCache): ditto

	* src/insets/insetinclude.C
	(getChildBuffer): new, return the buffer of the child if it exists
	(updateBibfilesCache): update the child buffer only if already loaded
	(getBibfilesCache): scan the child buffer only if already loaded

	* src/buffer.h
	(updateBibfilesCache): adjust comment
	(getBibfilesCache): ditto
	(bibfilesCache_): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13869 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-19 07:21:43 +00:00
Jürgen Spitzmüller
1bed69439f Much better performance when using natbib (bug 2460):
* src/BufferView_pimpl.C
	(bool BufferView::Pimpl::dispatch): update bibfiles cache after adding or
	deleting a bib database
* src/buffer.C
	(bool Buffer::readDocument): update bibfiles cache after the document 
	was read
* src/buffer.[Ch]
	(void Buffer::updateBibfilesCache): new method to build or update a cached
	vector with all used bibtex databases. 
	(void Buffer::getBibfilesCache): new method that returns the actual cache.
	(Buffer * Buffer::getMasterBuffer): new (non-const) method to get the buffer 
	of the master document

* src/insets/insetbibtex.C
	(void InsetBibtex::doDispatch): update the bibfiles cache after the inset has
	been modified.
* src/insets/insetinclude.C.
	(void Insetinclude::doDispatch): update the bibfiles cache after the inset 
	has Been modified.
* src/insets/insetinclude.[Ch]:
	(void Insetinclude::updateBibfilesCache): new method to build or update 
	a cached vector with all used bibtex databases. 
	(void Insetinclude::getBibfilesCache): new method that returns the actual 
	cache.
* src/insets/insetcite.C
	(string const getNatbibLabel): store a map of timestamps for all used bibtex 
	files (buffer's bibfiles cache) and rebuild the list of keys only if the timestamps
	or the list of files have changed. This is the actual performance boost. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13681 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-15 11:46:17 +00:00
Bo Peng
eb485caa96 view-source feature, from Bo Peng <ben.bob@gmail.com>
* src/buffer.h buffer.C - getSourceCode()
	* src/lyxfunc.C -  open view-source dialog
	* src/text3.C - change LFUN_MOUSE_RELEASE
	* src/output_linuxdoc.C, src/output_docbook.C, src/output_latex.C 
		- intercept output
	* src/outputparams.h, outputparams.C - add par_begin, par_end, dryrun
	* src/insets/insetgraphics.C  - add dryrun mode of file conversion
	* lib/ui/stdmenus.ui - add view-source menu item under view
	* Add view-source dialog, add 
	    src/frontends/qt2/QViewSourceDialog.h, QViewSource.C, QViewSource.h, QViewSourceDialog.C
	    src/frontends/qt2/ui/QViewSourceDialogBase.ui
	    src/frontends/controllers/ControlViewSource.h ControlViewSource.C
	  modify
	    src/frontends/qt2/Makefile.dialogs, Makefile.am, Dialogs.C,
	    src/frontends/controllers/Makefile.am, po.POTFILES.in


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13610 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-09 02:48:54 +00:00
Lars Gullik Bjønnes
9d6cad3fe6 * output_latex.h:
* buffer.h:
        * CutAndPaste.h:
        * pariterator.h:
        * paragraph_funcs.h:
        * output_linuxdoc.h:
        * output_docbook.h:
        * insets/insettext.h: get forward declaration of ParagraphList

        * output_plaintext.C:
        * bufferlist.C:
        * undo.C:
        * lyxtext.h:
        * undo.h:
        * buffer_funcs.C:
        * insets/insetbibitem.C: get proper ParagraphList decls

        * output_linuxdoc.C (linuxdocParagraphs):
        * output_latex.C (TeXOnePar):
        * insets/insettext.C (appendParagraphs):
        * insets/insetcharstyle.C (docbook): use std::distance

        * CutAndPaste.C (pasteSelectionHelper, copySelectionHelper):
        * paragraph_funcs.C (breakParagraph,
        breakParagraphConservative, mergeParagraph):
        * text.C (acceptChange, rejectChange):
        * text2.C (deleteEmptyParagraphMechanism): use boost::next

        * output_docbook.C (several places): use boost::next and
        std::distance

        * ParagraphList_fwd.h: modify to provid a forward declaratoin
        of the new ParagraphList.

        * RandomAccessList.h: New container for Paragraphs from
        Abdelrazak Younes

        * ParagraphList.h: new file, setup user of RandomAccessList

        * paragraph.C: remove ParagraphList constructor from this file



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13467 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-23 20:11:06 +00:00
Jean-Marc Lasgouttes
4842112b77 fix bug 2096: LyX file inserting is broken
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10631 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-29 15:08:35 +00:00
André Pönitz
3e1919e067 probably fixed bug 1561
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10298 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 23:03:01 +00:00
Jürgen Vigna
a685a01ef7 bug 344: Fixed loosing cursor/selection on buffer-switch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10286 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 14:29:35 +00:00
Angus Leeming
fb70c52b05 Whitespace, only whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9877 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-26 11:12:20 +00:00
Angus Leeming
e22c5f4d97 Asger's commentary, const-correct and bug-squashing little beauty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9558 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-31 16:29:48 +00:00
Alfredo Braunstein
70bcd97d45 remove paragraph::autoBreakRows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9397 a592a061-630c-0410-9148-cb99ea01b6c8
2004-12-17 16:27:12 +00:00
Alfredo Braunstein
ed064bdee6 par->pit renaming
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9300 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-24 21:53:46 +00:00
Lars Gullik Bjønnes
ec94b42f51 Use the preferred calling for Boost.Signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9010 a592a061-630c-0410-9148-cb99ea01b6c8
2004-09-26 14:19:47 +00:00
José Matox
498724d21b up to file format 236 and also fix Bug 421.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8927 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-14 18:41:27 +00:00
André Pönitz
b447408de2 macro rework
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8644 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-13 06:27:29 +00:00
André Pönitz
52ed731842 rest of patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8544 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-27 12:46:30 +00:00
Angus Leeming
7c70a8ee0f Georg's take on Bug 605.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8528 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-25 10:12:44 +00:00
André Pönitz
0d43ba149a the stuff from the sneak preview:
For one, it still contains a few things that are already in CVS (the
'brown paperbag' changes).

Secondly, this changes the ParagraphList to a std::vector but does not
yet take full advantage of it except removing LyXText::parOffset() and
similar.

I had an extensive talk with my profiler and we are happy nevertheless.

This also moves almost all Cut&Paste specific stuff from text.C to
CutAndPaste.C. Much smaller interface now... Namespace CutAndPaste is
now  lyx::cap::. Was inconsistent with the rest....

Make ParagraphList a proper class. We'll need this later for a
specialized erase/insert.

Remove some unneeded prototypes and function declarations

Use ParameterStruct directly instead of ShareContainer<ParameterStruct>

Inline a few accesses to CursorSlice members as suggested by the profiler.

Fix commandline conversion crash reported by Kayvan.

Replace PosIterator by DocumentIterator. The latter can also iterate
through math and nested text in math...

Remove math specific hack from Documentiterator

Derive InsetCollapsable from InsetText instead of using an InsetText
member. This give us the opportunity to get rid of the InsetOld::owner_
backpointer.

Cosmetics in CutAndPaste.C and cursor.C. Fix nasty crash (popping slices
off an empty selection anchor). Add a few asserts.

Remove all 'manual' update calls. We do now one per user interaction which
is completely sufficient.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8527 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-25 09:16:36 +00:00
André Pönitz
5198e1d9a3 The Buffer::LyXText -> Buffer::InsetText patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8498 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-18 12:53:43 +00:00
André Pönitz
ec4ab8ce18 revert Buffer LyxText->InsetText commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8489 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-11 17:16:38 +00:00
André Pönitz
1b3f5ee46f the Buffer::text -> inset change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8488 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-11 16:09:42 +00:00
Jean-Marc Lasgouttes
d891a896f4 Georg Baum\'s no-tempdir patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8458 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-25 12:00:53 +00:00
André Pönitz
1eaa3eb913 more IU
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8371 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-26 10:13:15 +00:00
Jean-Marc Lasgouttes
85fa1d41ba move Buffer::nice to LaTeXFeatures
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8364 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-21 17:52:07 +00:00
André Pönitz
550785b004 patch sent to the list yesteday
* buffer.[Ch]:
	* lyxtext.h:
	* paragraph_funcs.[Ch]: consolidate parts of Buffer::read() and
	InsetText::read() as LyXText::read()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8190 a592a061-630c-0410-9148-cb99ea01b6c8
2003-12-03 15:27:16 +00:00
André Pönitz
741064fa58 move the LyXText member
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8148 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-28 15:08:38 +00:00
José Matox
cd424d7853 Rename ascii to plaintext and LatexRunParams to OutputParams.
Create new files for each output format.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8046 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-05 12:06:20 +00:00
André Pönitz
b8a3ae7449 remove Inset::id
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8019 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-03 16:46:44 +00:00
Alfredo Braunstein
99fe02467a add PosIterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8014 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-02 17:56:26 +00:00
José Matox
15c913fe5a unify API for insets export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8008 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-31 18:45:43 +00:00
José Matox
95d8934808 factorise linuxdoc and docbook output code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8005 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-30 08:47:16 +00:00
Angus Leeming
78d3fbdac3 Set 'fully_loaded' when starting a new file too...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7954 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-22 14:40:24 +00:00
Angus Leeming
78046794cc Add a Buffer::fully_loaded member function, returning true only when
the file has been loaded fully. Used to prevent the premature generation
of previews and by the citation inset to prevent computation of
the natbib-style label.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7953 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-22 13:15:18 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Lars Gullik Bjønnes
495cd0eea0 more action work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7801 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-21 23:00:47 +00:00
Angus Leeming
f9c1cafbe6 Pragmatic pimpl-ing of BufferParams.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7721 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 17:00:19 +00:00
Angus Leeming
e835c9477b Pimpl Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7719 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 11:24:33 +00:00
Angus Leeming
fd36f5ad76 Make buffer's member variables private; use accessor functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7717 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 09:47:59 +00:00
Angus Leeming
462eca7d1a Remove a couple of #includes from buffer.h
Reorder #includes in lots of files into some semblence of a coherent order.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7695 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 18:38:02 +00:00
Angus Leeming
f3bff9d5d8 Move depth_type to support/types.h.
Remove paragraph.h from buffer.h, paragraph_funcs.h.
Add paragraph.h to a heap of .C files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7694 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 17:23:08 +00:00
Angus Leeming
2e1eeac0b9 Replace ParagraphList.h with ParagraphList_fwd.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7693 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 12:36:58 +00:00
Angus Leeming
236ea81bc5 Replace LString.h with support/std_string.h,
Lsstream.h with support/std_sstream.h,
support/LIstream.h with support/std_istream.h,
support/LOstream.h with support/std_ostream.h.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7685 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 17:23:11 +00:00
Angus Leeming
1dffc5cfe4 Move #includes out of header files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7659 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-04 03:54:04 +00:00
Lars Gullik Bjønnes
9d3229d5d7 Fix some zlib issues, use a temp file for lyx2lyx conversion.
Simplify some parts of file loading and insertion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7631 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-02 08:26:20 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
José Matox
aa848b8ccf remove file_format from buffer.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7469 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-01 10:23:16 +00:00