[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sc/source svx/source

Damien Chambe damien.chambe at gmail.com
Thu Jun 26 02:33:41 PDT 2014


 sc/source/ui/view/drawview.cxx |    2 +-
 svx/source/svdraw/gradtrns.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 21e4d0de7b8cce4941bebacf3e8d75c9e68ee176
Author: Damien Chambe <damien.chambe at gmail.com>
Date:   Sun Jun 15 21:17:41 2014 +0200

    Resolves fdo#76160 Calc invalid image position on zooming
    
    Change-Id: Idd268a3378a902c173dc4d75d879714c2e919b2d
    Reviewed-on: https://gerrit.libreoffice.org/9792
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>
    (cherry picked from commit b8d84a3bf59212a9652f76d7852c81191b8c8a3b)

diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index c4a4da2..09d845a 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -321,7 +321,7 @@ void ScDrawView::RecalcScale()
     if (nEndCol<20)
         nEndCol = 20;
     if (nEndRow<20)
-        nEndRow = 1000;
+        nEndRow = 20;
 
     ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev,aZoomX,aZoomY,nPPTX,nPPTY,
                             aScaleX,aScaleY );
commit cb27f7ab60a0aac36de0dfe184149ffb339ad59b
Author: Hideki Ikeda <hideki.ikeda at gmail.com>
Date:   Tue Jun 24 19:05:51 2014 -0400

    fdo#37401 - fixed the old vector length
    
    The center-left point in the area is used to calculate the old vector length but the coordinate was incorrect.
    
    Change-Id: I81a88182d11e30ee7a5caee3eac879b082bff160
    Reviewed-on: https://gerrit.libreoffice.org/9887
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 03675ab4a8994cb7000fd738d1685720c8b9e584)
    
    Related: fdo#37401 adjust fix to original aCenter use
    
    i.e. as far as I can see the bug came about during....
    
    commit 74cb1c4cb5f72fd8cf80c6d144eda00841394647
    Author: Ivo Hinkelmann <ihi at openoffice.org>
    Date:   Tue Nov 14 12:37:46 2006 +0000
    
    with
    
    2006/10/27 12:14:08 aw 1.2.1208.5: #i39528# ::basegfx -> basegfx adaption
    
    in
    
    -                Vector2D aFullVec(aStartPos - aEndPos);
    -                Vector2D aOldVec(Vector2D(aRect.Left(), aCenter.Y()) - aRect.TopLeft());
                                                             ^^^^^^^^^^^
    -                double fFullLen = aFullVec.GetLength();
    -                double fOldLen = aOldVec.GetLength();
    -                double fNewBorder = (fFullLen * 100.0) / fOldLen;
    -                sal_Int32 nNewBorder = 100 - (sal_Int32)(fNewBorder + 0.5);
    +                basegfx::B2DVector aFullVec(aStartPos - aEndPos);
    +                const basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY());
    +                const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aRange.getHeight());
                                                                           ^^^^^^^^^^^^^^^^^^
    +                const basegfx::B2DVector aOldVec(aCenterLeft - aTopLeft);
    +                const double fFullLen(aFullVec.getLength());
    +                const double fOldLen(aOldVec.getLength());
    +                const double fNewBorder((fFullLen * 100.0) / fOldLen);
    +                sal_Int32 nNewBorder(100L - FRound(fNewBorder));
    
    Change-Id: I840caa5e49a04f9b6460c4fa8e3731f3e5ebde05
    (cherry picked from commit ef16d765306c932c49254f295f57e5853129c1ea)
    (cherry picked from commit 383135d77867d0f2c05b4c807eb17b099604eaa1)

diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
index f0bdfeb..be875b2 100644
--- a/svx/source/svdraw/gradtrns.cxx
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -468,7 +468,7 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
             {
                 basegfx::B2DVector aFullVec(aStartPos - aEndPos);
                 const basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY());
-                const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aRange.getHeight());
+                const basegfx::B2DPoint aCenterLeft(aRange.getMinX(), aCenter.getY());
                 const basegfx::B2DVector aOldVec(aCenterLeft - aTopLeft);
                 const double fFullLen(aFullVec.getLength());
                 const double fOldLen(aOldVec.getLength());


More information about the Libreoffice-commits mailing list