[Libreoffice-commits] core.git: basctl/source cui/source dbaccess/source desktop/source editeng/source extensions/source fpicker/source include/vcl sc/source sd/source sfx2/source svx/source sw/source vcl/source xmlsecurity/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Dec 21 16:20:22 UTC 2016


 basctl/source/basicide/bastypes.cxx                        |    2 
 cui/source/customize/cfg.cxx                               |    4 -
 cui/source/dialogs/scriptdlg.cxx                           |    2 
 cui/source/options/dbregister.cxx                          |    2 
 cui/source/options/optcolor.cxx                            |    2 
 cui/source/options/optdict.cxx                             |    2 
 dbaccess/source/ui/app/AppControllerGen.cxx                |    2 
 dbaccess/source/ui/browser/brwctrlr.cxx                    |    2 
 dbaccess/source/ui/dlg/UserAdmin.cxx                       |    2 
 dbaccess/source/ui/dlg/indexdialog.cxx                     |    2 
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx       |    2 
 dbaccess/source/ui/tabledesign/TableController.cxx         |    2 
 desktop/source/app/lockfile2.cxx                           |    2 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx           |    6 +-
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx |    2 
 editeng/source/misc/splwrap.cxx                            |    2 
 extensions/source/abpilot/abspilot.cxx                     |    2 
 extensions/source/scanner/sanedlg.cxx                      |    2 
 fpicker/source/office/RemoteFilesDialog.cxx                |    4 -
 fpicker/source/office/iodlg.cxx                            |    2 
 include/vcl/layout.hxx                                     |   16 +++---
 sc/source/ui/miscdlgs/scuiautofmt.cxx                      |    4 -
 sc/source/ui/miscdlgs/tabopdlg.cxx                         |    2 
 sd/source/filter/html/pubdlg.cxx                           |    2 
 sd/source/ui/func/fupage.cxx                               |    2 
 sfx2/source/control/templatelocalview.cxx                  |    8 +--
 sfx2/source/control/templatesearchview.cxx                 |    4 -
 sfx2/source/dialog/dinfdlg.cxx                             |    2 
 sfx2/source/dialog/newstyle.cxx                            |    2 
 sfx2/source/dialog/templdlg.cxx                            |    4 -
 sfx2/source/doc/guisaveas.cxx                              |    4 -
 sfx2/source/doc/objserv.cxx                                |    6 +-
 sfx2/source/doc/saveastemplatedlg.cxx                      |    2 
 sfx2/source/doc/templatedlg.cxx                            |    2 
 sfx2/source/view/viewfrm.cxx                               |    6 +-
 sfx2/source/view/viewprn.cxx                               |    2 
 svx/source/dialog/docrecovery.cxx                          |    2 
 svx/source/form/datanavi.cxx                               |    8 +--
 sw/source/ui/dialog/uiregionsw.cxx                         |    4 -
 sw/source/ui/index/swuiidxmrk.cxx                          |    2 
 sw/source/ui/misc/glossary.cxx                             |    4 -
 sw/source/ui/table/tautofmt.cxx                            |    4 -
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx       |    2 
 sw/source/uibase/uiview/viewling.cxx                       |    2 
 vcl/source/window/layout.cxx                               |   30 ++++++-------
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx     |    2 
 46 files changed, 88 insertions(+), 88 deletions(-)

New commits:
commit 6b8ee3c9ba9b9262b34743a9f4e2a5b9dda4173f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Dec 21 15:48:51 2016 +0200

    convert VclButtonsType to scoped enum
    
    Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1
    Reviewed-on: https://gerrit.libreoffice.org/32285
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thomas Arnhold <thomas at arnhold.org>

diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index c186b8f..92282d7 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -768,7 +768,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent )
     aNameBuf.append('\'');
     aNameBuf.insert(0, '\'');
     aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
