tdf#103259 Add java not found error for mac

Change-Id: Ia52316b8868c8124dcb322b44e9600a33a13df28
Reviewed-on: https://gerrit.libreoffice.org/29920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Yousuf Philips
2016-10-20 00:13:40 +04:00
committed by Tomaž Vajngerl
parent 21e8ed8b5f
commit 967436ba7c
3 changed files with 10 additions and 0 deletions

View File

@@ -195,6 +195,7 @@
#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_WARNING_JAVANOTFOUND_MAC (STR_SVT_JAVAERROR_START+9)
#define STR_SVT_JAVAERROR_END (STR_ERROR_JVMCREATIONFAILED_MAC)
// String array to match UI language names to LanguageType values and vice versa

View File

@@ -24,6 +24,11 @@ String STR_WARNING_JAVANOTFOUND
Text [ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.";
};
String STR_WARNING_JAVANOTFOUND_MAC
{
Text [ en-US ] ="%PRODUCTNAME requires Oracle's Java Development Kit (JDK) on Mac OS X 10.10 or greater to perform this task. Please install them and restart %PRODUCTNAME.";
};
String STR_WARNING_INVALIDJAVASETTINGS_MAC
{
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.";

View File

@@ -122,7 +122,11 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
// No suitable JRE found
SolarMutexGuard aSolarGuard;
m_bJavaNotFound_Handled = true;
#ifdef MACOSX
ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND_MAC), VclMessageType::Warning);
#else
ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND), VclMessageType::Warning);
#endif
aWarningBox->SetText(SvtResId(STR_WARNING_JAVANOTFOUND_TITLE));
nResult = aWarningBox->Execute();
}