mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-05 00:56:24 +00:00
Correct indentation
This commit is contained in:
parent
03cfeae00a
commit
994844cb34
@ -26,21 +26,21 @@ using namespace std;
|
|||||||
using namespace lyx;
|
using namespace lyx;
|
||||||
|
|
||||||
extern "C" LyXFunctionResult applescript_execute_command(const char *cmd, const char *arg) {
|
extern "C" LyXFunctionResult applescript_execute_command(const char *cmd, const char *arg) {
|
||||||
LYXERR(Debug::ACTION, "Running command [" << cmd << "] with arguments [" << arg << "]");
|
LYXERR(Debug::ACTION, "Running command [" << cmd << "] with arguments [" << arg << "]");
|
||||||
FuncRequest fr(lyxaction.lookupFunc(cmd), arg);
|
FuncRequest fr(lyxaction.lookupFunc(cmd), arg);
|
||||||
fr.setOrigin(FuncRequest::LYXSERVER);
|
fr.setOrigin(FuncRequest::LYXSERVER);
|
||||||
DispatchResult dr;
|
DispatchResult dr;
|
||||||
theApp()->dispatch(fr, dr);
|
theApp()->dispatch(fr, dr);
|
||||||
|
|
||||||
string const rval = to_utf8(dr.message());
|
string const rval = to_utf8(dr.message());
|
||||||
char *cstr =(char*) malloc((rval.size()+1)*sizeof(rval[0]));
|
char *cstr =(char*) malloc((rval.size()+1)*sizeof(rval[0]));
|
||||||
strcpy (cstr, rval.c_str());
|
strcpy (cstr, rval.c_str());
|
||||||
|
|
||||||
// Returns the result
|
// Returns the result
|
||||||
LyXFunctionResult result;
|
LyXFunctionResult result;
|
||||||
result.code = dr.error() ? -1 : 0;
|
result.code = dr.error() ? -1 : 0;
|
||||||
result.message = cstr;
|
result.message = cstr;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user