diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-18 12:34:34 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-18 12:34:34 +0000 |
commit | 217a4d47c2b9a84ecab1252391e69ad83c88ada6 (patch) | |
tree | 98e1523e701caf2dce2cc3a360fdf5b7cc5ca426 /idlc/source/idlcmain.cxx | |
parent | fd96c67a95cac9a115c19590ee2079ca8c2787eb (diff) |
INTEGRATION: CWS sb28 (1.11.4); FILE MERGED
2005/01/04 15:52:51 sb 1.11.4.1: #i28722# idlc -stdin did not work correctly.
Diffstat (limited to 'idlc/source/idlcmain.cxx')
-rw-r--r-- | idlc/source/idlcmain.cxx | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx index 5970dd31eb9c..cb99a575f92f 100644 --- a/idlc/source/idlcmain.cxx +++ b/idlc/source/idlcmain.cxx @@ -2,9 +2,9 @@ * * $RCSfile: idlcmain.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: rt $ $Date: 2004-10-28 16:21:26 $ + * last change: $Author: kz $ $Date: 2005-01-18 13:34:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -97,19 +97,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) stdout, "%s: detected %d warnings compiling stdin\n", options.getProgramName().getStr(), idlc()->getWarningCount()); } - if (nErrors > 0) { - OString outputPathname; - if (options.isValid("-O")) { - OString outputPathname = convertToAbsoluteSystemPath( - options.getOption("-O")); - if (outputPathname[outputPathname.getLength() - 1] != '/') { - outputPathname += "/"; - } + OString outputUrl; + if (options.isValid("-O")) { + outputUrl = convertToFileUrl(options.getOption("-O")); + if (outputUrl[outputUrl.getLength() - 1] != '/') { + outputUrl += "/"; } - outputPathname += "stdin.urd"; - removeIfExists(outputPathname); + outputUrl += "stdin.urd"; + } else { + outputUrl = convertToFileUrl("stdin.urd"); + } + if (nErrors > 0) { + removeIfExists(outputUrl); } else { - nErrors = produceFile("stdin"); + nErrors = produceFile(outputUrl); } idlc()->reset(); } |