tdf#146386 deprecate, remove usage of Inet::Settings::ooInetFTPProxyName
* officecfg: deprecate Inet::Settings::ooInetFTPProxyName/Port * ucbhelper: stop handling these settings * sfx2: remove SID_INET_FTP_PROXY_NAME and SID_INET_FTP_PROXY_PORT and usage from SfxApplication::GetOptions() * shell: remove proxy config code from backends * stoc: the JavaVM would have its "ftp.proxyHost" properties set based on officecfg values; remove that * sysui,vcl: remove protocol from KDE desktop files and file picker Change-Id: Iba02676cf6e519e2fa60ba925209436d38e75f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159500 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
@@ -1509,7 +1509,7 @@ std::optional<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
|
||||
svl::Items<
|
||||
//SID_OPTIONS_START - ..END
|
||||
SID_SAVEREL_INET, SID_SAVEREL_FSYS,
|
||||
SID_INET_NOPROXY, SID_INET_FTP_PROXY_PORT,
|
||||
SID_INET_NOPROXY, SID_INET_HTTP_PROXY_PORT,
|
||||
SID_SECURE_URL, SID_SECURE_URL> );
|
||||
SfxApplication::GetOptions(*pRet);
|
||||
break;
|
||||
|
@@ -562,8 +562,6 @@ class SvxZoomItem;
|
||||
|
||||
#define SID_INET_HTTP_PROXY_NAME TypedWhichId<SfxStringItem>(SID_OPTIONS_START + 38)
|
||||
#define SID_INET_HTTP_PROXY_PORT TypedWhichId<SfxInt32Item>(SID_OPTIONS_START + 39)
|
||||
#define SID_INET_FTP_PROXY_NAME TypedWhichId<SfxStringItem>(SID_OPTIONS_START + 40)
|
||||
#define SID_INET_FTP_PROXY_PORT TypedWhichId<SfxInt32Item>(SID_OPTIONS_START + 41)
|
||||
|
||||
// Automatic update of Styles - manage TabPage
|
||||
#define SID_ATTR_AUTO_STYLE_UPDATE TypedWhichId<SfxBoolItem>(SID_OPTIONS_START + 65)
|
||||
|
@@ -30,16 +30,6 @@
|
||||
<value install:module="unixdesktop" oor:external="com.sun.star.configuration.backend.DesktopBackend ooInetProxyType"/>
|
||||
<value install:module="wnt" oor:external="com.sun.star.configuration.backend.WinInetBackend ooInetProxyType"/>
|
||||
</prop>
|
||||
<prop oor:name="ooInetFTPProxyName">
|
||||
<value install:module="macosx" oor:external="com.sun.star.configuration.backend.MacOSXBackend ooInetFTPProxyName"/>
|
||||
<value install:module="unixdesktop" oor:external="com.sun.star.configuration.backend.DesktopBackend ooInetFTPProxyName"/>
|
||||
<value install:module="wnt" oor:external="com.sun.star.configuration.backend.WinInetBackend ooInetFTPProxyName"/>
|
||||
</prop>
|
||||
<prop oor:name="ooInetFTPProxyPort">
|
||||
<value install:module="macosx" oor:external="com.sun.star.configuration.backend.MacOSXBackend ooInetFTPProxyPort"/>
|
||||
<value install:module="unixdesktop" oor:external="com.sun.star.configuration.backend.DesktopBackend ooInetFTPProxyPort"/>
|
||||
<value install:module="wnt" oor:external="com.sun.star.configuration.backend.WinInetBackend ooInetFTPProxyPort"/>
|
||||
</prop>
|
||||
<prop oor:name="ooInetHTTPProxyName">
|
||||
<value install:module="macosx" oor:external="com.sun.star.configuration.backend.MacOSXBackend ooInetHTTPProxyName"/>
|
||||
<value install:module="unixdesktop" oor:external="com.sun.star.configuration.backend.DesktopBackend ooInetHTTPProxyName"/>
|
||||
|
@@ -61,6 +61,7 @@
|
||||
<!-- UIHints: Tools Options Internet Proxy -->
|
||||
<info>
|
||||
<desc>Specifies the name of the FTP proxy server.</desc>
|
||||
<deprecated>Not used anymore</deprecated>
|
||||
</info>
|
||||
<value/>
|
||||
<!-- JB: Empty default inserted into empty property node. Remove if NIL was intended -->
|
||||
@@ -69,6 +70,7 @@
|
||||
<!-- UIHints: Tools Options Internet Proxy -->
|
||||
<info>
|
||||
<desc>Specifies the port of the FTP proxy server.</desc>
|
||||
<deprecated>Not used anymore</deprecated>
|
||||
</info>
|
||||
<constraints>
|
||||
<minInclusive oor:value="0">
|
||||
|
@@ -211,14 +211,6 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
|
||||
bRet = toSet_withDefault<officecfg::Inet::Settings::ooInetHTTPProxyPort>(
|
||||
rSet, SID_INET_HTTP_PROXY_PORT, 0);
|
||||
break;
|
||||
case SID_INET_FTP_PROXY_NAME:
|
||||
bRet = toSet<officecfg::Inet::Settings::ooInetFTPProxyName>(
|
||||
rSet, SID_INET_FTP_PROXY_NAME);
|
||||
break;
|
||||
case SID_INET_FTP_PROXY_PORT:
|
||||
bRet = toSet_withDefault<officecfg::Inet::Settings::ooInetFTPProxyPort>(
|
||||
rSet, SID_INET_FTP_PROXY_PORT, 0);
|
||||
break;
|
||||
case SID_INET_NOPROXY:
|
||||
bRet = toSet<officecfg::Inet::Settings::ooInetNoProxy>(rSet, SID_INET_NOPROXY);
|
||||
break;
|
||||
@@ -318,10 +310,6 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
|
||||
rSet, SID_INET_HTTP_PROXY_NAME, batch);
|
||||
toCfg_ifSet<officecfg::Inet::Settings::ooInetHTTPProxyPort>(
|
||||
rSet, SID_INET_HTTP_PROXY_PORT, batch);
|
||||
toCfg_ifSet<officecfg::Inet::Settings::ooInetFTPProxyName>(
|
||||
rSet, SID_INET_FTP_PROXY_NAME, batch);
|
||||
toCfg_ifSet<officecfg::Inet::Settings::ooInetFTPProxyPort>(
|
||||
rSet, SID_INET_FTP_PROXY_PORT, batch);
|
||||
toCfg_ifSet<officecfg::Inet::Settings::ooInetNoProxy>(rSet, SID_INET_NOPROXY, batch);
|
||||
|
||||
// Secure-Referrer
|
||||
|
@@ -237,8 +237,6 @@ css::uno::Any Default::getPropertyValue(OUString const & PropertyName)
|
||||
PropertyName == "ExternalMailer" ||
|
||||
PropertyName == "SourceViewFontHeight" ||
|
||||
PropertyName == "SourceViewFontName" ||
|
||||
PropertyName == "ooInetFTPProxyName" ||
|
||||
PropertyName == "ooInetFTPProxyPort" ||
|
||||
PropertyName == "ooInetHTTPProxyName" ||
|
||||
PropertyName == "ooInetHTTPProxyPort" ||
|
||||
PropertyName == "ooInetHTTPSProxyName" ||
|
||||
|
@@ -103,60 +103,6 @@ css::beans::Optional<css::uno::Any> getValue(std::u16string_view id)
|
||||
osl_getFileURLFromSystemPath(sDocumentsDir.pData, &sDocumentsURL.pData);
|
||||
return css::beans::Optional<css::uno::Any>(true, uno::Any(sDocumentsURL));
|
||||
}
|
||||
else if (id == u"ooInetFTPProxyName")
|
||||
{
|
||||
QString aFTPProxy;
|
||||
switch (KProtocolManager::proxyType())
|
||||
{
|
||||
case KProtocolManager::ManualProxy: // Proxies are manually configured
|
||||
aFTPProxy = KProtocolManager::proxyFor(QStringLiteral("FTP"));
|
||||
break;
|
||||
case KProtocolManager::PACProxy: // A proxy configuration URL has been given
|
||||
case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
|
||||
case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables
|
||||
// In such cases, the proxy address is not stored in KDE, but determined dynamically.
|
||||
// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
|
||||
// The best we can do here is to ask the current value for a given address.
|
||||
aFTPProxy = KProtocolManager::proxyForUrl(
|
||||
QUrl(QStringLiteral("ftp://ftp.libreoffice.org")));
|
||||
break;
|
||||
default: // No proxy is used
|
||||
break;
|
||||
}
|
||||
if (!aFTPProxy.isEmpty())
|
||||
{
|
||||
QUrl aProxy(aFTPProxy);
|
||||
OUString sProxy = fromQStringToOUString(aProxy.host());
|
||||
return css::beans::Optional<css::uno::Any>(true, uno::Any(sProxy));
|
||||
}
|
||||
}
|
||||
else if (id == u"ooInetFTPProxyPort")
|
||||
{
|
||||
QString aFTPProxy;
|
||||
switch (KProtocolManager::proxyType())
|
||||
{
|
||||
case KProtocolManager::ManualProxy: // Proxies are manually configured
|
||||
aFTPProxy = KProtocolManager::proxyFor(QStringLiteral("FTP"));
|
||||
break;
|
||||
case KProtocolManager::PACProxy: // A proxy configuration URL has been given
|
||||
case KProtocolManager::WPADProxy: // A proxy should be automatically discovered
|
||||
case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables
|
||||
// In such cases, the proxy address is not stored in KDE, but determined dynamically.
|
||||
// The proxy address may depend on the requested address, on the time of the day, on the speed of the wind...
|
||||
// The best we can do here is to ask the current value for a given address.
|
||||
aFTPProxy = KProtocolManager::proxyForUrl(
|
||||
QUrl(QStringLiteral("ftp://ftp.libreoffice.org")));
|
||||
break;
|
||||
default: // No proxy is used
|
||||
break;
|
||||
}
|
||||
if (!aFTPProxy.isEmpty())
|
||||
{
|
||||
QUrl aProxy(aFTPProxy);
|
||||
sal_Int32 nPort = aProxy.port();
|
||||
return css::beans::Optional<css::uno::Any>(true, uno::Any(nPort));
|
||||
}
|
||||
}
|
||||
else if (id == u"ooInetHTTPProxyName")
|
||||
{
|
||||
QString aHTTPProxy;
|
||||
|
@@ -137,11 +137,10 @@ OString getExecutable()
|
||||
void readKDESettings(std::map<OUString, css::beans::Optional<css::uno::Any>>& rSettings)
|
||||
{
|
||||
const std::vector<OUString> aKeys
|
||||
= { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight",
|
||||
"SourceViewFontName", "WorkPathVariable", "ooInetFTPProxyName",
|
||||
"ooInetFTPProxyPort", "ooInetHTTPProxyName", "ooInetHTTPProxyPort",
|
||||
"ooInetHTTPSProxyName", "ooInetHTTPSProxyPort", "ooInetNoProxy",
|
||||
"ooInetProxyType" };
|
||||
= { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight",
|
||||
"SourceViewFontName", "WorkPathVariable", "ooInetHTTPProxyName",
|
||||
"ooInetHTTPProxyPort", "ooInetHTTPSProxyName", "ooInetHTTPSProxyPort",
|
||||
"ooInetNoProxy", "ooInetProxyType" };
|
||||
|
||||
for (const OUString& aKey : aKeys)
|
||||
{
|
||||
@@ -227,8 +226,7 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName)
|
||||
{
|
||||
if (PropertyName == "EnableATToolSupport" || PropertyName == "ExternalMailer"
|
||||
|| PropertyName == "SourceViewFontHeight" || PropertyName == "SourceViewFontName"
|
||||
|| PropertyName == "WorkPathVariable" || PropertyName == "ooInetFTPProxyName"
|
||||
|| PropertyName == "ooInetFTPProxyPort" || PropertyName == "ooInetHTTPProxyName"
|
||||
|| PropertyName == "WorkPathVariable" || PropertyName == "ooInetHTTPProxyName"
|
||||
|| PropertyName == "ooInetHTTPProxyPort" || PropertyName == "ooInetHTTPSProxyName"
|
||||
|| PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy"
|
||||
|| PropertyName == "ooInetProxyType")
|
||||
|
@@ -48,12 +48,11 @@ namespace
|
||||
typedef enum {
|
||||
sHTTP,
|
||||
sHTTPS,
|
||||
sFTP
|
||||
} ServiceType;
|
||||
|
||||
/*
|
||||
* Returns current proxy settings for selected service type (HTTP or
|
||||
* FTP) as a C string (in the buffer specified by host and hostSize)
|
||||
* HTTPS) as a C string (in the buffer specified by host and hostSize)
|
||||
* and a port number.
|
||||
*/
|
||||
|
||||
@@ -86,10 +85,6 @@ bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *por
|
||||
proxiesProxy = kSCPropNetProxiesHTTPSProxy;
|
||||
proxiesPort = kSCPropNetProxiesHTTPSPort;
|
||||
break;
|
||||
default: proxiesEnable = kSCPropNetProxiesFTPEnable;
|
||||
proxiesProxy = kSCPropNetProxiesFTPProxy;
|
||||
proxiesPort = kSCPropNetProxiesFTPPort;
|
||||
break;
|
||||
}
|
||||
// Proxy enabled?
|
||||
enableNum = static_cast<CFNumberRef>(CFDictionaryGetValue( proxyDict,
|
||||
@@ -221,40 +216,6 @@ css::uno::Any MacOSXBackend::getPropertyValue(
|
||||
SAL_WARN("shell", "Got nil or empty list of user document directories" );
|
||||
}
|
||||
return css::uno::Any(css::beans::Optional< css::uno::Any >());
|
||||
} else if ( PropertyName == "ooInetFTPProxyName" )
|
||||
{
|
||||
char host[MAXHOSTNAMELEN];
|
||||
UInt16 port;
|
||||
bool retVal;
|
||||
|
||||
retVal = GetProxySetting(sFTP, host, 100, &port);
|
||||
|
||||
if (retVal)
|
||||
{
|
||||
auto const Server = OUString::createFromAscii( host );
|
||||
if( Server.getLength() > 0 )
|
||||
{
|
||||
return css::uno::Any(
|
||||
css::beans::Optional< css::uno::Any >(
|
||||
true, uno::Any( Server ) ) );
|
||||
}
|
||||
}
|
||||
return css::uno::Any(css::beans::Optional< css::uno::Any >());
|
||||
} else if ( PropertyName == "ooInetFTPProxyPort" )
|
||||
{
|
||||
char host[MAXHOSTNAMELEN];
|
||||
UInt16 port;
|
||||
bool retVal;
|
||||
|
||||
retVal = GetProxySetting(sFTP, host, 100, &port);
|
||||
|
||||
if (retVal && port > 0)
|
||||
{
|
||||
return css::uno::Any(
|
||||
css::beans::Optional< css::uno::Any >(
|
||||
true, uno::Any( sal_Int32(port) ) ) );
|
||||
}
|
||||
return css::uno::Any(css::beans::Optional< css::uno::Any >());
|
||||
} else if ( PropertyName == "ooInetHTTPProxyName" )
|
||||
{
|
||||
char host[MAXHOSTNAMELEN];
|
||||
|
@@ -225,23 +225,18 @@ WinInetBackend::WinInetBackend()
|
||||
ProxyEntry aHttpProxy = FindProxyEntry( aProxyList, u"http" );
|
||||
ProxyEntry aHttpsProxy = FindProxyEntry( aProxyList, u"https" );
|
||||
|
||||
ProxyEntry aFtpProxy = FindProxyEntry( aProxyList, u"ftp" );
|
||||
|
||||
if( aTypeIndepProxy.Server.getLength() )
|
||||
{
|
||||
aHttpProxy.Server = aTypeIndepProxy.Server;
|
||||
aHttpsProxy.Server = aTypeIndepProxy.Server;
|
||||
aFtpProxy.Server = aTypeIndepProxy.Server;
|
||||
|
||||
if( aTypeIndepProxy.Port.getLength() )
|
||||
{
|
||||
aHttpProxy.Port = aTypeIndepProxy.Port;
|
||||
aHttpsProxy.Port = aTypeIndepProxy.Port;
|
||||
aFtpProxy.Port = aTypeIndepProxy.Port;
|
||||
}
|
||||
else
|
||||
{
|
||||
aFtpProxy.Port = aHttpProxy.Port;
|
||||
aHttpsProxy.Port = aHttpProxy.Port;
|
||||
}
|
||||
}
|
||||
@@ -273,20 +268,6 @@ WinInetBackend::WinInetBackend()
|
||||
valueHttpsProxyPort_.IsPresent = true;
|
||||
valueHttpsProxyPort_.Value <<= aHttpsProxy.Port.toInt32();
|
||||
}
|
||||
|
||||
// ftp proxy name
|
||||
if( aFtpProxy.Server.getLength() > 0 )
|
||||
{
|
||||
valueFtpProxyName_.IsPresent = true;
|
||||
valueFtpProxyName_.Value <<= aFtpProxy.Server;
|
||||
}
|
||||
|
||||
// ftp proxy port
|
||||
if( aFtpProxy.Port.getLength() > 0 )
|
||||
{
|
||||
valueFtpProxyPort_.IsPresent = true;
|
||||
valueFtpProxyPort_.Value <<= aFtpProxy.Port.toInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,13 +288,7 @@ void WinInetBackend::setPropertyValue(
|
||||
css::uno::Any WinInetBackend::getPropertyValue(
|
||||
OUString const & PropertyName)
|
||||
{
|
||||
if ( PropertyName == "ooInetFTPProxyName" )
|
||||
{
|
||||
return css::uno::Any(valueFtpProxyName_);
|
||||
} else if ( PropertyName == "ooInetFTPProxyPort" )
|
||||
{
|
||||
return css::uno::Any(valueFtpProxyPort_);
|
||||
} else if ( PropertyName == "ooInetHTTPProxyName" )
|
||||
if (PropertyName == "ooInetHTTPProxyName")
|
||||
{
|
||||
return css::uno::Any(valueHttpProxyName_);
|
||||
} else if ( PropertyName == "ooInetHTTPProxyPort" )
|
||||
|
@@ -175,21 +175,6 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
|
||||
css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey("Settings/ooInetProxyType");
|
||||
if( proxyEnable.is() && 0 != proxyEnable->getLongValue())
|
||||
{
|
||||
// read ftp proxy name
|
||||
css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey("Settings/ooInetFTPProxyName");
|
||||
if(ftpProxy_name.is() && !ftpProxy_name->getStringValue().isEmpty()) {
|
||||
OUString ftpHost = "ftp.proxyHost=" + ftpProxy_name->getStringValue();
|
||||
|
||||
// read ftp proxy port
|
||||
css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey("Settings/ooInetFTPProxyPort");
|
||||
if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) {
|
||||
OUString ftpPort = "ftp.proxyPort=" + OUString::number(ftpProxy_port->getLongValue());
|
||||
|
||||
pjvm->pushProp(ftpHost);
|
||||
pjvm->pushProp(ftpPort);
|
||||
}
|
||||
}
|
||||
|
||||
// read http proxy name
|
||||
css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyName");
|
||||
if(httpProxy_name.is() && !httpProxy_name->getStringValue().isEmpty()) {
|
||||
@@ -228,10 +213,8 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
|
||||
value = value.replace(';', '|');
|
||||
|
||||
OUString httpNonProxyHosts = "http.nonProxyHosts=" + value;
|
||||
OUString ftpNonProxyHosts = "ftp.nonProxyHosts=" + value;
|
||||
|
||||
pjvm->pushProp(httpNonProxyHosts);
|
||||
pjvm->pushProp(ftpNonProxyHosts);
|
||||
}
|
||||
}
|
||||
xConfRegistry_simple->close();
|
||||
@@ -921,7 +904,6 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
OUString aAccessor;
|
||||
rEvent.Accessor >>= aAccessor;
|
||||
OUString aPropertyName;
|
||||
OUString aPropertyName2;
|
||||
OUString aPropertyValue;
|
||||
bool bSecurityChanged = false;
|
||||
if ( aAccessor == "ooInetProxyType" )
|
||||
@@ -956,22 +938,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
rEvent.Element >>= n;
|
||||
aPropertyValue = OUString::number(n);
|
||||
}
|
||||
else if ( aAccessor == "ooInetFTPProxyName" )
|
||||
{
|
||||
aPropertyName = "ftp.proxyHost";
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
}
|
||||
else if ( aAccessor == "ooInetFTPProxyPort" )
|
||||
{
|
||||
aPropertyName = "ftp.proxyPort";
|
||||
sal_Int32 n = 0;
|
||||
rEvent.Element >>= n;
|
||||
aPropertyValue = OUString::number(n);
|
||||
}
|
||||
else if ( aAccessor == "ooInetNoProxy" )
|
||||
{
|
||||
aPropertyName = "http.nonProxyHosts";
|
||||
aPropertyName2 = "ftp.nonProxyHosts";
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
aPropertyValue = aPropertyValue.replace(';', '|');
|
||||
}
|
||||
@@ -1042,7 +1011,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
// or if the port is set to 0
|
||||
aPropertyValue= aPropertyValue.trim();
|
||||
if( aPropertyValue.isEmpty() ||
|
||||
( ( aPropertyName == "ftp.proxyPort" || aPropertyName == "http.proxyPort" /*|| aPropertyName == "socksProxyPort"*/ ) && aPropertyValue == "0" )
|
||||
((aPropertyName == "http.proxyPort" /*|| aPropertyName == "socksProxyPort"*/) && aPropertyValue == "0")
|
||||
)
|
||||
{
|
||||
// call java.lang.System.getProperties
|
||||
@@ -1056,15 +1025,6 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;");
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Properties.remove", nullptr);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName);
|
||||
|
||||
// special case for ftp.nonProxyHosts and http.nonProxyHosts. The office only
|
||||
// has a value for two java properties
|
||||
if (!aPropertyName2.isEmpty())
|
||||
{
|
||||
jstring jsPropName2= pJNIEnv->NewString( reinterpret_cast<jchar const *>(aPropertyName2.getStr()), aPropertyName2.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1073,18 +1033,6 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName, jsPropValue);
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr);
|
||||
|
||||
// special case for ftp.nonProxyHosts and http.nonProxyHosts. The office only
|
||||
// has a value for two java properties
|
||||
if (!aPropertyName2.isEmpty())
|
||||
{
|
||||
jstring jsPropName2= pJNIEnv->NewString( reinterpret_cast<jchar const *>(aPropertyName2.getStr()), aPropertyName2.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
jsPropValue= pJNIEnv->NewString( reinterpret_cast<jchar const *>(aPropertyValue.getStr()), aPropertyValue.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName2, jsPropValue);
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
// If the settings for Security and NetAccess changed then we have to notify the SandboxSecurity
|
||||
@@ -1247,20 +1195,11 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
|
||||
JNIEnv * pJNIEnv = aAttachGuard.getEnvironment();
|
||||
|
||||
// The Java Properties
|
||||
OUString sFtpProxyHost("ftp.proxyHost");
|
||||
OUString sFtpProxyPort("ftp.proxyPort");
|
||||
OUString sFtpNonProxyHosts ("ftp.nonProxyHosts");
|
||||
OUString sHttpProxyHost("http.proxyHost");
|
||||
OUString sHttpProxyPort("http.proxyPort");
|
||||
OUString sHttpNonProxyHosts("http.nonProxyHosts");
|
||||
|
||||
// create Java Properties as JNI strings
|
||||
jstring jsFtpProxyHost= pJNIEnv->NewString( reinterpret_cast<jchar const *>(sFtpProxyHost.getStr()), sFtpProxyHost.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
jstring jsFtpProxyPort= pJNIEnv->NewString( reinterpret_cast<jchar const *>(sFtpProxyPort.getStr()), sFtpProxyPort.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
jstring jsFtpNonProxyHosts= pJNIEnv->NewString( reinterpret_cast<jchar const *>(sFtpNonProxyHosts.getStr()), sFtpNonProxyHosts.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
jstring jsHttpProxyHost= pJNIEnv->NewString( reinterpret_cast<jchar const *>(sHttpProxyHost.getStr()), sHttpProxyHost.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
jstring jsHttpProxyPort= pJNIEnv->NewString( reinterpret_cast<jchar const *>(sHttpProxyPort.getStr()), sHttpProxyPort.getLength());
|
||||
@@ -1296,28 +1235,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
|
||||
std::u16string_view propName= prop.subView( 0, index);
|
||||
OUString propValue= prop.copy( index + 1);
|
||||
|
||||
if( propName == sFtpProxyHost)
|
||||
{
|
||||
jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal);
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr);
|
||||
}
|
||||
else if( propName == sFtpProxyPort)
|
||||
{
|
||||
jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal);
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr);
|
||||
}
|
||||
else if( propName == sFtpNonProxyHosts)
|
||||
{
|
||||
jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal);
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr);
|
||||
}
|
||||
else if( propName == sHttpProxyHost)
|
||||
if (propName == sHttpProxyHost)
|
||||
{
|
||||
jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength());
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr);
|
||||
@@ -1345,9 +1263,6 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
|
||||
// call java.util.Properties.remove
|
||||
jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;");
|
||||
if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Property.remove", nullptr);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyHost);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyPort);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpNonProxyHosts);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsHttpProxyHost);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsHttpProxyPort);
|
||||
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsHttpNonProxyHosts);
|
||||
|
@@ -31,7 +31,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Data;SQL;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-base
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -31,7 +31,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Accounting;Stats;OpenDocument Spreadsheet;Chart;Microsoft Excel;Microsoft Works;OpenOffice Calc;ods;xls;xlsx;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-calc
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -31,7 +31,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Vector;Schema;Diagram;Layout;OpenDocument Graphics;Microsoft Publisher;Microsoft Visio;Corel Draw;cdr;odg;svg;pdf;vsd;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-draw
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -31,7 +31,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Slideshow;Slides;OpenDocument Presentation;Microsoft PowerPoint;Microsoft Works;OpenOffice Impress;odp;ppt;pptx;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-impress
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -32,7 +32,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Equation;OpenDocument Formula;Formula;odf;MathML;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-math
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -30,7 +30,7 @@ Comment=Launch applications to create text documents, spreadsheets, presentation
|
||||
StartupNotify=true
|
||||
X-GIO-NoFuse=true
|
||||
StartupWMClass=libreoffice-startcenter
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
##Define Actions
|
||||
Actions=Writer;Calc;Impress;Draw;Base;Math;
|
||||
|
@@ -31,7 +31,7 @@ X-GIO-NoFuse=true
|
||||
Keywords=Text;Letter;Fax;Document;OpenDocument Text;Microsoft Word;Microsoft Works;Lotus WordPro;OpenOffice Writer;CV;odt;doc;docx;rtf;
|
||||
InitialPreference=5
|
||||
StartupWMClass=libreoffice-writer
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
||||
Actions=NewDocument;
|
||||
[Desktop Action NewDocument]
|
||||
|
@@ -9,4 +9,4 @@ GenericName=XSLT based filters
|
||||
NoDisplay=true
|
||||
StartupNotify=true
|
||||
X-GIO-NoFuse=true
|
||||
X-KDE-Protocols=file,http,ftp,webdav,webdavs
|
||||
X-KDE-Protocols=file,http,webdav,webdavs
|
||||
|
@@ -56,8 +56,6 @@ constexpr OUString HTTP_PROXY_NAME_KEY = u"ooInetHTTPProxyName"_ustr;
|
||||
constexpr OUString HTTP_PROXY_PORT_KEY = u"ooInetHTTPProxyPort"_ustr;
|
||||
constexpr OUString HTTPS_PROXY_NAME_KEY = u"ooInetHTTPSProxyName"_ustr;
|
||||
constexpr OUString HTTPS_PROXY_PORT_KEY = u"ooInetHTTPSProxyPort"_ustr;
|
||||
constexpr OUString FTP_PROXY_NAME_KEY = u"ooInetFTPProxyName"_ustr;
|
||||
constexpr OUString FTP_PROXY_PORT_KEY = u"ooInetFTPProxyPort"_ustr;
|
||||
|
||||
|
||||
namespace ucbhelper
|
||||
@@ -129,7 +127,6 @@ class InternetProxyDecider_Impl :
|
||||
mutable osl::Mutex m_aMutex;
|
||||
InternetProxyServer m_aHttpProxy;
|
||||
InternetProxyServer m_aHttpsProxy;
|
||||
InternetProxyServer m_aFtpProxy;
|
||||
const InternetProxyServer m_aEmptyProxy;
|
||||
ProxyType m_nProxyType;
|
||||
uno::Reference< util::XChangesNotifier > m_xNotifier;
|
||||
@@ -352,14 +349,6 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
|
||||
xNameAccess, HTTPS_PROXY_PORT_KEY, m_aHttpsProxy.nPort );
|
||||
if ( m_aHttpsProxy.nPort == -1 )
|
||||
m_aHttpsProxy.nPort = 443; // standard HTTPS port.
|
||||
|
||||
// *** FTP ***
|
||||
getConfigStringValue(
|
||||
xNameAccess, FTP_PROXY_NAME_KEY, m_aFtpProxy.aName );
|
||||
|
||||
m_aFtpProxy.nPort = -1;
|
||||
getConfigInt32Value(
|
||||
xNameAccess, FTP_PROXY_PORT_KEY, m_aFtpProxy.nPort );
|
||||
}
|
||||
|
||||
// Register as listener for config changes.
|
||||
@@ -685,12 +674,7 @@ InternetProxyServer InternetProxyDecider_Impl::getProxy(
|
||||
return m_aEmptyProxy;
|
||||
}
|
||||
|
||||
if ( rProtocol.toAsciiLowerCase() == "ftp" )
|
||||
{
|
||||
if ( !m_aFtpProxy.aName.isEmpty() && m_aFtpProxy.nPort >= 0 )
|
||||
return m_aFtpProxy;
|
||||
}
|
||||
else if ( rProtocol.toAsciiLowerCase() == "https" )
|
||||
if (rProtocol.toAsciiLowerCase() == "https")
|
||||
{
|
||||
if ( !m_aHttpsProxy.aName.isEmpty() )
|
||||
return m_aHttpsProxy;
|
||||
@@ -774,22 +758,6 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
|
||||
if ( m_aHttpsProxy.nPort == -1 )
|
||||
m_aHttpsProxy.nPort = 443; // standard HTTPS port.
|
||||
}
|
||||
else if ( aKey == FTP_PROXY_NAME_KEY )
|
||||
{
|
||||
if ( !( rElem.Element >>= m_aFtpProxy.aName ) )
|
||||
{
|
||||
OSL_FAIL( "InternetProxyDecider - changesOccurred - "
|
||||
"Error getting config item value!" );
|
||||
}
|
||||
}
|
||||
else if ( aKey == FTP_PROXY_PORT_KEY )
|
||||
{
|
||||
if ( !( rElem.Element >>= m_aFtpProxy.nPort ) )
|
||||
{
|
||||
OSL_FAIL( "InternetProxyDecider - changesOccurred - "
|
||||
"Error getting config item value!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -42,9 +42,8 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent)
|
||||
, _winId(0)
|
||||
{
|
||||
_dialog->setSupportedSchemes({
|
||||
QStringLiteral("file"), QStringLiteral("ftp"), QStringLiteral("http"),
|
||||
QStringLiteral("https"), QStringLiteral("webdav"), QStringLiteral("webdavs"),
|
||||
QStringLiteral("smb"),
|
||||
QStringLiteral("file"), QStringLiteral("http"), QStringLiteral("https"),
|
||||
QStringLiteral("webdav"), QStringLiteral("webdavs"), QStringLiteral("smb"),
|
||||
QStringLiteral(""), // this makes removable devices shown
|
||||
});
|
||||
|
||||
|
@@ -60,9 +60,8 @@ KFFilePicker::KFFilePicker(css::uno::Reference<css::uno::XComponentContext> cons
|
||||
setCustomControlWidgetLayout(_layout.get());
|
||||
|
||||
m_pFileDialog->setSupportedSchemes({
|
||||
QStringLiteral("file"), QStringLiteral("ftp"), QStringLiteral("http"),
|
||||
QStringLiteral("https"), QStringLiteral("webdav"), QStringLiteral("webdavs"),
|
||||
QStringLiteral("smb"),
|
||||
QStringLiteral("file"), QStringLiteral("http"), QStringLiteral("https"),
|
||||
QStringLiteral("webdav"), QStringLiteral("webdavs"), QStringLiteral("smb"),
|
||||
QStringLiteral(""), // this makes removable devices shown
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user