]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
cosmetics
[lyx.git] / src / CutAndPaste.cpp
index f7aca651f0880e1095c18f9fd36f743cec2e8b99..93fb67c1ea90593525ea0246790953ca64455949 100644 (file)
@@ -46,6 +46,7 @@
 #include "mathed/InsetMath.h"
 #include "mathed/MathSupport.h"
 
+#include "support/limited_stack.h"
 #include "support/lstrings.h"
 
 #include "frontends/Clipboard.h"
@@ -376,8 +377,7 @@ void copySelectionHelper(Buffer const & buf, ParagraphList & pars,
                // This is invalid outside of ERT, so we need to change it
                // to the buffer language.
                if (it->ownerCode() == ERT_CODE || it->ownerCode() == LISTINGS_CODE) {
-                       it->changeLanguage(buf.params(), latex_language,
-                                          buf.getLanguage());
+                       it->changeLanguage(buf.params(), latex_language, buf.language());
                }
                it->setInsetOwner(0);
        }