[Libreoffice-commits] core.git: basctl/source cui/source dbaccess/source include/tools svx/source uui/source vcl/generic vcl/source

Noel Grandin noel at peralex.com
Fri Mar 27 00:35:03 PDT 2015


 basctl/source/basicide/baside3.cxx                      |    6 +--
 cui/source/customize/cfg.cxx                            |    6 +--
 cui/source/dialogs/cuifmsearch.cxx                      |    2 -
 dbaccess/source/ui/dlg/sqlmessage.cxx                   |   30 ++++++++--------
 dbaccess/source/ui/misc/datasourceconnector.cxx         |    2 -
 dbaccess/source/ui/relationdesign/RelationTableView.cxx |    2 -
 include/tools/wintypes.hxx                              |   24 ++++++------
 svx/source/dialog/prtqry.cxx                            |    2 -
 svx/source/tbxctrls/layctrl.cxx                         |    2 -
 uui/source/alreadyopen.cxx                              |    4 +-
 uui/source/filechanged.cxx                              |    2 -
 uui/source/lockfailed.cxx                               |    2 -
 uui/source/openlocked.cxx                               |    2 -
 uui/source/trylater.cxx                                 |    2 -
 vcl/generic/app/gensys.cxx                              |   26 ++++++-------
 vcl/source/control/button.cxx                           |    8 ++--
 vcl/source/control/morebtn.cxx                          |    4 +-
 vcl/source/window/btndlg.cxx                            |    8 ++--
 vcl/source/window/layout.cxx                            |    4 +-
 vcl/source/window/msgbox.cxx                            |   24 ++++++------
 20 files changed, 81 insertions(+), 81 deletions(-)

New commits:
commit 28a1e1dded72badd8ad16417d29b56f9476035d6
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 27 09:33:39 2015 +0200

    fix macro and enum name collision using CamelCase
    
    so that the enum names remain consistent
    
    Change-Id: I656069b484038d3bf17ecbb4f3e26395ca5a1b6d

diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index d4f6441a..12af692 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -913,7 +913,7 @@ NameClashQueryBox::NameClashQueryBox( vcl::Window* pParent,
     AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_RENAME), RET_YES,
         BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
     AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_REPLACE), RET_NO, 0 );
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
 
     SetImage( QueryBox::GetStandardImage() );
 }
@@ -937,8 +937,8 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( vcl::Window* pParent,
     AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_ADD), RET_YES,
         BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
     AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_OMIT), RET_NO, 0 );
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
-    AddButton( StandardButtonType::HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Help, RET_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
 
     SetImage( QueryBox::GetStandardImage() );
 }
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 5771f57..26d0c35 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5309,10 +5309,10 @@ MessBox( pWindow, WB_DEF_YES, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ),  CUI_R
     SetImage( WarningBox::GetStandardImage() );
     SetMessText( ReplaceIconName( aMessage ) );
     RemoveButton( 1 );
-    AddButton( StandardButtonType::SB_YES, 2, 0 );
+    AddButton( StandardButtonType::Yes, 2, 0 );
     AddButton( CUI_RES( RID_SVXSTR_YESTOALL ), 5, 0 );
-    AddButton( StandardButtonType::NO, 3, 0 );
-    AddButton( StandardButtonType::CANCEL, 4, 0 );
+    AddButton( StandardButtonType::No, 3, 0 );
+    AddButton( StandardButtonType::Cancel, 4, 0 );
 }
 
 SvxIconReplacementDialog :: SvxIconReplacementDialog(
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 673b7de..1dbd644 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -77,7 +77,7 @@ void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor )
 FmSearchDialog::FmSearchDialog(vcl::Window* pParent, const OUString& sInitialText, const ::std::vector< OUString >& _rContexts, sal_Int16 nInitialContext,
     const Link& lnkContextSupplier)
     :ModalDialog(pParent, "RecordSearchDialog", "cui/ui/fmsearchdialog.ui")
