svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 7e12414bf5e88108116653eee1870612d34c49cb
Author: Armin Le Grand <a...@apache.org>
Date:   Fri Jan 31 22:23:07 2014 +0000

    i123993 When executing rotation actions from the Sidebar 
PosSizePropertyPanel, take UIScale into account.
    
    Patch By: hanya
    Review By: alg

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 97b471a..e59b562 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -699,9 +699,11 @@ IMPL_LINK( PosSizePropertyPanel, AngleModifiedHdl, void *, 
EMPTYARG )
     }
     sal_Int64 nTmp = dTmp*100;
 
+    // #123993# Need to take UIScale into account when executing rotations
+    const double fUIScale(mpView && mpView->GetModel() ? 
double(mpView->GetModel()->GetUIScale()) : 1.0);
     SfxInt32Item aAngleItem( SID_ATTR_TRANSFORM_ANGLE,(sal_uInt32) nTmp);
-    SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X,(sal_uInt32) mlRotX);
-    SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y,(sal_uInt32) mlRotY);
+    SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X, basegfx::fround(mlRotX * 
fUIScale));
+    SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y, basegfx::fround(mlRotY * 
fUIScale));
 
     GetBindings()->GetDispatcher()->Execute(
         SID_ATTR_TRANSFORM, SFX_CALLMODE_RECORD, &aAngleItem, &aRotXItem, 
&aRotYItem, 0L );
@@ -715,9 +717,11 @@ IMPL_LINK( PosSizePropertyPanel, RotationHdl, void *, 
EMPTYARG )
 {
     sal_Int32 nTmp = mpDial->GetRotation();
 
+    // #123993# Need to take UIScale into account when executing rotations
+    const double fUIScale(mpView && mpView->GetModel() ? 
double(mpView->GetModel()->GetUIScale()) : 1.0);
     SfxInt32Item aAngleItem( SID_ATTR_TRANSFORM_ANGLE,(sal_uInt32) nTmp);
-    SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X,(sal_uInt32) mlRotX);
-    SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y,(sal_uInt32) mlRotY);
+    SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X, basegfx::fround(mlRotX * 
fUIScale));
+    SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y, basegfx::fround(mlRotY * 
fUIScale));
 
     GetBindings()->GetDispatcher()->Execute(
         SID_ATTR_TRANSFORM, SFX_CALLMODE_RECORD, &aAngleItem, &aRotXItem, 
&aRotYItem, 0L );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to