-    ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+    ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VclMessageType::Question, VclButtonsType::YesNo);
     return ( aQueryBox->Execute() == RET_YES );
 }
 
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8e8c8dd..56b9fa5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3302,7 +3302,7 @@ void SvxToolbarConfigPage::DeleteSelectedContent()
              GetTopLevelSelection()->IsDeletable() )
         {
             ScopedVclPtrInstance<MessageDialog> qbox(this,
-                CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VclButtonsType::YesNo);
 
             if ( qbox->Execute() == RET_YES )
             {
@@ -4742,7 +4742,7 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, ResetTopLevelHdl, Button *, void )
         static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos ));
 
     ScopedVclPtrInstance<MessageDialog> qbox(this,
-        CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VclButtonsType::YesNo);
 
     if ( qbox->Execute() == RET_YES )
     {
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 84f3a3d..6f06d14 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1064,7 +1064,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
     Reference< browse::XBrowseNode > node = getBrowseNode( pEntry );
     // ISSUE L10N string & can we centre list?
     OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 );
-    VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+    VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VclMessageType::Question, VclButtonsType::YesNo);
     aQueryBox->SetText( m_delQueryTitleStr );
     if ( aQueryBox->Execute() == RET_NO )
     {
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index c34f7b6..587cec3 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -274,7 +274,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl, Button*, void)
     SvTreeListEntry* pEntry = m_pPathBox->FirstSelected();
     if ( pEntry )
     {
-        ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VclButtonsType::YesNo);
         if ( aQuery->Execute() == RET_YES )
             m_pPathBox->GetModel()->Remove(pEntry);
     }
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 1d962bd..5af0986 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1172,7 +1172,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void )
     else
     {
         DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme");
-        ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
         aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE));
         if(RET_YES == aQuery->Execute())
         {
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index a44d7d1..a28bd94 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -453,7 +453,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, void)
 
     if ( nLang != nOldLang )
     {
-        ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VclButtonsType::YesNo);
         OUString sTxt(aBox->get_primary_text());
         sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() );
         aBox->set_primary_text(sTxt);
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index af2dd35..cf150dd 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -517,7 +517,7 @@ void OApplicationController::askToReconnect()
         bool bClear = true;
         if ( !m_pSubComponentManager->empty() )
         {
-            ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VclButtonsType::YesNo);
             switch (aQry->Execute())
             {
                 case RET_YES:
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 6e36b0f..08bb04e 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1370,7 +1370,7 @@ void SbaXDataBrowserController::resetted(const css::lang::EventObject& rEvent) t
 
 sal_Bool SbaXDataBrowserController::confirmDelete(const css::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception )
 {
-    if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
+    if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VclButtonsType::YesNo)->Execute() != RET_YES)
         return false;
 
     return true;
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index a477eb6..ce481b0 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -257,7 +257,7 @@ IMPL_LINK( OUserAdmin, UserHdl, Button *, pButton, void )
                 Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
                 if(xDrop.is())
                 {
-                    ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                    ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VclMessageType::Question, VclButtonsType::YesNo);
                     if(aQry->Execute() == RET_YES)
                         xDrop->dropByName(GetUser());
                 }
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index d094ae9..af7eee1 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -412,7 +412,7 @@ namespace dbaui
             {
                 OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX));
                 sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected));
