diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-31 14:25:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-01 06:46:29 +0000 |
commit | b860b73f2ba3322663106eeb1de7e07af6959248 (patch) | |
tree | 939d5596c023d4bfa467ecc3349548cd040d7e7d | |
parent | bf3f3a6bfb08c2d1a2c95f1c1cf62117e0002235 (diff) |
Convert VCL_MESSAGE to scoped enum
Change-Id: I976536849fa5585c96cee23b660c56d3d0116933
Reviewed-on: https://gerrit.libreoffice.org/25720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
70 files changed, 133 insertions, 133 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index a245c400478b..90e33aeb1df7 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -304,7 +304,7 @@ void ModulWindow::BasicExecute() { if ( !aDocument.allowMacros() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); return; } } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index d0ab4a3c0658..1aefb7571677 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -777,7 +777,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, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO); return ( aQueryBox->Execute() == RET_YES ); } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 2d583f74698c..2072c74dcdcd 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -613,7 +613,7 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() && !aDocument.allowMacros() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); return; } } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index e5773252edb9..a46595b4766a 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -847,7 +847,7 @@ void LibPage::InsertLib() } if ( !pLibDlg ) - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VclMessageType::Info)->Execute(); else { bool bChanges = false; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index eec86095bc06..f3e1b62d62d5 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2349,7 +2349,7 @@ IMPL_LINK_NOARG_TYPED( SvxConfigPage, AsyncInfoMsg, void*, void ) // Asynchronous msg because of D&D ScopedVclPtr<MessageDialog>::Create( this, CUI_RES( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), - VCL_MESSAGE_INFO )->Execute(); + VclMessageType::Info )->Execute(); } IMPL_LINK_TYPED( SvxConfigPage, MoveHdl, Button *, pButton, void ) @@ -3249,7 +3249,7 @@ void SvxToolbarConfigPage::DeleteSelectedContent() GetTopLevelSelection()->IsDeletable() ) { ScopedVclPtrInstance<MessageDialog> qbox(this, - CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( qbox->Execute() == RET_YES ) { @@ -3324,7 +3324,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton, case ID_DEFAULT_STYLE: { ScopedVclPtrInstance<MessageDialog> qbox(this, - CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( qbox->Execute() == RET_YES ) { diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 2dabd1cad03a..c68e5d1bf545 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1075,7 +1075,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, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO); aQueryBox->SetText( m_delQueryTitleStr ); if ( aQueryBox->Execute() == RET_NO ) { @@ -1483,7 +1483,7 @@ IMPL_STATIC_LINK_TYPED( SvxScriptErrorDialog, ShowDialog, void*, p, void ) message = OUString( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); } - ScopedVclPtrInstance<MessageDialog> pBox( nullptr, message, VCL_MESSAGE_WARNING ); + ScopedVclPtrInstance<MessageDialog> pBox( nullptr, message, VclMessageType::Warning ); pBox->SetText( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); pBox->Execute(); diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 46034fb9e1b9..14420b0083b2 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -274,7 +274,7 @@ IMPL_LINK_NOARG_TYPED(DbRegistrationOptionsPage, DeleteHdl, Button*, void) SvTreeListEntry* pEntry = m_pPathBox->FirstSelected(); if ( pEntry ) { - ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( aQuery->Execute() == RET_YES ) m_pPathBox->GetModel()->Remove(pEntry); } diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index b056e48b7df3..6ecc562e66ed 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -147,7 +147,7 @@ namespace svx { OUString sMsg = CUI_RES(STR_NAME_CONFLICT); sMsg = sMsg.replaceFirst("$file$", sCurrentText); - ScopedVclPtrInstance< MessageDialog > aError(this, sMsg, VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aError(this, sMsg, VclMessageType::Info); aError->Execute(); m_pName->SetSelection(Selection(0,sCurrentText.getLength())); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index afcde48d7a89..3085f6cf8336 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1206,7 +1206,7 @@ IMPL_LINK_TYPED(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, vo else { DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); - ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO); 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 5468c9e4b5c0..9d91faeca8d8 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -152,7 +152,7 @@ IMPL_LINK_NOARG_TYPED(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void) if ( bFound ) { // duplicate names? - ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VclMessageType::Info)->Execute(); pNameEdit->GrabFocus(); return; } @@ -453,7 +453,7 @@ IMPL_LINK_NOARG_TYPED(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, voi if ( nLang != nOldLang ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VCL_BUTTONS_YES_NO); OUString sTxt(aBox->get_primary_text()); sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); aBox->set_primary_text(sTxt); diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 250cae9b6ad5..025cc395fb1d 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -156,7 +156,7 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* ) officecfg::Office::Common::Misc::UseSwInterpreter::set(mpUseSwInterpreter->IsChecked(), batch); bModified = true; - ScopedVclPtrInstance<MessageDialog> aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO); + ScopedVclPtrInstance<MessageDialog> aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VclMessageType::Info); aWarnBox->Execute(); } diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 48db0bee5e19..4a115ddc8fee 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -532,7 +532,7 @@ void OApplicationController::askToReconnect() bool bClear = true; if ( !m_pSubComponentManager->empty() ) { - ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VCL_BUTTONS_YES_NO); switch (aQry->Execute()) { case RET_YES: diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 2d0b1ff0cadd..358899755b87 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1383,7 +1383,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>::Create(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) + if (ScopedVclPtrInstance<MessageDialog>::Create(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) return false; return true; diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 94d98687a44e..b1d884d1a799 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -257,7 +257,7 @@ IMPL_LINK_TYPED( 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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VclMessageType::Question, VCL_BUTTONS_YES_NO); 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 5613a5fe9b2e..17707c8fd3f6 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -419,7 +419,7 @@ namespace dbaui { OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX)); sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected)); - ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VclMessageType::Question, VCL_BUTTONS_YES_NO); if (RET_YES != aConfirm->Execute()) return; } diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index 26fce195d51d..72e409fefad8 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -306,7 +306,7 @@ namespace dbaui bool bReConnect = true; if ( _bUI ) { - ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VCL_BUTTONS_YES_NO); bReConnect = ( RET_YES == aQuery->Execute() ); } @@ -455,7 +455,7 @@ namespace dbaui if ( !pWin ) pWin = getView()->Window::GetParent(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VclMessageType::Info)->Execute(); } const Reference< XConnection >& DBSubComponentController::getConnection() const { diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 0b2b654ecff0..adb008be31c9 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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VclMessageType::Question, VCL_BUTTONS_YES_NO); if (RET_YES != aAsk->Execute()) return; diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx index 7636431048a6..6b883095776d 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), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); // 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 95b652dc05b1..857395cd088a 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -587,7 +587,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment:: { const SolarMutexGuard guard; ScopedVclPtrInstance<MessageDialog> aInfoBox(pParent, getResId(nResID), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL); bHadWarning = true; if ( RET_OK == aInfoBox->Execute() ) @@ -627,7 +627,7 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const { const SolarMutexGuard guard; ScopedVclPtrInstance<MessageDialog> aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL); OUString sText(aInfo->get_primary_text()); sText = sText.replaceAll("%NAME", rExtensionName); @@ -788,7 +788,7 @@ bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const { const SolarMutexGuard guard; ScopedVclPtrInstance<MessageDialog> aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL); 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 6794269da175..a440d9ed1722 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -449,7 +449,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { SolarMutexGuard guard; ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, - ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + ResId(id, *DeploymentGuiResMgr::get()), VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL); OUString s; if (bEqualNames) { diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 39add29e7d93..9c40f395e491 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -378,7 +378,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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO); 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 2aaf8bce1e81..def9876347f8 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -262,7 +262,7 @@ namespace abp if ( aTables.empty() ) { - if (RET_YES != ScopedVclPtrInstance<MessageDialog>::Create(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_YES != ScopedVclPtrInstance<MessageDialog>::Create(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VCL_BUTTONS_YES_NO)->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 df077f8431eb..6181f31a9cf0 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -614,7 +614,7 @@ IMPL_LINK_TYPED( SaneDlg, ClickBtnHdl, Button*, pButton, void ) aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) ); - ScopedVclPtrInstance< MessageDialog > aInfoBox(this, aString, VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aInfoBox(this, aString, VclMessageType::Info); aInfoBox->Execute(); } else if( pButton == mpPreviewButton ) @@ -890,7 +890,7 @@ void SaneDlg::AcquirePreview() if( nOption == -1 ) { OUString aString(SaneResId(STR_SLOW_PREVIEW)); - ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL); if (aBox->Execute() == RET_CANCEL) return; } diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 432f9e57ef20..e53473d2ddab 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -900,7 +900,7 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportPDFAHdl, CheckBox&, void // if a password was set, inform the user that this will not be used in PDF/A case if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING); + ScopedVclPtrInstance< MessageDialog > aBox(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VclMessageType::Warning); aBox->Execute(); } } diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 9e6d9dcc955c..56beb4dc395d 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -851,7 +851,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, { OUString sMsg = fpicker::SvtResId( STR_SVT_DELETESERVICE ); sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() ); - ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO ); + ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO ); if( aBox->Execute() == RET_YES ) { @@ -1149,7 +1149,7 @@ IMPL_LINK_NOARG_TYPED ( RemoteFilesDialog, OkHdl, Button*, void ) { OUString sMsg = fpicker::SvtResId( STR_SVT_ALREADYEXISTOVERWRITE ); sMsg = sMsg.replaceFirst( "$filename$", sName ); - ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO ); + ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO ); if( aBox->Execute() != RET_YES ) return; } diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index d658e92ee200..fc9663fe0c18 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1087,7 +1087,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid) "$filename$", aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) ); - ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( aBox->Execute() != RET_YES ) return; } diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index a968040b9c29..a3e21042989c 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -621,12 +621,12 @@ enum VclButtonsType VCL_BUTTONS_OK_CANCEL }; -enum VclMessageType +enum class VclMessageType { - VCL_MESSAGE_INFO, - VCL_MESSAGE_WARNING, - VCL_MESSAGE_QUESTION, - VCL_MESSAGE_ERROR + Info, + Warning, + Question, + Error }; class VCL_DLLPUBLIC MessageDialog : public Dialog @@ -655,7 +655,7 @@ public: MessageDialog(vcl::Window* pParent, const OUString &rMessage, - VclMessageType eMessageType = VCL_MESSAGE_ERROR, + VclMessageType eMessageType = VclMessageType::Error, VclButtonsType eButtonsType = VCL_BUTTONS_OK, WinBits nStyle = WB_MOVEABLE | WB_3DLOOK | WB_CLOSEABLE); MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription); diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index ace439883bee..e0f4e9267d03 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -263,7 +263,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, AddHdl, Button*, void) { sal_uInt16 nRet = ScopedVclPtr<MessageDialog>::Create(this, ScGlobal::GetRscString(STR_INVALID_AFNAME), - VCL_MESSAGE_ERROR, + VclMessageType::Error, VCL_BUTTONS_OK_CANCEL )->Execute(); @@ -383,7 +383,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) { bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create( this, ScGlobal::GetRscString(STR_INVALID_AFNAME), - VCL_MESSAGE_ERROR, + VclMessageType::Error, VCL_BUTTONS_OK_CANCEL )->Execute(); } diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 8cf0202b979d..06d46343a4d8 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>::Create(this, *pMsg, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); pEd->GrabFocus(); } diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 38b2e48d11d1..e3dee04acf1b 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -1153,7 +1153,7 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, FinishHdl, Button*, void) if (iter != m_aDesignList.end()) { ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME), - VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO); + VclMessageType::Error, VCL_BUTTONS_YES_NO); bRetry = aErrorBox->Execute() == RET_NO; if(!bRetry) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 11f371e54013..530da42b8db4 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), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); aQuestionBox->SetText(SD_RESSTR(STR_PAGE_BACKGROUND_TITLE)); bSetToAllPages = ( RET_YES == aQuestionBox->Execute() ); } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 5cae4f923ae3..de41df2d55c0 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1180,7 +1180,7 @@ void Outliner::ShowEndOfSearchDialog() // Show the message in an info box that is modal with respect to the // whole application. - ScopedVclPtrInstance< MessageDialog > aInfoBox(nullptr, aString, VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aInfoBox(nullptr, aString, VclMessageType::Info); ShowModalMessageBox (*aInfoBox.get()); } diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 4f1d71c70aef..bcae942bd5bc 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -830,7 +830,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) ScopedVclPtrInstance<MessageDialog> aSecurityWarningBox(pWindow, SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS), - VCL_MESSAGE_WARNING); + VclMessageType::Warning); aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() ); aSecurityWarningBox->Execute(); return; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 39babcdc32f4..9c85b166279c 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1052,7 +1052,7 @@ IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, SearchHdl, LinkParamNone*, void) if ( aFactories.empty() ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VclMessageType::Info); aBox->Execute(); } } @@ -2270,7 +2270,7 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg) else { DBG_ASSERT( pSrchDlg, "no search dialog" ); - ScopedVclPtrInstance< MessageDialog > aBox(pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VclMessageType::Info); aBox->Execute(); pSrchDlg->SetFocusOnEdit(); } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index eb4039fbb2af..644a43cc871f 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1657,7 +1657,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>::Create(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK) + if (ScopedVclPtrInstance<MessageDialog>::Create(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->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/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 93da4a54c9a8..3290ae18bddf 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -616,7 +616,7 @@ SfxTabPage::sfxpg SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet if (!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' '))) { - ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDNAME ), VclMessageType::Info); aBox->Execute(); m_pNameRw->GrabFocus(); m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); @@ -633,7 +633,7 @@ SfxTabPage::sfxpg SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet { if ( !pStyle->SetFollow( aFollowEntry ) ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VclMessageType::Info); aBox->Execute(); m_pFollowLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; @@ -653,7 +653,7 @@ SfxTabPage::sfxpg SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet { if ( !pStyle->SetParent( aParentEntry ) ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VclMessageType::Info); aBox->Execute(); m_pBaseLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 29eae5c9070c..db3d03edb36f 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -40,7 +40,7 @@ IMPL_LINK_NOARG_TYPED( SfxNewStyleDlg, OKHdl, ComboBox&, void ) { if ( !pStyle->IsUserDefined() ) { - ScopedVclPtrInstance<MessageDialog>::Create( this, SfxResId( STR_POOL_STYLE_NAME ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( this, SfxResId( STR_POOL_STYLE_NAME ), VclMessageType::Info )->Execute(); return; } @@ -59,7 +59,7 @@ IMPL_LINK_TYPED( 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), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)) + VclMessageType::Question, VCL_BUTTONS_YES_NO)) , rPool(rInPool) { get(m_pColBox, "stylename"); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index a6bf7d5adf43..fe830110d630 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1937,10 +1937,10 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl() { #if defined UNX ScopedVclPtrInstance<MessageDialog> aBox(SfxGetpApp()->GetTopWindow(), aMsg, - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); #else ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg, - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); #endif aApproved = aBox->Execute() == RET_YES; } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index a6219aa3947d..6f4ac53d4933 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -654,7 +654,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), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL); + VclMessageType::Question, VCL_BUTTONS_OK_CANCEL); if ( aMessageBox->Execute() == RET_OK ) nResult = STATUS_SAVEAS; else @@ -1397,7 +1397,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo || SignatureState::PARTIAL_OK == nDocumentSignatureState) { if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) + VclMessageType::Question, VCL_BUTTONS_YES_NO)->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 aa7f9132f299..77c17d2aa891 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -861,7 +861,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } case SID_CANCELCHECKOUT: { - if (ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + if (ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) { CancelCheckOut( ); @@ -1379,7 +1379,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) ) { // Only OASIS and OOo6.x formats will be handled further - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); return; } @@ -1413,8 +1413,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) if ( nVersion >= SvtSaveOptions::ODFVER_012 ) { - if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) - || (!bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) + if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + || (!bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) { sal_uInt16 nId = SID_SAVEDOC; if ( !GetMedium() || GetMedium()->GetName().isEmpty() ) @@ -1430,7 +1430,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) || SotStorage::GetVersion( GetMedium()->GetStorage() ) <= SOFFICE_FILEFORMAT_60 ) ) { // Only OASIS format will be handled further - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); return; } } diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx index beef6e60b3e8..28025e1bf984 100644 --- a/sfx2/source/doc/saveastemplatedlg.cxx +++ b/sfx2/source/doc/saveastemplatedlg.cxx @@ -69,7 +69,7 @@ void SfxSaveAsTemplateDialog::setDocumentModel(const uno::Reference<frame::XMode IMPL_LINK_NOARG_TYPED(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void) { - ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VCL_BUTTONS_YES_NO); if(!IsTemplateNameUnique()) { diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index d8dbb56b3799..c0b478c5ffdb 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -827,7 +827,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, EditTemplateHdl, ThumbnailViewItem*, pIte IMPL_LINK_TYPED(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, void) { - ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( aQueryDlg->Execute() != RET_YES ) return; @@ -1267,7 +1267,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete() OUString sCategory = aDlg->GetSelectedCategory(); aDlg->Close(); ScopedVclPtrInstance< MessageDialog > popupDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( popupDlg->Execute() != RET_YES ) return; diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 0c93e93dd636..120470fc6dc2 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -490,14 +490,14 @@ bool SfxClassificationHelper::ShowPasteInfo(SfxClassificationCheckPasteResult eR case SfxClassificationCheckPasteResult::TargetDocNotClassified: { if (!Application::IsHeadlessModeEnabled()) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VclMessageType::Info)->Execute(); return false; } break; case SfxClassificationCheckPasteResult::DocClassificationTooLow: { if (!Application::IsHeadlessModeEnabled()) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VclMessageType::Info)->Execute(); return false; } break; diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 3545508973bc..0ee0d601a593 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -488,7 +488,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), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( RET_YES == aBox->Execute() ) { SfxApplication* pApp = SfxGetpApp(); @@ -571,7 +571,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) ) { ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); bDo = ( RET_YES == aBox->Execute() ); } @@ -747,7 +747,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { // ask user for opening as template ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); if ( RET_YES == aBox->Execute() ) { SfxAllItemSet aSet( pApp->GetPool() ); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index ad240875f81d..1ce85c40da02 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -520,7 +520,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>::Create(nullptr, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() ) + RET_YES == ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() ) { // Flags with changes for <SetPrinter(SfxPrinter*)> are maintained nChangedFlags |= nNewOpt; @@ -805,7 +805,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // if printer is busy, abort configuration if ( !bSilent ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VclMessageType::Info)->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); return; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 0852c1d255e6..a957c1440d98 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -529,7 +529,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - ScopedVclPtrInstance< MessageDialog > aBox(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VclMessageType::Info); aBox->Execute(); rReq.Ignore(); } @@ -549,7 +549,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() ); if( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - ScopedVclPtrInstance< MessageDialog > aBox(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aBox(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VclMessageType::Info); aBox->Execute(); rReq.Ignore(); } @@ -1145,7 +1145,7 @@ bool SfxViewShell::PrepareClose { if ( bUI ) { - ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO ); + ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VclMessageType::Info ); aInfoBox->Execute(); } diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index c07fcaf59b6e..b1f8e452b0a6 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -122,7 +122,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque // No suitable JRE found SolarMutexGuard aSolarGuard; m_bJavaNotFound_Handled = true; - ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND), VCL_MESSAGE_WARNING); + ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND), VclMessageType::Warning); aWarningBox->SetText(SvtResId(STR_WARNING_JAVANOTFOUND_TITLE)); nResult = aWarningBox->Execute(); } @@ -139,9 +139,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bInvalidSettings_Handled = true; #ifdef MACOSX - ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VCL_MESSAGE_WARNING); + ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VclMessageType::Warning); #else - ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_INVALIDJAVASETTINGS), VCL_MESSAGE_WARNING); + ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_INVALIDJAVASETTINGS), VclMessageType::Warning); #endif aWarningBox->SetText(SvtResId(STR_WARNING_INVALIDJAVASETTINGS_TITLE)); nResult = aWarningBox->Execute(); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index e4c4b874776c..a820a59e14a7 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -849,7 +849,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry, short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes) { - ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VCL_BUTTONS_YES_NO); 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 f6341523e8e9..6db0f72e1255 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -956,7 +956,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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, false ) ); @@ -999,7 +999,7 @@ namespace svxform SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" ); } ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(nResId), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sSearch, sName); aQBox->set_primary_text(sMessText); @@ -1599,7 +1599,7 @@ namespace svxform else if (sIdent == "modelsremove") { ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); OUString sText = aQBox->get_primary_text(); sText = sText.replaceFirst( MODELNAME, sSelectedModel ); aQBox->set_primary_text(sText); @@ -1700,7 +1700,7 @@ namespace svxform { OUString sInstName = pPage->GetInstanceName(); ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclMessageType::Question, VCL_BUTTONS_YES_NO); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName ); aQBox->set_primary_text(sMessText); 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<MessageDialog>::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_WRONG_PASSWORD), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_NO == ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + RET_NO == ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::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<MessageDialog>::Create(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::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<MessageDialog>::Create(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index bde5c24684bd..fe4dcff0d091 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 = ScopedVclPtr<MessageDialog>::Create(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute(); + VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute(); if(RET_YES == nRet) { SwUnoInternalPaM aPam(*pWrtShell->GetDoc()); @@ -421,7 +421,7 @@ The code below would only be part of the solution. OUString sInfo(SW_RES(STR_SPELLING_COMPLETED)); // #i84610# vcl::Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5 - ScopedVclPtrInstance<MessageDialog>::Create(pTemp, sInfo, VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(pTemp, sInfo, VclMessageType::Info)->Execute(); LockFocusNotification( false ); // take care that the now valid selection is stored LoseFocus(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 08bf9c1b29d3..69e49e4d576d 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -325,7 +325,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam rCfg.IsSaveRelFile(), pOnlyText ); if(nSuccess == (sal_uInt16) -1 ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); } if( !pCurGrp ) delete pTmp; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 10c4f2d6235d..8523785aed1d 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1705,7 +1705,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, if( bMsg && nResId ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VclMessageType::Info)->Execute(); } return bRet; } @@ -1779,7 +1779,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( !IsError( aReader.Read( *pRead )) ) bRet = true; else if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info )->Execute(); } else { @@ -2157,7 +2157,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if (nRows > USHRT_MAX || nCols > USHRT_MAX) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2166,7 +2166,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if( !nRows || !nCols ) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2709,7 +2709,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } @@ -2748,7 +2748,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 4681b22897a7..2fe8d820b56e 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -762,7 +762,7 @@ void SwTableShell::Execute(SfxRequest &rReq) case TBLMERGE_TOOCOMPLEX: { ScopedVclPtrInstance<MessageDialog> aInfoBox( GetView().GetWindow(), - SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO ); + SW_RES( STR_ERR_TABLE_MERGE ), VclMessageType::Info ); aInfoBox->Execute(); break; } diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index b369b4e6c70a..da4e49a27909 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -815,7 +815,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) else { vcl::Window *pTmpWindow = &GetViewFrame()->GetWindow(); - ScopedVclPtrInstance<MessageDialog>::Create(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); } } else diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 115ba4d22865..0c5c8e4b992f 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -183,7 +183,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) if( !bDone ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_SCAN_NOSOURCE), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info )->Execute(); rReq.Ignore(); } else diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 9fb52ac1cb44..996733be191c 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -503,7 +503,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { if( bShowError ) { - ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SW_RESSTR( nResId ), VclMessageType::Info); aInfoBox->Execute(); } rReq.Ignore(); @@ -2256,7 +2256,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe if (!bCompare && !nFound) { vcl::Window* pWin = &GetEditWin(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, SW_RES(STR_NO_MERGE_ENTRY), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); } if( nRet==2 && xDocSh.Is() ) xDocSh->DoClose(); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 30094b7edd2c..905ceca86120 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -461,7 +461,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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VCL_BUTTONS_YES_NO); if( aBox->Execute() == RET_YES ) { bOther = true; diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index e7855d887172..ff84bd68024d 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -175,7 +175,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) } else { - ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO); + ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VclMessageType::Info); sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo)))); aInfoBox->Execute(); diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index fcf7b9d129c7..d30784625d32 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -39,7 +39,7 @@ void ShowServiceNotAvailableError(vcl::Window* pParent, { OUString aText = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE). replaceAll("%s", rServiceName); - ScopedVclPtrInstance< MessageDialog > aBox( pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING ); + ScopedVclPtrInstance< MessageDialog > aBox( pParent, aText, bError ? VclMessageType::Error : VclMessageType::Warning ); aBox->Execute(); } diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 7174c758758c..fc2a28aad420 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -801,7 +801,7 @@ void Edit::ShowTruncationWarning( vcl::Window* pParent ) ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) { - ScopedVclPtrInstance< MessageDialog > aBox( pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VCL_MESSAGE_WARNING ); + ScopedVclPtrInstance< MessageDialog > aBox( pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VclMessageType::Warning ); aBox->Execute(); } } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index b099a9681021..8c583dca6285 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2001,7 +2001,7 @@ void MessageDialog::create_owned_areas() MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle) : Dialog(pParent, nStyle) , m_eButtonsType(VCL_BUTTONS_NONE) - , m_eMessageType(VCL_MESSAGE_INFO) + , m_eMessageType(VclMessageType::Info) , m_pOwnedContentArea(nullptr) , m_pOwnedActionArea(nullptr) , m_pGrid(nullptr) @@ -2033,7 +2033,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_eMessageType(VCL_MESSAGE_INFO) + , m_eMessageType(VclMessageType::Info) , m_pOwnedContentArea(nullptr) , m_pOwnedActionArea(nullptr) , m_pGrid(nullptr) @@ -2156,16 +2156,16 @@ short MessageDialog::Execute() m_pImage = VclPtr<FixedImage>::Create(m_pGrid, WB_CENTER | WB_VCENTER | WB_3DLOOK); switch (m_eMessageType) { - case VCL_MESSAGE_INFO: + case VclMessageType::Info: m_pImage->SetImage(InfoBox::GetStandardImage()); break; - case VCL_MESSAGE_WARNING: + case VclMessageType::Warning: m_pImage->SetImage(WarningBox::GetStandardImage()); break; - case VCL_MESSAGE_QUESTION: + case VclMessageType::Question: m_pImage->SetImage(QueryBox::GetStandardImage()); break; - case VCL_MESSAGE_ERROR: + case VclMessageType::Error: m_pImage->SetImage(ErrorBox::GetStandardImage()); break; } @@ -2283,15 +2283,15 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue) set_secondary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); else if (rKey == "message-type") { - VclMessageType eMode = VCL_MESSAGE_INFO; + VclMessageType eMode = VclMessageType::Info; if (rValue.equals("info")) - eMode = VCL_MESSAGE_INFO; + eMode = VclMessageType::Info; else if (rValue.equals("warning")) - eMode = VCL_MESSAGE_WARNING; + eMode = VclMessageType::Warning; else if (rValue.equals("question")) - eMode = VCL_MESSAGE_QUESTION; + eMode = VclMessageType::Question; else if (rValue.equals("error")) - eMode = VCL_MESSAGE_ERROR; + eMode = VclMessageType::Error; else { SAL_WARN("vcl.layout", "unknown message type mode" << rValue.getStr()); diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 476da3da7d1c..e7777ceb9e83 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -245,7 +245,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures( } else { - ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING); + ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VclMessageType::Warning); aBox->Execute(); } diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 91bf1c33de0a..3fe698598443 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -278,7 +278,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 (ScopedVclPtr<MessageDialog>::Create( - nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_NO) + nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_NO) ret = false; else m_bWarningShowSignMacro = true; |