User: vg      
Date: 05/03/10 08:55:47

Modified:
 /dba/dbaccess/source/ui/uno/
  dbinteraction.cxx

Log:
 INTEGRATION: CWS dba24 (1.12.4); FILE MERGED
 2005/01/27 07:16:58 oj 1.12.4.1: #i41271# check if ds name is empty

File Changes:

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

File [changed]: dbinteraction.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/dbinteraction.cxx?r1=1.12&r2=1.13
Delta lines:  +16 -7
--------------------
--- dbinteraction.cxx   21 Jan 2005 17:21:42 -0000      1.12
+++ dbinteraction.cxx   10 Mar 2005 16:55:44 -0000      1.13
@@ -119,6 +119,10 @@
 #ifndef DBAUI_COLLECTIONVIEW_HXX
 #include "CollectionView.hxx"
 #endif
+#ifndef DBAUI_TOOLS_HXX
+#include "UITools.hxx"
+#endif
+
 
 //==========================================================================
 
@@ -297,7 +301,9 @@
                        nFlags |= LF_USERNAME_READONLY;
 
                // create the dialog
-               ::svt::LoginDialog aLogin(NULL, nFlags, 
_rAuthRequest.ServerName, sRealm.Len() ? &sRealm : NULL);
+        ::rtl::OUString sName = _rAuthRequest.ServerName;
+        sName = ::dbaui::getStrippedDatabaseName(NULL,sName);
+               ::svt::LoginDialog aLogin(NULL, nFlags, sName, sRealm.Len() ? 
&sRealm : NULL);
 
                // initialize it
                aLogin.SetErrorText(_rAuthRequest.Diagnostic.getStr());
@@ -312,12 +318,15 @@
                aLogin.SetSavePassword(bRemember);
                aLogin.SetSavePasswordText(ModuleRes(bRememberPersistent ? 
STR_REMEMBERPASSWORD_PERSISTENT : STR_REMEMBERPASSWORD_SESSION));
 
-               if (_rAuthRequest.ServerName.getLength())
-               {
                        String 
sLoginRequest(ModuleRes(STR_ENTER_CONNECTION_PASSWORD));
-                       sLoginRequest.SearchAndReplaceAscii("$name$", 
_rAuthRequest.ServerName.getStr()),
-                       aLogin.SetLoginRequestText(sLoginRequest);
+        if (sName.getLength())
+                       sLoginRequest.SearchAndReplaceAscii("$name$", 
sName.getStr());
+        else
+        {
+            sLoginRequest.SearchAndReplaceAscii("\"$name$\"", String());
+            sLoginRequest.SearchAndReplaceAscii("$name$", String()); // just 
to be sure that in other languages the string will be deleted
                }
+               aLogin.SetLoginRequestText(sLoginRequest);
 
                // execute
                sal_Int32 nResult = aLogin.Execute();




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

Reply via email to