]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTemplate.C
insetcharstyle drawing cosmetics
[lyx.git] / src / insets / ExternalTemplate.C
index 5caa2246c002dd2beb6876ac6cfa4b6206339905..482a0663dbf7e567bd6c341c3649d9bae607e2a1 100644 (file)
@@ -146,6 +146,18 @@ public:
                        ost << "\t\tPreamble " << *pit << '\n';
                }
 
+               typedef Template::Format::FileMap FileMap;
+               FileMap::const_iterator rit  = ft.referencedFiles.begin();
+               FileMap::const_iterator rend = ft.referencedFiles.end();
+               for (; rit != rend; ++rit) {
+                       vector<string>::const_iterator fit  = rit->second.begin();
+                       vector<string>::const_iterator fend = rit->second.end();
+                       for (; fit != fend; ++fit) {
+                               ost << "\t\tReferencedFile " << rit->first
+                                   << " \"" << *fit << "\"\n";
+                       }
+               }
+
                ost << "\tFormatEnd\n";
        }
 private:
@@ -452,6 +464,7 @@ void Template::Format::readFormat(LyXLex & lex)
                FO_PREAMBLE,
                FO_TRANSFORMCOMMAND,
                FO_TRANSFORMOPTION,
+               FO_REFERENCEDFILE,
                FO_END
        };
 
@@ -460,6 +473,7 @@ void Template::Format::readFormat(LyXLex & lex)
                { "option", FO_OPTION },
                { "preamble", FO_PREAMBLE },
                { "product", FO_PRODUCT },
+               { "referencedfile", FO_REFERENCEDFILE },
                { "requirement", FO_REQUIREMENT },
                { "transformcommand", FO_TRANSFORMCOMMAND },
                { "transformoption", FO_TRANSFORMOPTION },
@@ -521,6 +535,15 @@ void Template::Format::readFormat(LyXLex & lex)
                        break;
                }
 
+               case FO_REFERENCEDFILE: {
+                       lex.next(true);
+                       string const format = lex.getString();
+                       lex.next(true);
+                       string const file = lex.getString();
+                       referencedFiles[format].push_back(file);
+                       break;
+               }
+
                case FO_END:
                        return;
                }