-                ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VclMessageType::Question, VclButtonsType::YesNo);
                 if (RET_YES != aConfirm->Execute())
                     return;
             }
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 9b00cfa..260ced9 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -307,7 +307,7 @@ namespace dbaui
         bool bReConnect = true;
         if ( _bUI )
         {
-            ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VclButtonsType::YesNo);
             bReConnect = ( RET_YES == aQuery->Execute() );
         }
 
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 192b757..027facc 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -436,7 +436,7 @@ void OTableController::doEditIndexes()
     // table needs to be saved before editing indexes
     if (m_bNew || isModified())
     {
-        ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VclMessageType::Question, VclButtonsType::YesNo);
         if (RET_YES != aAsk->Execute())
             return;
 
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index 6b88309..a84584d 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -39,7 +39,7 @@ bool Lockfile_execWarning( Lockfile * that )
 
     // display warning and return response
     ScopedVclPtrInstance<MessageDialog> aBox(nullptr, DesktopResId(STR_QUERY_USERDATALOCKED),
-                                             VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                             VclMessageType::Question, VclButtonsType::YesNo);
     // set box title
     OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
     aBox->SetText( aTitle );
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 219b2fa..89ac27c 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -387,7 +387,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
     {
         const SolarMutexGuard guard;
         ScopedVclPtrInstance<MessageDialog> aInfoBox(pParent, getResId(nResID),
-                                                     VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
+                                                     VclMessageType::Warning, VclButtonsType::OkCancel);
         bHadWarning = true;
 
         if ( RET_OK == aInfoBox->Execute() )
@@ -428,7 +428,7 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
 {
     const SolarMutexGuard guard;
     ScopedVclPtrInstance<MessageDialog> aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
-                                              VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
+                                              VclMessageType::Warning, VclButtonsType::OkCancel);
 
     OUString sText(aInfo->get_primary_text());
     sText = sText.replaceAll("%NAME", rExtensionName);
@@ -592,7 +592,7 @@ bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
 {
     const SolarMutexGuard guard;
     ScopedVclPtrInstance<MessageDialog> aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
-                                              VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
+                                              VclMessageType::Warning, VclButtonsType::OkCancel);
 
     OUString sText(aInfo->get_primary_text());
     sText = sText.replaceAll("%NAME", rExtensionName);
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 2167231..79543cf 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -432,7 +432,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
         {
             SolarMutexGuard guard;
             ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr,
-                                                    ResId(id, *DeploymentGuiResMgr::get()), VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
+                                                    ResId(id, *DeploymentGuiResMgr::get()), VclMessageType::Warning, VclButtonsType::OkCancel);
             OUString s;
             if (bEqualNames)
             {
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 2ddb128..0ae986e 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -370,7 +370,7 @@ bool SvxSpellWrapper::SpellNext( )
         WAIT_OFF();
 
         sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
-        ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VclButtonsType::YesNo);
         if ( aBox->Execute() != RET_YES )
         {
             // sacrifice the other area if necessary ask for special area
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index ca16523..7859182 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -260,7 +260,7 @@ namespace abp
 
             if ( aTables.empty() )
             {
-                if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
+                if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
                 {
                     // cannot ask the user, or the user chose to use this data source, though there are no tables
                     bAllow = false;
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index cea597c..951b0d2 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -883,7 +883,7 @@ void SaneDlg::AcquirePreview()
     if( nOption == -1 )
     {
         OUString aString(SaneResId(STR_SLOW_PREVIEW));
-        ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
+        ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VclButtonsType::OkCancel);
         if (aBox->Execute() == RET_CANCEL)
             return;
     }
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index bda6faf..f268240 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -853,7 +853,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void )
         {
             OUString sMsg = fpicker::SvtResId( STR_SVT_DELETESERVICE );
             sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() );
-            ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO );
+            ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VclButtonsType::YesNo );
 
             if( aBox->Execute() == RET_YES )
             {
@@ -1158,7 +1158,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, Button*, void )
         {
             OUString sMsg = fpicker::SvtResId( STR_SVT_ALREADYEXISTOVERWRITE );
             sMsg = sMsg.replaceFirst( "$filename$", sName );
-            ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO );
+            ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VclButtonsType::YesNo );
             if( aBox->Execute() != RET_YES )
                 return;
         }
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index be95410..2eef55d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1072,7 +1072,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
                     "$filename$",
                     aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)
                 );
-                ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VclButtonsType::YesNo);
                 if ( aBox->Execute() != RET_YES )
                     return;
             }
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 59a0817..e137178 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -620,14 +620,14 @@ public:
     bool set_property(const OString &rKey, const OString &rValue);
 };
 
-enum VclButtonsType
+enum class VclButtonsType
 {
-    VCL_BUTTONS_NONE,
-    VCL_BUTTONS_OK,
-    VCL_BUTTONS_CLOSE,
-    VCL_BUTTONS_CANCEL,
-    VCL_BUTTONS_YES_NO,
-    VCL_BUTTONS_OK_CANCEL
+    NONE,
+    Ok,
+    Close,
+    Cancel,
+    YesNo,
+    OkCancel
 };
 
 enum class VclMessageType
