[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 12 08:48:40 UTC 2020


 vcl/source/outdev/font.cxx |   53 ++++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

New commits:
commit 22ae46a85086ee716dc5c6b727c76bfb9ccb7c0f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 11 16:29:05 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 12 09:47:53 2020 +0100

    use Point direct and drop a reinterpret_cast
    
    Change-Id: Idd8901225ddb687a2d1b8b5ba4069b40f218191f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105603
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index e633781ed040..71dc5e861fcf 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -278,32 +278,32 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
         PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control
     };
 
-    static const tools::Long aAccentPos[48] =
+    static const Point aAccentPos[24] =
     {
-         78,      0,
-        348,     79,
-        599,    235,
-        843,    469,
-        938,    574,
-        990,    669,
-        990,    773,
-        990,    843,
-        964,    895,
-        921,    947,
-        886,    982,
-        860,    999,
-        825,    999,
-        764,    999,
-        721,    964,
-        686,    895,
-        625,    791,
-        556,    660,
-        469,    504,
-        400,    400,
-        261,    252,
-         61,     61,
-          0,     27,
-          9,      0
+        {  78,    0 },
+        { 348,   79 },
+        { 599,  235 },
+        { 843,  469 },
+        { 938,  574 },
+        { 990,  669 },
+        { 990,  773 },
+        { 990,  843 },
+        { 964,  895 },
+        { 921,  947 },
+        { 886,  982 },
+        { 860,  999 },
+        { 825,  999 },
+        { 764,  999 },
+        { 721,  964 },
+        { 686,  895 },
+        { 625,  791 },
+        { 556,  660 },
+        { 469,  504 },
+        { 400,  400 },
+        { 261,  252 },
+        {  61,   61 },
+        {   0,   27 },
+        {   9,    0 }
     };
 
     rWidth      = 0;
@@ -396,8 +396,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
             }
             else
             {
-                tools::Polygon aPoly( SAL_N_ELEMENTS( aAccentPos ) / 2,
-                                      reinterpret_cast<const Point*>(aAccentPos),
+                tools::Polygon aPoly( SAL_N_ELEMENTS(aAccentPos), aAccentPos,
                                       aAccentPolyFlags );
                 double dScale = static_cast<double>(nDotSize)/1000.0;
                 aPoly.Scale( dScale, dScale );


More information about the Libreoffice-commits mailing list