[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/inc vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 22 16:55:39 UTC 2019


 vcl/inc/units.hrc            |    2 ++
 vcl/source/control/field.cxx |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8c02a13b68f86720a8ade3f796a70cf336046b99
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Nov 22 14:27:50 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 22 17:54:58 2019 +0100

    Resolves: tdf#128948 double prime symbol not parsed as inch indicator
    
    Change-Id: I9d3e606b5158b4594f94e0f13bdf2f635bc77357
    Reviewed-on: https://gerrit.libreoffice.org/83498
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/units.hrc b/vcl/inc/units.hrc
index 2fd522723e66..b13ad4476904 100644
--- a/vcl/inc/units.hrc
+++ b/vcl/inc/units.hrc
@@ -33,6 +33,8 @@ std::pair<const char*, FieldUnit> SV_FUNIT_STRINGS[] =
     { NC_("SV_FUNIT_STRINGS", "twip"), FieldUnit::TWIP },
     { NC_("SV_FUNIT_STRINGS", "pt"), FieldUnit::POINT },
     { NC_("SV_FUNIT_STRINGS", "pc"), FieldUnit::PICA },
+    /* To translators: double prime symbol for inch */
+    { NC_("SV_FUNIT_STRINGS", "″"), FieldUnit::INCH },
     { NC_("SV_FUNIT_STRINGS", "\""), FieldUnit::INCH },
     { NC_("SV_FUNIT_STRINGS", "in"), FieldUnit::INCH },
     { NC_("SV_FUNIT_STRINGS", "inch"), FieldUnit::INCH },
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 1e2ab5a237c5..6307b9ae49d7 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1045,7 +1045,7 @@ static OUString ImplMetricGetUnitText(const OUString& rStr)
     for (sal_Int32 i = rStr.getLength()-1; i >= 0; --i)
     {
         sal_Unicode c = rStr[i];
-        if ( (c == '\'') || (c == '\"') || (c == '%' ) || unicode::isAlpha(c) || unicode::isControl(c) )
+        if ( (c == '\'') || (c == '\"') || (c == '%') || (c == 0x2033) || unicode::isAlpha(c) || unicode::isControl(c) )
             aStr.insert(0, c);
         else
         {


More information about the Libreoffice-commits mailing list