Tag: cws_src680_bgdlremove
User: kso     
Date: 2007-05-21 10:35:21+0000
Log:
 RESYNC: (1.12-1.13); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/ui/dlg/
=======================================

File [changed]: ConnectionHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/ConnectionHelper.cxx?r1=1.12.4.1&r2=1.12.4.2
Delta lines:  +28 -29
---------------------
--- ConnectionHelper.cxx        2007-05-18 09:03:13+0000        1.12.4.1
+++ ConnectionHelper.cxx        2007-05-21 10:35:18+0000        1.12.4.2
@@ -250,11 +250,26 @@
                        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 @@
        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 @@
                        m_aET_Connection.SetText( sURL );
                else
                        m_aET_Connection.SetTextNoPrefix( sURL );
+
+        implUpdateURLDependentStates();
        }
 
        
//-------------------------------------------------------------------------
@@ -574,26 +591,20 @@
                                        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 @@
        }
 
        
//-------------------------------------------------------------------------
-       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);




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to