* lyxfunc.h:
- theLyXFunc(): new function in the global namespace.
- lyx::dispatch(): new function in the lyx namespace.
- lyx::getStatus(): new function in the lyx namespace.
* bufferlist.h:
- theBufferList(): new function in the global namespace.
* Clipboard.h:
- theClipboard(): new function in the global namespace.
* Selection.h:
- theSelection(): new function in the global namespace.
* FontLoader.h:
- theFontLoader(): new function in the global namespace.
* FontMetrics.h:
- theFontMetrics(LyXFont const &): new function in the global namespace.
* Application.C: implements the functions defined above.
* LyXView.h:
- getLyXFunc(): deleted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15298 a592a061-630c-0410-9148-cb99ea01b6c8
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
* src/lyx_cb.C
(newFile): Only set the new buffer if it is valid
* src/BufferView_pimpl.C
(BufferView::Pimpl::loadLyXFile): Test whether newFile succeeded
* src/lyxfunc.C
(LyXFunc::menuNew): Only set the new buffer if it is valid
(LyXFunc::open): ditto
* src/importer.C
(Importer::Import): ditto
* src/lyx_main.C
(LyX::exec2): Only use the new buffer if newFile succeeded
* src/buffer_funcs.C
(newFile): discard the buffer and return 0 if the template is invalid
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14474 a592a061-630c-0410-9148-cb99ea01b6c8
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
* toc.[Ch]:
- rewritten to take advantage of new TocBackend class. The toc
cache is implemented as a static variable:
static map<Buffer const *, lyx::TocBackend> toc_backend_;
* buffer_funcs.C:
updateLabels(Buffer const & buf) now calls
"lyx::toc::updateToc(buf);"
* pariterator.h: added default constructor
ParConstIterator(): DocIterator() {}
* insetfloat.C: added pit parameter to TocItem construction
* insetwrap.C: added pit parameter to TocItem construction
* MenuBackend.C: use a const ref instead of a copy of TocList
* ControlToc.[Ch]: optimisation of the API by using const reference instead of copy.
* qt4/TocPanel.[Ch]:
- optimisation of the API by using const reference instead of
copy
- directly use of TocBackend::TocIterator instead of identification by paragraph contents.
* qt4/QToc.C:
- optimisation of the API by using const reference instead of
copy
- makes use of TocBackend::Item::uid()
* qt2/QToc.C:
- use TocItem::depth() and TocItem::str() instead of public member access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13713 a592a061-630c-0410-9148-cb99ea01b6c8
capitalized to have first letter lowercased.
* Adjust all affected files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605 a592a061-630c-0410-9148-cb99ea01b6c8
letter start with a lower letter.
* All other .C and .h in the cs: adjust for above change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8
* text.C:
- LyXText::breakParagraph(): test if needsUpdateCounters() is enough before a full updateCounter
- LyXText::backspacePos0(): ditto
* text2.C:
- LyXText::deleteEmptyParagraphMechanism(): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13593 a592a061-630c-0410-9148-cb99ea01b6c8
classes.
* lyx_gui.C (start): use for_each instead of explicit for loop
* cursor.C (insert): use for_each instead of explicit for loop
* bufferlist.C (getFileNames): use std::transform and
std::back_inserter instead of std::copy and lyx::back_inserter_fun.
* buffer_funcs.C (bufferErrors): use for_each instead of explicit
for loop
* buffer.C (changeLanguage): use for_each instead of explicit for
loop
(hasParWithID): implement using getParFromID
* LaTeXFeatures.C: ws change only
* CutAndPaste.C (replaceSelectionWithString): Use a temporary var
to cleanup a bit.
* BufferView_pimpl.C (trackChanges): use for_each instead of
expilicit for loop
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9182 a592a061-630c-0410-9148-cb99ea01b6c8
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
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