cui/inc/strings.hrc            |    6 -
 cui/source/dialogs/about.cxx   |  179 +++++++++++++++++++++++--------------
 cui/source/inc/about.hxx       |   16 ++-
 cui/uiconfig/ui/aboutdialog.ui |  195 ++++++++++++++++++++++++++++++++++++-----
 include/vcl/svapp.hxx          |    4 
 vcl/source/app/svapp.cxx       |   70 +++++++-------
 6 files changed, 340 insertions(+), 130 deletions(-)

New commits:
commit ab846145bbd56f4308c8657df8b1354a403edd74
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Wed Apr 29 11:39:57 2020 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Wed Apr 29 19:09:39 2020 +0200

    Resolves tdf#132322 - Link to Gerrit hash reintroduced
    
    Mulit-line label split, Build realized as link_button
    
    Required changes also solve tdf#132066 partially as many
    localized strings are not anymore copied to clipboard
    
    Change-Id: I346fdc65cd1734f17854eccd587fe0b7e216e720
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93119
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 9c81a8e104f9..1049f7e7ff4f 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -381,14 +381,14 @@
 
 #define RID_SVXSTR_CANNOTCONVERTURL_ERR             
NC_("RID_SVXSTR_CANNOTCONVERTURL_ERR", "The URL <%1> cannot be converted to a 
filesystem path.")
 
-#define RID_SVXSTR_ABOUT_VERSION                    
NC_("aboutdialog|textbuffer1", "Version: 
%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX")
+#define RID_SVXSTR_ABOUT_VERSION                    
NC_("aboutdialog|textbuffer1", 
"%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX")
 #define RID_SVXSTR_ABOUT_COPYRIGHT                  
NC_("aboutdialog|copyright", "Copyright © 2000–2020 LibreOffice contributors.")
 #define RID_SVXSTR_ABOUT_CREDITS_URL                NC_("aboutdialog|link", 
"https://www.libreoffice.org/about-us/credits/";)
-#define RID_SVXSTR_ABOUT_BUILDID                    NC_("aboutdialog|buildid", 
"Build ID: $BUILDID")
+#define RID_SVXSTR_ABOUT_BUILDID                    NC_("aboutdialog|buildid", 
"$BUILDID")
 #define RID_SVXSTR_ABOUT_VENDOR                     NC_("aboutdialog|vendor", 
"This release was supplied by %OOOVENDOR.")
 #define RID_SVXSTR_ABOUT_BASED_ON                   
NC_("aboutdialog|libreoffice", "LibreOffice was based on OpenOffice.org.")
 #define RID_SVXSTR_ABOUT_DERIVED                    NC_("aboutdialog|derived", 
"%PRODUCTNAME is derived from LibreOffice which was based on OpenOffice.org")
-#define RID_SVXSTR_ABOUT_LOCALE                     NC_("aboutdialog|locale", 
"Locale: $LOCALE")
+#define RID_SVXSTR_ABOUT_LOCALE                     NC_("aboutdialog|locale", 
"$LOCALE")
 #define RID_SVXSTR_ABOUT_UILOCALE                   
NC_("aboutdialog|uilocale", "UI-Language: $LOCALE")
 
 #define RID_SVXSTR_EDIT_PATHS                       
NC_("optpathspage|editpaths", "Edit Paths: %1")
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index ed58d06acc1c..845ad5496a37 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -19,23 +19,23 @@
 
 #include <about.hxx>
 
-#include <osl/diagnose.h> //OSL_ENSURE
-#include <osl/process.h> //osl_getProcessLocale
+#include <osl/diagnose.h>    //OSL_ENSURE
+#include <osl/process.h>     //osl_getProcessLocale
 #include <rtl/character.hxx> //rtl::isAsciiHexDigit
-#include <sal/log.hxx> //SAL_WARN
-#include <vcl/settings.hxx> //GetSettings
+#include <sal/log.hxx>       //SAL_WARN
+#include <vcl/settings.hxx>  //GetSettings
+#include <vcl/svapp.hxx>     //Application::
+#include <vcl/virdev.hxx>    //VirtualDevice
 #include <vcl/weld.hxx>
