]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Handle paragraph direction switch in captions (with polyglossia/bidi)
[lyx.git] / src / Buffer.cpp
index 85e27952ff84dff199dbd95a2bb13b54402c24ff..46a9d967f7aa4637d55381e355606bc666f7e272 100644 (file)
@@ -466,7 +466,9 @@ Buffer::Impl::Impl(Buffer * owner, FileName const & file, bool readonly_,
        if (!cloned_buffer_) {
                temppath = createBufferTmpDir();
                lyxvc.setBuffer(owner_);
-               Language const * inplang = languages.getFromCode(theApp()->inputLanguageCode());
+               Language const * inplang = theApp() ?
+                                       languages.getFromCode(theApp()->inputLanguageCode())
+                                     : nullptr;
                if (inplang)
                        params.language = inplang;
                if (use_gui)
@@ -1966,6 +1968,9 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream & os,
                runparams.use_babel = params().writeLaTeX(os, features,
                                                          d->filename.onlyPath());
 
+               // Active characters
+               runparams.active_chars = features.getActiveChars();
+
                // Biblatex bibliographies are loaded here
                if (params().useBiblatex()) {
                        vector<pair<docstring, string>> const bibfiles =
@@ -3578,7 +3583,7 @@ typename M::const_iterator greatest_below(M & m, typename M::key_type const & x)
        if (it == m.begin())
                return m.end();
 
-       it--;
+       --it;
        return it;
 }
 
@@ -4633,7 +4638,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
                result_file = dest_filename;
        // We need to copy referenced files (e. g. included graphics
        // if format == "dvi") to the result dir.
-       vector<ExportedFile> const files =
+       vector<ExportedFile> const extfiles =
                runparams.exportdata->externalFiles(format);
        string const dest = runparams.export_folder.empty() ?
                onlyPath(result_file) : runparams.export_folder;
@@ -4641,7 +4646,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
                                 : force_overwrite == ALL_FILES;
        CopyStatus status = use_force ? FORCE : SUCCESS;
 
-       for (ExportedFile const & exp : files) {
+       for (ExportedFile const & exp : extfiles) {
                if (status == CANCEL) {
                        message(_("Document export cancelled."));
                        return ExportCancel;