summaryrefslogtreecommitdiff
path: root/uui
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 /uui
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 'uui')
-rw-r--r--uui/source/alreadyopen.cxx2
-rw-r--r--uui/source/filechanged.cxx2
-rw-r--r--uui/source/iahndl-errorhandler.cxx44
-rw-r--r--uui/source/iahndl.cxx10
-rw-r--r--uui/source/lockcorrupt.cxx2
-rw-r--r--uui/source/lockfailed.cxx2
-rw-r--r--uui/source/openlocked.cxx2
-rw-r--r--uui/source/trylater.cxx2
8 files changed, 33 insertions, 33 deletions
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
index 755d82171edc..02687af3800b 100644
--- a/uui/source/alreadyopen.cxx
+++ b/uui/source/alreadyopen.cxx
@@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, const std::locale& rLocale, const OUString& aMessage, bool bIsStoring ) :
- MessBox(pParent, 0,
+ MessBox(pParent, MessBoxStyle::NONE,
Translate::get(STR_ALREADYOPEN_TITLE, rLocale),
aMessage )
{
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index 97c98d216438..e9d50ce12584 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -22,7 +22,7 @@
#include "filechanged.hxx"
FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, const std::locale& rLocale ) :
- MessBox(pParent, 0,
+ MessBox(pParent, MessBoxStyle::NONE,
Translate::get(STR_FILECHANGED_TITLE, rLocale),
OUString() )
{
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 1277d11c17cc..9f4642ab063e 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -48,7 +48,7 @@ executeErrorDialog(
task::InteractionClassification eClassification,
OUString const & rContext,
OUString const & rMessage,
- WinBits nButtonMask)
+ MessBoxStyle nButtonMask)
{
SolarMutexGuard aGuard;
@@ -76,9 +76,9 @@ executeErrorDialog(
break;
case task::InteractionClassification_INFO:
-# define WB_DEF_BUTTONS (WB_DEF_OK | WB_DEF_CANCEL | WB_DEF_RETRY)
+# define WB_DEF_BUTTONS (MessBoxStyle::DefaultOk | MessBoxStyle::DefaultCancel | MessBoxStyle::DefaultRetry)
//(want to ignore any default button settings)...
- if ((nButtonMask & WB_DEF_BUTTONS) == WB_DEF_OK)
+ if ((nButtonMask & WB_DEF_BUTTONS) == MessBoxStyle::DefaultOk)
xBox.reset(VclPtr<InfoBox>::Create(pParent,
aText.makeStringAndClear()));
else
@@ -214,30 +214,30 @@ UUIInteractionHelper::handleErrorHandlerRequest(
// Finally, it seems to be better to leave default button
// determination to VCL (the favouring of CANCEL as default button
// seems to not always be what the user wants)...
- WinBits const aButtonMask[16]
- = { 0,
- WB_OK /*| WB_DEF_OK*/, // Abort
- 0,
- WB_RETRY_CANCEL /*| WB_DEF_CANCEL*/, // Retry, Abort
- 0,
- 0,
- 0,
- 0,
- WB_OK /*| WB_DEF_OK*/, // Approve
- WB_OK_CANCEL /*| WB_DEF_CANCEL*/, // Approve, Abort
- 0,
- 0,
- WB_YES_NO /*| WB_DEF_NO*/, // Approve, Disapprove
- WB_YES_NO_CANCEL /*| WB_DEF_CANCEL*/,
+ MessBoxStyle const aButtonMask[16]
+ = { MessBoxStyle::NONE,
+ MessBoxStyle::Ok /*| MessBoxStyle::DefaultOk*/, // Abort
+ MessBoxStyle::NONE,
+ MessBoxStyle::RetryCancel /*| MessBoxStyle::DefaultCancel*/, // Retry, Abort
+ MessBoxStyle::NONE,
+ MessBoxStyle::NONE,
+ MessBoxStyle::NONE,
+ MessBoxStyle::NONE,
+ MessBoxStyle::Ok /*| MessBoxStyle::DefaultOk*/, // Approve
+ MessBoxStyle::OkCancel /*| MessBoxStyle::DefaultCancel*/, // Approve, Abort
+ MessBoxStyle::NONE,
+ MessBoxStyle::NONE,
+ MessBoxStyle::YesNo /*| MessBoxStyle::DefaultNo*/, // Approve, Disapprove
+ MessBoxStyle::YesNoCancel /*| MessBoxStyle::DefaultCancel*/,
// Approve, Disapprove, Abort
- 0,
- 0 };
+ MessBoxStyle::NONE,
+ MessBoxStyle::NONE };
- WinBits nButtonMask = aButtonMask[(xApprove.is() ? 8 : 0)
+ MessBoxStyle nButtonMask = aButtonMask[(xApprove.is() ? 8 : 0)
| (xDisapprove.is() ? 4 : 0)
| (xRetry.is() ? 2 : 0)
| (xAbort.is() ? 1 : 0)];
- if (nButtonMask == 0)
+ if (nButtonMask == MessBoxStyle::NONE)
return;
//TODO! remove this backwards compatibility?
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 4b61c00c8979..d136f047c3f3 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -961,7 +961,7 @@ executeMessageBox(
vcl::Window * pParent,
OUString const & rTitle,
OUString const & rMessage,
- WinBits nButtonMask )
+ MessBoxStyle nButtonMask )
{
SolarMutexGuard aGuard;
@@ -1110,7 +1110,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
aTitle += aErrTitle;
executeMessageBox(
- getParentProperty(), aTitle, aErrorString, WB_OK );
+ getParentProperty(), aTitle, aErrorString, MessBoxStyle::Ok );
}
else
ErrorHandler::HandleError(nErrorCode);
@@ -1208,14 +1208,14 @@ UUIInteractionHelper::handleBrokenPackageRequest(
return;
}
- WinBits nButtonMask;
+ MessBoxStyle nButtonMask;
if( xApprove.is() && xDisapprove.is() )
{
- nButtonMask = WB_YES_NO | WB_DEF_YES;
+ nButtonMask = MessBoxStyle::YesNo | MessBoxStyle::DefaultYes;
}
else if ( xAbort.is() )
{
- nButtonMask = WB_OK;
+ nButtonMask = MessBoxStyle::Ok;
}
else
return;
diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx
index a101a6794332..5812216b0c4e 100644
--- a/uui/source/lockcorrupt.cxx
+++ b/uui/source/lockcorrupt.cxx
@@ -24,7 +24,7 @@
#include <vcl/button.hxx>
LockCorruptQueryBox::LockCorruptQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
- : MessBox(pParent, 0, Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale), OUString())
+ : MessBox(pParent, MessBoxStyle::NONE, Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale), OUString())
{
SetImage( ErrorBox::GetStandardImage() );
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index e5d00b9a01a6..80209ee5fbbc 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -23,7 +23,7 @@
#include <vcl/button.hxx>
LockFailedQueryBox::LockFailedQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
- : MessBox(pParent, 0, Translate::get(STR_LOCKFAILED_TITLE, rResLocale), OUString())
+ : MessBox(pParent, MessBoxStyle::NONE, Translate::get(STR_LOCKFAILED_TITLE, rResLocale), OUString())
{
SetImage( ErrorBox::GetStandardImage() );
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index cae6baa2b0c0..dfd59425e090 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -22,7 +22,7 @@
#include <unotools/resmgr.hxx>
OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage ) :
- MessBox(pParent, 0,
+ MessBox(pParent, MessBoxStyle::NONE,
Translate::get(STR_OPENLOCKED_TITLE, rResLocale),
aMessage )
{
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
index a7eb623d1fc4..01a09502b286 100644
--- a/uui/source/trylater.cxx
+++ b/uui/source/trylater.cxx
@@ -22,7 +22,7 @@
#include "trylater.hxx"
TryLaterQueryBox::TryLaterQueryBox(vcl::Window* pParent, const std::locale& rResLocale, const OUString& aMessage)
- : MessBox(pParent, 0, Translate::get(STR_TRYLATER_TITLE, rResLocale), aMessage)
+ : MessBox(pParent, MessBoxStyle::NONE, Translate::get(STR_TRYLATER_TITLE, rResLocale), aMessage)
{
SetImage( QueryBox::GetStandardImage() );