@@ -665,7 +665,7 @@ public:
     MessageDialog(vcl::Window* pParent,
         const OUString &rMessage,
         VclMessageType eMessageType = VclMessageType::Error,
-        VclButtonsType eButtonsType = VCL_BUTTONS_OK);
+        VclButtonsType eButtonsType = VclButtonsType::Ok);
     MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
     virtual bool set_property(const OString &rKey, const OString &rValue) override;
     virtual short Execute() override;
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index bc8d9af..8095ea7 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -264,7 +264,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl, Button*, void)
                     sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(this,
                                             ScGlobal::GetRscString(STR_INVALID_AFNAME),
                                             VclMessageType::Error,
-                                            VCL_BUTTONS_OK_CANCEL
+                                            VclButtonsType::OkCancel
                                           )->Execute();
 
                     bOk = ( nRet == RET_CANCEL );
@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl, Button*, void)
                 bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>( this,
                                       ScGlobal::GetRscString(STR_INVALID_AFNAME),
                                       VclMessageType::Error,
-                                      VCL_BUTTONS_OK_CANCEL
+                                      VclButtonsType::OkCancel
                                       )->Execute();
             }
         }
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index a796f25..daf684d 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -223,7 +223,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
             break;
     }
 
-    ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute();
+    ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VclButtonsType::OkCancel)->Execute();
     pEd->GrabFocus();
 }
 
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 00878d6..7da385f 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1153,7 +1153,7 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl, Button*, void)
                 if (iter != m_aDesignList.end())
                 {
                     ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
-                        VclMessageType::Error, VCL_BUTTONS_YES_NO);
+                        VclMessageType::Error, VclButtonsType::YesNo);
                     bRetry = aErrorBox->Execute() == RET_NO;
 
                     if(!bRetry)
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 998e157..6bf77d4 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -379,7 +379,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
                 {
                     ScopedVclPtrInstance<MessageDialog> aQuestionBox(
                         pParent, SD_RESSTR(STR_PAGE_BACKGROUND_TXT),
-                        VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                        VclMessageType::Question, VclButtonsType::YesNo);
                     aQuestionBox->SetText(SD_RESSTR(STR_PAGE_BACKGROUND_TITLE));
                     bSetToAllPages = ( RET_YES == aQuestionBox->Execute() );
                 }
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 9bb05809..ffb3eee 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -285,7 +285,7 @@ IMPL_LINK(TemplateLocalView, ContextMenuSelectHdl, Menu*, pMenu, bool)
         break;
     case MNI_DELETE:
     {
-        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
         if ( aQueryDlg->Execute() != RET_YES )
             break;
 
@@ -518,7 +518,7 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_
         {
             OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
                 getRegionName(nTargetRegion));
-            ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
             if ( aQueryDlg->Execute() != RET_YES )
                 return false;
 
@@ -619,7 +619,7 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s
                 {
                     OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
                         getRegionName(nTargetRegion));
-                    ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                    ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
 
                     if ( aQueryDlg->Execute() != RET_YES )
                     {
@@ -912,7 +912,7 @@ void TemplateLocalView::KeyInput( const KeyEvent& rKEvt )
     }
     else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
     {
-        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
 
         if ( aQueryDlg->Execute() != RET_YES )
             return;
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 3b1a6fb..0628e0d 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -59,7 +59,7 @@ void TemplateSearchView::KeyInput( const KeyEvent& rKEvt )
     }
     else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
     {
-        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
 
         if ( aQueryDlg->Execute() != RET_YES )
             return;
@@ -158,7 +158,7 @@ IMPL_LINK(TemplateSearchView, ContextMenuSelectHdl, Menu*, pMenu, bool)
         break;
     case MNI_DELETE:
     {
-        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
         if ( aQueryDlg->Execute() != RET_YES )
             break;
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 4739073..c321af9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1687,7 +1687,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
         if ( bIsFromTypeBox ) // LoseFocus of TypeBox
             pLine->m_bTypeLostFocus = true;
         vcl::Window* pParent = GetParent()->GetParent();
-        if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK)
+        if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VclButtonsType::OkCancel)->Execute() == RET_OK)
             pLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(CUSTOM_TYPE_TEXT) ) );
         else
             pLine->m_aValueEdit->GrabFocus();
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 903a934..11f58bb 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -59,7 +59,7 @@ IMPL_LINK( SfxNewStyleDlg, ModifyHdl, Edit&, rBox, void )
 SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rInPool )
     : ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
     , aQueryOverwriteBox(VclPtr<MessageDialog>::Create(this, SfxResId(STR_QUERY_OVERWRITE),
-                                           VclMessageType::Question, VCL_BUTTONS_YES_NO))
+                                           VclMessageType::Question, VclButtonsType::YesNo))
     , rPool(rInPool)
 {
     get(m_pColBox, "stylename");
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index fb56275..8e5f32e 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1888,10 +1888,10 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl()
         {
         #if defined UNX
             ScopedVclPtrInstance<MessageDialog> aBox(SfxGetpApp()->GetTopWindow(), aMsg,
-                               VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                               VclMessageType::Question, VclButtonsType::YesNo);
         #else
             ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg,
-                               VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                               VclMessageType::Question, VclButtonsType::YesNo);
         #endif
             aApproved = aBox->Execute() == RET_YES;
         }
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a2053b4..4077a2a 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -653,7 +653,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
             // notify the user that SaveAs is going to be done
             vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
             ScopedVclPtrInstance<MessageDialog> aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
