xref: /aoo4110/main/stoc/source/javavm/jvmargs.cxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_stoc.hxx"
26 
27 #include "jvmargs.hxx"
28 #include <rtl/ustring.hxx>
29 
30 
31 #define OUSTR(x) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
32 
33 using namespace rtl;
34 
35 namespace stoc_javavm {
36 
JVM()37 JVM::JVM() throw()//: _enabled(sal_False)
38 {
39 }
40 
pushProp(const OUString & property)41 void JVM::pushProp(const OUString & property)
42 {
43     sal_Int32 index = property.indexOf((sal_Unicode)'=');
44     if(index > 0)
45     {
46         OUString left = property.copy(0, index).trim();
47         OUString right(property.copy(index + 1).trim());
48         _props.push_back(property);
49     }
50     else
51     { // no '=', could be -X
52         _props.push_back(property);
53     }
54 }
55 
56 
getProperties() const57 const ::std::vector< ::rtl::OUString > & JVM::getProperties() const
58 {
59     return _props;
60 }
61 
62 }
63