From b860b73f2ba3322663106eeb1de7e07af6959248 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 31 May 2016 14:25:11 +0200 Subject: Convert VCL_MESSAGE to scoped enum Change-Id: I976536849fa5585c96cee23b660c56d3d0116933 Reviewed-on: https://gerrit.libreoffice.org/25720 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/chrdlg/break.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 10 +++++----- sw/source/ui/index/swuiidxmrk.cxx | 2 +- sw/source/ui/misc/glossary.cxx | 10 +++++----- sw/source/ui/misc/srtdlg.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- sw/source/ui/table/tautofmt.cxx | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 4f53dff41419..9107ec55073e 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -114,7 +114,7 @@ IMPL_LINK_NOARG_TYPED(SwBreakDlg, OkHdl, Button*, void) default:; //prevent warning } if(!bOk) { - ScopedVclPtrInstance::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); m_pPageNumEdit->GrabFocus(); return; } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 3c3e65ff06f8..12b0bb612cb6 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -413,7 +413,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) } else { - ScopedVclPtrInstance::Create(this, SW_RES(STR_WRONG_PASSWORD), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); } } } @@ -978,7 +978,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, UseFileHdl, Button *, pButton, void ) bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { - if (RET_NO == ScopedVclPtrInstance::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_NO == ScopedVclPtrInstance::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } if( bFile ) @@ -1254,7 +1254,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void ) } else { - ScopedVclPtrInstance::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); ChangePasswdHdl(pBox); break; } @@ -1697,7 +1697,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, voi } else { - ScopedVclPtrInstance::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); } } else if(!bChange) @@ -1721,7 +1721,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) if( pBox->IsChecked() ) { if( m_pWrtSh->HasSelection() && - RET_NO == ScopedVclPtrInstance::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + RET_NO == ScopedVclPtrInstance::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 2419980d65ad..ef95072e5e23 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1215,7 +1215,7 @@ IMPL_LINK_NOARG_TYPED(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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VCL_BUTTONS_YES_NO); if(RET_YES != aQuery->Execute()) return; } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index b84742525609..16b8357b5d94 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -462,7 +462,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) const OUString aShortName(m_pShortNameEdit->GetText()); if(pGlossaryHdl->HasShortName(aShortName)) { - ScopedVclPtrInstance::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX)); m_pShortNameEdit->GrabFocus(); return true; @@ -520,7 +520,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) } else if (sItemIdent == "delete") { - ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO); if (RET_YES == aQuery->Execute()) { const OUString aShortName(m_pShortNameEdit->GetText()); @@ -599,7 +599,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) Init(); else { - ScopedVclPtrInstance::Create(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); } } } @@ -678,7 +678,7 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, BibHdl, Button*, void) } else { - ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VclMessageType::Question, VCL_BUTTONS_YES_NO); if(RET_YES == aBox->Execute()) PathHdl(m_pPathBtn); @@ -812,7 +812,7 @@ IMPL_LINK_NOARG_TYPED(SwNewGlosNameDlg, Rename, Button*, void) if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText()) && sNew != m_pOldShort->GetText() ) { - ScopedVclPtrInstance::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pNewShort->GrabFocus(); } else diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index d5d1f8794c96..09646029b763 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -365,7 +365,7 @@ void SwSortDlg::Apply() } if( !bRet ) - ScopedVclPtrInstance::Create( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create( this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); } IMPL_LINK_TYPED( SwSortDlg, DelimHdl, Button*, pButton, void ) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index ce1ea9b90ed7..ff04a0f6e637 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -628,7 +628,7 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) OUString sTableName = m_pNameED->GetText(); if(sTableName.indexOf(' ') != -1) { - ScopedVclPtrInstance::Create(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance::Create(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); m_pNameED->GrabFocus(); return KEEP_PAGE; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 38d8dad14889..691bf1ee647a 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -357,7 +357,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) if( !bFormatInserted ) { - bOk = RET_CANCEL == ScopedVclPtr::Create(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtr::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } @@ -455,7 +455,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) if( !bFormatRenamed ) { - bOk = RET_CANCEL == ScopedVclPtr::Create(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtr::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } -- cgit v1.2.3