summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-30 23:40:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-02 14:53:47 +0100
commit1b088c6e496b799ca9ddb0d6f7b98bcb5c132ecc (patch)
tree82233934338933862ebcc8135a5733d854acc26b /uui
parent2658eeb1203833662aa99c4577d311474a5538a2 (diff)
pointer is always non-null
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-authentication.cxx3
-rw-r--r--uui/source/logindlg.cxx10
-rw-r--r--uui/source/logindlg.hxx2
3 files changed, 7 insertions, 8 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 3844804a3cb1..76eaada570f1 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -95,9 +95,8 @@ executeLoginDialog(
nFlags |= LF_NO_USESYSCREDS;
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
- UniString aRealm(rRealm);
boost::scoped_ptr< LoginDialog > xDialog(
- new LoginDialog( pParent, nFlags, rInfo.GetServer(), &aRealm, xManager.get()));
+ new LoginDialog( pParent, nFlags, rInfo.GetServer(), rRealm, xManager.get()));
if (rInfo.GetErrorText().Len() != 0)
xDialog->SetErrorText(rInfo.GetErrorText());
xDialog->SetName(rInfo.GetUserName());
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 78a29c86078e..8a15dfe7a8ba 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -250,8 +250,8 @@ LoginDialog::LoginDialog
(
Window* pParent,
sal_uInt16 nFlags,
- const String& rServer,
- const String* pRealm,
+ const rtl::OUString& rServer,
+ const rtl::OUString& rRealm,
ResMgr* pResMgr
) :
@@ -280,10 +280,10 @@ LoginDialog::LoginDialog
{
UniString aRequest;
- if ((nFlags & LF_NO_ACCOUNT) != 0 && pRealm && pRealm->Len() != 0)
+ if ((nFlags & LF_NO_ACCOUNT) != 0 && !rRealm.isEmpty())
{
- aRequest = ResId(STR_LOGIN_REALM, *pResMgr);
- aRequest.SearchAndReplaceAscii("%2", *pRealm);
+ aRequest = ResId::toString(ResId(STR_LOGIN_REALM, *pResMgr));
+ aRequest.SearchAndReplaceAscii("%2", rRealm);
}
else
aRequest = aRequestInfo.GetText();
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index 7ce8d5c21593..bd533f157a52 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -82,7 +82,7 @@ class LoginDialog : public ModalDialog
public:
LoginDialog( Window* pParent, sal_uInt16 nFlags,
- const String& rServer, const String* pRealm,
+ const rtl::OUString& rServer, const rtl::OUString &rRealm,
ResMgr * pResMgr );
virtual ~LoginDialog();