-#include <vcl/svapp.hxx> //Application::
-#include <vcl/virdev.hxx> //VirtualDevice
 
+#include <config_buildid.h> //EXTRA_BUILDID
+#include <dialmgr.hxx>      //CuiResId
 #include <i18nlangtag/languagetag.hxx>
+#include <sfx2/app.hxx> //SfxApplication::loadBrandSvg
+#include <strings.hrc>
 #include <svtools/langhelp.hxx>
 #include <unotools/bootstrap.hxx> //utl::Bootstrap::getBuildVersion
 #include <unotools/configmgr.hxx> //ConfigManager::
-#include <config_buildid.h> //EXTRA_BUILDID
-#include <dialmgr.hxx> //CuiResId
-#include <sfx2/app.hxx> //SfxApplication::loadBrandSvg
-#include <strings.hrc>
 
 #include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
 #include <vcl/unohelp2.hxx>
@@ -58,13 +58,36 @@ AboutDialog::AboutDialog(weld::Window *pParent)
       m_pCopyButton(m_xBuilder->weld_button("btnCopyVersion")),
       m_pBrandImage(m_xBuilder->weld_image("imBrand")),
       m_pAboutImage(m_xBuilder->weld_image("imAbout")),
-      m_pVersionLabel(m_xBuilder->weld_label("lbVersion")),
+      m_pVersionLabel(m_xBuilder->weld_label("lbVersionString")),
+      m_pBuildCaption(m_xBuilder->weld_label("lbBuild")),
+      m_pBuildLabel(m_xBuilder->weld_link_button("lbBuildString")),
+      m_pEnvLabel(m_xBuilder->weld_label("lbEnvString")),
+      m_pUILabel(m_xBuilder->weld_label("lbUIString")),
+      m_pLocaleLabel(m_xBuilder->weld_label("lbLocaleString")),
+      m_pMiscLabel(m_xBuilder->weld_label("lbMiscString")),
       m_pCopyrightLabel(m_xBuilder->weld_label("lbCopyright")) {
+
+  // Labels
   m_pVersionLabel->set_label(GetVersionString());
+
+  OUString sbuildId = GetBuildString();
+  if (IsStringValidGitHash(sbuildId)) {
+    m_pBuildLabel->set_label(sbuildId);
+    m_pBuildLabel->set_uri(
+        "https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h="; + 
sbuildId);
+  } else {
+    m_pBuildCaption->hide();
+    m_pBuildLabel->hide();
+  }
+
+  m_pEnvLabel->set_label(GetEnvString());
+  m_pUILabel->set_label(GetUIString());
+  m_pLocaleLabel->set_label(GetLocaleString());
+  m_pMiscLabel->set_label(GetMiscString());
   m_pCopyrightLabel->set_label(GetCopyrightString());
 
-  //Images
-  const Size nWidth(m_pVersionLabel->get_preferred_size());
+  // Images
+  const long nWidth(m_pCopyrightLabel->get_preferred_size().getWidth());
   BitmapEx aBackgroundBitmap;
 
   if (SfxApplication::loadBrandSvg(Application::GetSettings()
@@ -73,8 +96,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
                                            .IsDark()
                                        ? "shell/logo_inverted"
                                        : "shell/logo",
-                                   aBackgroundBitmap,
-                                   nWidth.getWidth() * 0.8)) {
+                                   aBackgroundBitmap, nWidth * 0.8)) {
     ScopedVclPtr<VirtualDevice> m_pVirDev =
         m_pBrandImage->create_virtual_device();
     m_pVirDev->SetOutputSizePixel(aBackgroundBitmap.GetSizePixel());
@@ -82,8 +104,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
     m_pBrandImage->set_image(m_pVirDev.get());
     m_pVirDev.disposeAndClear();
   }
