diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-18 12:40:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-18 15:08:56 +0200 |
commit | cccc6bcfa095121c91e8bbc396f5bcf7e95424b9 (patch) | |
tree | f94a97a9698e3376405a36decc7612a2c523c9fd /vcl/ios | |
parent | a0659cc41d7764dd104bce82f8c5b3f0b8073173 (diff) |
Don't access broken service mgr during bootstrap failure
...so that displaying a (non-translated) error box upon BE_UNO_SERVICEMANAGER
works after all. Augment the error text with an exception message where
appropriate. This allows to revert fdfb7a3c4b3a89b73ab5546b9620348bc4984d8f
"Related fdo#51252: Report uncaught exceptions with MessageBox on Windows" as
that was to catch and display failures from instantiating the service mgr.
Change-Id: I049a38e95342634796eb0e940e2ee8e55193c9d3
Diffstat (limited to 'vcl/ios')
-rw-r--r-- | vcl/ios/source/app/salsys.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/vcl/ios/source/app/salsys.cxx b/vcl/ios/source/app/salsys.cxx index 02cd6442525a..8501e3f6ba8d 100644 --- a/vcl/ios/source/app/salsys.cxx +++ b/vcl/ios/source/app/salsys.cxx @@ -106,9 +106,13 @@ rtl::OUString IosSalSystem::GetDisplayScreenName( unsigned int nScreen ) return aRet; } -static NSString* getStandardString( int nButtonId ) +static NSString* getStandardString( int nButtonId, bool bUseResources ) { - rtl::OUString aText( Button::GetStandardText( nButtonId ) ); + rtl::OUString aText; + if( bUseResources ) + { + aText = Button::GetStandardText( nButtonId ); + } if( ! aText.getLength() ) // this is for bad cases, we might be missing the vcl resource { switch( nButtonId ) @@ -150,7 +154,7 @@ static NSString* getStandardString( int nButtonId ) int IosSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, - int nDefaultButton) + int nDefaultButton, bool bUseResources) { NSString* pTitle = CreateNSString( rTitle ); NSString* pMessage = CreateNSString( rMessage ); @@ -189,11 +193,14 @@ int IosSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, if( aButtonIds[nC].nDefaultButton == nDefaultButton ) { if( aButtonIds[nC].nTextIds[0] != -1 ) - pDefText = getStandardString( aButtonIds[nC].nTextIds[0] ); + pDefText = getStandardString( + aButtonIds[nC].nTextIds[0], bUseResources ); if( aButtonIds[nC].nTextIds[1] != -1 ) - pAltText = getStandardString( aButtonIds[nC].nTextIds[1] ); + pAltText = getStandardString( + aButtonIds[nC].nTextIds[1], bUseResources ); if( aButtonIds[nC].nTextIds[2] != -1 ) - pOthText = getStandardString( aButtonIds[nC].nTextIds[2] ); + pOthText = getStandardString( + aButtonIds[nC].nTextIds[2], bUseResources ); break; } } |