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 /dbaccess/source | |
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 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/dlg/CollectionView.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionPage.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 40 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/sqlmessage.hxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/RowSetDrop.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/dbinteraction.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/unosqlmessage.cxx | 2 |
16 files changed, 50 insertions, 49 deletions
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 78ee969ccdd1..376edc7f7c44 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -176,7 +176,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click, Button*, void) { if ( xNameContainer->hasByName(sName) ) { - ScopedVclPtrInstance< QueryBox > aBox(this, WB_YES_NO, DBA_RES(STR_ALREADYEXISTOVERWRITE)); + ScopedVclPtrInstance< QueryBox > aBox(this, MessBoxStyle::YesNo, DBA_RES(STR_ALREADYEXISTOVERWRITE)); if ( aBox->Execute() != RET_YES ) return; } diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 90df7695b5c2..c35461411c0b 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -472,7 +472,7 @@ namespace dbaui sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - ScopedVclPtrInstance< QueryBox > aQuery(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery); + ScopedVclPtrInstance< QueryBox > aQuery(GetParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, sQuery); sal_Int32 nQueryResult = aQuery->Execute(); m_bUserGrabFocus = true; @@ -489,7 +489,7 @@ namespace dbaui sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - ScopedVclPtrInstance< QueryBox > aWhatToDo(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery); + ScopedVclPtrInstance< QueryBox > aWhatToDo(GetParent(), MessBoxStyle::RetryCancel | MessBoxStyle::DefaultRetry, sQuery); nQueryResult = aWhatToDo->Execute(); m_bUserGrabFocus = true; diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 65f2d0663ae7..0667a8102729 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -308,7 +308,7 @@ namespace dbaui const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, DBA_RES(pMessage), OUString(), WB_OK | WB_DEF_OK, mt ); + ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt ); aMsg->Execute(); } bool OConnectionTabPage::checkTestConnection() diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index fb31b1b0dc27..302139afd27a 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -557,7 +557,7 @@ using namespace ::com::sun::star; #endif const char *pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - ScopedVclPtrInstance<OSQLMessageBox> aMsg(this, DBA_RES(pMessage), OUString(), WB_OK | WB_DEF_OK, mt); + ScopedVclPtrInstance<OSQLMessageBox> aMsg(this, DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt); aMsg->Execute(); } diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index d5850a03961b..ec2fcda8b3df 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -263,7 +263,7 @@ namespace dbaui eImage = OSQLMessageBox::Error; aMessage = DBA_RES(STR_CONNECTION_NO_SUCCESS); } - ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, sTitle, aMessage, WB_OK, eImage ); + ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, sTitle, aMessage, MessBoxStyle::Ok, eImage ); aMsg->Execute(); } if ( !bSuccess ) diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 40c1b1f515c9..8a8a6adf8846 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -543,7 +543,7 @@ namespace dbaui #endif const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - ScopedVclPtrInstance<OSQLMessageBox> aMsg(this, DBA_RES(pMessage), OUString(), WB_OK | WB_DEF_OK, mt); + ScopedVclPtrInstance<OSQLMessageBox> aMsg(this, DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt); aMsg->Execute(); } void OGeneralSpecialJDBCDetailsPage::callModifiedHdl(void* pControl) diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index bef59f71af24..600a15cf2f7e 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -523,32 +523,32 @@ void OSQLMessageBox::impl_positionControls() SetPageSizePixel( aDialogSize ); } -void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) +void OSQLMessageBox::impl_createStandardButtons( MessBoxStyle _nStyle ) { - if ( _nStyle & WB_YES_NO_CANCEL ) + if ( _nStyle & MessBoxStyle::YesNoCancel ) { - lcl_addButton( *this, StandardButtonType::Yes, ( _nStyle & WB_DEF_YES ) != 0 ); - lcl_addButton( *this, StandardButtonType::No, ( _nStyle & WB_DEF_NO ) != 0 ); - lcl_addButton( *this, StandardButtonType::Cancel, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::Yes, bool(_nStyle & MessBoxStyle::DefaultYes) ); + lcl_addButton( *this, StandardButtonType::No, bool( _nStyle & MessBoxStyle::DefaultNo ) ); + lcl_addButton( *this, StandardButtonType::Cancel, bool( _nStyle & MessBoxStyle::DefaultCancel ) ); } - else if ( _nStyle & WB_OK_CANCEL ) + else if ( _nStyle & MessBoxStyle::OkCancel ) { - lcl_addButton( *this, StandardButtonType::OK, ( _nStyle & WB_DEF_OK ) != 0 ); - lcl_addButton( *this, StandardButtonType::Cancel, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::OK, bool( _nStyle & MessBoxStyle::DefaultOk ) ); + lcl_addButton( *this, StandardButtonType::Cancel, bool( _nStyle & MessBoxStyle::DefaultCancel ) ); } - else if ( _nStyle & WB_YES_NO ) + else if ( _nStyle & MessBoxStyle::YesNo ) { - lcl_addButton( *this, StandardButtonType::Yes, ( _nStyle & WB_DEF_YES ) != 0 ); - lcl_addButton( *this, StandardButtonType::No, ( _nStyle & WB_DEF_NO ) != 0 ); + lcl_addButton( *this, StandardButtonType::Yes, bool( _nStyle & MessBoxStyle::DefaultYes ) ); + lcl_addButton( *this, StandardButtonType::No, bool( _nStyle & MessBoxStyle::DefaultNo ) ); } - else if ( _nStyle & WB_RETRY_CANCEL ) + else if ( _nStyle & MessBoxStyle::RetryCancel ) { - lcl_addButton( *this, StandardButtonType::Retry, ( _nStyle & WB_DEF_RETRY ) != 0 ); - lcl_addButton( *this, StandardButtonType::Cancel, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::Retry, bool( _nStyle & MessBoxStyle::DefaultRetry ) ); + lcl_addButton( *this, StandardButtonType::Cancel, bool( _nStyle & MessBoxStyle::DefaultCancel ) ); } else { - OSL_ENSURE( WB_OK & _nStyle, "OSQLMessageBox::impl_createStandardButtons: unsupported dialog style requested!" ); + OSL_ENSURE( MessBoxStyle::Ok & _nStyle, "OSQLMessageBox::impl_createStandardButtons: unsupported dialog style requested!" ); AddButton( StandardButtonType::OK, RET_OK, ButtonDialogFlags::Default | ButtonDialogFlags::Focus ); } @@ -598,7 +598,7 @@ void OSQLMessageBox::impl_addDetailsButton() } } -void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) +void OSQLMessageBox::Construct( MessBoxStyle _nStyle, MessageType _eImage ) { SetText( utl::ConfigManager::getProductName() + " Base" ); @@ -641,7 +641,7 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) impl_addDetailsButton(); } -OSQLMessageBox::OSQLMessageBox(vcl::Window* _pParent, const SQLExceptionInfo& _rException, WinBits _nStyle, const OUString& _rHelpURL ) +OSQLMessageBox::OSQLMessageBox(vcl::Window* _pParent, const SQLExceptionInfo& _rException, MessBoxStyle _nStyle, const OUString& _rHelpURL ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( VclPtr<FixedImage>::Create(this) ) ,m_aTitle( VclPtr<FixedText>::Create(this, WB_WORDBREAK | WB_LEFT) ) @@ -652,7 +652,7 @@ OSQLMessageBox::OSQLMessageBox(vcl::Window* _pParent, const SQLExceptionInfo& _r Construct( _nStyle, AUTO ); } -OSQLMessageBox::OSQLMessageBox( vcl::Window* _pParent, const OUString& _rTitle, const OUString& _rMessage, WinBits _nStyle, MessageType _eType, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) +OSQLMessageBox::OSQLMessageBox( vcl::Window* _pParent, const OUString& _rTitle, const OUString& _rMessage, MessBoxStyle _nStyle, MessageType _eType, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( VclPtr<FixedImage>::Create(this) ) ,m_aTitle( VclPtr<FixedText>::Create(this, WB_WORDBREAK | WB_LEFT) ) @@ -689,7 +689,7 @@ IMPL_LINK_NOARG( OSQLMessageBox, ButtonClickHdl, Button *, void ) } // OSQLWarningBox -OSQLWarningBox::OSQLWarningBox( vcl::Window* _pParent, const OUString& _rMessage, WinBits _nStyle, +OSQLWarningBox::OSQLWarningBox( vcl::Window* _pParent, const OUString& _rMessage, MessBoxStyle _nStyle, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :OSQLMessageBox( _pParent, DBA_RES( STR_EXCEPTION_WARNING ), _rMessage, _nStyle, OSQLMessageBox::Warning, _pAdditionalErrorInfo ) { @@ -697,7 +697,7 @@ OSQLWarningBox::OSQLWarningBox( vcl::Window* _pParent, const OUString& _rMessage // OSQLErrorBox OSQLErrorBox::OSQLErrorBox( vcl::Window* _pParent, const OUString& _rMessage ) - :OSQLMessageBox( _pParent, DBA_RES( STR_EXCEPTION_ERROR ), _rMessage, WB_OK | WB_DEF_OK, OSQLMessageBox::Error, nullptr ) + :OSQLMessageBox( _pParent, DBA_RES( STR_EXCEPTION_ERROR ), _rMessage, MessBoxStyle::Ok | MessBoxStyle::DefaultOk, OSQLMessageBox::Error, nullptr ) { } diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx index cff7777bcde4..e070185f76f3 100644 --- a/dbaccess/source/ui/inc/sqlmessage.hxx +++ b/dbaccess/source/ui/inc/sqlmessage.hxx @@ -23,6 +23,7 @@ #include <vcl/button.hxx> #include <vcl/fixed.hxx> #include <vcl/btndlg.hxx> +#include <vcl/msgbox.hxx> #include <connectivity/dbexception.hxx> @@ -72,7 +73,7 @@ public: OSQLMessageBox( vcl::Window* _pParent, const dbtools::SQLExceptionInfo& _rException, - WinBits _nStyle = WB_OK | WB_DEF_OK, + MessBoxStyle _nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk, const OUString& _rHelpURL = OUString() ); @@ -85,7 +86,7 @@ public: OSQLMessageBox(vcl::Window* pParent, const OUString& rTitle, const OUString& rMessage, - WinBits nStyle = WB_OK | WB_DEF_OK, + MessBoxStyle nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk, MessageType _eType = Info, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = nullptr ); @@ -93,13 +94,13 @@ public: virtual void dispose() override; private: - void Construct( WinBits nStyle, MessageType eImage ); + void Construct( MessBoxStyle nStyle, MessageType eImage ); DECL_LINK(ButtonClickHdl, Button*, void ); private: void impl_positionControls(); - void impl_createStandardButtons( WinBits _nStyle ); + void impl_createStandardButtons( MessBoxStyle _nStyle ); void impl_addDetailsButton(); }; @@ -109,7 +110,7 @@ class OSQLWarningBox : public OSQLMessageBox public: OSQLWarningBox( vcl::Window* _pParent, const OUString& _rMessage, - WinBits _nStyle = WB_OK | WB_DEF_OK, + MessBoxStyle _nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = nullptr ); }; diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index e9b9ad17ffc4..57b8fcb63305 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -748,7 +748,7 @@ void ODatabaseExport::showErrorDialog(const css::sdbc::SQLException& e) OUString aMsg = e.Message + "\n" + DBA_RES( STR_QRY_CONTINUE ); - ScopedVclPtrInstance< OSQLWarningBox > aBox( nullptr, aMsg, WB_YES_NO | WB_DEF_NO ); + ScopedVclPtrInstance< OSQLWarningBox > aBox( nullptr, aMsg, MessBoxStyle::YesNo | MessBoxStyle::DefaultNo ); if (aBox->Execute() == RET_YES) m_bDontAskAgain = true; diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index 94f6b2182b35..4a02455f8e35 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -239,7 +239,7 @@ bool ORowSetImportExport::insertNewRow() if(!m_bAlreadyAsked) { OUString sAskIfContinue = DBA_RES(STR_ERROR_OCCURRED_WHILE_COPYING); - ScopedVclPtrInstance< OSQLWarningBox > aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ); + ScopedVclPtrInstance< OSQLWarningBox > aDlg( m_pParent, sAskIfContinue, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes ); if(aDlg->Execute() == RET_YES) m_bAlreadyAsked = true; else diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index f914f3a54263..0970babdf37b 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1211,7 +1211,7 @@ sal_Int32 askForUserAction(vcl::Window* _pParent, const char* pTitle, const char SolarMutexGuard aGuard; OUString aMsg = DBA_RES(pText); aMsg = aMsg.replaceFirst("%1", _sName); - ScopedVclPtrInstance<OSQLMessageBox> aAsk(_pParent, DBA_RES(pTitle), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query); + ScopedVclPtrInstance<OSQLMessageBox> aAsk(_pParent, DBA_RES(pTitle), aMsg,MessBoxStyle::YesNo | MessBoxStyle::DefaultYes,OSQLMessageBox::Query); if ( _bAll ) { aAsk->AddButton(DBA_RES(STR_BUTTON_TEXT_ALL), RET_ALL); diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 03d997895519..3a56c45f912a 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -941,7 +941,7 @@ void OQueryController::impl_initialize() OUString aTitle(DBA_RES(STR_QUERYDESIGN_NO_VIEW_SUPPORT)); OUString aMessage(DBA_RES(STR_QUERYDESIGN_NO_VIEW_ASK)); ODataView* pWindow = getView(); - ScopedVclPtrInstance< OSQLMessageBox > aDlg( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query ); + ScopedVclPtrInstance< OSQLMessageBox > aDlg( pWindow, aTitle, aMessage, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, OSQLMessageBox::Query ); bClose = aDlg->Execute() == RET_NO; } if ( bClose ) @@ -1738,7 +1738,7 @@ short OQueryController::saveModified() ) { OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) ); - ScopedVclPtrInstance< QueryBox > aQry( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ); + ScopedVclPtrInstance< QueryBox > aQry( getView(), MessBoxStyle::YesNoCancel | MessBoxStyle::DefaultYes, sMessageText ); nRet = aQry->Execute(); if ( ( nRet == RET_YES ) diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index e43e9ceec013..96b985465b7c 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -323,7 +323,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) { - ScopedVclPtrInstance< OSQLWarningBox > aDlg( this, DBA_RES( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); + ScopedVclPtrInstance< OSQLWarningBox > aDlg( this, DBA_RES( STR_QUERY_REL_DELETE_WINDOW ), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes ); if ( m_bInRemove || aDlg->Execute() == RET_YES ) { m_pView->getController().ClearUndoManager(); @@ -341,7 +341,7 @@ void ORelationTableView::lookForUiActivities() { OUString sTitle(DBA_RES(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - ScopedVclPtrInstance< OSQLMessageBox > aDlg(this,DBA_RES(STR_QUERY_REL_EDIT_RELATION),OUString(),0); + ScopedVclPtrInstance< OSQLMessageBox > aDlg(this,DBA_RES(STR_QUERY_REL_EDIT_RELATION),OUString(),MessBoxStyle::NONE); aDlg->SetText(sTitle); aDlg->RemoveButton(aDlg->GetButtonId(0)); aDlg->AddButton( DBA_RES(STR_QUERY_REL_EDIT), RET_OK, ButtonDialogFlags::Default | ButtonDialogFlags::Focus); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 618a342568fa..bfb16297c65c 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -403,7 +403,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs) { OUString sText( DBA_RES( STR_NAME_ALREADY_EXISTS ) ); sText = sText.replaceFirst( "#" , m_sName); - ScopedVclPtrInstance< OSQLMessageBox > aDlg( getView(), DBA_RES( STR_ERROR_DURING_CREATION ), sText, WB_OK, OSQLMessageBox::Error ); + ScopedVclPtrInstance< OSQLMessageBox > aDlg( getView(), DBA_RES( STR_ERROR_DURING_CREATION ), sText, MessBoxStyle::Ok, OSQLMessageBox::Error ); aDlg->Execute(); bError = true; @@ -933,7 +933,7 @@ bool OTableController::checkColumns(bool _bNew) { OUString sTitle(DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD)); OUString sMsg(DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY)); - ScopedVclPtrInstance< OSQLMessageBox > aBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES); + ScopedVclPtrInstance< OSQLMessageBox > aBox(getView(), sTitle,sMsg, MessBoxStyle::YesNoCancel | MessBoxStyle::DefaultYes); switch ( aBox->Execute() ) { @@ -1065,7 +1065,7 @@ void OTableController::alterColumns() aMessage = aMessage.replaceFirst( "$column$", pField->GetName() ); SQLExceptionInfo aError( ::cppu::getCaughtException() ); - ScopedVclPtrInstance< OSQLWarningBox > aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ); + ScopedVclPtrInstance< OSQLWarningBox > aMsg( getView(), aMessage, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes , &aError ); bNotOk = aMsg->Execute() == RET_YES; } else @@ -1122,7 +1122,7 @@ void OTableController::alterColumns() { OUString aMessage(DBA_RES(STR_TABLEDESIGN_ALTER_ERROR)); aMessage = aMessage.replaceFirst("$column$",pField->GetName()); - ScopedVclPtrInstance< OSQLWarningBox > aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES, &aError); + ScopedVclPtrInstance< OSQLWarningBox > aMsg( getView(), aMessage, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, &aError); if ( aMsg->Execute() != RET_YES ) { Reference<XPropertySet> xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW); @@ -1189,7 +1189,7 @@ void OTableController::alterColumns() OUString aMsgT(DBA_RES(STR_TBL_COLUMN_IS_KEYCOLUMN)); aMsgT = aMsgT.replaceFirst("$column$",*pIter); OUString aTitle(DBA_RES(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE)); - ScopedVclPtrInstance< OSQLMessageBox > aMsg(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES); + ScopedVclPtrInstance< OSQLMessageBox > aMsg(getView(),aTitle,aMsgT,MessBoxStyle::YesNo| MessBoxStyle::DefaultYes); if(aMsg->Execute() == RET_YES) { xKeyColumns = nullptr; diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 119a729f699b..00e9a1ea6adb 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -162,22 +162,22 @@ namespace dbaui sal_Int32 nRetryPos = getContinuation(RETRY, _rContinuations); // determine the style of the dialog, dependent on the present continuation types - WinBits nDialogStyle = 0; + MessBoxStyle nDialogStyle = MessBoxStyle::NONE; bool bHaveCancel = nAbortPos != -1; // "approve" means "Yes", "disapprove" means "No" // VCL only supports having both (which makes sense ...) if ( ( nApprovePos != -1 ) || ( nDisapprovePos != -1 ) ) - nDialogStyle = ( bHaveCancel ? WB_YES_NO_CANCEL : WB_YES_NO ) | WB_DEF_YES; + nDialogStyle = ( bHaveCancel ? MessBoxStyle::YesNoCancel : MessBoxStyle::YesNo ) | MessBoxStyle::DefaultYes; else { // if there's no yes/no, then use a default OK button - nDialogStyle = ( bHaveCancel ? WB_OK_CANCEL : WB_OK ) | WB_DEF_OK; + nDialogStyle = ( bHaveCancel ? MessBoxStyle::OkCancel : MessBoxStyle::Ok ) | MessBoxStyle::DefaultOk; } // If there's a "Retry" continuation, have a "Retry" button if ( nRetryPos != -1 ) { - nDialogStyle = WB_RETRY_CANCEL | WB_DEF_RETRY; + nDialogStyle = MessBoxStyle::RetryCancel | MessBoxStyle::DefaultRetry; } // execute the dialog diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index 222fd7bf05dd..b5948ca79a9f 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -146,7 +146,7 @@ Reference<XPropertySetInfo> SAL_CALL OSQLMessageDialog::getPropertySetInfo() VclPtr<Dialog> OSQLMessageDialog::createDialog(vcl::Window* _pParent) { if ( m_aException.hasValue() ) - return VclPtr<OSQLMessageBox>::Create( _pParent, SQLExceptionInfo( m_aException ), WB_OK | WB_DEF_OK, m_sHelpURL ); + return VclPtr<OSQLMessageBox>::Create( _pParent, SQLExceptionInfo( m_aException ), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL ); OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!"); return VclPtr<OSQLMessageBox>::Create(_pParent, SQLException()); |