From dcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 22 Aug 2017 11:11:44 +0200 Subject: convert message box style bits to scoped enum and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Date: Fri Feb 4 14:52:54 2011 +0100 ka102: added/removed files for SVG import and module cleanup Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962 Reviewed-on: https://gerrit.libreoffice.org/41412 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/core/data/validat.cxx | 8 ++++---- sc/source/filter/oox/workbookfragment.cxx | 2 +- sc/source/ui/condformat/colorformat.cxx | 2 +- sc/source/ui/dbgui/dbnamdlg.cxx | 2 +- sc/source/ui/docshell/dbdocfun.cxx | 18 +++++++++--------- sc/source/ui/docshell/docfunc.cxx | 2 +- sc/source/ui/docshell/docsh.cxx | 10 +++++----- sc/source/ui/docshell/docsh3.cxx | 2 +- sc/source/ui/docshell/docsh4.cxx | 18 +++++++++--------- sc/source/ui/docshell/externalrefmgr.cxx | 2 +- sc/source/ui/miscdlgs/crnrdlg.cxx | 2 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 2 +- sc/source/ui/miscdlgs/warnbox.cxx | 2 +- sc/source/ui/navipi/scenwnd.cxx | 2 +- sc/source/ui/optdlg/tpusrlst.cxx | 2 +- sc/source/ui/view/cellsh1.cxx | 4 ++-- sc/source/ui/view/cellsh3.cxx | 2 +- sc/source/ui/view/dbfunc.cxx | 2 +- sc/source/ui/view/dbfunc3.cxx | 10 +++++----- sc/source/ui/view/spelleng.cxx | 2 +- sc/source/ui/view/tabvwshf.cxx | 4 ++-- sc/source/ui/view/viewfun2.cxx | 2 +- sc/source/ui/view/viewfun3.cxx | 2 +- sc/source/ui/view/viewfunc.cxx | 2 +- 24 files changed, 53 insertions(+), 53 deletions(-) (limited to 'sc') diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 8099960fd048..4c4383405e63 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -390,17 +390,17 @@ bool ScValidationData::DoError( vcl::Window* pParent, const OUString& rInput, //TODO: ErrorBox / WarningBox / InfoBox ? //TODO: (with InfoBox always OK-Button only) - WinBits nStyle = 0; + MessBoxStyle nStyle = MessBoxStyle::NONE; switch (eErrorStyle) { case SC_VALERR_STOP: - nStyle = WB_OK | WB_DEF_OK; + nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk; break; case SC_VALERR_WARNING: - nStyle = WB_OK_CANCEL | WB_DEF_CANCEL; + nStyle = MessBoxStyle::OkCancel | MessBoxStyle::DefaultCancel; break; case SC_VALERR_INFO: - nStyle = WB_OK_CANCEL | WB_DEF_OK; + nStyle = MessBoxStyle::OkCancel | MessBoxStyle::DefaultOk; break; default: { diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 72d2985e536f..67a500e72322 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -533,7 +533,7 @@ void WorkbookFragment::recalcFormulaCells() { // Ask the user if full re-calculation is desired. ScopedVclPtrInstance aBox( - ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS)); aBox->SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index f6e9ebc4eb9d..b318a1e19802 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -256,7 +256,7 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, OkBtnHdl, Button*, void ) if(bWarn) { //show warning message and don't close - ScopedVclPtrInstance< WarningBox > aWarn(this, WB_OK, maStrWarnSameValue ); + ScopedVclPtrInstance< WarningBox > aWarn(this, MessBoxStyle::Ok, maStrWarnSameValue ); aWarn->Execute(); } else diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 65b66db6e89f..463d672b56f0 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -523,7 +523,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl, Button*, void) aBuf.append(aStrDelMsg.getToken(0, '#')); aBuf.append(aStrEntry); aBuf.append(aStrDelMsg.getToken(1, '#')); - ScopedVclPtrInstance< QueryBox > aBox(this, WinBits(WB_YES_NO|WB_DEF_YES), aBuf.makeStringAndClear()); + ScopedVclPtrInstance< QueryBox > aBox(this, MessBoxStyle::YesNo|MessBoxStyle::DefaultYes, aBuf.makeStringAndClear()); if (RET_YES == aBox->Execute()) { diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 72dbe61b9e57..11c53f1c8278 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -994,11 +994,11 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtrInstance( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - // "StarCalc" "Delete Data?" - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() - == RET_YES ); + bOk = ScopedVclPtrInstance( ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, + // "StarCalc" "Delete Data?" + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() + == RET_YES; } if (bOk) @@ -1282,7 +1282,7 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb // OutRange of pOldObj (pDestObj) is still old area if (!lcl_EmptyExcept(&rDoc, aNewOut, pOldObj->GetOutRange())) { - ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ); if (aBox->Execute() == RET_NO) { @@ -1334,7 +1334,7 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) if (pModel && !aListOfObjects.empty()) { ScopedVclPtrInstance aBox( - ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_PIVOT_REMOVE_PIVOTCHART)); if (aBox->Execute() == RET_NO) { @@ -1478,7 +1478,7 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool if (!bEmpty) { ScopedVclPtrInstance aBox( - ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY)); if (aBox->Execute() == RET_NO) @@ -1551,7 +1551,7 @@ bool ScDBDocFunc::UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) { if (!lcl_EmptyExcept(&rDoc, aNewOut, rDPObj.GetOutRange())) { - ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ); if (aBox->Execute() == RET_NO) { diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 5c3d77d248f5..c9e19236a699 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5064,7 +5064,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, aMessage += aTemplate.getToken( 1, '#' ); short nResult = ScopedVclPtrInstance( ScDocShell::GetActiveDialogParent(), - WinBits(WB_YES_NO_CANCEL | WB_DEF_YES), + MessBoxStyle::YesNoCancel | MessBoxStyle::DefaultYes, aMessage )->Execute(); if ( nResult == RET_YES ) { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index f51db7d69225..2e26e5d2386e 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -472,7 +472,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css // Generator is not LibreOffice. Ask if the user wants to perform // full re-calculation. ScopedVclPtrInstance aBox( - GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS)); aBox->SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); @@ -706,7 +706,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScAppOptions aAppOptions = SC_MOD()->GetAppOptions(); if ( aAppOptions.GetShowSharedDocumentWarning() ) { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::Ok, ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) ); aBox->SetDefaultCheckBoxText(); aBox->Execute(); @@ -833,7 +833,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_SAVE_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), WinBits( WB_RETRY_CANCEL | WB_DEF_RETRY ), aMessage ); + ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), MessBoxStyle::RetryCancel | MessBoxStyle::DefaultRetry, aMessage ); if ( aBox->Execute() == RET_RETRY ) { bRetry = true; @@ -908,7 +908,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::Ok, ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ); aBox->Execute(); @@ -949,7 +949,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( GetDocument().GetExternalRefManager()->containsUnsavedReferences() ) { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits( WB_YES_NO ), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::YesNo, ScGlobal::GetRscString( STR_UNSAVED_EXT_REF ) ); if( RET_NO == aBox->Execute()) diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 99165cea57cf..1254223c29a3 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -1204,7 +1204,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) ScopedVclPtrInstance< ScConflictsDlg > aDlg( GetActiveDialogParent(), GetViewData(), &rSharedDoc, aConflictsList ); if ( aDlg->Execute() == RET_CANCEL ) { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_DOC_WILLNOTBESAVED ) ); if ( aBox->Execute() == RET_YES ) { diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 009f8b987436..341cd921a87f 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -220,7 +220,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aMessage += sTarget; aMessage += aTemplate.getToken( 1, '#' ); - ScopedVclPtrInstance< QueryBox > aBox( nullptr, WinBits(WB_YES_NO | WB_DEF_YES), aMessage ); + ScopedVclPtrInstance< QueryBox > aBox( nullptr, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, aMessage ); bDo = ( aBox->Execute() == RET_YES ); } @@ -439,7 +439,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if(nSet==LM_ON_DEMAND) { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_RELOAD_TABLES) ); nDlgRet=aBox->Execute(); @@ -490,7 +490,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) OSL_ENSURE(pViewSh,"SID_REIMPORT_AFTER_LOAD: no View"); if (pViewSh && pDBColl) { - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ); if (aBox->Execute() == RET_YES) { @@ -583,7 +583,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { // no dialog on playing the macro ScopedVclPtrInstance aBox( GetActiveDialogParent(), - WinBits(WB_YES_NO | WB_DEF_NO), + MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, ScGlobal::GetRscString( STR_END_REDLINING ) ); bDo = ( aBox->Execute() == RET_YES ); } @@ -648,7 +648,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( nSlot == SID_DOCUMENT_COMPARE ) { //! old changes trace will be lost ScopedVclPtrInstance aBox( GetActiveDialogParent(), - WinBits(WB_YES_NO | WB_DEF_NO), + MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, ScGlobal::GetRscString( STR_END_REDLINING ) ); if( aBox->Execute() == RET_YES ) bDo = ExecuteChangeProtectionDialog( true ); @@ -940,7 +940,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { ScopedVclPtrInstance aBox( GetActiveDialogParent(), - WinBits( WB_YES_NO | WB_DEF_YES ), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_DOC_WILLBESAVED ) ); if ( aBox->Execute() == RET_NO ) { @@ -1029,14 +1029,14 @@ void ScDocShell::Execute( SfxRequest& rReq ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_TRY_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), WinBits( WB_OK ), aMessage ); + ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), MessBoxStyle::Ok, aMessage ); aBox->Execute(); } else { ScopedVclPtrInstance aBox( GetActiveDialogParent(), - WinBits( WB_YES_NO | WB_DEF_YES ), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_DOC_DISABLESHARED ) ); if ( aBox->Execute() == RET_YES ) { @@ -1070,7 +1070,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) else { xCloseable->close( true ); - ScopedVclPtrInstance aBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScopedVclPtrInstance aBox( GetActiveDialogParent(), MessBoxStyle::Ok, ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ); aBox->Execute(); } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 8277b26c80c2..cc2018961f66 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -3186,7 +3186,7 @@ void ScExternalRefManager::Notify( SfxBroadcaster&, const SfxHint& rHint ) { case SfxEventHintId::PrepareCloseDoc: { - ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), WinBits( WB_OK ), + ScopedVclPtrInstance aBox( ScDocShell::GetActiveDialogParent(), MessBoxStyle::Ok, ScGlobal::GetRscString( STR_CLOSE_WITH_UNSAVED_REFS ) ); aBox->Execute(); } diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index f68c9a06ccad..f2779fc15ea5 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -27,7 +27,7 @@ #include #define ERRORBOX(s) ScopedVclPtrInstance(this, s)->Execute() -#define QUERYBOX(m) ScopedVclPtrInstance(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() +#define QUERYBOX(m) ScopedVclPtrInstance(this, MessBoxStyle::YesNo|MessBoxStyle::DefaultYes, m)->Execute() const sal_uLong nEntryDataCol = 0; const sal_uLong nEntryDataRow = 1; diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index da465ae23774..b59fc2647153 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -286,7 +286,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl, Button*, void) + aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == - ScopedVclPtrInstance( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) + ScopedVclPtrInstance( this, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, aMsg )->Execute() ) { m_pLbFormat->RemoveEntry( nIndex ); m_pLbFormat->SelectEntryPos( nIndex-1 ); diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx index 9cd98b09f60c..fa1c7eb976b7 100644 --- a/sc/source/ui/miscdlgs/warnbox.cxx +++ b/sc/source/ui/miscdlgs/warnbox.cxx @@ -26,7 +26,7 @@ #include "helpids.h" ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) : - WarningBox( pParent, WB_YES_NO | WB_DEF_YES, ScResId( STR_REPLCELLSWARN ) ) + WarningBox( pParent, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScResId( STR_REPLCELLSWARN ) ) { // By default, the check box is ON, and the user needs to un-check it to // disable all future warnings. diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index e10fff290086..0d9d6e030f53 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -183,7 +183,7 @@ void ScScenarioListBox::EditScenario() void ScScenarioListBox::DeleteScenario() { if( GetSelectEntryCount() > 0 ) - if( ScopedVclPtrInstance( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) + if( ScopedVclPtrInstance( nullptr, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) ExecuteScenarioSlot( SID_DELETE_SCENARIO ); } diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index ae2425345311..229ea952fd2c 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -614,7 +614,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) + aStrQueryRemove.getToken( 1, '#' ); if ( RET_YES == ScopedVclPtrInstance( this, - WinBits( WB_YES_NO | WB_DEF_YES ), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, aMsg )->Execute() ) { diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 269ff7a68890..275c0b060bbe 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2010,7 +2010,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // or should create a new overlapping conditional format if(!bCondFormatDlg && bContainsExistingCondFormat) { - ScopedVclPtrInstance aBox( pTabViewShell->GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScopedVclPtrInstance aBox( pTabViewShell->GetDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS) ); bool bEditExisting = aBox->Execute() == RET_YES; if(bEditExisting) @@ -2952,7 +2952,7 @@ void ScCellShell::ExecuteDataPilotDialog() // confirm selection if it contains SubTotal cells ScopedVclPtrInstance aBox( pTabViewShell->GetDialogParent(), - WinBits(WB_YES_NO | WB_DEF_YES), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ); if (aBox->Execute() == RET_NO) bOK = false; diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index b2be50b1ba05..35cd7e44d25c 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -419,7 +419,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { if ( rReq.IsAPI() || RET_YES == - ScopedVclPtrInstance( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance( pTabViewShell->GetDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_UPDATE_SCENARIO) )-> Execute() ) { diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 876abdfa3156..16a5d4d431cb 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -340,7 +340,7 @@ void ScDBFunc::ToggleAutoFilter() { if (!bHeader) { - if ( ScopedVclPtrInstance( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + if ( ScopedVclPtrInstance( GetViewData().GetDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc" ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // header from first row? )->Execute() == RET_YES ) diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 8443f0bc54ef..fc0a8da88c46 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -396,11 +396,11 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtrInstance( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - // "StarCalc" "delete data?" - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() - == RET_YES ); + bOk = ScopedVclPtrInstance( GetViewData().GetDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, + // "StarCalc" "delete data?" + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() + == RET_YES; } if (bOk) diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 8ad1f59c1c74..f3100a2376f8 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -306,7 +306,7 @@ bool ScSpellingEngine::ShowTableWrapDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtrInstance aMsgBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ), + ScopedVclPtrInstance aMsgBox( pParent, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) ); return aMsgBox->Execute() == RET_YES; diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index ad32a62964d8..c178a4033d66 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -624,7 +624,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) // Hard warning as there is potential of data loss on deletion bDoIt = ( RET_YES == ScopedVclPtrInstance( GetDialogParent(), - WinBits( WB_YES_NO | WB_DEF_NO ), + MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, ScGlobal::GetRscString(STR_QUERY_PIVOTTABLE_DELTAB))->Execute() ); } else @@ -632,7 +632,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) // no parameter given, ask for confirmation bDoIt = ( RET_YES == ScopedVclPtrInstance( GetDialogParent(), - WinBits( WB_YES_NO | WB_DEF_YES ), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, ScGlobal::GetRscString(STR_QUERY_DELTAB))->Execute() ); } } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index cf01cb183b02..0cf938c2058a 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2042,7 +2042,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) } ScopedVclPtrInstance aBox( GetViewData().GetDialogParent(), - WinBits(WB_YES_NO | WB_DEF_NO), + MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr ); sal_uInt16 nRetVal = aBox->Execute(); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 7eacb848350f..0d7d4968a76d 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1073,7 +1073,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScWaitCursorOff aWaitOff( GetFrameWin() ); OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER ); ScopedVclPtrInstance aBox( GetViewData().GetDialogParent(), - WinBits(WB_YES_NO | WB_DEF_NO), aMessage ); + MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, aMessage ); if ( aBox->Execute() != RET_YES ) { return false; diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index bb2dfeda707d..a3132788411d 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -441,7 +441,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) ); aMessage += aCorrectedFormula; nResult = ScopedVclPtrInstance( GetViewData().GetDialogParent(), - WinBits(WB_YES_NO | WB_DEF_YES), + MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, aMessage )->Execute(); } if ( nResult == RET_YES ) -- cgit