-                                      VclMessageType::Question, VCL_BUTTONS_OK_CANCEL);
+                                      VclMessageType::Question, VclButtonsType::OkCancel);
             if ( aMessageBox->Execute() == RET_OK )
                 nResult = STATUS_SAVEAS;
             else
@@ -1399,7 +1399,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
            || SignatureState::PARTIAL_OK == nDocumentSignatureState)
         {
             if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE),
-                              VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
+                              VclMessageType::Question, VclButtonsType::YesNo)->Execute() != RET_YES)
             {
                 // the user has decided not to store the document
                 throw task::ErrorCodeIOException(
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 82b94fd..0d5dcfa 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -839,7 +839,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
         }
         case SID_CANCELCHECKOUT:
         {
-            if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
+            if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
             {
                 CancelCheckOut( );
 
@@ -1378,8 +1378,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
         if ( nVersion >= SvtSaveOptions::ODFVER_012 )
         {
 
-            if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
-              || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) )
+            if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
+              || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES) )
             {
                 sal_uInt16 nId = SID_SAVEDOC;
                 if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx
index a4c0db6..1aadfeb 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -78,7 +78,7 @@ void SfxSaveAsTemplateDialog::setDocumentModel(const uno::Reference<frame::XMode
 
 IMPL_LINK_NOARG(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void)
 {
-    ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+    ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VclButtonsType::YesNo);
 
     if(!IsTemplateNameUnique())
     {
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 63056eb..3b35ed4 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1172,7 +1172,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
         OUString sCategory = aDlg->GetSelectedCategory();
         aDlg.disposeAndClear();
         ScopedVclPtrInstance< MessageDialog > popupDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE),
-            VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            VclMessageType::Question, VclButtonsType::YesNo);
 
         if ( popupDlg->Execute() != RET_YES )
             return;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c0e4c13..6e35ade 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -462,7 +462,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     {
                         // css::sdbcx::User offering to open it as a template
                         ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
-                                           VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                           VclMessageType::Question, VclButtonsType::YesNo);
                         if ( RET_YES == aBox->Execute() )
                         {
                             SfxApplication* pApp = SfxGetpApp();
@@ -545,7 +545,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                  !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
             {
                 ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
-                                   VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                   VclMessageType::Question, VclButtonsType::YesNo);
                 bDo = ( RET_YES == aBox->Execute() );
             }
 
@@ -721,7 +721,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     {
                         // ask user for opening as template
                         ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
-                                           VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                           VclMessageType::Question, VclButtonsType::YesNo);
                         if ( RET_YES == aBox->Execute() )
                         {
                             SfxAllItemSet aSet( pApp->GetPool() );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index f9d6c9a..dfe49c1 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -511,7 +511,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
 
     // Ask if possible, if page format should be taken over from printer.
     if ( ( bOriChg  || bPgSzChg ) &&
-        RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() )
+        RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VclButtonsType::YesNo)->Execute() )
     {
         // Flags with changes for  <SetPrinter(SfxPrinter*)> are maintained
         nChangedFlags |= nNewOpt;
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index f2e81f4..032c15f 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -841,7 +841,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
 
 short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes)
 {
-    ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+    ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VclButtonsType::YesNo);
     if (aQuery->Execute() == RET_YES)
         return DLG_RET_OK;
     else
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index e50adbc..1653273 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -949,7 +949,7 @@ namespace svxform
                     bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE );
                     sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
                     OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME);