-  if (SfxApplication::loadBrandSvg("shell/about", aBackgroundBitmap,
-                                   nWidth.getWidth())) {
+  if (SfxApplication::loadBrandSvg("shell/about", aBackgroundBitmap, nWidth)) {
     ScopedVclPtr<VirtualDevice> m_pVirDev =
         m_pAboutImage->create_virtual_device();
     m_pVirDev->SetOutputSizePixel(aBackgroundBitmap.GetSizePixel());
@@ -92,7 +113,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
     m_pVirDev.disposeAndClear();
   }
 
-  //Links
+  // Links
   m_pCreditsButton->set_uri(CuiResId(RID_SVXSTR_ABOUT_CREDITS_URL));
 
   OUString sURL(officecfg::Office::Common::Help::StartCenter::InfoURL::get());
@@ -104,46 +125,20 @@ AboutDialog::AboutDialog(weld::Window *pParent)
          LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
   m_pReleaseNotesButton->set_uri(sURL);
 
-  //Handler
+  // Handler
   m_pCopyButton->connect_clicked(LINK(this, AboutDialog, HandleClick));
   m_pCloseButton->grab_focus();
 }
 
 AboutDialog::~AboutDialog() {}
 
-OUString AboutDialog::GetBuildId() {
-  OUString sDefault;
-  OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault));
-  if (!sBuildId.isEmpty())
-    return sBuildId;
-
-  sBuildId = utl::Bootstrap::getBuildIdData(sDefault);
-
-  if (!sBuildId.isEmpty()) {
-    return sBuildId.getToken(0, '-');
-  }
-
-  OSL_ENSURE(!sBuildId.isEmpty(), "No BUILDID in bootstrap file");
-  return sBuildId;
-}
-
-OUString AboutDialog::GetLocaleString() {
-  OUString aLocaleStr;
-  rtl_Locale *pLocale;
-
-  osl_getProcessLocale(&pLocale);
-
-  if (pLocale && pLocale->Language) {
-    if (pLocale->Country && rtl_uString_getLength(pLocale->Country) > 0)
-      aLocaleStr = OUString::unacquired(&pLocale->Language) + "_" +
-                   OUString::unacquired(&pLocale->Country);
-    else
-      aLocaleStr = OUString(pLocale->Language);
-    if (pLocale->Variant && rtl_uString_getLength(pLocale->Variant) > 0)
-      aLocaleStr += OUString(pLocale->Variant);
+bool AboutDialog::IsStringValidGitHash(const OUString &hash) {
+  for (int i = 0; i < hash.getLength(); i++) {
+    if (!std::isxdigit(hash[i])) {
+      return false;
+    }
   }
-
-  return aLocaleStr;
+  return true;
 }
 
 OUString AboutDialog::GetVersionString() {
@@ -154,48 +149,85 @@ OUString AboutDialog::GetVersionString() {
 #elif defined(_WIN32)
   sVersion += " (x86)";
 #endif
+  return sVersion;
+}
 
-  OUString sBuildId = GetBuildId();
+OUString AboutDialog::GetBuildString() {
 
-  OUString aLocaleStr = Application::GetSettings().GetLanguageTag().getBcp47() 
+
-                        " (" + GetLocaleString() + ")";
-  OUString aUILocaleStr =
-      Application::GetSettings().GetUILanguageTag().getBcp47();
+  OUString sDefault;
+  OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault));
+  if (sBuildId.isEmpty())
+    sBuildId = utl::Bootstrap::getBuildIdData(sDefault);
+  if (sBuildId.isEmpty()) {
+    sBuildId = sBuildId.getToken(0, '-');
+  }
+  OSL_ENSURE(!sBuildId.isEmpty(), "No BUILDID in bootstrap file");
+
+  OUString sBuildStr;
 
   if (!sBuildId.trim().isEmpty()) {
-    sVersion += "\n";
-    OUString sBuildStr = CuiResId(RID_SVXSTR_ABOUT_BUILDID);
+    sBuildStr = CuiResId(RID_SVXSTR_ABOUT_BUILDID);
     if (sBuildStr.indexOf("$BUILDID") == -1) {
       SAL_WARN("cui.dialogs", "translated Build Id string in translations "
                               "doesn't contain $BUILDID placeholder");
       sBuildStr += " $BUILDID";
     }
-    sVersion += sBuildStr.replaceAll("$BUILDID", sBuildId);
+    sBuildStr = sBuildStr.replaceAll("$BUILDID", sBuildId);
   }
+  return sBuildStr;
+}
 
-  sVersion += "\n" + Application::GetHWOSConfInfo();
+OUString AboutDialog::GetEnvString() { return Application::GetHWOSConfInfo(1); 
}
+OUString AboutDialog::GetUIString() { return Application::GetHWOSConfInfo(2); }
 
-  bool const extra = EXTRA_BUILDID[0] != '\0';
-  // extracted from the 'if' to avoid Clang -Wunreachable-code
-  if (extra) {
-    sVersion += "\n" EXTRA_BUILDID;
+OUString AboutDialog::GetLocaleString() {
+
+  OUString aLocaleStr;
+
+  rtl_Locale *pLocale;
+  osl_getProcessLocale(&pLocale);
+  if (pLocale && pLocale->Language) {
+    if (pLocale->Country && rtl_uString_getLength(pLocale->Country) > 0)
+      aLocaleStr = OUString::unacquired(&pLocale->Language) + "_" +
+                   OUString::unacquired(&pLocale->Country);
+    else
+      aLocaleStr = OUString(pLocale->Language);
+    if (pLocale->Variant && rtl_uString_getLength(pLocale->Variant) > 0)
+      aLocaleStr += OUString(pLocale->Variant);
   }
 
+  aLocaleStr = Application::GetSettings().GetLanguageTag().getBcp47() + " (" +
+               aLocaleStr + ")";
   OUString sLocaleStr(CuiResId(RID_SVXSTR_ABOUT_LOCALE));
   if (sLocaleStr.indexOf("$LOCALE") == -1) {
     SAL_WARN("cui.dialogs", "translated locale string in translations doesn't "
                             "contain $LOCALE placeholder");
     sLocaleStr += " $LOCALE";
   }
-  sVersion += "\n" + sLocaleStr.replaceAll("$LOCALE", aLocaleStr);
+  sLocaleStr = sLocaleStr.replaceAll("$LOCALE", aLocaleStr);
 
+  OUString aUILocaleStr =
+      Application::GetSettings().GetUILanguageTag().getBcp47();
   OUString sUILocaleStr(CuiResId(RID_SVXSTR_ABOUT_UILOCALE));
   if (sUILocaleStr.indexOf("$LOCALE") == -1) {
     SAL_WARN("cui.dialogs", "translated uilocale string in translations "
                             "doesn't contain $LOCALE placeholder");
     sUILocaleStr += " $LOCALE";
   }
-  sVersion += "; " + sUILocaleStr.replaceAll("$LOCALE", aUILocaleStr);
+  sUILocaleStr = sUILocaleStr.replaceAll("$LOCALE", aUILocaleStr);
+
+  return sLocaleStr + "; " + sUILocaleStr;
+}
+
+OUString AboutDialog::GetMiscString() {
+
+  OUString sMisc;
+
+  bool const extra = EXTRA_BUILDID[0] != '\0';
+  // extracted from the 'if' to avoid Clang -Wunreachable-code
+  if (extra) {
+    sMisc = EXTRA_BUILDID "\n";
+  }
 
   OUString aCalcMode = "Calc: "; // Calc calculation mode
 
@@ -218,9 +250,9 @@ OUString AboutDialog::GetVersionString() {
     aCalcMode += "threaded";
   }
 
-  sVersion += "\n" + aCalcMode;
+  sMisc += aCalcMode;
 
-  return sVersion;
+  return sMisc;
 }
 
 OUString AboutDialog::GetCopyrightString() {
@@ -240,6 +272,15 @@ IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, 
void) {
   css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard =
       css::datatransfer::clipboard::SystemClipboard::create(
           comphelper::getProcessComponentContext());
-  vcl::unohelper::TextDataObject::CopyStringTo(m_pVersionLabel->get_label(), 
xClipboard);
+
+  OUString sInfo;
+  sInfo += "Version: " + m_pVersionLabel->get_label() + "\n";
+  sInfo += "Build ID: " + m_pBuildLabel->get_label() + "\n";
+  sInfo += m_pEnvLabel->get_label();
+  sInfo += m_pUILabel->get_label() + "\n";
+  sInfo += "Locale: " + m_pLocaleLabel->get_label() + "\n";
+  sInfo += m_pMiscLabel->get_label();
+
+  vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard);
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 0872a7c3da44..53f8ca489fa2 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -34,12 +34,24 @@ private:
     std::unique_ptr<weld::Image> m_pBrandImage;
     std::unique_ptr<weld::Image> m_pAboutImage;
     std::unique_ptr<weld::Label> m_pVersionLabel;
+    std::unique_ptr<weld::Label> m_pBuildCaption;
+    std::unique_ptr<weld::LinkButton> m_pBuildLabel;
+    std::unique_ptr<weld::Label> m_pEnvLabel;
+    std::unique_ptr<weld::Label> m_pUILabel;
+    std::unique_ptr<weld::Label> m_pLocaleLabel;
+    std::unique_ptr<weld::Label> m_pMiscLabel;
     std::unique_ptr<weld::Label> m_pCopyrightLabel;
 
-    static OUString GetBuildId();
     static OUString GetVersionString();
-    static OUString GetCopyrightString();
+    static OUString GetBuildString();
+    static OUString GetEnvString();
+    static OUString GetUIString();
     static OUString GetLocaleString();
+    static OUString GetMiscString();
+    static OUString GetExtraString();
+
+    static OUString GetCopyrightString();
+    static bool IsStringValidGitHash(const OUString& hash);
 
     DECL_LINK(HandleClick, weld::Button&, void);
 
diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index bbbac5187d92..5f3610856e34 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -75,6 +75,7 @@
                 <property name="can_focus">False</property>
                 <property name="halign">center</property>
                 <property name="valign">center</property>
+                <property name="margin_left">12</property>
                 <property name="margin_right">12</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
@@ -89,14 +90,14 @@
               <object class="GtkImage" id="imBrand">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="halign">center</property>
+                <property name="halign">start</property>
                 <property name="valign">center</property>
-                <property name="margin_left">24</property>
+                <property name="margin_left">30</property>
                 <property name="margin_top">24</property>
                 <property name="margin_bottom">24</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="xalign">0</property>
+                <property name="xalign">0.5</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -104,23 +105,172 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="lbCopyright">
+              <object class="GtkGrid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="valign">start</property>
-                <property name="margin_bottom">6</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="label" context="aboutdialog|copyright">This 
release was supplied by The Document Foundation.
-Copyright (c) 1980-2020 LibreOffice contributors.
-LibreOffice was based on OpenOffice.org</property>
-                <property name="wrap">True</property>
-                <property name="max_width_chars">50</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
+                <child>
+                  <object class="GtkLabel" id="lbVersion">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbVersion">Version:</property>
+                    <property name="wrap">True</property>
+                    <property name="max_width_chars">50</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbBuild">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbBuild">Build:</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbEnvironment">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbEnvironment">Environment:</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbVersionString">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xpad">6</property>
+                    <property name="label">7.0</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbEnvString">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xpad">6</property>
+                    <property name="label">8 cores</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLinkButton" id="lbBuildString">
+                    <property name="label">0815</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbMisc">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbExtra">Misc:</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbMiscString">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xpad">6</property>
+                    <property name="label">Calc</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbLocale">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbLocale">Locale:</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbLocaleString">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xpad">6</property>
+                    <property name="label">English</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbUI">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" 
context="aboutdialog|lbUI">User Interface:</property>
+                    <property name="xalign">1</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="lbUIString">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xpad">6</property>
+                    <property name="label">VCL: gtk</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">1</property>
               </packing>
             </child>
             <child>
@@ -146,24 +296,23 @@ LibreOffice was based on OpenOffice.org</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="lbVersion">
+              <object class="GtkLabel" id="lbCopyright">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="valign">end</property>
+                <property name="valign">start</property>
+                <property name="margin_bottom">6</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="label">Version: 7.0
-Build ID: 7.0
-CPU threads
-Locale:
-Calc:</property>
+                <property name="label" context="aboutdialog|copyright">This 
release was supplied by The Document Foundation.
+Copyright (c) 1980-2020 LibreOffice contributors.
+LibreOffice was based on OpenOffice.org</property>
                 <property name="wrap">True</property>
                 <property name="max_width_chars">50</property>
                 <property name="xalign">0</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">3</property>
               </packing>
             </child>
             <child>
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index e6ed7a1f46fc..b450043767f7 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -903,8 +903,10 @@ public:
 
     /** Get useful OS, Hardware and configuration information,
      * cf. Help->About, and User-Agent
+     * bSelection = 0 to return all info, 1 for environment only,
+     *   and 2 for VCL/render related infos
      */
-    static OUString             GetHWOSConfInfo();
+    static OUString             GetHWOSConfInfo(const int bSelection = 0);
 
     /** Load a localized branding PNG file as a bitmap.
 
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 651d4aa456dd..db0a09ddb2db 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1133,54 +1133,60 @@ OUString Application::GetAppName()
         return OUString();
 }
 
-OUString Application::GetHWOSConfInfo()
+enum {hwAll=0, hwEnv=1, hwUI=2};
+
+OUString Application::GetHWOSConfInfo(const int bSelection)
 {
     ImplSVData* pSVData = ImplGetSVData();
     OUStringBuffer aDetails;
 
-    aDetails.append( VclResId(SV_APP_CPUTHREADS) );
-    aDetails.append( 
static_cast<sal_Int32>(std::thread::hardware_concurrency()) );
-    aDetails.append( "; " );
+    if (bSelection != hwUI) {
+        aDetails.append( VclResId(SV_APP_CPUTHREADS) );
+        aDetails.append( 
static_cast<sal_Int32>(std::thread::hardware_concurrency()) );
+        aDetails.append( "; " );
 
-    OUString aVersion;
-    if ( pSVData && pSVData->mpDefInst )
-        aVersion = pSVData->mpDefInst->getOSVersion();
-    else
-        aVersion = "-";
+        OUString aVersion;
+        if ( pSVData && pSVData->mpDefInst )
+            aVersion = pSVData->mpDefInst->getOSVersion();
+        else
+            aVersion = "-";
 
-    aDetails.append( VclResId(SV_APP_OSVERSION) );
-    aDetails.append( aVersion );
-    aDetails.append( "; " );
+        aDetails.append( VclResId(SV_APP_OSVERSION) );
+        aDetails.append( aVersion );
+        aDetails.append( "; " );
+    }
 
-    aDetails.append( VclResId(SV_APP_UIRENDER) );
+    if (bSelection != hwEnv) {
+        aDetails.append( VclResId(SV_APP_UIRENDER) );
 #if HAVE_FEATURE_SKIA
-    if ( SkiaHelper::isVCLSkiaEnabled() )
-    {
-        switch(SkiaHelper::renderMethodToUse())
+        if ( SkiaHelper::isVCLSkiaEnabled() )
         {
-            case SkiaHelper::RenderVulkan:
-                aDetails.append( VclResId(SV_APP_SKIA_VULKAN) );
-                break;
-            case SkiaHelper::RenderRaster:
-                aDetails.append( VclResId(SV_APP_SKIA_RASTER) );
-                break;
+            switch(SkiaHelper::renderMethodToUse())
+            {
+                case SkiaHelper::RenderVulkan:
+                    aDetails.append( VclResId(SV_APP_SKIA_VULKAN) );
+                    break;
+                case SkiaHelper::RenderRaster:
+                    aDetails.append( VclResId(SV_APP_SKIA_RASTER) );
+                    break;
+            }
         }
-    }
-    else
+        else
 #endif
 #if HAVE_FEATURE_OPENGL
-    if ( OpenGLWrapper::isVCLOpenGLEnabled() )
-        aDetails.append( VclResId(SV_APP_GL) );
-    else
+        if ( OpenGLWrapper::isVCLOpenGLEnabled() )
+            aDetails.append( VclResId(SV_APP_GL) );
+        else
 #endif
-        aDetails.append( VclResId(SV_APP_DEFAULT) );
-    aDetails.append( "; " );
+            aDetails.append( VclResId(SV_APP_DEFAULT) );
+        aDetails.append( "; " );
 
 #if (defined LINUX || defined _WIN32 || defined MACOSX)
-    aDetails.append( SV_APP_VCLBACKEND );
-    aDetails.append( GetToolkitName() );
-    aDetails.append( "; " );
+        aDetails.append( SV_APP_VCLBACKEND );
+        aDetails.append( GetToolkitName() );
+        aDetails.append( "; " );
 #endif
+    }
 
     return aDetails.makeStringAndClear();
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to