Kaydet (Commit) 0b0bc5eb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove std::bad_alloc -> css::uno::RuntimeException mappings

...that are no longer needed now that the dynamic exception specifications are
gone from C++ UNO, so won't cause std::unexpected any more.

Change-Id: Ie3418658f5a84e6cec1ac48e3413f523f87497fe
Reviewed-on: https://gerrit.libreoffice.org/52641Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 0a4c1fb6
......@@ -21,7 +21,6 @@
#include <cstddef>
#include <memory>
#include <new>
#include "com/sun/star/beans/Introspection.hpp"
#include "com/sun/star/beans/theIntrospection.hpp"
......@@ -205,11 +204,7 @@ namespace CppMain {
css::uno::Reference< css::uno::XInterface > create(
css::uno::Reference< css::uno::XComponentContext > const & context)
{
try {
return static_cast< ::cppu::OWeakObject * >(new Service(context));
} catch (::std::bad_alloc &) {
throw css::uno::RuntimeException("std::bad_alloc");
}
return static_cast< ::cppu::OWeakObject * >(new Service(context));
}
rtl::OUString getImplementationName() {
......
......@@ -18,11 +18,8 @@
#include "sal/config.h"
#include <new>
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
......@@ -60,11 +57,7 @@ namespace CppServer {
css::uno::Reference< css::uno::XInterface > create(
css::uno::Reference< css::uno::XComponentContext > const &)
{
try {
return static_cast< ::cppu::OWeakObject * >(new Service);
} catch (::std::bad_alloc &) {
throw css::uno::RuntimeException("std::bad_alloc");
}
return static_cast< ::cppu::OWeakObject * >(new Service);
}
rtl::OUString getImplementationName() {
......
......@@ -20,7 +20,6 @@
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
......@@ -60,11 +59,7 @@ namespace CppTest {
css::uno::Reference< css::uno::XInterface > create(
css::uno::Reference< css::uno::XComponentContext > const &)
{
try {
return static_cast< cppu::OWeakObject * >(new Service);
} catch (std::bad_alloc &) {
throw css::uno::RuntimeException("std::bad_alloc");
}
return static_cast< cppu::OWeakObject * >(new Service);
}
rtl::OUString getImplementationName() {
......
......@@ -62,67 +62,60 @@ executeLoginDialog(
LoginErrorInfo & rInfo,
OUString const & rRealm)
{
try
{
SolarMutexGuard aGuard;
bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0;
bool bSavePassword = rInfo.GetCanRememberPassword();
bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials();
LoginFlags nFlags = LoginFlags::NONE;
if (rInfo.GetErrorText().isEmpty())
nFlags |= LoginFlags::NoErrorText;
if (!bAccount)
nFlags |= LoginFlags::NoAccount;
if (!(rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_USER_NAME))
nFlags |= LoginFlags::UsernameReadonly;
if (!bSavePassword)
nFlags |= LoginFlags::NoSavePassword;
if (!bCanUseSysCreds)
nFlags |= LoginFlags::NoUseSysCreds;
ScopedVclPtrInstance< LoginDialog > xDialog(pParent, nFlags, rInfo.GetServer(), rRealm);
if (!rInfo.GetErrorText().isEmpty())
xDialog->SetErrorText(rInfo.GetErrorText());
xDialog->SetName(rInfo.GetUserName());
if (bAccount)
xDialog->ClearAccount();
else
xDialog->ClearPassword();
xDialog->SetPassword(rInfo.GetPassword());
SolarMutexGuard aGuard;
bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0;
bool bSavePassword = rInfo.GetCanRememberPassword();
bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials();
LoginFlags nFlags = LoginFlags::NONE;
if (rInfo.GetErrorText().isEmpty())
nFlags |= LoginFlags::NoErrorText;
if (!bAccount)
nFlags |= LoginFlags::NoAccount;
if (!(rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_USER_NAME))
nFlags |= LoginFlags::UsernameReadonly;
if (!bSavePassword)
nFlags |= LoginFlags::NoSavePassword;
if (!bCanUseSysCreds)
nFlags |= LoginFlags::NoUseSysCreds;
ScopedVclPtrInstance< LoginDialog > xDialog(pParent, nFlags, rInfo.GetServer(), rRealm);
if (!rInfo.GetErrorText().isEmpty())
xDialog->SetErrorText(rInfo.GetErrorText());
xDialog->SetName(rInfo.GetUserName());
if (bAccount)
xDialog->ClearAccount();
else
xDialog->ClearPassword();
xDialog->SetPassword(rInfo.GetPassword());
if (bSavePassword)
{
std::locale aLocale(Translate::Create("uui"));
xDialog->SetSavePasswordText(
Translate::get(rInfo.GetIsRememberPersistent()
? RID_SAVE_PASSWORD
: RID_KEEP_PASSWORD,
aLocale));
xDialog->SetSavePassword(rInfo.GetIsRememberPassword());
}
if (bSavePassword)
{
std::locale aLocale(Translate::Create("uui"));
xDialog->SetSavePasswordText(
Translate::get(rInfo.GetIsRememberPersistent()
? RID_SAVE_PASSWORD
: RID_KEEP_PASSWORD,
aLocale));
xDialog->SetSavePassword(rInfo.GetIsRememberPassword());
}
if ( bCanUseSysCreds )
xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() );
if ( bCanUseSysCreds )
xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() );
rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk :
DialogMask::ButtonsCancel);
rInfo.SetUserName(xDialog->GetName());
rInfo.SetPassword(xDialog->GetPassword());
rInfo.SetAccount(xDialog->GetAccount());
rInfo.SetIsRememberPassword(xDialog->IsSavePassword());
rInfo.SetResult(xDialog->Execute() == RET_OK ? DialogMask::ButtonsOk :
DialogMask::ButtonsCancel);
rInfo.SetUserName(xDialog->GetName());
rInfo.SetPassword(xDialog->GetPassword());
rInfo.SetAccount(xDialog->GetAccount());
rInfo.SetIsRememberPassword(xDialog->IsSavePassword());
if ( bCanUseSysCreds )
rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() );
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
if ( bCanUseSysCreds )
rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() );
}
void getRememberModes(
......@@ -405,7 +398,6 @@ executeMasterPasswordDialog(
task::PasswordRequestMode nMode)
{
OString aMaster;
try
{
SolarMutexGuard aGuard;
......@@ -429,10 +421,6 @@ executeMasterPasswordDialog(
xDialog->GetMasterPassword(), RTL_TEXTENCODING_UTF8);
}
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
sal_uInt8 aKey[RTL_DIGEST_LENGTH_MD5];
// FIXME this is subject to the SHA1-bug tdf#114939 - but this
......@@ -506,51 +494,43 @@ executePasswordDialog(
bool bIsPasswordToModify,
bool bIsSimplePasswordRequest )
{
try
{
SolarMutexGuard aGuard;
SolarMutexGuard aGuard;
std::locale aResLocale(Translate::Create("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
if (bIsSimplePasswordRequest)
{
std::unique_ptr<PasswordDialog> xDialog(new PasswordDialog(pParent, nMode,
aResLocale, aDocName, bIsPasswordToModify, bIsSimplePasswordRequest));
xDialog->SetMinLen(0);
rInfo.SetResult(xDialog->run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel);
rInfo.SetPassword(xDialog->GetPassword());
}
else
{
const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length
VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create();
ScopedVclPtr<AbstractPasswordToOpenModifyDialog> const pDialog(
pFact->CreatePasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify));
rInfo.SetResult( pDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel );
rInfo.SetPassword( pDialog->GetPasswordToOpen() );
rInfo.SetPasswordToModify( pDialog->GetPasswordToModify() );
rInfo.SetRecommendToOpenReadonly( pDialog->IsRecommendToOpenReadonly() );
}
}
else // enter password or reenter password
std::locale aResLocale(Translate::Create("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
if (bIsSimplePasswordRequest)
{
std::unique_ptr<PasswordDialog> xDialog(new PasswordDialog(pParent, nMode,
aResLocale, aDocName, bIsPasswordToModify, bIsSimplePasswordRequest));
xDialog->SetMinLen(0);
rInfo.SetResult(xDialog->run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel);
rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword());
rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString());
rInfo.SetPassword(xDialog->GetPassword());
}
else
{
const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length
VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create();
ScopedVclPtr<AbstractPasswordToOpenModifyDialog> const pDialog(
pFact->CreatePasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify));
rInfo.SetResult( pDialog->Execute() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel );
rInfo.SetPassword( pDialog->GetPasswordToOpen() );
rInfo.SetPasswordToModify( pDialog->GetPasswordToModify() );
rInfo.SetRecommendToOpenReadonly( pDialog->IsRecommendToOpenReadonly() );
}
}
catch (std::bad_alloc const &)
else // enter password or reenter password
{
throw uno::RuntimeException("out of memory",
uno::Reference< uno::XInterface>());
std::unique_ptr<PasswordDialog> xDialog(new PasswordDialog(pParent, nMode,
aResLocale, aDocName, bIsPasswordToModify, bIsSimplePasswordRequest));
xDialog->SetMinLen(0);
rInfo.SetResult(xDialog->run() == RET_OK ? DialogMask::ButtonsOk : DialogMask::ButtonsCancel);
rInfo.SetPassword(bIsPasswordToModify ? OUString() : xDialog->GetPassword());
rInfo.SetPasswordToModify(bIsPasswordToModify ? xDialog->GetPassword() : OUString());
}
}
......
......@@ -49,24 +49,17 @@ executeFilterDialog(
uui::FilterNameList const & rFilters,
OUString & rFilter )
{
try
{
SolarMutexGuard aGuard;
SolarMutexGuard aGuard;
ScopedVclPtrInstance< uui::FilterDialog > xDialog(pParent);
ScopedVclPtrInstance< uui::FilterDialog > xDialog(pParent);
xDialog->SetURL(rURL);
xDialog->ChangeFilters(&rFilters);
xDialog->SetURL(rURL);
xDialog->ChangeFilters(&rFilters);
uui::FilterNameListPtr pSelected = rFilters.end();
if( xDialog->AskForFilter( pSelected ) )
{
rFilter = pSelected->sInternal;
}
}
catch (std::bad_alloc const &)
uui::FilterNameListPtr pSelected = rFilters.end();
if( xDialog->AskForFilter( pSelected ) )
{
throw uno::RuntimeException("out of memory");
rFilter = pSelected->sInternal;
}
}
......
......@@ -73,73 +73,66 @@ handleLockedDocumentRequest_(
if ( !xApprove.is() || !xDisapprove.is() || !xAbort.is() )
return;
try
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
OUString aMessage;
std::vector< OUString > aArguments;
aArguments.push_back( aDocumentURL );
sal_Int32 nResult = RET_CANCEL;
if ( nMode == UUI_DOC_LOAD_LOCK )
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
: Translate::get( STR_UNKNOWNUSER, aResLocale) );
aArguments.push_back( xRetry.is()
? Translate::get( STR_OPENLOCKED_ALLOWIGNORE_MSG, aResLocale )
: "" );
aMessage = Translate::get(STR_OPENLOCKED_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
nResult = aDialog.run();
}
else if ( nMode == UUI_DOC_SAVE_LOCK )
{
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
OUString aMessage;
std::vector< OUString > aArguments;
aArguments.push_back( aDocumentURL );
sal_Int32 nResult = RET_CANCEL;
if ( nMode == UUI_DOC_LOAD_LOCK )
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
: Translate::get( STR_UNKNOWNUSER, aResLocale) );
aArguments.push_back( xRetry.is()
? Translate::get( STR_OPENLOCKED_ALLOWIGNORE_MSG, aResLocale )
: "" );
aMessage = Translate::get(STR_OPENLOCKED_MSG, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
nResult = aDialog.run();
}
else if ( nMode == UUI_DOC_SAVE_LOCK )
{
aArguments.push_back( !aInfo.isEmpty()
? aInfo
: Translate::get( STR_UNKNOWNUSER,
aResLocale ) );
aMessage = Translate::get(xRetry.is() ? STR_OVERWRITE_IGNORELOCK_MSG : STR_TRYLATER_MSG,
aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
nResult = aDialog.run();
}
else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
nMode == UUI_DOC_OWN_SAVE_LOCK )
{
aArguments.push_back( aInfo );
aMessage = Translate::get(nMode == UUI_DOC_OWN_SAVE_LOCK
? STR_ALREADYOPEN_SAVE_MSG
: STR_ALREADYOPEN_MSG,
aResLocale );
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
AlreadyOpenQueryBox aDialog(pParent, aResLocale, aMessage, nMode == UUI_DOC_OWN_SAVE_LOCK);
nResult = aDialog.run();
}
if ( nResult == RET_YES )
xApprove->select();
else if ( nResult == RET_NO )
xDisapprove->select();
else if ( nResult == RET_IGNORE && xRetry.is() )
xRetry->select();
else
xAbort->select();
aArguments.push_back( !aInfo.isEmpty()
? aInfo
: Translate::get( STR_UNKNOWNUSER,
aResLocale ) );
aMessage = Translate::get(xRetry.is() ? STR_OVERWRITE_IGNORELOCK_MSG : STR_TRYLATER_MSG,
aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
nResult = aDialog.run();
}
catch (std::bad_alloc const &)
else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
nMode == UUI_DOC_OWN_SAVE_LOCK )
{
throw uno::RuntimeException("out of memory");
aArguments.push_back( aInfo );
aMessage = Translate::get(nMode == UUI_DOC_OWN_SAVE_LOCK
? STR_ALREADYOPEN_SAVE_MSG
: STR_ALREADYOPEN_MSG,
aResLocale );
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
AlreadyOpenQueryBox aDialog(pParent, aResLocale, aMessage, nMode == UUI_DOC_OWN_SAVE_LOCK);
nResult = aDialog.run();
}
if ( nResult == RET_YES )
xApprove->select();
else if ( nResult == RET_NO )
xDisapprove->select();
else if ( nResult == RET_IGNORE && xRetry.is() )
xRetry->select();
else
xAbort->select();
}
void
......@@ -155,22 +148,15 @@ handleChangedByOthersRequest_(
if ( !xApprove.is() || !xAbort.is() )
return;
try
{
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
FileChangedQueryBox aDialog(pParent, aResLocale);
sal_Int32 nResult = aDialog.run();
if ( nResult == RET_YES )
xApprove->select();
else
xAbort->select();
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
FileChangedQueryBox aDialog(pParent, aResLocale);
sal_Int32 nResult = aDialog.run();
if ( nResult == RET_YES )
xApprove->select();
else
xAbort->select();
}
const sal_uInt16 UUI_DOC_CreateErrDlg = 0;
......@@ -191,33 +177,26 @@ handleLockFileProblemRequest_(
if ( !xApprove.is() || !xAbort.is() )
return;
try
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
sal_Int32 nResult;
if (nWhichDlg == UUI_DOC_CreateErrDlg)
{
SolarMutexGuard aGuard;
std::locale aResLocale = Translate::Create("uui");
sal_Int32 nResult;
if (nWhichDlg == UUI_DOC_CreateErrDlg)
{
LockFailedQueryBox aDialog(pParent, aResLocale);
nResult = aDialog.run();
}
else
{
LockCorruptQueryBox aDialog(pParent, aResLocale);
nResult = aDialog.run();
}
if ( nResult == RET_OK )
xApprove->select();
else
xAbort->select();
LockFailedQueryBox aDialog(pParent, aResLocale);
nResult = aDialog.run();
}
catch (std::bad_alloc const &)
else
{
throw uno::RuntimeException("out of memory");
LockCorruptQueryBox aDialog(pParent, aResLocale);
nResult = aDialog.run();
}
if ( nResult == RET_OK )
xApprove->select();
else
xAbort->select();
}
} // namespace
......
......@@ -140,32 +140,25 @@ executeUnknownAuthDialog(
uno::Reference< uno::XComponentContext > const & xContext,
const uno::Reference< security::XCertificate >& rXCert)
{
try
{
SolarMutexGuard aGuard;
SolarMutexGuard aGuard;
UnknownAuthDialog aDialog(pParent, rXCert, xContext);
UnknownAuthDialog aDialog(pParent, rXCert, xContext);
// Get correct resource string
OUString aMessage;
// Get correct resource string
OUString aMessage;
std::vector< OUString > aArguments;
aArguments.push_back( getContentPart( rXCert->getSubjectName()) );
std::vector< OUString > aArguments;
aArguments.push_back( getContentPart( rXCert->getSubjectName()) );
std::locale aResLocale(Translate::Create("uui"));
ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
std::locale aResLocale(Translate::Create("uui"));
ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
aMessage = Translate::get(STR_UUI_UNKNOWNAUTH_UNTRUSTED, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
aDialog.setDescriptionText( aMessage );
aMessage = Translate::get(STR_UUI_UNKNOWNAUTH_UNTRUSTED, aResLocale);
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
aDialog.setDescriptionText( aMessage );
return static_cast<bool>(aDialog.run());
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
return static_cast<bool>(aDialog.run());
}
enum class SslWarnType {
......@@ -180,62 +173,55 @@ executeSSLWarnDialog(
SslWarnType failure,
const OUString & hostName )
{
try
{
SolarMutexGuard aGuard;
SolarMutexGuard aGuard;
SSLWarnDialog aDialog(pParent, rXCert, xContext);
SSLWarnDialog aDialog(pParent, rXCert, xContext);
// Get correct resource string
std::vector< OUString > aArguments_1;
char const * pMessageKey = nullptr;
char const * pTitleKey = nullptr;
// Get correct resource string
std::vector< OUString > aArguments_1;
char const * pMessageKey = nullptr;
char const * pTitleKey = nullptr;
switch( failure )
{
case SslWarnType::DOMAINMISMATCH:
pMessageKey = STR_UUI_SSLWARN_DOMAINMISMATCH;
pTitleKey = STR_UUI_SSLWARN_DOMAINMISMATCH_TITLE;
aArguments_1.push_back( hostName );
aArguments_1.push_back(
getContentPart( rXCert->getSubjectName()) );
aArguments_1.push_back( hostName );
break;
case SslWarnType::EXPIRED:
pMessageKey = STR_UUI_SSLWARN_EXPIRED;
pTitleKey = STR_UUI_SSLWARN_EXPIRED_TITLE;
aArguments_1.push_back(
getContentPart( rXCert->getSubjectName()) );
aArguments_1.push_back(
getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
aArguments_1.push_back(
getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
break;
case SslWarnType::INVALID:
pMessageKey = STR_UUI_SSLWARN_INVALID;
pTitleKey = STR_UUI_SSLWARN_INVALID_TITLE;
break;
default: assert(false);
}
switch( failure )
{
case SslWarnType::DOMAINMISMATCH:
pMessageKey = STR_UUI_SSLWARN_DOMAINMISMATCH;
pTitleKey = STR_UUI_SSLWARN_DOMAINMISMATCH_TITLE;
aArguments_1.push_back( hostName );
aArguments_1.push_back(
getContentPart( rXCert->getSubjectName()) );
aArguments_1.push_back( hostName );
break;
case SslWarnType::EXPIRED:
pMessageKey = STR_UUI_SSLWARN_EXPIRED;
pTitleKey = STR_UUI_SSLWARN_EXPIRED_TITLE;
aArguments_1.push_back(
getContentPart( rXCert->getSubjectName()) );
aArguments_1.push_back(
getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
aArguments_1.push_back(
getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
break;
case SslWarnType::INVALID:
pMessageKey = STR_UUI_SSLWARN_INVALID;
pTitleKey = STR_UUI_SSLWARN_INVALID_TITLE;
break;
default: assert(false);
}
std::locale aResLocale(Translate::Create("uui"));
std::locale aResLocale(Translate::Create("uui"));
OUString aMessage_1 = Translate::get(pMessageKey, aResLocale);
aMessage_1 = UUIInteractionHelper::replaceMessageWithArguments(
aMessage_1, aArguments_1 );
aDialog.setDescription1Text( aMessage_1 );
OUString aMessage_1 = Translate::get(pMessageKey, aResLocale);
aMessage_1 = UUIInteractionHelper::replaceMessageWithArguments(
aMessage_1, aArguments_1 );
aDialog.setDescription1Text( aMessage_1 );
OUString aTitle = Translate::get(pTitleKey, aResLocale);
aDialog.set_title(aTitle);
OUString aTitle = Translate::get(pTitleKey, aResLocale);
aDialog.set_title(aTitle);
return static_cast<bool>(aDialog.run());
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
return static_cast<bool>(aDialog.run());
}
void
......
......@@ -861,10 +861,6 @@ UUIInteractionHelper::handleRequest_impl(
// Not handled.
return false;
}
catch (std::bad_alloc const &)
{
throw uno::RuntimeException("out of memory");
}
catch( const uno::RuntimeException& )
{
throw; // allowed to leave here
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment