]> git.lyx.org Git - features.git/commit
Fix bug 2138: copy and paste should preserve formatting between different
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 13 Jan 2007 18:29:50 +0000 (18:29 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 13 Jan 2007 18:29:50 +0000 (18:29 +0000)
commit3500af60babc81d7c1d18221f7aae89805ee3adb
treeb513409ff74aac6eb892540d25203e92acc0a57f
parente17b39d4538fb9f2f8d51e5563188953f9d576b6
Fix bug 2138: copy and paste should preserve formatting between different
LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).

* src/insets/insettabular.C
(InsetTabular::doDispatch): adjust to clipboard interface change
(InsetTabular::copySelection): ditto

* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): ditto

* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): ditto

* src/buffer.[Ch]
(Buffer::readString): New method: Read document from a string
(Buffer::readFile): Change return value from bool to enum (needed
for readString). Return wrongversion if we are reading from a string
and the version does not match.
(Buffer::do_writeFile): make public and rename to write

* src/CutAndPaste.C
(putClipboard): New helper, put stuff to the system clipboard
(void copySelectionHelper): Use putClipboard instead of
theClipboard().put()
(void copySelection): ditto
(void pasteClipboard): new method for pasting in text
(void pasteParagraphList):

* src/frontends/Clipboard.h
(Clipboard::get): Rename to getAsText
(Clipboard::getAsLyX): New method for getting the system clipboard
in LyX format
(Clipboard::hasLyXContents): New method telling whether there is LyX
contents in the clipboard

* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods

* src/text3.C
(LyXText::dispatch): Use pasteClipboard for pasting the system
clipboard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
src/CutAndPaste.C
src/CutAndPaste.h
src/buffer.C
src/buffer.h
src/frontends/Clipboard.h
src/frontends/qt4/GuiClipboard.C
src/frontends/qt4/GuiClipboard.h
src/insets/insettabular.C
src/mathed/InsetMathGrid.C
src/mathed/InsetMathNest.C
src/text3.C