summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-22 11:11:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-23 08:47:52 +0200
commitdcc667ac5ef0d7b4bbdfba0727ef6e2be3ed5313 (patch)
tree78e04f13656eddd5a528506dda41f96fce6aad7f /sc
parente725111f8283f4dbefde7b14efbe9afd850095df (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/validat.cxx8
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx2
-rw-r--r--sc/source/ui/condformat/colorformat.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx18
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx10
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx18
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/warnbox.cxx2
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx10
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
24 files changed, 53 insertions, 53 deletions
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<QueryBox> 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<MessBox>( 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<MessBox>( 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<QueryBox> aBox( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ ScopedVclPtrInstance<QueryBox> 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<QueryBox> 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<QueryBox> 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<QueryBox> aBox( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ ScopedVclPtrInstance<QueryBox> 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<QueryBox>( 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<QueryBox> 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<WarningBox> aBox( GetActiveDialogParent(), WinBits( WB_OK ),
+ ScopedVclPtrInstance<WarningBox> 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<WarningBox> aBox( GetActiveDialogParent(), WinBits( WB_OK ),
+ ScopedVclPtrInstance<WarningBox> 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<WarningBox> aBox( GetActiveDialogParent(), WinBits( WB_YES_NO ),
+ ScopedVclPtrInstance<WarningBox> 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<QueryBox> aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<QueryBox> 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<QueryBox> aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ ScopedVclPtrInstance<QueryBox> 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<QueryBox> aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ ScopedVclPtrInstance<QueryBox> 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<WarningBox> 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<WarningBox> 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<QueryBox> 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<WarningBox> 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<WarningBox> aBox( GetActiveDialogParent(), WinBits( WB_OK ),
+ ScopedVclPtrInstance<WarningBox> 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<WarningBox> aBox( ScDocShell::GetActiveDialogParent(), WinBits( WB_OK ),
+ ScopedVclPtrInstance<WarningBox> 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 <memory>
#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>(this, s)->Execute()
-#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute()
+#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>(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<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() )
+ ScopedVclPtrInstance<QueryBox>( 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<QueryBox>( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES )
+ if( ScopedVclPtrInstance<QueryBox>( 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<QueryBox>( 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<QueryBox> aBox( pTabViewShell->GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<QueryBox> 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<QueryBox> 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<QueryBox>( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ ScopedVclPtrInstance<QueryBox>( 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<MessBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
+ if ( ScopedVclPtrInstance<MessBox>( 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<MessBox>( 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<MessBox>( 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<MessBox> aMsgBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<MessBox> 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<QueryBox>( 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<QueryBox>( 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<MessBox> 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<QueryBox> 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<QueryBox>( GetViewData().GetDialogParent(),
- WinBits(WB_YES_NO | WB_DEF_YES),
+ MessBoxStyle::YesNo | MessBoxStyle::DefaultYes,
aMessage )->Execute();
}
if ( nResult == RET_YES )