diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-22 02:00:50 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-22 16:35:20 +0200 |
commit | a2dad3e10ada8adcc9b5bdb60d3d516e33aa3f07 (patch) | |
tree | 2af3da995acbc570abeaeab09e816179d2addaac | |
parent | 337b592a721bef2c54cbe8c4927e5cc5a68c2138 (diff) |
VCL don't mirror Y position
I don't know why Y values should be affected by mirroring at all. This
produced a lot of negative Y values for me.
Change-Id: I2b147ede948510a7bc1a5838cf89a8fd02e2ed46
Reviewed-on: https://gerrit.libreoffice.org/74547
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r-- | vcl/source/window/window.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5a0b505e2aef..c9c4a93da413 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2744,22 +2744,18 @@ void Window::setPosSizePixel( long nX, long nY, OutputDevice *pParentOutDev = pWinParent->GetOutDev(); if( pParentOutDev->HasMirroredGraphics() ) { + const SalFrameGeometry& aSysGeometry = mpWindowImpl->mpFrame->GetUnmirroredGeometry(); + const SalFrameGeometry& aParentSysGeometry = + pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry(); long myWidth = nOldWidth; if( !myWidth ) - myWidth = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth; + myWidth = aSysGeometry.nWidth; if( !myWidth ) myWidth = nWidth; nFlags |= PosSizeFlags::X; nSysFlags |= SAL_FRAME_POSSIZE_X; - nX = pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration + - pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth - myWidth - 1 - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX; - if(!(nFlags & PosSizeFlags::Y)) - { - nFlags |= PosSizeFlags::Y; - nSysFlags |= SAL_FRAME_POSSIZE_Y; - nY = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY - pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY - - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nTopDecoration; - } + nX = aParentSysGeometry.nX - aSysGeometry.nLeftDecoration + aParentSysGeometry.nWidth + - myWidth - 1 - aSysGeometry.nX; } } } |