summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-02 22:45:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-03 00:06:33 +0100
commit80fdb3498c68f9e7f9bdd98674e762cb084fce57 (patch)
tree4d3f3625003d4093b8bc061eecf118709d1f9bdf /uui
parent4312651dfc47a9bb6eff5c18862e67dded1cf385 (diff)
drop ensure for non-NULL pointer and use a ref
Change-Id: I492c576a9a04874538f07769f5ac40f84e2d4308
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-errorhandler.cxx2
-rw-r--r--uui/source/iahndl-ssl.cxx6
-rw-r--r--uui/source/iahndl.cxx7
-rw-r--r--uui/source/iahndl.hxx20
4 files changed, 8 insertions, 27 deletions
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index f3abea762322..aa893150e003 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -185,7 +185,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
if (!xManager.get())
return;
ResId aResId(aId[eSource], *xManager.get());
- if (!ErrorResource(aResId).getString(nErrorCode, &aMessage))
+ if (!ErrorResource(aResId).getString(nErrorCode, aMessage))
return;
}
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 5bd383203853..2b860ffc1e11 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -172,7 +172,7 @@ executeUnknownAuthDialog(
{
ResId aResId(RID_UUI_ERRHDL, *xManager.get());
if (ErrorResource(aResId).getString(
- ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED, &aMessage))
+ ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED, aMessage))
{
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
@@ -241,7 +241,7 @@ executeSSLWarnDialog(
ResId aResId(RID_UUI_ERRHDL, *xManager.get());
if (ErrorResource(aResId).getString(
ERRCODE_AREA_UUI_UNKNOWNAUTH + failure + DESCRIPTION_1,
- &aMessage_1))
+ aMessage_1))
{
aMessage_1 = UUIInteractionHelper::replaceMessageWithArguments(
aMessage_1, aArguments_1 );
@@ -250,7 +250,7 @@ executeSSLWarnDialog(
rtl::OUString aTitle;
ErrorResource(aResId).getString(
- ERRCODE_AREA_UUI_UNKNOWNAUTH + failure + TITLE, &aTitle);
+ ERRCODE_AREA_UUI_UNKNOWNAUTH + failure + TITLE, aTitle);
xDialog->SetText( aTitle );
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 2406b40b9821..8816ea971383 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1488,7 +1488,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
return;
ResId aResId( RID_UUI_ERRHDL, *xManager.get() );
- if ( !ErrorResource(aResId).getString(nErrorCode, &aMessage) )
+ if ( !ErrorResource(aResId).getString(nErrorCode, aMessage) )
return;
}
@@ -1545,17 +1545,16 @@ UUIInteractionHelper::handleBrokenPackageRequest(
//=========================================================================
bool
-ErrorResource::getString(ErrCode nErrorCode, rtl::OUString * pString)
+ErrorResource::getString(ErrCode nErrorCode, rtl::OUString &rString)
const SAL_THROW(())
{
- OSL_ENSURE(pString, "specification violation");
ResId aResId(static_cast< sal_uInt16 >(nErrorCode & ERRCODE_RES_MASK),
*m_pResMgr);
aResId.SetRT(RSC_STRING);
if (!IsAvailableRes(aResId))
return false;
aResId.SetAutoRelease(false);
- *pString = UniString(aResId);
+ rString = aResId.toString();
m_pResMgr->PopContext();
return true;
}
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index df1edde33291..3306e272ad29 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -346,28 +346,10 @@ public:
inline ~ErrorResource() SAL_THROW(()) { FreeResource(); }
- bool getString(ErrCode nErrorCode, rtl::OUString * pString) const
+ bool getString(ErrCode nErrorCode, rtl::OUString &rString) const
SAL_THROW(());
};
-/*
-class InteractionRequest
-{
-public:
- InteractionRequest(
- com::sun::star::uno::Reference<
- com::sun::star::task::XInteractionRequest > const & rRequest)
- : m_aRequest( rRequest ) {}
-
- virtual bool toString( rtl::OUString & rString ) = 0;
- virtual bool handle( rtl::OUString & rString ) = 0;
-
-private:
- com::sun::star::uno::Reference<
- com::sun::star::task::XInteractionRequest > m_aRequest;
-};
-*/
-
#endif // UUI_IAHNDL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */