]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
Cosmetics.
[lyx.git] / src / CutAndPaste.cpp
index 0b3e8f5ed89f8a4d8ba460ce2f842349f98b26b2..fdf609e6f5bd5502ec3406998bc1dcfc934ab1fe 100644 (file)
 #include "Changes.h"
 #include "Cursor.h"
 #include "ErrorList.h"
+#include "FuncCode.h"
 #include "FuncRequest.h"
 #include "InsetIterator.h"
 #include "InsetList.h"
 #include "Language.h"
-#include "lfuns.h"
 #include "LyXFunc.h"
 #include "LyXRC.h"
 #include "Text.h"
@@ -456,6 +456,23 @@ bool reduceSelectionToOneCell(Cursor & cur)
 }
 
 
+bool multipleCellsSelected(Cursor const & cur)
+{
+       if (!cur.selection() || !cur.inMathed())
+               return false;
+       
+       CursorSlice i1 = cur.selBegin();
+       CursorSlice i2 = cur.selEnd();
+       if (!i1.inset().asInsetMath())
+               return false;
+       
+       if (i1.idx() == i2.idx())
+               return false;
+       
+       return true;
+}
+
+
 void switchBetweenClasses(DocumentClass const * const oldone, 
                DocumentClass const * const newone, InsetText & in, ErrorList & errorlist)
 {