See attached. It fixes at least the menu cut/copy - paste multi-cell within a tabular.
OK to commit? - Martin
Index: tabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v retrieving revision 1.222 diff -u -p -r1.222 tabular.C --- tabular.C 5 May 2005 18:50:33 -0000 1.222 +++ tabular.C 11 May 2005 15:56:51 -0000 @@ -2510,6 +2510,13 @@ shared_ptr<InsetText> LyXTabular::getCel } +void LyXTabular::setCellInset(row_type row, col_type column, + shared_ptr<InsetText> ins) const +{ + cell_info[row][column].inset = ins; +} + + LyXTabular::idx_type LyXTabular::getCellFromInset(InsetBase const * inset) const { Index: tabular.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.h,v retrieving revision 1.95 diff -u -p -r1.95 tabular.h --- tabular.h 19 Jan 2005 15:03:29 -0000 1.95 +++ tabular.h 11 May 2005 15:56:51 -0000 @@ -384,6 +384,9 @@ public: /// boost::shared_ptr<InsetText> getCellInset(row_type row, col_type column) const; + /// + void setCellInset(row_type row, col_type column, + boost::shared_ptr<InsetText>) const; /// Search for \param inset in the tabular, with the /// idx_type getCellFromInset(InsetBase const * inset) const; Index: insets/insettabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.464 diff -u -p -r1.464 insettabular.C --- insets/insettabular.C 26 Apr 2005 11:12:19 -0000 1.464 +++ insets/insettabular.C 11 May 2005 15:56:51 -0000 @@ -1757,9 +1757,9 @@ bool InsetTabular::pasteSelection(LCurso --c1; continue; } - shared_ptr<InsetText> inset = tabular.getCellInset(r2, c2); - inset = paste_tabular->getCellInset(r1, c1); - inset->markNew(); + tabular.setCellInset(r2, c2, + paste_tabular->getCellInset(r1, c1)); + tabular.getCellInset(r2, c2)->markNew(); } } return true;
signature.asc
Description: This is a digitally signed message part