-    ,m_sCancel( Button::GetStandardText( StandardButtonType::CANCEL ) )
+    ,m_sCancel( Button::GetStandardText( StandardButtonType::Cancel ) )
     ,m_pPreSearchFocus( NULL )
     ,m_lnkContextSupplier(lnkContextSupplier)
     ,m_pConfig( NULL )
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index b47fd5f..a3ded92 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -425,12 +425,12 @@ namespace
         sal_uInt16 nButtonID = 0;
         switch ( _eType )
         {
-        case StandardButtonType::SB_YES:    nButtonID = RET_YES; break;
-        case StandardButtonType::NO:     nButtonID = RET_NO; break;
+        case StandardButtonType::Yes:    nButtonID = RET_YES; break;
+        case StandardButtonType::No:     nButtonID = RET_NO; break;
         case StandardButtonType::OK:     nButtonID = RET_OK; break;
-        case StandardButtonType::CANCEL: nButtonID = RET_CANCEL; break;
-        case StandardButtonType::RETRY:  nButtonID = RET_RETRY; break;
-        case StandardButtonType::HELP:   nButtonID = RET_HELP; break;
+        case StandardButtonType::Cancel: nButtonID = RET_CANCEL; break;
+        case StandardButtonType::Retry:  nButtonID = RET_RETRY; break;
+        case StandardButtonType::Help:   nButtonID = RET_HELP; break;
         default:
             OSL_FAIL( "lcl_addButton: invalid button id!" );
             break;
@@ -564,24 +564,24 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
 {
     if ( _nStyle & WB_YES_NO_CANCEL )
     {
-        lcl_addButton( *this, StandardButtonType::SB_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,    ( _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 );
     }
     else if ( _nStyle & WB_OK_CANCEL )
     {
         lcl_addButton( *this, StandardButtonType::OK,     ( _nStyle & WB_DEF_OK ) != 0 );
-        lcl_addButton( *this, StandardButtonType::CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 );
+        lcl_addButton( *this, StandardButtonType::Cancel, ( _nStyle & WB_DEF_CANCEL ) != 0 );
     }
     else if ( _nStyle & WB_YES_NO )
     {
-        lcl_addButton( *this, StandardButtonType::SB_YES,    ( _nStyle & WB_DEF_YES ) != 0 );
-        lcl_addButton( *this, StandardButtonType::NO,     ( _nStyle & WB_DEF_NO ) != 0 );
+        lcl_addButton( *this, StandardButtonType::Yes,    ( _nStyle & WB_DEF_YES ) != 0 );
+        lcl_addButton( *this, StandardButtonType::No,     ( _nStyle & WB_DEF_NO ) != 0 );
     }
     else if ( _nStyle & WB_RETRY_CANCEL )
     {
-        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,  ( _nStyle & WB_DEF_RETRY ) != 0 );
+        lcl_addButton( *this, StandardButtonType::Cancel, ( _nStyle & WB_DEF_CANCEL ) != 0 );
     }
     else
     {
@@ -591,7 +591,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
 
     if ( !m_sHelpURL.isEmpty() )
     {
-        lcl_addButton( *this, StandardButtonType::HELP, false );
+        lcl_addButton( *this, StandardButtonType::Help, false );
 
         OUString aTmp;
         INetURLObject aHID( m_sHelpURL );
@@ -628,7 +628,7 @@ void OSQLMessageBox::impl_addDetailsButton()
 
     if ( bMoreDetailsAvailable )
     {
-        AddButton( StandardButtonType::MORE, RET_MORE, 0 );
+        AddButton( StandardButtonType::More, RET_MORE, 0 );
         PushButton* pButton = GetPushButton( RET_MORE );
         OSL_ENSURE( pButton, "OSQLMessageBox::impl_addDetailsButton: just added this button, why isn't it there?" );
         pButton->SetClickHdl( LINK( this, OSQLMessageBox, ButtonClickHdl ) );
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index bc583fa..8ed65da 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -161,7 +161,7 @@ namespace dbaui
                     if ( aWarnings.hasValue() )
                     {
                         OUString sMessage( ModuleRes( STR_WARNINGS_DURING_CONNECT ) );
-                        sMessage = sMessage.replaceFirst( "$buttontext$", Button::GetStandardText( StandardButtonType::MORE ) );
+                        sMessage = sMessage.replaceFirst( "$buttontext$", Button::GetStandardText( StandardButtonType::More ) );
                         sMessage = OutputDevice::GetNonMnemonicString( sMessage );
 
                         SQLWarning aContext;
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index dd3861b..38ee81f 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -342,7 +342,7 @@ void ORelationTableView::lookForUiActivities()
         aDlg.RemoveButton(aDlg.GetButtonId(0));
         aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
         aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0);
-        aDlg.AddButton( StandardButtonType::CANCEL,RET_CANCEL,0);
+        aDlg.AddButton( StandardButtonType::Cancel,RET_CANCEL,0);
         sal_uInt16 nRet = aDlg.Execute();
         if( nRet == RET_CANCEL)
         {
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index e042483..897e635 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -298,18 +298,18 @@ enum class SymbolAlign { LEFT, RIGHT };
 enum class StandardButtonType
 {
     OK           = 0,
-    CANCEL       = 1,
-    SB_YES       = 2, // overlaps with YES constant on MacOS
-    NO           = 3,
-    RETRY        = 4,
-    HELP         = 5,
-    CLOSE        = 6,
-    MORE         = 7,
-    SB_IGNORE    = 8, // overlaps with IGNORE constant on Windows
-    ABORT        = 9,
-    LESS         = 10,
-    RESET        = 11,
-    COUNT        = 12,
+    Cancel       = 1,
+    Yes          = 2,
+    No           = 3,
+    Retry        = 4,
+    Help         = 5,
+    Close        = 6,
+    More         = 7,
+    Ignore       = 8,
+    Abort        = 9,
+    Less         = 10,
+    Reset        = 11,
+    Count        = 12,
 };
 
 // prominent place for ListBox window types
diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx
index 6d65338..d14872f 100644
--- a/svx/source/dialog/prtqry.cxx
+++ b/svx/source/dialog/prtqry.cxx
@@ -33,7 +33,7 @@ SvxPrtQryBox::SvxPrtQryBox(vcl::Window* pParent) :
             BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON);
 
     AddButton(SVX_RESSTR(RID_SVXSTR_QRY_PRINT_ALL), 2, 0);
-    AddButton(StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON);
+    AddButton(StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON);
     SetButtonHelpText( RET_OK, OUString() );
 }
 
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 3f7cfb9..c9c98d2 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -665,7 +665,7 @@ void ColumnsWindow::Paint( const Rectangle& )
     if ( nCol )
         aText = OUString::number(nCol);
     else
-        aText = comphelper::string::remove(Button::GetStandardText(StandardButtonType::CANCEL), '~');
+        aText = comphelper::string::remove(Button::GetStandardText(StandardButtonType::Cancel), '~');
 
     Size aTextSize(GetTextWidth( aText ), GetTextHeight());
     DrawText( Point( ( aSize.Width() - aTextSize.Width() ) / 2, aSize.Height() - nTextHeight + 2 ), aText );
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
index d5cf01b..fa83bee 100644
--- a/uui/source/alreadyopen.cxx
+++ b/uui/source/alreadyopen.cxx
@@ -32,14 +32,14 @@ AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, ResMgr* pResMgr,
         AddButton( ResId(STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr).toString(), RET_YES,
                 BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
         AddButton( ResId(STR_ALREADYOPEN_SAVE_BTN, *pResMgr).toString(), RET_NO, 0 );
-        AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+        AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
     }
     else
     {
         AddButton( ResId(STR_ALREADYOPEN_READONLY_BTN, *pResMgr).toString(), RET_YES,
                 BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
         AddButton( ResId(STR_ALREADYOPEN_OPEN_BTN, *pResMgr).toString(), RET_NO, 0 );
-        AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+        AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
     }
 
     SetButtonHelpText( RET_YES, OUString() );
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index 5ab63f7..9b9946c 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -29,7 +29,7 @@ FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, ResMgr* pResMgr
 
     AddButton(ResId(STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr).toString(), RET_YES,
             BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON);
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
 
     SetButtonHelpText( RET_YES, OUString() );
     SetMessText(ResId(STR_FILECHANGED_MSG, *pResMgr).toString());
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index aa75130..875add5 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -30,7 +30,7 @@ LockFailedQueryBox::LockFailedQueryBox( vcl::Window* pParent, ResMgr* pResMgr )
     SetImage( ErrorBox::GetStandardImage() );
 
     AddButton( StandardButtonType::OK, RET_OK, BUTTONDIALOG_OKBUTTON );
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
 
     SetMessText(ResId(STR_LOCKFAILED_MSG, *pResMgr ).toString());
     SetCheckBoxText(ResId(STR_LOCKFAILED_DONTSHOWAGAIN, *pResMgr).toString());
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index a1618bb..ca6883e 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -32,7 +32,7 @@ OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, ResMgr* pResMgr, c
 
     AddButton(ResId(STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr).toString(), RET_NO, 0);
 
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
     SetButtonHelpText( RET_YES, OUString() );
     SetButtonHelpText( RET_NO, OUString() );
 
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
index 1446397..3f5719f 100644
--- a/uui/source/trylater.cxx
+++ b/uui/source/trylater.cxx
@@ -30,7 +30,7 @@ TryLaterQueryBox::TryLaterQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const
     AddButton(ResId(STR_TRYLATER_RETRYSAVING_BTN, *pResMgr).toString(), RET_YES,
             BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON);
     AddButton(ResId(STR_TRYLATER_SAVEAS_BTN, *pResMgr).toString(), RET_NO, 0);
-    AddButton( StandardButtonType::CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+    AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
 
     SetButtonHelpText( RET_YES, OUString() );
     SetButtonHelpText( RET_NO, OUString() );
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx
index 5d1f395..0bd02ee 100644
--- a/vcl/generic/app/gensys.cxx
+++ b/vcl/generic/app/gensys.cxx
@@ -56,22 +56,22 @@ OUString GetNativeMessageBoxButtonText( StandardButtonType nButtonId, bool bUseR
         case StandardButtonType::OK:
             aText = "OK";
             break;
-        case StandardButtonType::CANCEL:
+        case StandardButtonType::Cancel:
             aText = "Cancel";
             break;
-        case StandardButtonType::ABORT:
+        case StandardButtonType::Abort:
             aText = "Abort";
             break;
-        case StandardButtonType::RETRY:
+        case StandardButtonType::Retry:
             aText = "Retry";
             break;
-        case StandardButtonType::SB_IGNORE:
+        case StandardButtonType::Ignore:
             aText = "Ignore";
             break;
-        case StandardButtonType::SB_YES:
+        case StandardButtonType::Yes:
             aText = "Yes";
             break;
-        case StandardButtonType::NO:
+        case StandardButtonType::No:
             aText = "No";
             break;
         default: break;
@@ -109,9 +109,9 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
     if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL ||
         nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO )
     {
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::SB_YES, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Yes, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES;
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::NO, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::No, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO;
         if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO )
             nDefButton = 1;
@@ -122,21 +122,21 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
     {
         if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL )
         {
-            aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::RETRY, bUseResources ) );
+            aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Retry, bUseResources ) );
             nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
         }
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::CANCEL, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Cancel, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL;
         if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL )
             nDefButton = aButtons.size()-1;
     }
     if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE )
     {
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::ABORT, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Abort, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT;
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::RETRY, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Retry, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
-        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::SB_IGNORE, bUseResources ) );
+        aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Ignore, bUseResources ) );
         nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE;
         switch( nDefaultButton )
         {
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 542b54c..f4ca6e6 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -115,7 +115,7 @@ OUString Button::GetStandardText( StandardButtonType eButton )
     {
         sal_uInt32 nResId;
         const char* pDefText;
-    } aResIdAry[static_cast<int>(StandardButtonType::COUNT)] =
+    } aResIdAry[static_cast<int>(StandardButtonType::Count)] =
     {
         { SV_BUTTONTEXT_OK, "~OK" },
         { SV_BUTTONTEXT_CANCEL, "~Cancel" },
@@ -1698,7 +1698,7 @@ void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
     PushButton::ImplInit( pParent, nStyle );
 
-    SetText( Button::GetStandardText( StandardButtonType::CANCEL ) );
+    SetText( Button::GetStandardText( StandardButtonType::Cancel ) );
 }
 
 CancelButton::CancelButton( vcl::Window* pParent, WinBits nStyle ) :
