summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/dlg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-22 11:11:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-23 08:47:52 +0200
commitdcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313 (patch)
tree78e04f13656eddd5a528506dda41f96fce6aad7f /dbaccess/source/ui/dlg
parentctypeitm no more exists (diff)
downloadcore-dcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313.tar.gz
core-dcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313.zip
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/ui/dlg')
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx4
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx40
7 files changed, 27 insertions, 27 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 )
{
}