]> git.lyx.org Git - features.git/commitdiff
buffer-export * synonymous to buffer-export
authorGuillaume Munch <gm@lyx.org>
Tue, 28 Feb 2017 21:15:53 +0000 (22:15 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 5 Mar 2017 07:45:52 +0000 (08:45 +0100)
src/Buffer.cpp
src/LyXAction.cpp
src/frontends/qt4/GuiView.cpp

index 86da237eec9bb3736dfa9f573b0064a287b7884f..60dcc51ce309d7b7c37e6284c6d412886a8107b8 100644 (file)
@@ -2534,8 +2534,8 @@ bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                        enable = true;
                        break;
                }
-               string format =
-                       arg.empty() ? params().getDefaultOutputFormat() : to_utf8(arg);
+               string format = (arg.empty() || arg == "*") ?
+                       params().getDefaultOutputFormat() : to_utf8(arg);
                size_t pos = format.find(' ');
                if (pos != string::npos)
                        format = format.substr(0, pos);
@@ -2643,8 +2643,8 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                break;
 
        case LFUN_BUFFER_EXPORT: {
-               string const format =
-                       argument.empty() ? params().getDefaultOutputFormat() : argument;
+               string const format = (argument.empty() || argument == "*") ?
+                       params().getDefaultOutputFormat() : argument;
                ExportStatus const status = doExport(format, false);
                dr.setError(status != ExportSuccess);
                if (status != ExportSuccess)
index dba6e64fdbfed9cfaa3c31b1a4d92a7902831dad..1ac74db6ca4416960748d9cefb21e93fd6957817 100644 (file)
@@ -583,8 +583,8 @@ void LyXAction::init()
                         want to start from and for the command that you want to
                         apply to this format. Internally the control is then passed
                         to #LFUN_BUFFER_EXPORT_CUSTOM.\n
-                        If absent, the default output format of the document is
-                        used.
+                        If absent or *, then the default output format of the
+                        document is used.
                <DEST>  If present, this argument provides the export destination
                        filename. Its containing folder will also be the destination
                        folder, where all the needed external files will be copied.
index c4f6b5724ddc92ea84d314285eaf2fe44e4d2547..63bd4c67d94f6bcedacdfc427810214734f66fb8 100644 (file)
@@ -3548,7 +3548,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        else
                                target_dir = doc_buffer->fileName().onlyPath();
 
-                       string const format = argument.empty() ?
+                       string const format = (argument.empty() || argument == "*") ?
                                doc_buffer->params().getDefaultOutputFormat() : argument;
 
                        if ((dest.empty() && doc_buffer->isUnnamed())