diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-22 11:11:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-23 08:47:52 +0200 |
commit | dcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313 (patch) | |
tree | 78e04f13656eddd5a528506dda41f96fce6aad7f /basic/source/runtime | |
parent | e725111f8283f4dbefde7b14efbe9afd850095df (diff) |
convert message box style bits to scoped enum
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since
commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a
Date: Fri Feb 4 14:52:54 2011 +0100
ka102: added/removed files for SVG import and module cleanup
Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962
Reviewed-on: https://gerrit.libreoffice.org/41412
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime')
-rw-r--r-- | basic/source/runtime/iosys.cxx | 6 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 33 |
2 files changed, 19 insertions, 20 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index ab9a333ad5a8..73899c44a5cc 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -722,9 +722,9 @@ void SbiIoSystem::Shutdown() { #if defined __GNUC__ vcl::Window* pParent = Application::GetDefDialogParent(); - ScopedVclPtrInstance<MessBox>( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( pParent, MessBoxStyle::Ok, OUString(), aOut )->Execute(); #else - ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), MessBoxStyle::Ok, OUString(), aOut )->Execute(); #endif } aOut.clear(); @@ -869,7 +869,7 @@ void SbiIoSystem::WriteCon(const OUString& rText) SolarMutexGuard aSolarGuard; if( !ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), - WinBits( WB_OK_CANCEL | WB_DEF_OK ), + MessBoxStyle::OkCancel | MessBoxStyle::DefaultOk, OUString(), s)->Execute() ) { nError = ERRCODE_BASIC_USER_ABORT; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 62bc21ba8246..26fcf6bb2161 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4243,14 +4243,14 @@ void SbRtl_SavePicture(StarBASIC *, SbxArray & rPar, bool) void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool) { - static const WinBits nStyleMap[] = - { - WB_OK, // MB_OK - WB_OK_CANCEL, // MB_OKCANCEL - WB_ABORT_RETRY_IGNORE, // MB_ABORTRETRYIGNORE - WB_YES_NO_CANCEL, // MB_YESNOCANCEL - WB_YES_NO, // MB_YESNO - WB_RETRY_CANCEL // MB_RETRYCANCEL + static const MessBoxStyle nStyleMap[] = + { + MessBoxStyle::Ok, // MB_OK + MessBoxStyle::OkCancel, // MB_OKCANCEL + MessBoxStyle::AbortRetryIgnore, // MB_ABORTRETRYIGNORE + MessBoxStyle::YesNoCancel, // MB_YESNOCANCEL + MessBoxStyle::YesNo, // MB_YESNO + MessBoxStyle::RetryCancel // MB_RETRYCANCEL }; static const sal_Int16 nButtonMap[] = { @@ -4268,7 +4268,7 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } - WinBits nWinBits; + MessBoxStyle nWinBits; WinBits nType = 0; // MB_OK if( nArgCount >= 3 ) nType = (WinBits)rPar.Get(2)->GetInteger(); @@ -4280,37 +4280,36 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool) } nWinBits = nStyleMap[ nStyle ]; - WinBits nWinDefBits; - nWinDefBits = (WB_DEF_OK | WB_DEF_RETRY | WB_DEF_YES); + MessBoxStyle nWinDefBits = MessBoxStyle::DefaultOk | MessBoxStyle::DefaultRetry | MessBoxStyle::DefaultYes; if( nType & 256 ) { if( nStyle == 5 ) { - nWinDefBits = WB_DEF_CANCEL; + nWinDefBits = MessBoxStyle::DefaultCancel; } else if( nStyle == 2 ) { - nWinDefBits = WB_DEF_RETRY; + nWinDefBits = MessBoxStyle::DefaultRetry; } else { - nWinDefBits = (WB_DEF_CANCEL | WB_DEF_RETRY | WB_DEF_NO); + nWinDefBits = (MessBoxStyle::DefaultCancel | MessBoxStyle::DefaultRetry | MessBoxStyle::DefaultNo); } } else if( nType & 512 ) { if( nStyle == 2) { - nWinDefBits = WB_DEF_IGNORE; + nWinDefBits = MessBoxStyle::DefaultIgnore; } else { - nWinDefBits = WB_DEF_CANCEL; + nWinDefBits = MessBoxStyle::DefaultCancel; } } else if( nStyle == 2) { - nWinDefBits = WB_DEF_CANCEL; + nWinDefBits = MessBoxStyle::DefaultCancel; } nWinBits |= nWinDefBits; |