summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 15:40:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:31 +0100
commit0696e590455145e3a57b9925b76a7a8ff5f6043e (patch)
tree5cf3e61ced4dea80e0552989b8af40bfbd0f5272
parent5f073470617d225fc519fd485e447a8ad10967d9 (diff)
convert WARNINGBOX_* to MessageDialog + string
Change-Id: Icdd1cbd4660ebcc156d1a406bd853fce3b5cf1e1
-rw-r--r--include/svtools/svtools.hrc23
-rw-r--r--svtools/source/java/javaerror.src22
-rw-r--r--svtools/source/java/javainteractionhandler.cxx11
3 files changed, 23 insertions, 33 deletions
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index c0af41357fb5..207f2f003b86 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -196,13 +196,16 @@
#define STR_SVT_INDEXENTRY_END (STR_SVT_INDEXENTRY_PHONETIC_LC)
//String - Ids for Java errors, messages
-#define STR_SVT_JAVAERROR_START (STR_SVT_INDEXENTRY_END + 1)
-#define STR_ERROR_JVMCREATIONFAILED_TITLE (STR_SVT_JAVAERROR_START+1)
-#define STR_WARNING_JAVANOTFOUND (STR_SVT_JAVAERROR_START+2)
-#define STR_WARNING_INVALIDJAVASETTINGS (STR_SVT_JAVAERROR_START+3)
-#define STR_ERROR_JVMCREATIONFAILED (STR_SVT_JAVAERROR_START+4)
-#define STR_ERROR_JVMCREATIONFAILED_MAC (STR_SVT_JAVAERROR_START+5)
-#define STR_SVT_JAVAERROR_END (STR_ERROR_JVMCREATIONFAILED_MAC)
+#define STR_SVT_JAVAERROR_START (STR_SVT_INDEXENTRY_END + 1)
+#define STR_ERROR_JVMCREATIONFAILED_TITLE (STR_SVT_JAVAERROR_START+1)
+#define STR_WARNING_JAVANOTFOUND (STR_SVT_JAVAERROR_START+2)
+#define STR_WARNING_JAVANOTFOUND_TITLE (STR_SVT_JAVAERROR_START+3)
+#define STR_WARNING_INVALIDJAVASETTINGS (STR_SVT_JAVAERROR_START+4)
+#define STR_WARNING_INVALIDJAVASETTINGS_MAC (STR_SVT_JAVAERROR_START+5)
+#define STR_WARNING_INVALIDJAVASETTINGS_TITLE (STR_SVT_JAVAERROR_START+6)
+#define STR_ERROR_JVMCREATIONFAILED (STR_SVT_JAVAERROR_START+7)
+#define STR_ERROR_JVMCREATIONFAILED_MAC (STR_SVT_JAVAERROR_START+8)
+#define STR_SVT_JAVAERROR_END (STR_ERROR_JVMCREATIONFAILED_MAC)
// String array to match UI language names to LanguageType values and vice versa
#define STR_ARR_SVT_LANGUAGE_TABLE_START (STR_SVT_JAVAERROR_END + 1)
@@ -261,12 +264,6 @@
#define RID_SVTOOLS_IMAGELIST_SMALL (RID_SVTOOLS_IMAGELIST_START + 2)
#define RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX (RID_SVTOOLS_IMAGELIST_START + 3)
-// Java message boxes
-#define WARNINGBOX_JAVANOTFOUND (RID_SVTOOLS_START+22)
-#define WARNINGBOX_INVALIDJAVASETTINGS (RID_SVTOOLS_START+23)
-// RID_SVTOOLS_START + 24 unused
-#define WARNINGBOX_INVALIDJAVASETTINGS_MAC (RID_SVTOOLS_START+25)
-
// images
#define RID_IMG_TREENODE_COLLAPSED (RID_SVTOOLS_START + 0)
#define RID_IMG_TREENODE_EXPANDED (RID_SVTOOLS_START + 1)
diff --git a/svtools/source/java/javaerror.src b/svtools/source/java/javaerror.src
index e5c17e945f2c..f1d1386ccb64 100644
--- a/svtools/source/java/javaerror.src
+++ b/svtools/source/java/javaerror.src
@@ -19,25 +19,19 @@
#include <svtools/svtools.hrc>
-WarningBox WARNINGBOX_JAVANOTFOUND
+String STR_WARNING_JAVANOTFOUND
{
- Buttons = WB_OK ;
- DefButton = WB_DEF_OK ;
- Message[ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.";
+ Text [ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.";
};
-WarningBox WARNINGBOX_INVALIDJAVASETTINGS_MAC
+String STR_WARNING_INVALIDJAVASETTINGS_MAC
{
- Buttons = WB_OK ;
- DefButton = WB_DEF_OK ;
- Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.";
+ Text [ en-US ] ="The %PRODUCTNAME configuration has been changed. Under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.";
};
-WarningBox WARNINGBOX_INVALIDJAVASETTINGS
+String STR_WARNING_INVALIDJAVASETTINGS
{
- Buttons = WB_OK ;
- DefButton = WB_DEF_OK ;
- Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.";
+ Text [ en-US ] ="The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.";
};
String STR_ERROR_JVMCREATIONFAILED_MAC
@@ -50,12 +44,12 @@ String STR_ERROR_JVMCREATIONFAILED
Text[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - %PRODUCTNAME - Advanced.";
};
-String STR_WARNING_JAVANOTFOUND
+String STR_WARNING_JAVANOTFOUND_TITLE
{
Text[ en-US ] = "JRE Required" ;
};
-String STR_WARNING_INVALIDJAVASETTINGS
+String STR_WARNING_INVALIDJAVASETTINGS_TITLE
{
Text[ en-US ] = "Select JRE";
};
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index 36ab197f9bd7..15e797d18dfe 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/java/RestartRequiredException.hpp>
#include <comphelper/processfactory.hxx>
#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <tools/rcid.h>
@@ -123,8 +122,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
// No suitable JRE found
SolarMutexGuard aSolarGuard;
m_bJavaNotFound_Handled = true;
- WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_JAVANOTFOUND ) );
- aWarningBox.SetText(SvtResId(STR_WARNING_JAVANOTFOUND).toString());
+ MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_JAVANOTFOUND), VCL_MESSAGE_WARNING);
+ aWarningBox.SetText(SvtResId(STR_WARNING_JAVANOTFOUND_TITLE));
nResult = aWarningBox.Execute();
}
else
@@ -140,11 +139,11 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
SolarMutexGuard aSolarGuard;
m_bInvalidSettings_Handled = true;
#ifdef MACOSX
- WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS_MAC ) );
+ MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VCL_MESSAGE_WARNING);
#else
- WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS ) );
+ MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS), VCL_MESSAGE_WARNING);
#endif
- aWarningBox.SetText(SvtResId(STR_WARNING_INVALIDJAVASETTINGS).toString());
+ aWarningBox.SetText(SvtResId(STR_WARNING_INVALIDJAVASETTINGS_TITLE));
nResult = aWarningBox.Execute();
}
else