[Libreoffice-commits] core.git: include/svtools svtools/source

tagezi lera.goncharuk at gmail.com
Mon Jan 22 05:42:04 UTC 2018


 include/svtools/strings.hrc                    |    1 +
 svtools/source/java/javainteractionhandler.cxx |   10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 506e1396c34bb90c8d2c3679e3e84c3833b18869
Author: tagezi <lera.goncharuk at gmail.com>
Date:   Sun Jan 21 19:08:30 2018 +0300

    tdf#115002 Including of bitness information into Java message on Windows
    
    Change-Id: Id5235360110cf9838a38f8063448b06a5de1f82c
    Reviewed-on: https://gerrit.libreoffice.org/48272
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index e9e05f2f8109..5413f7794daa 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -282,6 +282,7 @@
 #define STR_SVT_DEFAULT_SERVICE_LABEL           NC_("STR_SVT_DEFAULT_SERVICE_LABEL", "$user$'s $service$")
 
 #define STR_WARNING_JAVANOTFOUND                NC_("STR_WARNING_JAVANOTFOUND", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.")
+#define STR_WARNING_JAVANOTFOUND_WIN            NC_("STR_WARNING_JAVANOTFOUND_WIN", "%PRODUCTNAME requires a %BITNESS-bit Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.")
 #define STR_WARNING_JAVANOTFOUND_MAC            NC_("STR_WARNING_JAVANOTFOUND_MAC", "%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.")
 #define STR_WARNING_INVALIDJAVASETTINGS_MAC     NC_("STR_WARNING_INVALIDJAVASETTINGS_MAC", "The %PRODUCTNAME configuration has been changed. Under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.")
 #define STR_WARNING_INVALIDJAVASETTINGS         NC_("STR_WARNING_INVALIDJAVASETTINGS", "The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.")
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index ba9625065663..6eb906a23005 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -118,8 +118,16 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
            // No suitable JRE found
             SolarMutexGuard aSolarGuard;
             m_bJavaNotFound_Handled = true;
-#ifdef MACOSX
+#if defined( MACOSX )
             ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND_MAC), VclMessageType::Warning);
+#elif defined( _WIN32 )
+            ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND_WIN), VclMessageType::Warning);
+            OUString sPrimTex = aWarningBox->get_primary_text();
+#if defined( _WIN64 )
+            aWarningBox->set_primary_text(sPrimTex.replaceAll( "%BITNESS", "64" ));
+#else
+            aWarningBox->set_primary_text(sPrimTex.replaceAll( "%BITNESS", "32" ));
+#endif
 #else
             ScopedVclPtrInstance< MessageDialog > aWarningBox(nullptr, SvtResId(STR_WARNING_JAVANOTFOUND), VclMessageType::Warning);
 #endif


More information about the Libreoffice-commits mailing list