summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-15 09:05:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-15 09:09:37 +0100
commita53061deb1c2d81e0657fa8e1637cbbada285076 (patch)
tree3edfe0408da976b8859537d4911cc5ff256c8457
parent1eb84514fd25e8482bdc56185f96a06fe52155f4 (diff)
archetype for ErrorBox + resource -> MessageDialog + string conversion
in this case the .src has WB_OK for "ok button only" which is the default for MessageDialog so no arguments apart from the string and the parent dialog (null in this case) are needed Change-Id: I63ddafddfcc448e3502b19d657dcad040a56c845
-rw-r--r--sfx2/source/dialog/dialog.hrc2
-rw-r--r--sfx2/source/dialog/dialog.src6
-rw-r--r--sfx2/source/dialog/passwd.cxx4
3 files changed, 5 insertions, 7 deletions
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index a6344384825c..d9f461a9cf05 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -47,7 +47,7 @@
#define STR_VIEWVERSIONCOMMENT ( RC_DIALOG_BEGIN + 71 )
-#define MSG_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
+#define STR_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
#define STR_APPLY ( RC_DIALOG_BEGIN + 87 )
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index d9dda37c26ee..8d8273a341e9 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -108,11 +108,9 @@ String SID_SIDEBAR
Text [ en-US ] = "Sidebar";
};
-ErrorBox MSG_ERROR_WRONG_CONFIRM
+String STR_ERROR_WRONG_CONFIRM
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Faulty password confirmation";
+ Text [ en-US ] = "Faulty password confirmation";
};
String STR_PDF_EXPORT_SEND
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index d55700ffe458..1b746fb44872 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -19,7 +19,7 @@
// Include ---------------------------------------------------------------
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
#include <sfx2/passwd.hxx>
#include "sfxtypes.hxx"
@@ -71,7 +71,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
bConfirmFailed = true;
if ( bConfirmFailed )
{
- ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) );
+ MessageDialog aBox(this, SfxResId(STR_ERROR_WRONG_CONFIRM));
aBox.Execute();
mpConfirm1ED->SetText( OUString() );
mpConfirm1ED->GrabFocus();