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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 30 17:32:10 UTC 2018


 vcl/source/window/decoview.cxx |   33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

New commits:
commit 47b820d17c5fcab61e8db0f19b9b9b357c29f97c
Author:     Thorsten Wagner <thorsten.wagner.4 at gmail.com>
AuthorDate: Mon Jun 25 23:53:58 2018 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Mon Jul 30 19:31:46 2018 +0200

    Inaccurate symbol signs fixed (tdf#118381)
    
    Change-Id: I2af1d3e4c924acd2ae601f0b40fcf1b2be17c397
    Reviewed-on: https://gerrit.libreoffice.org/56426
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-on: https://gerrit.libreoffice.org/58328
    Tested-by: Jenkins

diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index e44eba19e727..f1dbc388162c 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -68,6 +68,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
     const long n2 = nSide/2;
     const long n4 = (n2+1)/2;
     const long n8 = (n4+1)/2;
+    const long n16 = (n8+1)/2;
     const Point aCenter = nRect.Center();
 
     switch ( eType )
@@ -79,6 +80,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustTop( 1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
                                 Point( aCenter.X()+i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top() ) );
             }
             pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top()+1,
                                        aCenter.X()+n8, nRect.Bottom() ) );
@@ -91,6 +94,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustBottom( -1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
                                 Point( aCenter.X()+i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom() ) );
             }
             pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top(),
                                        aCenter.X()+n8, nRect.Bottom()-1 ) );
@@ -103,6 +108,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustLeft( 1 );
                 pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ),
                                 Point( nRect.Left(), aCenter.Y()+i ) );
+                pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()-i ) );
+                pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()+i ) );
             }
             pDev->DrawRect( tools::Rectangle( nRect.Left()+1, aCenter.Y()-n8,
                                        nRect.Right(), aCenter.Y()+n8 ) );
@@ -115,6 +122,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustRight( -1 );
                 pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ),
                                 Point( nRect.Right(), aCenter.Y()+i ) );
+                pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()-i ) );
+                pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()+i ) );
             }
             pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8,
                                        nRect.Right()-1, aCenter.Y()+n8 ) );
@@ -128,6 +137,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustTop( 1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
                                 Point( aCenter.X()+i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top() ) );
             }
             break;
 
@@ -139,6 +150,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustBottom( -1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
                                 Point( aCenter.X()+i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom() ) );
             }
             break;
 
@@ -158,6 +171,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustLeft( 1 );
                 pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ),
                                 Point( nRect.Left(), aCenter.Y()+i ) );
+                pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()-i ) );
+                pDev->DrawPixel( Point( nRect.Left(), aCenter.Y()+i ) );
             }
             break;
 
@@ -178,6 +193,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustRight( -1 );
                 pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ),
                                 Point( nRect.Right(), aCenter.Y()+i ) );
+                pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()-i ) );
+                pDev->DrawPixel( Point( nRect.Right(), aCenter.Y()+i ) );
             }
             break;
 
@@ -189,8 +206,12 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustTop( 1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
                                 Point( aCenter.X()+i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top() ) );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Top()+n2 ),
                                 Point( aCenter.X()+i, nRect.Top()+n2 ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Top()+n2 ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Top()+n2 ) );
             }
             break;
 
@@ -202,8 +223,12 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
                 nRect.AdjustBottom( -1 );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
                                 Point( aCenter.X()+i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom() ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom() ) );
                 pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom()-n2 ),
                                 Point( aCenter.X()+i, nRect.Bottom()-n2 ) );
+                pDev->DrawPixel( Point( aCenter.X()-i, nRect.Bottom()-n2 ) );
+                pDev->DrawPixel( Point( aCenter.X()+i, nRect.Bottom()-n2 ) );
             }
             break;
 
@@ -353,10 +378,10 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
             break;
 
         case SymbolType::PLUS:
-            pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8/2,
-                                       nRect.Right()+1, aCenter.Y()+n8/2+1 ) );
-            pDev->DrawRect( tools::Rectangle( aCenter.X()-n8/2, nRect.Top(),
-                                       aCenter.X()+n8/2+1, nRect.Bottom()+1 ) );
+            pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n16,
+                                              nRect.Right(), aCenter.Y()+n16 ) );
+            pDev->DrawRect( tools::Rectangle( aCenter.X()-n16, nRect.Top(),
+                                              aCenter.X()+n16, nRect.Bottom() ) );
             break;
         case SymbolType::DONTKNOW:
         case SymbolType::IMAGE:


More information about the Libreoffice-commits mailing list