@@ -1742,14 +1742,14 @@ void CancelButton::Click()
 CloseButton::CloseButton( vcl::Window* pParent, WinBits nStyle )
     : CancelButton(pParent, nStyle)
 {
-    SetText( Button::GetStandardText( StandardButtonType::CLOSE ) );
+    SetText( Button::GetStandardText( StandardButtonType::Close ) );
 }
 
 void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
     PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
 
-    SetText( Button::GetStandardText( StandardButtonType::HELP ) );
+    SetText( Button::GetStandardText( StandardButtonType::Help ) );
 }
 
 HelpButton::HelpButton( vcl::Window* pParent, WinBits nStyle ) :
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 9d3701c..95cd171 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -42,8 +42,8 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
 
     PushButton::ImplInit( pParent, nStyle );
 
-    mpMBData->maMoreText = Button::GetStandardText( StandardButtonType::MORE );
-    mpMBData->maLessText = Button::GetStandardText( StandardButtonType::LESS );
+    mpMBData->maMoreText = Button::GetStandardText( StandardButtonType::More );
+    mpMBData->maLessText = Button::GetStandardText( StandardButtonType::Less );
 
     ShowState();
 
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index b211dcf..cb67341 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -298,16 +298,16 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
 
     if ( eType == StandardButtonType::OK )
         nBtnFlags |= BUTTONDIALOG_OKBUTTON;
