]> git.lyx.org Git - lyx.git/commitdiff
Fix tabular paste (and conflict markers in ChangeLog file :-)
authorMartin Vermeer <martin.vermeer@hut.fi>
Thu, 12 May 2005 12:22:39 +0000 (12:22 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Thu, 12 May 2005 12:22:39 +0000 (12:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9939 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/insets/ChangeLog
src/insets/insettabular.C
src/insets/insettext.h
src/tabular.C
src/tabular.h

index 92fadf5e853916a54ae6b6ebdd0bef416a9db4f8..b1634c33646c7e0b218aa98d1ba92d819f1c6482 100644 (file)
@@ -1,4 +1,17 @@
-<<<<<<< ChangeLog
+2005-05-12  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * tabular.[hC]: added setCellInset to fix tabular paste.
+
+2005-05-11  Lars Gullik Bjonnes  <larsbj@gullik.net>
+
+       * buffer.C (save): check if destination is writable before trying
+       to copy a file
+
+2005-05-11  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * BufferView_pimpl.C (update): fix processEvents -caused update
+       recursion bug
+
 2005-05-10  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * buffer_funcs.C (setCounter): fix test for numbering of
        * 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  <larsbj@gullik.net>
-
-       * buffer.C (save): check if destination is writable before trying
-       to copy a file
-
->>>>>>> 1.2180
-2005-05-11  Martin Vermeer  <martin.vermeer@hut.fi>
-
-       * BufferView_pimpl.C (update): fix processEvents -caused update
-       recursion bug
-
 2005-05-09  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * cursor.h (undispatched, noUpdate): add comments from AndrĂ©
index 3756e088e868a937fba1b592794b53ff65d95b33..ea0f88d008e2b289d5d952d9174e66546d7d9192 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-12  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * insettabular.C (pasteSelection):
+       * insettext.h (copy c'tor): fix paste inside tabulars.
+
 2005-04-29  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * insetoptarg.C (plaintext): add dummy method.
index b4e358a85fb359794f18a4869542afdb78d05e8a..fee633e961214d4ba3f5b11fbc246ebae0807337 100644 (file)
@@ -1757,9 +1757,11 @@ bool InsetTabular::pasteSelection(LCursor & cur)
                                --c1;
                                continue;
                        }
-                       shared_ptr<InsetText> inset = tabular.getCellInset(r2, c2);
-                       inset = paste_tabular->getCellInset(r1, c1);
+                       shared_ptr<InsetText> inset(
+                               new InsetText(*paste_tabular->getCellInset(r1, c1)));
+                       tabular.setCellInset(r2, c2, inset);
                        inset->markNew();
+                       cur.pos() = 0;
                }
        }
        return true;
index 6a26d2672bd07efd6b0711625727926c9da8c15d..4d82a7b2c5c746e78b4a8552b9addeb9aa707bdb 100644 (file)
@@ -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:
index f2322e6e6bc304a6d09e988a917144a50853e8dc..bde0dc4f78c869bdd83e536433e7396925e72308 100644 (file)
@@ -2510,6 +2510,13 @@ shared_ptr<InsetText> LyXTabular::getCellInset(row_type row,
 }
 
 
+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 ea4b2c88909782e9090a7502305a8c03c3daa269..693ae7bf5845bebadb7bb66d1216a683ddcbca30 100644 (file)
@@ -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;