-                    ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                    ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VclButtonsType::YesNo);
                     OUString sMessText = aQBox->get_primary_text();
                     sMessText = sMessText.replaceFirst(
                         sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, false ) );
@@ -992,7 +992,7 @@ namespace svxform
                     SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
                 }
                 ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(nResId),
-                                                          VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                                          VclMessageType::Question, VclButtonsType::YesNo);
                 OUString sMessText = aQBox->get_primary_text();
                 sMessText = sMessText.replaceFirst( sSearch, sName);
                 aQBox->set_primary_text(sMessText);
@@ -1588,7 +1588,7 @@ namespace svxform
             else if (sIdent == "modelsremove")
             {
                 ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL),
-                                    VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                    VclMessageType::Question, VclButtonsType::YesNo);
                 OUString sText = aQBox->get_primary_text();
                 sText = sText.replaceFirst( MODELNAME, sSelectedModel );
                 aQBox->set_primary_text(sText);
@@ -1689,7 +1689,7 @@ namespace svxform
                 {
                     OUString sInstName = pPage->GetInstanceName();
                     ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
-                                                              VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                                                              VclMessageType::Question, VclButtonsType::YesNo);
                     OUString sMessText = aQBox->get_primary_text();
                     sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName );
                     aQBox->set_primary_text(sMessText);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 0c7af41..6f0d69b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -988,7 +988,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, Button *, pButton, void )
             bool bContent = pSectRepr->IsContent();
             if( pBox->IsChecked() && bContent && rSh.HasSelection() )
             {
-                if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
+                if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
                     pBox->Check( false );
             }
             if( bFile )
@@ -1725,7 +1725,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
     if( pBox->IsChecked() )
     {
         if( m_pWrtSh->HasSelection() &&
-            RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
+            RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
             pBox->Check( false );
     }
 
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index e8d4ef2..bcf1905 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1227,7 +1227,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl, Button*, void)
                 bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i);
             if(bDifferent)
             {
-                ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+                ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VclButtonsType::YesNo);
                 if(RET_YES != aQuery->Execute())
                     return;
             }
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 99676c6..da62932 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -522,7 +522,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
     }
     else if (sItemIdent == "delete")
     {
-        ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+        ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
         if (RET_YES == aQuery->Execute())
         {
             const OUString aShortName(m_pShortNameEdit->GetText());
@@ -680,7 +680,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, Button*, void)
         }
         else
         {
-            ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VclMessageType::Question, VclButtonsType::YesNo);
 
             if(RET_YES == aBox->Execute())
                 PathHdl(m_pPathBtn);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 8cce069..190b4a3 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -356,7 +356,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl, Button*, void)
 
             if( !bFormatInserted )
             {
-                bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)
+                bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
                                     ->Execute();
             }
         }
@@ -454,7 +454,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl, Button*, void)
 
             if( !bFormatRenamed )
             {
-                bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)
+                bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
                                     ->Execute();
             }
         }
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 69d329a..55b74f7 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -392,7 +392,7 @@ The code below would only be part of the solution.
             {
                 LockFocusNotification( true );
                 sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE),
-                                                VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute();
+                                                VclMessageType::Question, VclButtonsType::YesNo)->Execute();
                 if(RET_YES == nRet)
                 {
                     SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 75a1c2e..2152477 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -460,7 +460,7 @@ void SwView::HyphenateDocument()
         // turned on no special area
         {
             // I want also in special areas hyphenation
-            ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+            ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VclButtonsType::YesNo);
             if( aBox->Execute() == RET_YES )
             {
                 bOther = true;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 0f42dd6..9a51658 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2171,7 +2171,7 @@ void MessageDialog::create_owned_areas()
 
 MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle)
     : Dialog(pParent, nStyle)
-    , m_eButtonsType(VCL_BUTTONS_NONE)
+    , m_eButtonsType(VclButtonsType::NONE)
     , m_eMessageType(VclMessageType::Info)
     , m_pOwnedContentArea(nullptr)
     , m_pOwnedActionArea(nullptr)
@@ -2202,7 +2202,7 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
 
 MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
     : Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WINDOW_MESSBOX)
