From: Martin Vermeer Date: Thu, 12 May 2005 12:22:39 +0000 (+0000) Subject: Fix tabular paste (and conflict markers in ChangeLog file :-) X-Git-Tag: 1.6.10~14294 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5230d7b7944e69efb67a2927098abefc7fbac8be;p=lyx.git Fix tabular paste (and conflict markers in ChangeLog file :-) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9939 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 92fadf5e85..b1634c3364 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,17 @@ -<<<<<<< ChangeLog +2005-05-12 Martin Vermeer + + * tabular.[hC]: added setCellInset to fix tabular paste. + +2005-05-11 Lars Gullik Bjonnes + + * buffer.C (save): check if destination is writable before trying + to copy a file + +2005-05-11 Martin Vermeer + + * BufferView_pimpl.C (update): fix processEvents -caused update + recursion bug + 2005-05-10 Jean-Marc Lasgouttes * buffer_funcs.C (setCounter): fix test for numbering of @@ -17,18 +30,6 @@ * lyxlayout.[Ch]: add special NOT_IN_TOC toclevel value for layouts that should not appear in a table of contents. -======= -2005-05-11 Lars Gullik Bjonnes - - * buffer.C (save): check if destination is writable before trying - to copy a file - ->>>>>>> 1.2180 -2005-05-11 Martin Vermeer - - * BufferView_pimpl.C (update): fix processEvents -caused update - recursion bug - 2005-05-09 Georg Baum * cursor.h (undispatched, noUpdate): add comments from André diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 3756e088e8..ea0f88d008 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-05-12 Martin Vermeer + + * insettabular.C (pasteSelection): + * insettext.h (copy c'tor): fix paste inside tabulars. + 2005-04-29 Jean-Marc Lasgouttes * insetoptarg.C (plaintext): add dummy method. diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index b4e358a85f..fee633e961 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -1757,9 +1757,11 @@ bool InsetTabular::pasteSelection(LCursor & cur) --c1; continue; } - shared_ptr inset = tabular.getCellInset(r2, c2); - inset = paste_tabular->getCellInset(r1, c1); + shared_ptr inset( + new InsetText(*paste_tabular->getCellInset(r1, c1))); + tabular.setCellInset(r2, c2, inset); inset->markNew(); + cur.pos() = 0; } } return true; diff --git a/src/insets/insettext.h b/src/insets/insettext.h index 6a26d2672b..4d82a7b2c5 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -136,9 +136,10 @@ public: bool insetAllowed(Code) const { return true; } /// bool allowSpellCheck() const { return true; } + /// + InsetText(InsetText const &); protected: - InsetText(InsetText const &); /// virtual void doDispatch(LCursor & cur, FuncRequest & cmd); private: diff --git a/src/tabular.C b/src/tabular.C index f2322e6e6b..bde0dc4f78 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -2510,6 +2510,13 @@ shared_ptr LyXTabular::getCellInset(row_type row, } +void LyXTabular::setCellInset(row_type row, col_type column, + shared_ptr ins) const +{ + cell_info[row][column].inset = ins; +} + + LyXTabular::idx_type LyXTabular::getCellFromInset(InsetBase const * inset) const { diff --git a/src/tabular.h b/src/tabular.h index ea4b2c8890..693ae7bf58 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -384,6 +384,9 @@ public: /// boost::shared_ptr getCellInset(row_type row, col_type column) const; + /// + void setCellInset(row_type row, col_type column, + boost::shared_ptr) const; /// Search for \param inset in the tabular, with the /// idx_type getCellFromInset(InsetBase const * inset) const;