summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/ConnectionHelper.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-05-10 09:21:15 +0000
committerKurt Zenker <kz@openoffice.org>2007-05-10 09:21:15 +0000
commit8ca0b0295d3b2edb0f3fb08422e57db8cc5b7d7a (patch)
treeee32ac7a92692788b30ee11e5bd598e02a2bacc9 /dbaccess/source/ui/dlg/ConnectionHelper.cxx
parent4f534d633b3cfc3aa768caca51098859d9ffcfef (diff)
INTEGRATION: CWS dba23a (1.11.70); FILE MERGED
2007/03/13 08:42:12 fs 1.11.70.2: some slight re-factoring (class/method renaming), plus some rudimentary fix for #b6532894# 2007/02/26 10:33:59 fs 1.11.70.1: remove unused code Issue number: #i74776# Submitted by: jnavrati@openoffice.org Reviewed by: frank.schoenheit@sun.com
Diffstat (limited to 'dbaccess/source/ui/dlg/ConnectionHelper.cxx')
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx55
1 files changed, 27 insertions, 28 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index ddc8eb5664c1..88c04008c42d 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ConnectionHelper.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: rt $ $Date: 2007-04-26 07:55:47 $
+ * last change: $Author: kz $ $Date: 2007-05-10 10:21:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -250,11 +250,26 @@ DBG_NAME(OConnectionHelper)
checkTestConnection();
m_aET_Connection.ClearModifyFlag();
}
+
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
}
+ // -----------------------------------------------------------------------
+ void OConnectionHelper::implUpdateURLDependentStates() const
+ {
+ OSL_PRECOND( m_pAdminDialog, "OConnectionHelper::implUpdateURLDependentStates: no admin dialog!" );
+ if ( !m_pAdminDialog )
+ return;
-
+ switch ( m_eType )
+ {
+ case DST_CALC:
+ m_pAdminDialog->enableConfirmSettings( getURLNoPrefix().Len() > 0 );
+ break;
+ default:
+ break;
+ }
+ }
// -----------------------------------------------------------------------
IMPL_LINK(OConnectionHelper, OnBrowseConnections, PushButton*, /*_pButton*/)
@@ -512,7 +527,7 @@ DBG_NAME(OConnectionHelper)
void OConnectionHelper::implSetURL( const String& _rURL, sal_Bool _bPrefix )
{
String sURL( _rURL );
- DBG_ASSERT( m_pCollection, "OConnectionHelper::setURL: have no interpreter for the URLs!" );
+ DBG_ASSERT( m_pCollection, "OConnectionHelper::implSetURL: have no interpreter for the URLs!" );
if ( m_pCollection && sURL.Len() )
{
@@ -548,6 +563,8 @@ DBG_NAME(OConnectionHelper)
m_aET_Connection.SetText( sURL );
else
m_aET_Connection.SetTextNoPrefix( sURL );
+
+ implUpdateURLDependentStates();
}
//-------------------------------------------------------------------------
@@ -574,26 +591,20 @@ DBG_NAME(OConnectionHelper)
sFileURLDecoded = sURL;
}
- // encode the URL
- INetURLObject aFileURL( sFileURLDecoded, INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8 );
- sFileURLDecoded = aFileURL.GetMainURL( INetURLObject::NO_DECODE );
sURL = sTypePrefix;
if ( sFileURLDecoded.Len() )
{
- OFileNotation aFileNotation(sFileURLDecoded,OFileNotation::N_SYSTEM);
-
- // set this decoded URL as text
- sURL += String(aFileNotation.get(OFileNotation::N_URL));
+ OFileNotation aFileNotation( sFileURLDecoded, OFileNotation::N_SYSTEM );
+ sURL += String( aFileNotation.get( OFileNotation::N_URL ) );
}
+
+ // encode the URL
+ INetURLObject aFileURL( sFileURLDecoded, INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8 );
+ sFileURLDecoded = aFileURL.GetMainURL( INetURLObject::NO_DECODE );
}
}
return sURL;
}
- //-------------------------------------------------------------------------
- String OConnectionHelper::getURL( ) const
- {
- return implGetURL( sal_True );
- }
//-------------------------------------------------------------------------
void OConnectionHelper::setURL( const String& _rURL )
@@ -614,18 +625,6 @@ DBG_NAME(OConnectionHelper)
}
//-------------------------------------------------------------------------
- String OConnectionHelper::getConnectionURL( ) const
- {
- return getURL( );
- }
-
- //-------------------------------------------------------------------------
- void OConnectionHelper::changeConnectionURL( const String& _rNewDSN )
- {
- setURL( _rNewDSN );
- }
-
- //-------------------------------------------------------------------------
sal_Int32 OConnectionHelper::checkPathExistence(const String& _rURL)
{
IS_PATH_EXIST e_exists = pathExists(_rURL, sal_False);