summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorJuergen Schmidt <jsc@openoffice.org>2010-03-04 10:06:29 +0100
committerJuergen Schmidt <jsc@openoffice.org>2010-03-04 10:06:29 +0100
commitcc180d4c943c6e5d5902f95594abb1acf0d5612c (patch)
treedf8f08a36be148c11e24dab6120ee88f5589117d /stoc
parentcb6dc8c0cbadd25385d581c0dd3583afc10fd26a (diff)
jsc330: #105478#: set Java system properties for https proxyaccording the office settings
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 8042b70c9dd1..08926e261531 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -357,6 +357,23 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
}
}
+ // read https proxy name
+ css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPSProxyName")));
+ if(httpsProxy_name.is() && httpsProxy_name->getStringValue().getLength()) {
+ rtl::OUString httpsHost = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyHost="));
+ httpsHost += httpsProxy_name->getStringValue();
+
+ // read https proxy port
+ css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPSProxyPort")));
+ if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) {
+ rtl::OUString httpsPort = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyPort="));
+ httpsPort += rtl::OUString::valueOf(httpsProxy_port->getLongValue());
+
+ pjvm->pushProp(httpsHost);
+ pjvm->pushProp(httpsPort);
+ }
+ }
+
// read nonProxyHosts
css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetNoProxy")));
if(nonProxies_name.is() && nonProxies_name->getStringValue().getLength()) {
@@ -1173,6 +1190,22 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
aPropertyValue = rtl::OUString::valueOf(n);
}
else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(
+ "ooInetHTTPSProxyName")))
+ {
+ aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "https.proxyHost"));
+ rEvent.Element >>= aPropertyValue;
+ }
+ else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(
+ "ooInetHTTPSProxyPort")))
+ {
+ aPropertyName
+ = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyPort"));
+ sal_Int32 n = 0;
+ rEvent.Element >>= n;
+ aPropertyValue = rtl::OUString::valueOf(n);
+ }
+ else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(
"ooInetFTPProxyName")))
{
aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(