convert VclButtonsType to scoped enum
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1 Reviewed-on: https://gerrit.libreoffice.org/32285 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
This commit is contained in:
parent
c7964e48b6
commit
6b8ee3c9ba
@ -768,7 +768,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent )
|
||||
aNameBuf.append('\'');
|
||||
aNameBuf.insert(0, '\'');
|
||||
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
return ( aQueryBox->Execute() == RET_YES );
|
||||
}
|
||||
|
||||
|
@ -3302,7 +3302,7 @@ void SvxToolbarConfigPage::DeleteSelectedContent()
|
||||
GetTopLevelSelection()->IsDeletable() )
|
||||
{
|
||||
ScopedVclPtrInstance<MessageDialog> qbox(this,
|
||||
CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( qbox->Execute() == RET_YES )
|
||||
{
|
||||
@ -4742,7 +4742,7 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, ResetTopLevelHdl, Button *, void )
|
||||
static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos ));
|
||||
|
||||
ScopedVclPtrInstance<MessageDialog> qbox(this,
|
||||
CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( qbox->Execute() == RET_YES )
|
||||
{
|
||||
|
@ -1064,7 +1064,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
|
||||
Reference< browse::XBrowseNode > node = getBrowseNode( pEntry );
|
||||
// ISSUE L10N string & can we centre list?
|
||||
OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 );
|
||||
VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
aQueryBox->SetText( m_delQueryTitleStr );
|
||||
if ( aQueryBox->Execute() == RET_NO )
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl, Button*, void)
|
||||
SvTreeListEntry* pEntry = m_pPathBox->FirstSelected();
|
||||
if ( pEntry )
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aQuery->Execute() == RET_YES )
|
||||
m_pPathBox->GetModel()->Remove(pEntry);
|
||||
}
|
||||
|
@ -1172,7 +1172,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void )
|
||||
else
|
||||
{
|
||||
DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme");
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE));
|
||||
if(RET_YES == aQuery->Execute())
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, void)
|
||||
|
||||
if ( nLang != nOldLang )
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
OUString sTxt(aBox->get_primary_text());
|
||||
sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() );
|
||||
aBox->set_primary_text(sTxt);
|
||||
|
@ -517,7 +517,7 @@ void OApplicationController::askToReconnect()
|
||||
bool bClear = true;
|
||||
if ( !m_pSubComponentManager->empty() )
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
switch (aQry->Execute())
|
||||
{
|
||||
case RET_YES:
|
||||
|
@ -1370,7 +1370,7 @@ void SbaXDataBrowserController::resetted(const css::lang::EventObject& rEvent) t
|
||||
|
||||
sal_Bool SbaXDataBrowserController::confirmDelete(const css::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception )
|
||||
{
|
||||
if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
|
||||
if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VclButtonsType::YesNo)->Execute() != RET_YES)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -257,7 +257,7 @@ IMPL_LINK( OUserAdmin, UserHdl, Button *, pButton, void )
|
||||
Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
|
||||
if(xDrop.is())
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if(aQry->Execute() == RET_YES)
|
||||
xDrop->dropByName(GetUser());
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ namespace dbaui
|
||||
{
|
||||
OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX));
|
||||
sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected));
|
||||
ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if (RET_YES != aConfirm->Execute())
|
||||
return;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ namespace dbaui
|
||||
bool bReConnect = true;
|
||||
if ( _bUI )
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
bReConnect = ( RET_YES == aQuery->Execute() );
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ void OTableController::doEditIndexes()
|
||||
// table needs to be saved before editing indexes
|
||||
if (m_bNew || isModified())
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if (RET_YES != aAsk->Execute())
|
||||
return;
|
||||
|
||||
|
@ -39,7 +39,7 @@ bool Lockfile_execWarning( Lockfile * that )
|
||||
|
||||
// display warning and return response
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(nullptr, DesktopResId(STR_QUERY_USERDATALOCKED),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
// set box title
|
||||
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
|
||||
aBox->SetText( aTitle );
|
||||
|
@ -387,7 +387,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
|
||||
{
|
||||
const SolarMutexGuard guard;
|
||||
ScopedVclPtrInstance<MessageDialog> aInfoBox(pParent, getResId(nResID),
|
||||
VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
|
||||
VclMessageType::Warning, VclButtonsType::OkCancel);
|
||||
bHadWarning = true;
|
||||
|
||||
if ( RET_OK == aInfoBox->Execute() )
|
||||
@ -428,7 +428,7 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
|
||||
{
|
||||
const SolarMutexGuard guard;
|
||||
ScopedVclPtrInstance<MessageDialog> aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
|
||||
VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
|
||||
VclMessageType::Warning, VclButtonsType::OkCancel);
|
||||
|
||||
OUString sText(aInfo->get_primary_text());
|
||||
sText = sText.replaceAll("%NAME", rExtensionName);
|
||||
@ -592,7 +592,7 @@ bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
|
||||
{
|
||||
const SolarMutexGuard guard;
|
||||
ScopedVclPtrInstance<MessageDialog> aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
|
||||
VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
|
||||
VclMessageType::Warning, VclButtonsType::OkCancel);
|
||||
|
||||
OUString sText(aInfo->get_primary_text());
|
||||
sText = sText.replaceAll("%NAME", rExtensionName);
|
||||
|
@ -432,7 +432,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
|
||||
{
|
||||
SolarMutexGuard guard;
|
||||
ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr,
|
||||
ResId(id, *DeploymentGuiResMgr::get()), VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
|
||||
ResId(id, *DeploymentGuiResMgr::get()), VclMessageType::Warning, VclButtonsType::OkCancel);
|
||||
OUString s;
|
||||
if (bEqualNames)
|
||||
{
|
||||
|
@ -370,7 +370,7 @@ bool SvxSpellWrapper::SpellNext( )
|
||||
WAIT_OFF();
|
||||
|
||||
sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(pWin, EditResId(nResId), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aBox->Execute() != RET_YES )
|
||||
{
|
||||
// sacrifice the other area if necessary ask for special area
|
||||
|
@ -260,7 +260,7 @@ namespace abp
|
||||
|
||||
if ( aTables.empty() )
|
||||
{
|
||||
if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
|
||||
if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
|
||||
{
|
||||
// cannot ask the user, or the user chose to use this data source, though there are no tables
|
||||
bAllow = false;
|
||||
|
@ -883,7 +883,7 @@ void SaneDlg::AcquirePreview()
|
||||
if( nOption == -1 )
|
||||
{
|
||||
OUString aString(SaneResId(STR_SLOW_PREVIEW));
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VCL_BUTTONS_OK_CANCEL);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VclMessageType::Warning, VclButtonsType::OkCancel);
|
||||
if (aBox->Execute() == RET_CANCEL)
|
||||
return;
|
||||
}
|
||||
|
@ -853,7 +853,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void )
|
||||
{
|
||||
OUString sMsg = fpicker::SvtResId( STR_SVT_DELETESERVICE );
|
||||
sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() );
|
||||
ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO );
|
||||
ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VclButtonsType::YesNo );
|
||||
|
||||
if( aBox->Execute() == RET_YES )
|
||||
{
|
||||
@ -1158,7 +1158,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, Button*, void )
|
||||
{
|
||||
OUString sMsg = fpicker::SvtResId( STR_SVT_ALREADYEXISTOVERWRITE );
|
||||
sMsg = sMsg.replaceFirst( "$filename$", sName );
|
||||
ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO );
|
||||
ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VclMessageType::Question, VclButtonsType::YesNo );
|
||||
if( aBox->Execute() != RET_YES )
|
||||
return;
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
|
||||
"$filename$",
|
||||
aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)
|
||||
);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aBox->Execute() != RET_YES )
|
||||
return;
|
||||
}
|
||||
|
@ -620,14 +620,14 @@ public:
|
||||
bool set_property(const OString &rKey, const OString &rValue);
|
||||
};
|
||||
|
||||
enum VclButtonsType
|
||||
enum class VclButtonsType
|
||||
{
|
||||
VCL_BUTTONS_NONE,
|
||||
VCL_BUTTONS_OK,
|
||||
VCL_BUTTONS_CLOSE,
|
||||
VCL_BUTTONS_CANCEL,
|
||||
VCL_BUTTONS_YES_NO,
|
||||
VCL_BUTTONS_OK_CANCEL
|
||||
NONE,
|
||||
Ok,
|
||||
Close,
|
||||
Cancel,
|
||||
YesNo,
|
||||
OkCancel
|
||||
};
|
||||
|
||||
enum class VclMessageType
|
||||
@ -665,7 +665,7 @@ public:
|
||||
MessageDialog(vcl::Window* pParent,
|
||||
const OUString &rMessage,
|
||||
VclMessageType eMessageType = VclMessageType::Error,
|
||||
VclButtonsType eButtonsType = VCL_BUTTONS_OK);
|
||||
VclButtonsType eButtonsType = VclButtonsType::Ok);
|
||||
MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
|
||||
virtual bool set_property(const OString &rKey, const OString &rValue) override;
|
||||
virtual short Execute() override;
|
||||
|
@ -264,7 +264,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl, Button*, void)
|
||||
sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(this,
|
||||
ScGlobal::GetRscString(STR_INVALID_AFNAME),
|
||||
VclMessageType::Error,
|
||||
VCL_BUTTONS_OK_CANCEL
|
||||
VclButtonsType::OkCancel
|
||||
)->Execute();
|
||||
|
||||
bOk = ( nRet == RET_CANCEL );
|
||||
@ -383,7 +383,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl, Button*, void)
|
||||
bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>( this,
|
||||
ScGlobal::GetRscString(STR_INVALID_AFNAME),
|
||||
VclMessageType::Error,
|
||||
VCL_BUTTONS_OK_CANCEL
|
||||
VclButtonsType::OkCancel
|
||||
)->Execute();
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
|
||||
break;
|
||||
}
|
||||
|
||||
ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute();
|
||||
ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VclButtonsType::OkCancel)->Execute();
|
||||
pEd->GrabFocus();
|
||||
}
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl, Button*, void)
|
||||
if (iter != m_aDesignList.end())
|
||||
{
|
||||
ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
|
||||
VclMessageType::Error, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Error, VclButtonsType::YesNo);
|
||||
bRetry = aErrorBox->Execute() == RET_NO;
|
||||
|
||||
if(!bRetry)
|
||||
|
@ -379,7 +379,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
|
||||
{
|
||||
ScopedVclPtrInstance<MessageDialog> aQuestionBox(
|
||||
pParent, SD_RESSTR(STR_PAGE_BACKGROUND_TXT),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
aQuestionBox->SetText(SD_RESSTR(STR_PAGE_BACKGROUND_TITLE));
|
||||
bSetToAllPages = ( RET_YES == aQuestionBox->Execute() );
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ IMPL_LINK(TemplateLocalView, ContextMenuSelectHdl, Menu*, pMenu, bool)
|
||||
break;
|
||||
case MNI_DELETE:
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
break;
|
||||
|
||||
@ -518,7 +518,7 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_
|
||||
{
|
||||
OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
|
||||
getRegionName(nTargetRegion));
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
return false;
|
||||
|
||||
@ -619,7 +619,7 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s
|
||||
{
|
||||
OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
|
||||
getRegionName(nTargetRegion));
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
{
|
||||
@ -912,7 +912,7 @@ void TemplateLocalView::KeyInput( const KeyEvent& rKEvt )
|
||||
}
|
||||
else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
return;
|
||||
|
@ -59,7 +59,7 @@ void TemplateSearchView::KeyInput( const KeyEvent& rKEvt )
|
||||
}
|
||||
else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
return;
|
||||
@ -158,7 +158,7 @@ IMPL_LINK(TemplateSearchView, ContextMenuSelectHdl, Menu*, pMenu, bool)
|
||||
break;
|
||||
case MNI_DELETE:
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( aQueryDlg->Execute() != RET_YES )
|
||||
break;
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
|
||||
if ( bIsFromTypeBox ) // LoseFocus of TypeBox
|
||||
pLine->m_bTypeLostFocus = true;
|
||||
vcl::Window* pParent = GetParent()->GetParent();
|
||||
if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK)
|
||||
if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VclButtonsType::OkCancel)->Execute() == RET_OK)
|
||||
pLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(CUSTOM_TYPE_TEXT) ) );
|
||||
else
|
||||
pLine->m_aValueEdit->GrabFocus();
|
||||
|
@ -59,7 +59,7 @@ IMPL_LINK( SfxNewStyleDlg, ModifyHdl, Edit&, rBox, void )
|
||||
SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rInPool )
|
||||
: ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
|
||||
, aQueryOverwriteBox(VclPtr<MessageDialog>::Create(this, SfxResId(STR_QUERY_OVERWRITE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO))
|
||||
VclMessageType::Question, VclButtonsType::YesNo))
|
||||
, rPool(rInPool)
|
||||
{
|
||||
get(m_pColBox, "stylename");
|
||||
|
@ -1888,10 +1888,10 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl()
|
||||
{
|
||||
#if defined UNX
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(SfxGetpApp()->GetTopWindow(), aMsg,
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
#else
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg,
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
#endif
|
||||
aApproved = aBox->Execute() == RET_YES;
|
||||
}
|
||||
|
@ -653,7 +653,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
|
||||
// notify the user that SaveAs is going to be done
|
||||
vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
|
||||
ScopedVclPtrInstance<MessageDialog> aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
|
||||
VclMessageType::Question, VCL_BUTTONS_OK_CANCEL);
|
||||
VclMessageType::Question, VclButtonsType::OkCancel);
|
||||
if ( aMessageBox->Execute() == RET_OK )
|
||||
nResult = STATUS_SAVEAS;
|
||||
else
|
||||
@ -1399,7 +1399,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
|
||||
|| SignatureState::PARTIAL_OK == nDocumentSignatureState)
|
||||
{
|
||||
if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
|
||||
VclMessageType::Question, VclButtonsType::YesNo)->Execute() != RET_YES)
|
||||
{
|
||||
// the user has decided not to store the document
|
||||
throw task::ErrorCodeIOException(
|
||||
|
@ -839,7 +839,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
|
||||
}
|
||||
case SID_CANCELCHECKOUT:
|
||||
{
|
||||
if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
|
||||
if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
|
||||
{
|
||||
CancelCheckOut( );
|
||||
|
||||
@ -1378,8 +1378,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
|
||||
if ( nVersion >= SvtSaveOptions::ODFVER_012 )
|
||||
{
|
||||
|
||||
if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
|
||||
|| (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) )
|
||||
if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
|
||||
|| (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES) )
|
||||
{
|
||||
sal_uInt16 nId = SID_SAVEDOC;
|
||||
if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
|
||||
|
@ -78,7 +78,7 @@ void SfxSaveAsTemplateDialog::setDocumentModel(const uno::Reference<frame::XMode
|
||||
|
||||
IMPL_LINK_NOARG(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void)
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if(!IsTemplateNameUnique())
|
||||
{
|
||||
|
@ -1172,7 +1172,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
|
||||
OUString sCategory = aDlg->GetSelectedCategory();
|
||||
aDlg.disposeAndClear();
|
||||
ScopedVclPtrInstance< MessageDialog > popupDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if ( popupDlg->Execute() != RET_YES )
|
||||
return;
|
||||
|
@ -462,7 +462,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
|
||||
{
|
||||
// css::sdbcx::User offering to open it as a template
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( RET_YES == aBox->Execute() )
|
||||
{
|
||||
SfxApplication* pApp = SfxGetpApp();
|
||||
@ -545,7 +545,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
|
||||
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
|
||||
{
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
bDo = ( RET_YES == aBox->Execute() );
|
||||
}
|
||||
|
||||
@ -721,7 +721,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
|
||||
{
|
||||
// ask user for opening as template
|
||||
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if ( RET_YES == aBox->Execute() )
|
||||
{
|
||||
SfxAllItemSet aSet( pApp->GetPool() );
|
||||
|
@ -511,7 +511,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
|
||||
|
||||
// Ask if possible, if page format should be taken over from printer.
|
||||
if ( ( bOriChg || bPgSzChg ) &&
|
||||
RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() )
|
||||
RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VclButtonsType::YesNo)->Execute() )
|
||||
{
|
||||
// Flags with changes for <SetPrinter(SfxPrinter*)> are maintained
|
||||
nChangedFlags |= nNewOpt;
|
||||
|
@ -841,7 +841,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
|
||||
|
||||
short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes)
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if (aQuery->Execute() == RET_YES)
|
||||
return DLG_RET_OK;
|
||||
else
|
||||
|
@ -949,7 +949,7 @@ namespace svxform
|
||||
bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE );
|
||||
sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
|
||||
OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME);
|
||||
ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
OUString sMessText = aQBox->get_primary_text();
|
||||
sMessText = sMessText.replaceFirst(
|
||||
sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, false ) );
|
||||
@ -992,7 +992,7 @@ namespace svxform
|
||||
SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
|
||||
}
|
||||
ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(nResId),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
OUString sMessText = aQBox->get_primary_text();
|
||||
sMessText = sMessText.replaceFirst( sSearch, sName);
|
||||
aQBox->set_primary_text(sMessText);
|
||||
@ -1588,7 +1588,7 @@ namespace svxform
|
||||
else if (sIdent == "modelsremove")
|
||||
{
|
||||
ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
OUString sText = aQBox->get_primary_text();
|
||||
sText = sText.replaceFirst( MODELNAME, sSelectedModel );
|
||||
aQBox->set_primary_text(sText);
|
||||
@ -1689,7 +1689,7 @@ namespace svxform
|
||||
{
|
||||
OUString sInstName = pPage->GetInstanceName();
|
||||
ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
VclMessageType::Question, VclButtonsType::YesNo);
|
||||
OUString sMessText = aQBox->get_primary_text();
|
||||
sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName );
|
||||
aQBox->set_primary_text(sMessText);
|
||||
|
@ -988,7 +988,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, Button *, pButton, void )
|
||||
bool bContent = pSectRepr->IsContent();
|
||||
if( pBox->IsChecked() && bContent && rSh.HasSelection() )
|
||||
{
|
||||
if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
|
||||
if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
|
||||
pBox->Check( false );
|
||||
}
|
||||
if( bFile )
|
||||
@ -1725,7 +1725,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
|
||||
if( pBox->IsChecked() )
|
||||
{
|
||||
if( m_pWrtSh->HasSelection() &&
|
||||
RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute())
|
||||
RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute())
|
||||
pBox->Check( false );
|
||||
}
|
||||
|
||||
|
@ -1227,7 +1227,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl, Button*, void)
|
||||
bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i);
|
||||
if(bDifferent)
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if(RET_YES != aQuery->Execute())
|
||||
return;
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
|
||||
}
|
||||
else if (sItemIdent == "delete")
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if (RET_YES == aQuery->Execute())
|
||||
{
|
||||
const OUString aShortName(m_pShortNameEdit->GetText());
|
||||
@ -680,7 +680,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, Button*, void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VclMessageType::Question, VclButtonsType::YesNo);
|
||||
|
||||
if(RET_YES == aBox->Execute())
|
||||
PathHdl(m_pPathBtn);
|
||||
|
@ -356,7 +356,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl, Button*, void)
|
||||
|
||||
if( !bFormatInserted )
|
||||
{
|
||||
bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)
|
||||
bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
|
||||
->Execute();
|
||||
}
|
||||
}
|
||||
@ -454,7 +454,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl, Button*, void)
|
||||
|
||||
if( !bFormatRenamed )
|
||||
{
|
||||
bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)
|
||||
bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
|
||||
->Execute();
|
||||
}
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ The code below would only be part of the solution.
|
||||
{
|
||||
LockFocusNotification( true );
|
||||
sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE),
|
||||
VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute();
|
||||
VclMessageType::Question, VclButtonsType::YesNo)->Execute();
|
||||
if(RET_YES == nRet)
|
||||
{
|
||||
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
|
||||
|
@ -460,7 +460,7 @@ void SwView::HyphenateDocument()
|
||||
// turned on no special area
|
||||
{
|
||||
// I want also in special areas hyphenation
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VCL_BUTTONS_YES_NO);
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VclButtonsType::YesNo);
|
||||
if( aBox->Execute() == RET_YES )
|
||||
{
|
||||
bOther = true;
|
||||
|
@ -2171,7 +2171,7 @@ void MessageDialog::create_owned_areas()
|
||||
|
||||
MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle)
|
||||
: Dialog(pParent, nStyle)
|
||||
, m_eButtonsType(VCL_BUTTONS_NONE)
|
||||
, m_eButtonsType(VclButtonsType::NONE)
|
||||
, m_eMessageType(VclMessageType::Info)
|
||||
, m_pOwnedContentArea(nullptr)
|
||||
, m_pOwnedActionArea(nullptr)
|
||||
@ -2202,7 +2202,7 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
|
||||
|
||||
MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
|
||||
: Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WINDOW_MESSBOX)
|
||||
, m_eButtonsType(VCL_BUTTONS_NONE)
|
||||
, m_eButtonsType(VclButtonsType::NONE)
|
||||
, m_eMessageType(VclMessageType::Info)
|
||||
, m_pOwnedContentArea(nullptr)
|
||||
, m_pOwnedActionArea(nullptr)
|
||||
@ -2376,9 +2376,9 @@ short MessageDialog::Execute()
|
||||
VclPtr<PushButton> pBtn;
|
||||
switch (m_eButtonsType)
|
||||
{
|
||||
case VCL_BUTTONS_NONE:
|
||||
case VclButtonsType::NONE:
|
||||
break;
|
||||
case VCL_BUTTONS_OK:
|
||||
case VclButtonsType::Ok:
|
||||
pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
|
||||
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
|
||||
pBtn->Show();
|
||||
@ -2386,7 +2386,7 @@ short MessageDialog::Execute()
|
||||
m_aOwnedButtons.push_back(pBtn);
|
||||
m_aResponses[pBtn] = RET_OK;
|
||||
break;
|
||||
case VCL_BUTTONS_CLOSE:
|
||||
case VclButtonsType::Close:
|
||||
pBtn.set( VclPtr<CloseButton>::Create(pButtonBox) );
|
||||
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
|
||||
pBtn->Show();
|
||||
@ -2394,14 +2394,14 @@ short MessageDialog::Execute()
|
||||
m_aOwnedButtons.push_back(pBtn);
|
||||
m_aResponses[pBtn] = RET_CLOSE;
|
||||
break;
|
||||
case VCL_BUTTONS_CANCEL:
|
||||
case VclButtonsType::Cancel:
|
||||
pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) );
|
||||
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
|
||||
pBtn->set_id("cancel");
|
||||
m_aOwnedButtons.push_back(pBtn);
|
||||
m_aResponses[pBtn] = RET_CANCEL;
|
||||
break;
|
||||
case VCL_BUTTONS_YES_NO:
|
||||
case VclButtonsType::YesNo:
|
||||
pBtn = VclPtr<PushButton>::Create(pButtonBox);
|
||||
pBtn->SetText(Button::GetStandardText(StandardButtonType::Yes));
|
||||
pBtn->Show();
|
||||
@ -2417,7 +2417,7 @@ short MessageDialog::Execute()
|
||||
m_aOwnedButtons.push_back(pBtn);
|
||||
m_aResponses[pBtn] = RET_NO;
|
||||
break;
|
||||
case VCL_BUTTONS_OK_CANCEL:
|
||||
case VclButtonsType::OkCancel:
|
||||
pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
|
||||
pBtn->Show();
|
||||
pBtn->set_id("ok");
|
||||
@ -2478,19 +2478,19 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
|
||||
}
|
||||
else if (rKey == "buttons")
|
||||
{
|
||||
VclButtonsType eMode = VCL_BUTTONS_NONE;
|
||||
VclButtonsType eMode = VclButtonsType::NONE;
|
||||
if (rValue.equals("none"))
|
||||
eMode = VCL_BUTTONS_NONE;
|
||||
eMode = VclButtonsType::NONE;
|
||||
else if (rValue.equals("ok"))
|
||||
eMode = VCL_BUTTONS_OK;
|
||||
eMode = VclButtonsType::Ok;
|
||||
else if (rValue.equals("cancel"))
|
||||
eMode = VCL_BUTTONS_CANCEL;
|
||||
eMode = VclButtonsType::Cancel;
|
||||
else if (rValue.equals("close"))
|
||||
eMode = VCL_BUTTONS_CLOSE;
|
||||
eMode = VclButtonsType::Close;
|
||||
else if (rValue.equals("yes-no"))
|
||||
eMode = VCL_BUTTONS_YES_NO;
|
||||
eMode = VclButtonsType::YesNo;
|
||||
else if (rValue.equals("ok-cancel"))
|
||||
eMode = VCL_BUTTONS_OK_CANCEL;
|
||||
eMode = VclButtonsType::OkCancel;
|
||||
else
|
||||
{
|
||||
SAL_WARN("vcl.layout", "unknown buttons type mode" << rValue.getStr());
|
||||
|
@ -294,7 +294,7 @@ bool DigitalSignaturesDialog::canAddRemove()
|
||||
//is shown every time until the user presses 'OK'. From then on, the warning
|
||||
//is not displayed anymore as long as the signatures dialog is alive.
|
||||
if (ScopedVclPtrInstance<MessageDialog>(
|
||||
nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_NO)
|
||||
nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_NO)
|
||||
ret = false;
|
||||
else
|
||||
m_bWarningShowSignMacro = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user