-    else if ( eType == StandardButtonType::HELP )
+    else if ( eType == StandardButtonType::Help )
         nBtnFlags |= BUTTONDIALOG_HELPBUTTON;
-    else if ( (eType == StandardButtonType::CANCEL) || (eType == StandardButtonType::CLOSE) )
+    else if ( (eType == StandardButtonType::Cancel) || (eType == StandardButtonType::Close) )
         nBtnFlags |= BUTTONDIALOG_CANCELBUTTON;
     pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
 
     // Standard-Buttons have the right text already
     if ( !((eType == StandardButtonType::OK)     && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
-         !((eType == StandardButtonType::CANCEL) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
-         !((eType == StandardButtonType::HELP)   && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
+         !((eType == StandardButtonType::Cancel) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
+         !((eType == StandardButtonType::Help)   && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
     {
         pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
     }
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index a89e176..9c74a18 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2171,14 +2171,14 @@ short MessageDialog::Execute()
                 break;
             case VCL_BUTTONS_YES_NO:
                 pBtn = new PushButton(pButtonBox);
-                pBtn->SetText(Button::GetStandardText(StandardButtonType::SB_YES));
+                pBtn->SetText(Button::GetStandardText(StandardButtonType::Yes));
                 pBtn->Show();
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_YES;
 
                 pBtn = new PushButton(pButtonBox);
                 pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
-                pBtn->SetText(Button::GetStandardText(StandardButtonType::NO));
+                pBtn->SetText(Button::GetStandardText(StandardButtonType::No));
                 pBtn->Show();
                 m_aOwnedButtons.push_back(pBtn);
                 m_aResponses[pBtn] = RET_NO;
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index deb19d7..2c68157 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -76,7 +76,7 @@ void MessBox::ImplInitButtons()
             nOKFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
 
         AddButton( StandardButtonType::OK, RET_OK, nOKFlags );
-        AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
+        AddButton( StandardButtonType::Cancel, RET_CANCEL, nCancelFlags );
     }
     else if ( nStyle & WB_YES_NO )
     {
@@ -86,8 +86,8 @@ void MessBox::ImplInitButtons()
             nNoFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
         nNoFlags |= BUTTONDIALOG_CANCELBUTTON;
 
-        AddButton( StandardButtonType::SB_YES, RET_YES, nYesFlags );
-        AddButton( StandardButtonType::NO, RET_NO, nNoFlags );
+        AddButton( StandardButtonType::Yes, RET_YES, nYesFlags );
+        AddButton( StandardButtonType::No, RET_NO, nNoFlags );
     }
     else if ( nStyle & WB_YES_NO_CANCEL )
     {
@@ -98,9 +98,9 @@ void MessBox::ImplInitButtons()
         else
             nCancelFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
 
-        AddButton( StandardButtonType::SB_YES, RET_YES, nYesFlags );
-        AddButton( StandardButtonType::NO, RET_NO, nNoFlags );
-        AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
+        AddButton( StandardButtonType::Yes, RET_YES, nYesFlags );
+        AddButton( StandardButtonType::No, RET_NO, nNoFlags );
+        AddButton( StandardButtonType::Cancel, RET_CANCEL, nCancelFlags );
     }
     else if ( nStyle & WB_RETRY_CANCEL )
     {
@@ -109,8 +109,8 @@ void MessBox::ImplInitButtons()
         else // WB_DEF_RETRY
             nRetryFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
 
-        AddButton( StandardButtonType::RETRY, RET_RETRY, nRetryFlags );
-        AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags );
+        AddButton( StandardButtonType::Retry, RET_RETRY, nRetryFlags );
+        AddButton( StandardButtonType::Cancel, RET_CANCEL, nCancelFlags );
     }
     else if ( nStyle & WB_ABORT_RETRY_IGNORE )
     {
@@ -124,9 +124,9 @@ void MessBox::ImplInitButtons()
         else if ( nStyle & WB_DEF_IGNORE )
             nIgnoreFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
 
-        AddButton( StandardButtonType::ABORT, RET_CANCEL, nAbortFlags );
-        AddButton( StandardButtonType::RETRY, RET_RETRY, nRetryFlags );
-        AddButton( StandardButtonType::SB_IGNORE, RET_IGNORE, nIgnoreFlags );
+        AddButton( StandardButtonType::Abort, RET_CANCEL, nAbortFlags );
+        AddButton( StandardButtonType::Retry, RET_RETRY, nRetryFlags );
+        AddButton( StandardButtonType::Ignore, RET_IGNORE, nIgnoreFlags );
     }
     else if ( nStyle & WB_OK )
     {
@@ -162,7 +162,7 @@ void MessBox::ImplPosControls()
     {
         if ( !mbHelpBtn )
         {
-            AddButton( StandardButtonType::HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
+            AddButton( StandardButtonType::Help, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
             mbHelpBtn = true;
         }
     }


More information about the Libreoffice-commits mailing list