Fix a conversion char -> char_type without encoding conversion in
cap::replaceSelectionWithString().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16212 a592a061-630c-0410-9148-cb99ea01b6c8
* src/CutAndPaste.C
(pasteParagraphList): Don't record undo info here...
* src/BufferView.C
(BufferView::menuInsertLyXFile): ... but here instead
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15886 a592a061-630c-0410-9148-cb99ea01b6c8
copySelection; fix change tracking in
pasteSelectionHelper; remove a few CT-related FIXMEs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15788 a592a061-630c-0410-9148-cb99ea01b6c8
* src/paragraph.h: rename erase() to eraseChars()
for consistency with eraseChar()
* src/paragraph_pimpl.h: dito; merge the two erase() methods
* src/*.C: adjust properly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15478 a592a061-630c-0410-9148-cb99ea01b6c8
seems. ChangeTracking responsible please verify all
erase/eraseChar where we added false or where it is
called without changetracking bool (jug).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15456 a592a061-630c-0410-9148-cb99ea01b6c8
- Add debugging input
- If cursor::dispatch does not handle the func, then it should not request an update
- Dump metrics cache after redraw
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15443 a592a061-630c-0410-9148-cb99ea01b6c8
export (e.g. the ToC) and the navigate menu.
* src/insets/insetbase.h
(InsetBase::plaintext): output to a docstream
(InsetBase::textString): ditto
* src/mathed/TextPainter.h
(TextPainter::show): ditto
* src/support/docstream.[Ch] New file and string streams for
docstring. The file streams convert to UTF8 on the fly.
* many more files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15301 a592a061-630c-0410-9148-cb99ea01b6c8
* 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
* rename output_changes to outputChanges
* rename tracking_changes to trackChanges
* add FIXMEs for later revision
* remove trackChanges(); the CT data structure will always be set up
* decouple LFUNs changes-output/change-accept/change-reject/
all-changes-accept/all-changes-reject from LFUN changes-track
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15261 a592a061-630c-0410-9148-cb99ea01b6c8
* BufferView
- layoutChanged: new boost signal.
- LyXView owner(), owner_: deleted
* text3.C
- emit BufferView::layoutChanged instead of calling LyXView::setLayout directly
- LFUN_MOUSE_RELEASE: delete LyXView updateMenubar() and updateToolbars() direct calls.
The update is of both bars is done in WorkArea::dispatch().
* WorkArea.C
- dispatch(): add LyXView updateMenubar() call.
* LyXView
- connects to BufferView::layoutChanged directly to Toolbars::setLayout()
- setLayout(): deleted.
* qt4/GuiImplementation: modify BufferView construction (without LyXView).
All other files: cleanup header declaration of LyXView.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15153 a592a061-630c-0410-9148-cb99ea01b6c8
* src/CutAndPaste.C (pasteSelectionHelper): pass Cursor
as argument, remove cursor-dependent arguments,
implement method to reset layout in insets which
forceParagraphsToDefault.
* src/CutAndPaste.C (pasteParagraphList): adapt call of
pasteSelectionHelper.
* insets/insetbox.C (doDispatch):
* insets/insetert.C (doDispatch):
* insets/insetcharstyle.C (doDispatch):
* insettext.[Ch] (forceParagraphsToDefault):
remove ad-hoc-Code to
reset paragraph layout.
This is now done generally in CutAndPaste.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15062 a592a061-630c-0410-9148-cb99ea01b6c8
* src/CutAndPaste.C (setSelectionRange, replaceWord): remove.
(replaceSelectionWithString): select the new string after
replacement; add a bool parameter indicating in which sense the
selection is made.
* src/lyxfind.C (replace): adapt to above changes.
(find): comment out debug message.
* src/frontends/controllers/ControlSpellchecker.C (isLetter):
rename parameter.
(nextWord): take a LCursor as parameter; set the selection over
the word that has been found.
(check): adapt to changes above (the length of the word is not
necessarily the length of the selection -- fixes bug 2068).
(replace): use cap::replaceSelectionWithString
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14708 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
With this change, the only difference between BufferView.h and BufferView_pimpl.h is "cursor.h" so I think it is time to merge the two classes at last.
BufferView:
* showErrorList(), getErrorList(): transfered to LyXView.
BufferView::pimpl
* addError(), showReadonly(), connectBuffer(), disconnectBuffer(): transfered to LyXView.
CutAndPaste.C: adapted to API changes
frontends/controllers/ControlErrorList.C: ditto
lyxfunc.C: ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14458 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LyXAction.C
(LyXAction::init): handle new LFUN_CLIPBOARD_PASTE
* src/insets/insettabular.C
(InsetTabular::doDispatch): ditto
* src/insets/insetbox.C
(InsetBox::doDispatch): ditto
* src/insets/insetert.C
(InsetERT::doDispatch): ditto
(InsetERT::getStatus): ditto
* src/insets/insetcharstyle.C
(InsetCharStyle::doDispatch): ditto
* src/BufferView_pimpl.C
(BufferView::Pimpl::selectionRequest): stuff selection, not clipboard
* src/mathed/math_nestinset.C
(MathNestInset::lfunMousePress): get stuff selection, not clipboard
(MathNestInset::lfunMouseRelease): clipboard -> selection in
commented code
* src/CutAndPaste.C
(cutSelection): ditto
* src/frontends/{qt3,gtk}/GuiImplementation.C
(GuiImplementation::newWorkArea): create new selection, not clipboard,
since the clipboard is now an object
(GuiImplementation::destroyWorkArea): destroy selection, not clipboard
* src/frontends/{qt4,qt3,gtk}/GuiSelection.h: new, copied from
GuiClipboard.h
* src/frontends/{qt4,qt3,gtk}/GuiSelection.C: new, copied from
GuiClipboard.C
* src/frontends/{qt3,gtk}/GuiImplementation.h
(selection): new accessor for selection_
(selection_): new, the global selection object
* src/frontends/{qt4,qt3,gtk}/Makefile.am: add GuiSelection.C and
GuiSelection.h
* src/frontends/{qt4,qt3,gtk}/GuiClipboard.C
(GuiClipboard::get): return clipboard, not selection
(GuiClipboard::put): stuff clipboard, not selection
* src/frontends/{qt4,qt3,gtk}/GuiClipboard.h
(haveSelection): remove (this is now in GuiSelection)
* src/frontends/{qt3,gtk}/GuiClipboard.h
(old_work_area_): remove, since it is not needed anymore
* src/frontends/gtk/ghelpers.C
(getGTKStockIcon): handle LFUN_CLIPBOARD_PASTE
* src/frontends/Clipboard.h
(haveSelection): remove (this is now in Selection)
* src/frontends/qt4/GuiImplementation.[Ch]
(GuiImplementation::selection): new accessor for selection_
* src/frontends/Gui.h
(selection): New accessor for the global selection object
* src/frontends/Selection.h; new, copied from Clipboard.h
* src/frontends/Makefile.am: add Selection.h
* src/text3.C
(various): s/clipboard().haveSelection/selection().haveSelection/
(LyXText::dispatch): handle LFUN_CLIPBOARD_PASTE
(LyXText::getStatus): ditto
* src/lfuns.h: new lfun LFUN_CLIPBOARD_PASTE
* lib/ui/stdmenus.ui: add new lfun LFUN_CLIPBOARD_PASTE
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14408 a592a061-630c-0410-9148-cb99ea01b6c8
is changed
* src/cursor.C: remove unused 'using std::swap'
* src/BufferView.C: ditto
* src/CutAndPaste.[Ch]
(switchBetweenClasses): replace ParagraphList argument with InsetText
argument. This avoids an unnecessary swap in lyxfunc.C.
* src/CutAndPaste.C
(pasteSelectionHelper): Adjust to the changes above
(pasteSelectionHelper): Use ParagraphList::swap instead of std::swap.
This fixes the crash.
* src/lyxfunc.C
(LyXFunc::dispatch): Adjust to switchBetweenClasses changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13895 a592a061-630c-0410-9148-cb99ea01b6c8
* CutAndPaste.C
(eraseSelectionHelper): merge (conditionally) only first and last
paragraph of selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13875 a592a061-630c-0410-9148-cb99ea01b6c8
* src/CutAndPaste.C
(resetOwnerAndChanges): rename to resetParagraph and reset the
language of ERT paragraphs, too
(copySelectionHelper): adapt to changes above
(cutSelection): ditto
(copySelection): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13699 a592a061-630c-0410-9148-cb99ea01b6c8
indicating if ct is used in the current buffer.
(cleanChanges): pass enum ChangeTracking.
* src/paragraph_pimpl.C (cleanChanges): delete ct marks from
paste content if ct is of in the buffer. Set content INSERTED
if ct is on (bug 2207).
* src/CutAndPaste.C (pasteSelectionHelper): pass information
about the current change tracking state to cleanChanges.
* src/paragraph_pimpl.h (cleanChanges): pass enum ChangeTracking.
* src/paragraph.C (cleanChanges): pass enum ChangeTracking.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13666 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