diff options
author | Armin Le Grand <alg@apache.org> | 2014-01-31 22:23:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-01 12:12:05 +0000 |
commit | bb2b4a63a879bac9039d4a1e872a3df0b15866f4 (patch) | |
tree | 589004a0a51b363811cab8adb1118af6133cc861 /svx | |
parent | 59e7894fb2eed689504a340bbbe8d7537d9e70f6 (diff) |
Resolves: #i123993# When executing rotation actions from the Sidebar...
PosSizePropertyPanel, take UIScale into account.
Patch By: hanya
Review By: alg
(cherry picked from commit 7e12414bf5e88108116653eee1870612d34c49cb)
Change-Id: Ia480db54ec0834237a91f86338348727ff43cf7b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 97555c5184f6..291d71b4964d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -514,9 +514,11 @@ IMPL_LINK( PosSizePropertyPanel, AngleModifiedHdl, void *, EMPTYARG ) } sal_Int64 nTmp = dTmp*100; + // #i123993# 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 ); @@ -530,9 +532,11 @@ IMPL_LINK( PosSizePropertyPanel, RotationHdl, void *, EMPTYARG ) { sal_Int32 nTmp = mpDial->GetRotation(); + // #i123993# 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 ); |