pointer is always non-null

This commit is contained in:
Caolán McNamara 2012-03-30 23:40:05 +01:00
parent 2658eeb120
commit 1b088c6e49
6 changed files with 13 additions and 15 deletions

View File

@ -422,7 +422,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if (pBookmark)
{
UniString sBookmark( INetURLObject::decode( pBookmark->GetValue(), '%', INetURLObject::DECODE_WITH_CHARSET ) );
rtl::OUString sBookmark(INetURLObject::decode(pBookmark->GetValue(), '%', INetURLObject::DECODE_WITH_CHARSET));
rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if(xSlideshow.is() && xSlideshow->isRunning())
@ -431,7 +431,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
else
{
GotoBookmark( sBookmark );
GotoBookmark(sBookmark);
}
}
}

View File

@ -1480,12 +1480,11 @@ namespace svxform
//////////////////////////////////////////////////////////////////////
// BasisNamen erzeugen
UniString aBaseName;
rtl::OUString aBaseName;
if( pEntryData->ISA(FmFormData) )
aBaseName = SVX_RES( RID_STR_STDFORMNAME );
aBaseName = SVX_RESSTR( RID_STR_STDFORMNAME );
else if( pEntryData->ISA(FmControlData) )
aBaseName = SVX_RES( RID_STR_CONTROL );
aBaseName = SVX_RESSTR( RID_STR_CONTROL );
//////////////////////////////////////////////////////////////////////
// Neuen Namen erstellen

View File

@ -870,7 +870,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
{
// check whether CharStretching is possible at all
GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
UniString aTestString(sal_Unicode('J'));
rtl::OUString aTestString(static_cast<sal_Unicode>('J'));
if(pMtf && (!pMtf->IsRecord() || pMtf->IsPause()))
pMtf = NULL;

View File

@ -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());

View File

@ -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();

View File

@ -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();