]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
Buffer: Rename function names:
[lyx.git] / src / CutAndPaste.cpp
index 5fd559f10712bcde390269735519de54db3373fb..e716cc3a817ca35306ab119f33549b0741904461 100644 (file)
@@ -35,8 +35,8 @@
 #include "Paragraph.h"
 #include "ParagraphParameters.h"
 #include "ParIterator.h"
-#include "Undo.h"
 
+#include "insets/InsetBibitem.h"
 #include "insets/InsetBranch.h"
 #include "insets/InsetCommand.h"
 #include "insets/InsetFlex.h"
@@ -272,7 +272,7 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
 
                case LABEL_CODE: {
                        // check for duplicates
-                       InsetCommand & lab = static_cast<InsetCommand &>(*it);
+                       InsetLabel & lab = dynamic_cast<InsetLabel &>(*it);
                        docstring const oldname = lab.getParam("name");
                        lab.updateCommand(oldname, false);
                        // We need to update the buffer reference cache.
@@ -310,7 +310,7 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
 
                case BIBITEM_CODE: {
                        // check for duplicates
-                       InsetCommand & bib = static_cast<InsetCommand &>(*it);
+                       InsetBibitem & bib = dynamic_cast<InsetBibitem &>(*it);
                        docstring const oldkey = bib.getParam("key");
                        bib.updateCommand(oldkey, false);
                        // We need to update the buffer reference cache.