]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
Properly fix handling of title layouts within insets (#11787)
[lyx.git] / src / insets / InsetTabular.cpp
index 2bfa3914b9fa8a13531d85ccb4ff81c16aba2794..e007e59174841ebf8b495e9b84ef8dd7ff804655 100644 (file)
@@ -5184,6 +5184,16 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                                        break;
                                }
                        }
+                       else if (theClipboard().hasTextContents(Clipboard::LyXTextType)) {
+                               // This might be tabular data from another LyX instance. Check!
+                               docstring const clip =
+                                       theClipboard().getAsText(Clipboard::PlainTextType);
+                               if (clip.find_first_of(from_ascii("\t\n")) != docstring::npos) {
+                                       FuncRequest ncmd = FuncRequest(LFUN_CLIPBOARD_PASTE, cmd.argument());
+                                       doDispatch(cur, ncmd);
+                                       break;
+                               }
+                       }
                        if (!cur.selIsMultiCell())
                                cell(cur.idx())->dispatch(cur, cmd);
                        break;