summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
commit4fdd55226d2972e3a256426db3122ac23b0615c6 (patch)
tree23f5b3a68382d6d3b8db0cb5e2537ed74a228d7c /ucbhelper
parentc3d5444d84e18fa82235bb9d419861ac5e54f544 (diff)
parente1028d9225bc47922c387aa462887c7643bc6c40 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: comphelper/source/misc/servicedecl.cxx i18npool/source/breakiterator/breakiteratorImpl.cxx l10ntools/scripts/localize.pl svl/source/items/itemset.cxx svl/source/memtools/svarray.cxx svl/source/numbers/zformat.cxx svtools/source/brwbox/brwbox1.cxx tools/source/stream/strmwnt.cxx vcl/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_layout.hxx vcl/inc/vcl/graphite_serverfont.hxx vcl/source/control/imgctrl.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev3.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/winproc.cxx vcl/unx/source/fontmanager/fontconfig.cxx
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/inc/ucbhelper/simplenameclashresolverequest.hxx8
-rw-r--r--ucbhelper/source/client/proxydecider.cxx239
-rw-r--r--ucbhelper/workben/ucbexplorer/ucbexplorer.hrc7
-rw-r--r--ucbhelper/workben/ucbexplorer/ucbexplorer.src2
4 files changed, 129 insertions, 127 deletions
diff --git a/ucbhelper/inc/ucbhelper/simplenameclashresolverequest.hxx b/ucbhelper/inc/ucbhelper/simplenameclashresolverequest.hxx
index 8c2bff929d56..ca6a01e6b9fc 100644
--- a/ucbhelper/inc/ucbhelper/simplenameclashresolverequest.hxx
+++ b/ucbhelper/inc/ucbhelper/simplenameclashresolverequest.hxx
@@ -38,7 +38,7 @@ namespace ucbhelper {
/**
* This class implements a simple name clash resolve interaction request.
* Instances can be passed directly to XInteractionHandler::handle(...). Each
- * instance contains an NameClashResolveRequest and two interaction
+ * instance contains a NameClashResolveRequest and two interaction
* continuations: "Abort" and "SupplyName". Another continuation
* ("ReplaceExistingData") may be supplied optionally.
*
@@ -57,11 +57,11 @@ public:
*
* @param rTargetFolderURL contains the URL of the folder that contains
* the clashing resource.
- * @param rClashingName contains the clashing name,
+ * @param rClashingName contains the clashing name.
* @param rProposedNewName contains a proposal for the new name or is
* empty.
- * @param bSupportsOverwriteData indictes whether an
- * InteractioneplaceExistingData continuation shall be supplied
+ * @param bSupportsOverwriteData indicates whether an
+ * InteractionReplaceExistingData continuation shall be supplied
* with the interaction request.
*/
SimpleNameClashResolveRequest( const rtl::OUString & rTargetFolderURL,
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 7d722b9247ab..beb1b194fac2 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -52,13 +52,15 @@
using namespace com::sun::star;
using namespace ucbhelper;
-#define CONFIG_ROOT_KEY "org.openoffice.Inet/Settings"
-#define PROXY_TYPE_KEY "ooInetProxyType"
-#define NO_PROXY_LIST_KEY "ooInetNoProxy"
-#define HTTP_PROXY_NAME_KEY "ooInetHTTPProxyName"
-#define HTTP_PROXY_PORT_KEY "ooInetHTTPProxyPort"
-#define FTP_PROXY_NAME_KEY "ooInetFTPProxyName"
-#define FTP_PROXY_PORT_KEY "ooInetFTPProxyPort"
+#define CONFIG_ROOT_KEY "org.openoffice.Inet/Settings"
+#define PROXY_TYPE_KEY "ooInetProxyType"
+#define NO_PROXY_LIST_KEY "ooInetNoProxy"
+#define HTTP_PROXY_NAME_KEY "ooInetHTTPProxyName"
+#define HTTP_PROXY_PORT_KEY "ooInetHTTPProxyPort"
+#define HTTPS_PROXY_NAME_KEY "ooInetHTTPSProxyName"
+#define HTTPS_PROXY_PORT_KEY "ooInetHTTPSProxyPort"
+#define FTP_PROXY_NAME_KEY "ooInetFTPProxyName"
+#define FTP_PROXY_PORT_KEY "ooInetFTPProxyPort"
//=========================================================================
namespace ucbhelper
@@ -133,6 +135,7 @@ class InternetProxyDecider_Impl :
{
mutable osl::Mutex m_aMutex;
InternetProxyServer m_aHttpProxy;
+ InternetProxyServer m_aHttpsProxy;
InternetProxyServer m_aFtpProxy;
const InternetProxyServer m_aEmptyProxy;
sal_Int32 m_nProxyType;
@@ -247,6 +250,63 @@ bool WildCard::Matches( const rtl::OUString& rString ) const
}
//=========================================================================
+bool getConfigStringValue(
+ const uno::Reference< container::XNameAccess > & xNameAccess,
+ const char * key,
+ rtl::OUString & value )
+{
+ try
+ {
+ if ( !( xNameAccess->getByName( rtl::OUString::createFromAscii( key ) )
+ >>= value ) )
+ {
+ OSL_ENSURE( sal_False,
+ "InternetProxyDecider - "
+ "Error getting config item value!" );
+ return false;
+ }
+ }
+ catch ( lang::WrappedTargetException const & )
+ {
+ return false;
+ }
+ catch ( container::NoSuchElementException const & )
+ {
+ return false;
+ }
+ return true;
+}
+
+//=========================================================================
+bool getConfigInt32Value(
+ const uno::Reference< container::XNameAccess > & xNameAccess,
+ const char * key,
+ sal_Int32 & value )
+{
+ try
+ {
+ uno::Any aValue = xNameAccess->getByName(
+ rtl::OUString::createFromAscii( key ) );
+ if ( aValue.hasValue() && !( aValue >>= value ) )
+ {
+ OSL_ENSURE( sal_False,
+ "InternetProxyDecider - "
+ "Error getting config item value!" );
+ return false;
+ }
+ }
+ catch ( lang::WrappedTargetException const & )
+ {
+ return false;
+ }
+ catch ( container::NoSuchElementException const & )
+ {
+ return false;
+ }
+ return true;
+}
+
+//=========================================================================
//=========================================================================
//
// InternetProxyDecider_Impl Implementation.
@@ -292,127 +352,43 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
if ( xNameAccess.is() )
{
- try
- {
- if ( !( xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- PROXY_TYPE_KEY )) ) >>= m_nProxyType ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
+ // *** Proxy type ***
+ getConfigInt32Value(
+ xNameAccess, PROXY_TYPE_KEY, m_nProxyType );
+ // *** No proxy list ***
rtl::OUString aNoProxyList;
- try
- {
- if ( !( xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- NO_PROXY_LIST_KEY )) ) >>= aNoProxyList ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
-
+ getConfigStringValue(
+ xNameAccess, NO_PROXY_LIST_KEY, aNoProxyList );
setNoProxyList( aNoProxyList );
- try
- {
- if ( !( xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- HTTP_PROXY_NAME_KEY )) )
- >>= m_aHttpProxy.aName ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
+ // *** HTTP ***
+ getConfigStringValue(
+ xNameAccess, HTTP_PROXY_NAME_KEY, m_aHttpProxy.aName );
m_aHttpProxy.nPort = -1;
- try
- {
- uno::Any aValue = xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- HTTP_PROXY_PORT_KEY )) );
- if ( aValue.hasValue() &&
- !( aValue >>= m_aHttpProxy.nPort ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
-
+ getConfigInt32Value(
+ xNameAccess, HTTP_PROXY_PORT_KEY, m_aHttpProxy.nPort );
if ( m_aHttpProxy.nPort == -1 )
m_aHttpProxy.nPort = 80; // standard HTTP port.
- try
- {
- if ( !( xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- FTP_PROXY_NAME_KEY )) )
- >>= m_aFtpProxy.aName ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
+ // *** HTTPS ***
+ getConfigStringValue(
+ xNameAccess, HTTPS_PROXY_NAME_KEY, m_aHttpsProxy.aName );
+
+ m_aHttpsProxy.nPort = -1;
+ getConfigInt32Value(
+ 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;
- try
- {
- uno::Any aValue = xNameAccess->getByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- FTP_PROXY_PORT_KEY )) );
- if ( aValue.hasValue() &&
- !( aValue >>= m_aFtpProxy.nPort ) )
- {
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
- "Error getting config item value!" );
- }
- }
- catch ( lang::WrappedTargetException const & )
- {
- }
- catch ( container::NoSuchElementException const & )
- {
- }
+ getConfigInt32Value(
+ xNameAccess, FTP_PROXY_PORT_KEY, m_aFtpProxy.nPort );
}
// Register as listener for config changes.
@@ -589,6 +565,12 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy(
if ( m_aFtpProxy.aName.getLength() > 0 && m_aFtpProxy.nPort >= 0 )
return m_aFtpProxy;
}
+ else if ( rProtocol.toAsciiLowerCase()
+ .equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) ) )
+ {
+ if ( m_aHttpsProxy.aName.getLength() )
+ return m_aHttpsProxy;
+ }
else if ( m_aHttpProxy.aName.getLength() )
{
// All other protocols use the HTTP proxy.
@@ -663,6 +645,29 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
m_aHttpProxy.nPort = 80; // standard HTTP port.
}
else if ( aKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
+ HTTPS_PROXY_NAME_KEY ) ) )
+ {
+ if ( !( rElem.Element >>= m_aHttpsProxy.aName ) )
+ {
+ OSL_ENSURE( sal_False,
+ "InternetProxyDecider - changesOccurred - "
+ "Error getting config item value!" );
+ }
+ }
+ else if ( aKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
+ HTTPS_PROXY_PORT_KEY ) ) )
+ {
+ if ( !( rElem.Element >>= m_aHttpsProxy.nPort ) )
+ {
+ OSL_ENSURE( sal_False,
+ "InternetProxyDecider - changesOccurred - "
+ "Error getting config item value!" );
+ }
+
+ if ( m_aHttpsProxy.nPort == -1 )
+ m_aHttpsProxy.nPort = 443; // standard HTTPS port.
+ }
+ else if ( aKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
FTP_PROXY_NAME_KEY ) ) )
{
if ( !( rElem.Element >>= m_aFtpProxy.aName ) )
diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc b/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
index c2dc98574e3a..7d6aa8dba4ad 100644
--- a/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
+++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
@@ -24,13 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//=========================================================================
-//
+
// UCB Explorer ( resource identifiers )
-//
-// (C) 2000 StarOffice Entwicklungs GmbH, Hamburg, Germany
-//
-//=========================================================================
#ifndef _UCBEXPLORER_HRC
#define _UCBEXPLORER_HRC
diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.src b/ucbhelper/workben/ucbexplorer/ucbexplorer.src
index ea9aa993cba2..aac9b6ac8571 100644
--- a/ucbhelper/workben/ucbexplorer/ucbexplorer.src
+++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.src
@@ -81,6 +81,7 @@ Menu MENU_POPUP
ModalDialog DLG_STRINGINPUT
{
+ HelpID = "ucbhelper:ModalDialog:DLG_STRINGINPUT";
Border = TRUE ;
Moveable = TRUE ;
OutputSize = TRUE ;
@@ -94,6 +95,7 @@ ModalDialog DLG_STRINGINPUT
};
Edit ED_STRINGINPUT_DLG_NAME
{
+ HelpID = "ucbhelper:Edit:DLG_STRINGINPUT:ED_STRINGINPUT_DLG_NAME";
Pos = MAP_APPFONT ( 40 , 16 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
Border = TRUE ;