commit e0a5babde7f97d86742b58f17d6b2eaad4d0c860
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Fri Feb 23 08:58:16 2018 +0100

    Add literal param to InsetInclude
    
    This is used by lstinput
    
    File format change.
    
    Fixes: #10544.
---
 development/FORMAT                |    5 +
 lib/lyx2lyx/LyX.py                |    7 +-
 lib/lyx2lyx/Makefile.am           |    1 +
 lib/lyx2lyx/lyx_2_4.py            |  105 ++++++++
 src/frontends/qt4/GuiInclude.cpp  |    4 +
 src/frontends/qt4/ui/IncludeUi.ui |  520 +++++++++++++++++++------------------
 src/insets/InsetInclude.cpp       |    6 +-
 src/version.h                     |    4 +-
 8 files changed, 391 insertions(+), 261 deletions(-)

diff --git a/development/FORMAT b/development/FORMAT
index 5e0c5bf..5058ee2 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -7,6 +7,11 @@ changes happened in particular if possible. A good example 
would be
 
 -----------------------
 
+2018-02-23  Jürgen Spitzmüller  <j.spitzmuel...@gmx.de>
+
+       * format incremented to 545: Add "literal" param to inset include
+          This is used by the lstinput caption.
+
 2017-06-06 Enrico Forestieri <for...@lyx.org>
        * Format incremented to 544: support for minted.
          The listings inset now supports also the minted package.
diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py
index 98111d6..ce047e8 100644
--- a/lib/lyx2lyx/LyX.py
+++ b/lib/lyx2lyx/LyX.py
@@ -1,6 +1,6 @@
 # This file is part of lyx2lyx
 # -*- coding: utf-8 -*-
-# Copyright (C) 2002-2015 The LyX Team
+# Copyright (C) 2002-2018 The LyX Team
 # Copyright (C) 2002-2004 Dekel Tsur <de...@lyx.org>
 # Copyright (C) 2002-2006 José Matos <jama...@lyx.org>
 #
