summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-06-05 17:10:47 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-06-05 17:10:47 +0000
commit11d46cafc17a5d7606ce1e649ce5a9befd4ccbe0 (patch)
treeeffa7616eae8b70f9434b821b3a871a6b42a6c33 /ucb
parenteae8fa3f90fde462df282317bd1fb0b8459d30a8 (diff)
INTEGRATION: CWS bgdlremove (1.5.40); FILE MERGED
2007/05/11 14:09:42 kso 1.5.40.1: #i76911# - no longer uses VOS.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/odma/odma_main.cxx53
1 files changed, 35 insertions, 18 deletions
diff --git a/ucb/source/ucp/odma/odma_main.cxx b/ucb/source/ucp/odma/odma_main.cxx
index dd2d58bb14..6014f14808 100644
--- a/ucb/source/ucp/odma/odma_main.cxx
+++ b/ucb/source/ucp/odma/odma_main.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: odma_main.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 13:58:24 $
+ * last change: $Author: ihi $ $Date: 2007-06-05 18:10:47 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -33,11 +33,10 @@
*
************************************************************************/
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_ucb.hxx"
-#ifndef _VOS_PROCESS_HXX_
-#include <vos/process.hxx>
-#endif
+
#ifndef _OSL_PROCESS_H_
#include <osl/process.h>
#endif
@@ -51,9 +50,7 @@
#define SOFFICE "soffice"
#endif
-using namespace vos;
-
-/** our main program to convert ODMAIDs to URLs
+/** our main program to convert ODMAIDs to ODMA URLs
*/
#if (defined UNX) || (defined OS2)
@@ -63,24 +60,44 @@ void _cdecl main( int argc, char * argv[] )
#endif
{
static ::rtl::OUString sProcess(RTL_CONSTASCII_USTRINGPARAM(SOFFICE));
- if(argc > 1) // only chang when argument is docid
+ if(argc > 1)
{
::rtl::OUString* pArguments = new ::rtl::OUString[argc-1];
- for(int i = 1; i < argc;++i)
+ for(int i = 0; i < argc-1; ++i)
{
- pArguments[i] = ::rtl::OUString::createFromAscii(argv[1]);
- if( pArguments[i].matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(ODMA_URL_ODMAID)))
+ pArguments[i] = ::rtl::OUString::createFromAscii(argv[i+1]);
+ if( pArguments[i].matchIgnoreAsciiCaseAsciiL(
+ RTL_CONSTASCII_STRINGPARAM(ODMA_URL_ODMAID)))
{
- ::rtl::OUString sArgument = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_URL_SCHEME ODMA_URL_SHORT "/"));
+ ::rtl::OUString sArgument
+ = ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ ODMA_URL_SCHEME ODMA_URL_SHORT "/"));
sArgument += pArguments[i];
pArguments[i] = sArgument;
}
}
- {
- OArgumentList aList(pArguments,argc-1);
- OProcess aProcess( sProcess );
- aProcess.execute(OProcess::TOption_Detached,aList);
- }
+
+ rtl_uString ** ustrArgumentList = new rtl_uString * [argc-1];
+ for (int i = 0; i < argc-1; i++)
+ ustrArgumentList[i] = pArguments[i].pData;
+
+ oslProcess aProcess;
+
+ if ( osl_Process_E_None == osl_executeProcess(
+ sProcess.pData,
+ ustrArgumentList,
+ argc-1,
+ osl_Process_DETACHED,
+ NULL,
+ NULL,
+ NULL,
+ 0,
+ &aProcess )
+ )
+ osl_freeProcessHandle( aProcess );
+
+ delete [] ustrArgumentList;
delete [] pArguments;
}
}