-    , m_eButtonsType(VCL_BUTTONS_NONE)
+    , m_eButtonsType(VclButtonsType::NONE)
     , m_eMessageType(VclMessageType::Info)
     , m_pOwnedContentArea(nullptr)
     , m_pOwnedActionArea(nullptr)
@@ -2376,9 +2376,9 @@ short MessageDialog::Execute()
         VclPtr<PushButton> pBtn;
         switch (m_eButtonsType)
         {
-            case VCL_BUTTONS_NONE:
+            case VclButtonsType::NONE:
                 break;
-            case VCL_BUTTONS_OK:
+            case VclButtonsType::Ok:
                 pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
                 pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
                 pBtn->Show();
@@ -2386,7 +2386,7 @@ short MessageDialog::Execute()
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_OK;
                 break;
-            case VCL_BUTTONS_CLOSE:
+            case VclButtonsType::Close:
                 pBtn.set( VclPtr<CloseButton>::Create(pButtonBox) );
                 pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
                 pBtn->Show();
@@ -2394,14 +2394,14 @@ short MessageDialog::Execute()
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_CLOSE;
                 break;
-            case VCL_BUTTONS_CANCEL:
+            case VclButtonsType::Cancel:
                 pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) );
                 pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
                 pBtn->set_id("cancel");
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_CANCEL;
                 break;
-            case VCL_BUTTONS_YES_NO:
+            case VclButtonsType::YesNo:
                 pBtn = VclPtr<PushButton>::Create(pButtonBox);
                 pBtn->SetText(Button::GetStandardText(StandardButtonType::Yes));
                 pBtn->Show();
@@ -2417,7 +2417,7 @@ short MessageDialog::Execute()
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_NO;
                 break;
-            case VCL_BUTTONS_OK_CANCEL:
+            case VclButtonsType::OkCancel:
                 pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
                 pBtn->Show();
                 pBtn->set_id("ok");
@@ -2478,19 +2478,19 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
     }
     else if (rKey == "buttons")
     {
-        VclButtonsType eMode = VCL_BUTTONS_NONE;
+        VclButtonsType eMode = VclButtonsType::NONE;
         if (rValue.equals("none"))
-            eMode = VCL_BUTTONS_NONE;
+            eMode = VclButtonsType::NONE;
         else if (rValue.equals("ok"))
-            eMode = VCL_BUTTONS_OK;
+            eMode = VclButtonsType::Ok;
         else if (rValue.equals("cancel"))
-            eMode = VCL_BUTTONS_CANCEL;
+            eMode = VclButtonsType::Cancel;
         else if (rValue.equals("close"))
-            eMode = VCL_BUTTONS_CLOSE;
+            eMode = VclButtonsType::Close;
         else if (rValue.equals("yes-no"))
-            eMode = VCL_BUTTONS_YES_NO;
+            eMode = VclButtonsType::YesNo;
         else if (rValue.equals("ok-cancel"))
-            eMode = VCL_BUTTONS_OK_CANCEL;
+            eMode = VclButtonsType::OkCancel;
         else
         {
             SAL_WARN("vcl.layout", "unknown buttons type mode" << rValue.getStr());
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 3be036f..afe09b9 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -294,7 +294,7 @@ bool DigitalSignaturesDialog::canAddRemove()
             //is shown every time until the user presses 'OK'. From then on, the warning
             //is not displayed anymore as long as the signatures dialog is alive.
             if (ScopedVclPtrInstance<MessageDialog>(
-                  nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_NO)
+                  nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_NO)
                 ret = false;
             else
                 m_bWarningShowSignMacro = true;


More information about the Libreoffice-commits mailing list