@@ -92,8 +92,9 @@ format_relation = [("0_06",    [200], minor_versions("0.6" , 
4)),
                    ("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
                    ("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
                    ("2_1", list(range(414,475)), minor_versions("2.1" , 5)),
-                   ("2_2", list(range(475,509)), minor_versions("2.2" , 0)),
-                   ("2_3", (), minor_versions("2.3" , 0))
+                   ("2_2", list(range(475,509)), minor_versions("2.2" , 4)),
+                   ("2_3", list(range(509,545)), minor_versions("2.3" , 0)),
+                   ("2_4", (), minor_versions("2.4" , 0))
                   ]
 
 ####################################################################
diff --git a/lib/lyx2lyx/Makefile.am b/lib/lyx2lyx/Makefile.am
index 89ba23b..9913240 100644
--- a/lib/lyx2lyx/Makefile.am
+++ b/lib/lyx2lyx/Makefile.am
@@ -34,6 +34,7 @@ dist_lyx2lyx_PYTHON = \
        lyx_2_1.py \
        lyx_2_2.py \
        lyx_2_3.py \
+       lyx_2_4.py \
        profiling.py \
        test_parser_tools.py
 
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
new file mode 100644
index 0000000..21e0a08
--- /dev/null
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+# This file is part of lyx2lyx
+# Copyright (C) 2018 The LyX team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+""" Convert files to the file format generated by lyx 2.4"""
+
+import re, string
+import unicodedata
+import sys, os
+
+# Uncomment only what you need to import, please.
+
+from parser_tools import (find_end_of_inset, find_token) 
+#    del_token, del_value, del_complete_lines,
+#    find_complete_lines, find_end_of, find_end_of_layout, 
+#    find_re, find_substring, find_token_backwards,
+#    get_containing_inset, get_containing_layout, get_bool_value, get_value,
+#    get_quoted_value, is_in_inset, set_bool_value
+#    find_tokens, find_token_exact, check_token, get_option_value
+
+#from lyx2lyx_tools import (add_to_preamble, put_cmd_in_ert, revert_font_attrs,
+#                           insert_to_preamble, latex_length)
+#  get_ert, lyx2latex, lyx2verbatim, length_in_bp, convert_info_insets
+#  revert_flex_inset, hex2ratio, str2bool
+
+####################################################################
+# Private helper functions
+
+
+
+###############################################################################
+###
+### Conversion and reversion routines
+###
+###############################################################################
+
+  
+def convert_lst_literalparam(document):
+    " Add param literal to include inset "
+
+    i = 0
+    while True:
+        i = find_token(document.body, '\\begin_inset CommandInset include', i)
+        if i == -1:
+            break
+        j = find_end_of_inset(document.body, i)
+        if j == -1:
+            document.warning("Malformed LyX document: Can't find end of 
command inset at line %d" % i)
+            i += 1
+            continue
+        while i < j and document.body[i].strip() != '':
+            i += 1
+        document.body.insert(i, "literal \"true\"")
+
+
+def revert_lst_literalparam(document):
+    " Remove param literal from include inset "
+
+    i = 0
+    while True:
+        i = find_token(document.body, '\\begin_inset CommandInset include', i)
+        if i == -1:
+            break
+        j = find_end_of_inset(document.body, i)
+        if j == -1:
+            document.warning("Malformed LyX document: Can't find end of 
include inset at line %d" % i)
+            i += 1
+            continue
+        k = find_token(document.body, 'literal', i, j)
+        if k == -1:
+            i += 1
+            continue
+        del document.body[k]
+
+
+##
+# Conversion hub
+#
+
+supported_versions = ["2.4.0", "2.4"]
+convert = [
+           [545, [convert_lst_literalparam]]
+          ]
+
+revert =  [
+           [544, [revert_lst_literalparam]]
+          ]
+
+
+if __name__ == "__main__":
+    pass
diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp
index 8e7a57c..36fb9a0 100644
--- a/src/frontends/qt4/GuiInclude.cpp
+++ b/src/frontends/qt4/GuiInclude.cpp
@@ -64,6 +64,7 @@ GuiInclude::GuiInclude(GuiView & lv)
        connect(previewCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(captionLE, SIGNAL(textChanged(const QString&)), this, 
SLOT(change_adaptor()));
        connect(labelLE, SIGNAL(textChanged(const QString&)), this, 
SLOT(change_adaptor()));
+       connect(literalCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(listingsED, SIGNAL(textChanged()), this, 
SLOT(change_adaptor()));
        connect(listingsED, SIGNAL(textChanged()), this, 
SLOT(setListingsMsg()));
        connect(bypassCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
@@ -227,6 +228,7 @@ void GuiInclude::paramsToDialog(InsetCommandParams const & 
icp)
                string extra = getStringFromVector(pars);
                
listingsED->setPlainText(toqstr(InsetListingsParams(extra).separatedParams()));
        }
+       literalCB->setChecked(icp["literal"] == "true");
 
        // Make sure that the bc is in the INITIAL state
        if (bc().policy().buttonStatus(ButtonPolicy::OKAY))
@@ -265,6 +267,8 @@ void GuiInclude::applyView()
                else
                        params_.setCmdName("verbatiminput");
        }
+       params_["literal"] = literalCB->isChecked()
+                       ? from_ascii("true") : from_ascii("false");
 }
 
 
diff --git a/src/frontends/qt4/ui/IncludeUi.ui 
b/src/frontends/qt4/ui/IncludeUi.ui
index 0522d3d..11a8f49 100644
--- a/src/frontends/qt4/ui/IncludeUi.ui
+++ b/src/frontends/qt4/ui/IncludeUi.ui
@@ -1,229 +1,333 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>IncludeUi</class>
- <widget class="QDialog" name="IncludeUi" >
-  <property name="geometry" >
+ <widget class="QDialog" name="IncludeUi">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>371</width>
-    <height>374</height>
+    <width>363</width>
+    <height>470</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string/>
   </property>
-  <property name="sizeGripEnabled" >
+  <property name="sizeGripEnabled">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item row="3" column="0" colspan="6" >
-    <widget class="QGroupBox" name="listingsGB" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>7</vsizetype>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <widget class="QLabel" name="filenameLA">
+     <property name="toolTip">
+      <string/>
+     </property>
+     <property name="text">
+      <string>&amp;File:</string>
+     </property>
+     <property name="buddy">
+      <cstring>filenameED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2">
+    <widget class="QLineEdit" name="filenameED">
+     <property name="toolTip">
+      <string>File name to include</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="4">
+    <widget class="QPushButton" name="browsePB">
+     <property name="toolTip">
+      <string>Select a file</string>
+     </property>
+     <property name="text">
+      <string>&amp;Browse...</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <widget class="QLabel" name="TextLabel1">
+     <property name="text">
+      <string>&amp;Include Type:</string>
+     </property>
+     <property name="buddy">
+      <cstring>typeCO</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QComboBox" name="typeCO">
+     <item>
+      <property name="text">
+       <string>Include</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Input</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Verbatim</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Program Listing</string>
+      </property>
+     </item>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>28</width>
+       <height>28</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="4">
+    <widget class="QPushButton" name="editPB">
+     <property name="toolTip">
+      <string>Edit the file</string>
+     </property>
+     <property name="text">
+      <string>&amp;Edit</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="5">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="leftMargin">
+      <number>0</number>
+     </property>
+     <property name="topMargin">
+      <number>0</number>
+     </property>
+     <property name="rightMargin">
+      <number>0</number>
+     </property>
+     <property name="bottomMargin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QCheckBox" name="visiblespaceCB">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Underline spaces in generated output</string>
+       </property>
+       <property name="text">
+        <string>&amp;Mark spaces in output</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="previewCB">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Show LaTeX preview</string>
+       </property>
+       <property name="text">
+        <string>&amp;Show preview</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="3" column="0" colspan="5">
+    <widget class="QGroupBox" name="listingsGB">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="title" >
+     <property name="title">
       <string>Listing Parameters</string>
      </property>
-     <layout class="QGridLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
-      </property>
-      <item row="3" column="1" >
-       <widget class="QTextEdit" name="listingsED" >
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>5</hsizetype>
-          <vsizetype>7</vsizetype>
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize" >
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-       </widget>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="labelLE"/>
       </item>
-      <item row="4" column="0" colspan="2" >
-       <widget class="QCheckBox" name="bypassCB" >
-        <property name="toolTip" >
-         <string>Check it to enter parameters that are not recognizable by 
LyX</string>
+      <item row="1" column="0">
+       <widget class="QLabel" name="labelLabel">
+        <property name="text">
+         <string>&amp;Label:</string>
         </property>
-        <property name="text" >
-         <string>&amp;Bypass validation</string>
+        <property name="buddy">
+         <cstring>labelLE</cstring>
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
-       <widget class="QLineEdit" name="captionLE" >
-        <property name="minimumSize" >
+      <item row="4" column="1">
+       <widget class="QTextEdit" name="listingsED">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
          <size>
-          <width>150</width>
+          <width>0</width>
           <height>0</height>
          </size>
         </property>
        </widget>
       </item>
-      <item row="0" column="0" >
-       <widget class="QLabel" name="captionLabel" >
-        <property name="text" >
-         <string>C&amp;aption:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>captionLE</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1" >
-       <widget class="QLineEdit" name="labelLE" />
-      </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="labelLabel" >
-        <property name="text" >
-         <string>La&amp;bel:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>labelLE</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0" colspan="2" >
-       <widget class="QLabel" name="label_3" >
-        <property name="text" >
-         <string>Mo&amp;re parameters</string>
-        </property>
-        <property name="buddy" >
-         <cstring>listingsED</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0" >
-       <widget class="QTextBrowser" name="listingsTB" >
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>7</vsizetype>
+      <item row="4" column="0">
+       <widget class="QTextBrowser" name="listingsTB">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="minimumSize" >
+        <property name="minimumSize">
          <size>
           <width>0</width>
           <height>0</height>
          </size>
         </property>
-        <property name="maximumSize" >
+        <property name="maximumSize">
          <size>
           <width>120</width>
           <height>16777215</height>
          </size>
         </property>
-        <property name="cursor" >
-         <cursor>0</cursor>
+        <property name="cursor" stdset="0">
+         <cursorShape>ArrowCursor</cursorShape>
         </property>
-        <property name="focusPolicy" >
+        <property name="focusPolicy">
          <enum>Qt::NoFocus</enum>
         </property>
-        <property name="acceptDrops" >
+        <property name="acceptDrops">
          <bool>true</bool>
         </property>
-        <property name="frameShape" >
+        <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
         </property>
-        <property name="frameShadow" >
+        <property name="frameShadow">
          <enum>QFrame::Plain</enum>
         </property>
-        <property name="lineWidth" >
+        <property name="lineWidth">
          <number>0</number>
         </property>
-        <property name="acceptRichText" >
+        <property name="acceptRichText">
          <bool>false</bool>
         </property>
        </widget>
       </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="captionLabel">
+        <property name="text">
+         <string>&amp;Caption:</string>
+        </property>
+        <property name="buddy">
+         <cstring>captionLE</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="captionLE">
+        <property name="minimumSize">
+         <size>
+          <width>150</width>
+          <height>0</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="2">
+       <widget class="QCheckBox" name="bypassCB">
+        <property name="toolTip">
+         <string>Check it to enter parameters that are not recognizable by 
LyX</string>
+        </property>
+        <property name="text">
+         <string>&amp;Bypass validation</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>&amp;More parameters</string>
+        </property>
+        <property name="buddy">
+         <cstring>listingsED</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QCheckBox" name="literalCB">
+        <property name="toolTip">
+         <string>Pass content of the `Caption' field literally to LaTeX. Check 
this if you want to enter LaTeX code.</string>
+        </property>
+        <property name="text">
+         <string>Li&amp;teral</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
-   <item row="2" column="0" colspan="6" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
+   <item row="4" column="0" colspan="3">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="leftMargin">
       <number>0</number>
      </property>
-     <property name="spacing" >
-      <number>6</number>
+     <property name="topMargin">
+      <number>0</number>
      </property>
-     <item>
-      <widget class="QCheckBox" name="visiblespaceCB" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>3</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="toolTip" >
-        <string>Underline spaces in generated output</string>
-       </property>
-       <property name="text" >
-        <string>&amp;Mark spaces in output</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QCheckBox" name="previewCB" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>3</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="toolTip" >
-        <string>Show LaTeX preview</string>
-       </property>
-       <property name="text" >
-        <string>&amp;Show preview</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="4" column="0" colspan="6" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
+     <property name="rightMargin">
       <number>0</number>
      </property>
-     <property name="spacing" >
-      <number>6</number>
+     <property name="bottomMargin">
+      <number>0</number>
      </property>
      <item>
       <spacer>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Expanding</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>20</width>
          <height>20</height>
@@ -232,120 +336,30 @@
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="okPB" >
-       <property name="text" >
+      <widget class="QPushButton" name="okPB">
+       <property name="text">
         <string>&amp;OK</string>
        </property>
-       <property name="default" >
+       <property name="autoDefault">
         <bool>true</bool>
        </property>
-       <property name="autoDefault" >
+       <property name="default">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="closePB" >
-       <property name="text" >
+      <widget class="QPushButton" name="closePB">
+       <property name="text">
         <string>&amp;Close</string>
        </property>
-       <property name="autoDefault" >
+       <property name="autoDefault">
         <bool>false</bool>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item row="0" column="0" >
-    <widget class="QLabel" name="filenameLA" >
-     <property name="toolTip" >
-      <string/>
-     </property>
-     <property name="text" >
-      <string>&amp;File:</string>
-     </property>
-     <property name="buddy" >
-      <cstring>filenameED</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" colspan="4" >
-    <widget class="QLineEdit" name="filenameED" >
-     <property name="toolTip" >
-      <string>File name to include</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" colspan="2" >
-    <widget class="QLabel" name="TextLabel1" >
-     <property name="text" >
-      <string>&amp;Include Type:</string>
-     </property>
-     <property name="buddy" >
-      <cstring>typeCO</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="2" >
-    <widget class="QComboBox" name="typeCO" >
-     <item>
-      <property name="text" >
-       <string>Include</string>
-      </property>
-     </item>
-     <item>
-      <property name="text" >
-       <string>Input</string>
-      </property>
-     </item>
-     <item>
-      <property name="text" >
-       <string>Verbatim</string>
-      </property>
-     </item>
-     <item>
-      <property name="text" >
-       <string>Program Listing</string>
-      </property>
-     </item>
-    </widget>
-   </item>
-   <item row="1" column="3" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>28</width>
-       <height>28</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="5" >
-    <widget class="QPushButton" name="browsePB" >
-     <property name="toolTip" >
-      <string>Select a file</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Browse...</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="5" >
-    <widget class="QPushButton" name="editPB" >
-     <property name="toolTip" >
-      <string>Edit the file</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Edit</string>
-     </property>
-    </widget>
-   </item>
   </layout>
  </widget>
  <tabstops>
@@ -363,7 +377,7 @@
   <tabstop>closePB</tabstop>
  </tabstops>
  <includes>
-  <include location="local" >qt_i18n.h</include>
+  <include location="local">qt_i18n.h</include>
  </includes>
  <resources/>
  <connections/>
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 89f2533..da2cd80 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -224,6 +224,7 @@ ParamInfo const & InsetInclude::findInfo(string const & /* 
cmdName */)
        if (param_info_.empty()) {
                param_info_.add("filename", ParamInfo::LATEX_REQUIRED);
                param_info_.add("lstparams", ParamInfo::LATEX_OPTIONAL);
+               param_info_.add("literal", ParamInfo::LYX_INTERNAL);
        }
        return param_info_;
 }
@@ -631,9 +632,8 @@ void InsetInclude::latex(otexstream & os, OutputParams 
const & runparams) const
                                language = opts[i].substr(9);
                                opts.erase(opts.begin() + i--);
                        } else if (prefixIs(opts[i], from_ascii("caption="))) {
-                               // FIXME We should use HANDLING_LATEXIFY here,
-                               // but that's a file format change (see #10455).
-                               caption = opts[i].substr(8);
+                               caption = params().prepareCommand(runparams, 
opts[i].substr(8),
+                                                                 
ParamInfo::HANDLING_LATEXIFY);
                                opts.erase(opts.begin() + i--);
                                if (!use_minted)
                                        
latexed_opts.push_back(from_ascii("caption=") + caption);
diff --git a/src/version.h b/src/version.h
index 1c42af3..50fd0a8 100644
--- a/src/version.h
+++ b/src/version.h
@@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 544 // ef: minted support
-#define LYX_FORMAT_TEX2LYX 544
+#define LYX_FORMAT_LYX 545 // spitz: literal for include
+#define LYX_FORMAT_TEX2LYX 545
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
 #ifndef _MSC_VER

Reply via email to