summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-08-18 02:33:50 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-08-18 02:33:50 +0200
commit58c7c4c290799effa8abcaee5f71cdf35fb3efdd (patch)
treed657b4110881ce0f8b886e76bf87fd1993e79aeb
parent36a36444aea744626115668f63dc8164a6f83e82 (diff)
InfoBox MSG_ERROR_SEND_MAIL and MSG_CANT_CLOSE to String
Change-Id: If033f0ccca636a3ab3080a01a11467ce1ce9b24e
-rw-r--r--sfx2/source/view/view.hrc6
-rw-r--r--sfx2/source/view/view.src13
-rw-r--r--sfx2/source/view/viewsh.cxx7
3 files changed, 10 insertions, 16 deletions
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
index 4efc0eaea905..42fe1a16fa27 100644
--- a/sfx2/source/view/view.hrc
+++ b/sfx2/source/view/view.hrc
@@ -21,8 +21,6 @@
#include <sfx2/sfx.hrc>
-// #defines *****************************************************************
-
#define STR_NODEFPRINTER (RID_SFX_VIEW_START+ 0)
#define STR_ERROR_PRINTER_BUSY (RID_SFX_VIEW_START+ 1)
#define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 2)
@@ -33,12 +31,12 @@
#define STR_PRINT_NEWSIZE (RID_SFX_VIEW_START+23)
#define STR_PRINT_NEWORISIZE (RID_SFX_VIEW_START+24)
-#define MSG_ERROR_SEND_MAIL (RID_SFX_VIEW_START+31)
+#define STR_ERROR_SEND_MAIL (RID_SFX_VIEW_START+31)
#define STR_ERROR_SAVE_TEMPLATE (RID_SFX_VIEW_START+33)
#define MSG_QUERY_OPENASTEMPLATE (RID_SFX_VIEW_START+41)
-#define MSG_CANT_CLOSE (RID_SFX_VIEW_START+42)
+#define STR_CANT_CLOSE (RID_SFX_VIEW_START+42)
#endif
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index 7f0b599ab80b..d2ea1f79deee 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -22,7 +22,6 @@
#include "helpid.hrc"
#include "sfxlocal.hrc"
- // Strings ---------------------------------------------------------------
String STR_NODEFPRINTER
{
Text [ en-US ] = "No default printer found.\nPlease choose a printer and try again." ;
@@ -64,18 +63,14 @@ String STR_PRINT_NEWORISIZE
Text [ en-US ] = "The page size and orientation have been modified.\nWould you like to save the new settings in the\nactive document?" ;
};
-InfoBox MSG_CANT_CLOSE
+String STR_CANT_CLOSE
{
- Message [ en-US ] = "The document cannot be closed because a\n print job is being carried out." ;
+ Text [ en-US ] = "The document cannot be closed because a\n print job is being carried out." ;
};
- // MSG_ERROR_SEND_MAIL ---------------------------------------------------
-
-InfoBox MSG_ERROR_SEND_MAIL
+String STR_ERROR_SEND_MAIL
{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\nPlease check the %PRODUCTNAME settings or your e-mail program settings." ;
+ Text [ en-US ] = "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\nPlease check the %PRODUCTNAME settings or your e-mail program settings." ;
};
QueryBox MSG_QUERY_OPENASTEMPLATE
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c4cd7c2ae588..4d1b807a6ed7 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -20,6 +20,7 @@
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
+#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/toolbox.hxx>
#include <svl/intitem.hxx>
@@ -556,7 +557,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( eResult == SfxMailModel::SEND_MAIL_ERROR )
{
- InfoBox aBox( SfxGetpApp()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ MessageDialog aBox( SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO);
aBox.Execute();
rReq.Ignore();
}
@@ -576,7 +577,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() );
if( eResult == SfxMailModel::SEND_MAIL_ERROR )
{
- InfoBox aBox( SfxGetpApp()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ MessageDialog aBox( SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO);
aBox.Execute();
rReq.Ignore();
}
@@ -1284,7 +1285,7 @@ bool SfxViewShell::PrepareClose
{
if ( bUI )
{
- InfoBox aInfoBox( &GetViewFrame()->GetWindow(), SfxResId( MSG_CANT_CLOSE ) );
+ MessageDialog aInfoBox( &GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO );
aInfoBox.Execute();
}