Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Commit

Permalink
consolidte method usage
Browse files Browse the repository at this point in the history
  • Loading branch information
anti43 committed Jan 28, 2013
1 parent eab47ee commit db4bfb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/enoa/connection/NoaConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public void run() {
if (LocalSettings.hasProperty(LocalSettings.OFFICE_COMMAND)) {
FileExecutor.run(LocalSettings.getProperty(LocalSettings.OFFICE_COMMAND));
} else {
FileExecutor.run(getOOArgs(path, port));
NoaConnectionLocalServer.startOOServerIfNotRunning(path, port);
}
}
};
Expand All @@ -343,8 +343,9 @@ protected static String[] getOOArgs(String path, int port) {
"--nolockcheck",
"--nocrashreport",
"--nodefault",
(Main.osIsWindows ? "--accept=socket,host=0.0.0.0,port=" + port + ";urp;StarOffice.Service"
: "--accept='socket,host=0.0.0.0,port=" + port + ";urp;StarOffice.Service'")};
(Main.osIsWindows ? "--accept=socket,host=0.0.0.0,port=8100;urp;StarOffice.Service;"
: "--accept='socket,host=0.0.0.0,port=8100;urp;StarOffice.Service'")
};
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/enoa/connection/NoaConnectionLocalServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ public void run() {
if (LocalSettings.hasProperty(LocalSettings.OFFICE_COMMAND)) {
FileExecutor.run(LocalSettings.getProperty(LocalSettings.OFFICE_COMMAND));
} else {
FileExecutor.run(getOOArgs(path, port));
try {
startOOServer(path, port);
} catch (IOException iOException) {
Log.Debug(iOException);
}
}
}
};
Expand Down

0 comments on commit db4bfb2

Please sign in to comment.