diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2022-02-09 12:31:49 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-02-14 12:09:34 +0100 |
commit | 5c982b3c9ebf50c3f814705363b2381877bed859 (patch) | |
tree | 8a3edccde549e454259b83bb78fc56e21f669d1d /include/sfx2 | |
parent | 6099409099fefa2d7dba117df2dc0a3df979137a (diff) |
lokCalcRTL: global RTL: fix chart edit mode rendering
If global RTL flag is set, vcl-window X offset of chart window is
mirrored w.r.t parent window rectangle. This has to be undone to get the
correct chart bounding box in negative X document coordinates so that
the offset calculations for tile rendering remains the same for RTL
documents irrespective of the system/global RTL setting.
Conflicts:
include/sfx2/lokcharthelper.hxx
sfx2/source/view/lokcharthelper.cxx
Change-Id: I3e1666681af4e7ab1257bcc88d44bbdb053a7d47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129704
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 4fd2a14c6ee68f0574766ec7ec3dca35debe9d20)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129778
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/lokcharthelper.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx index a05868866ef4..c93c4d2b8459 100644 --- a/include/sfx2/lokcharthelper.hxx +++ b/include/sfx2/lokcharthelper.hxx @@ -29,11 +29,13 @@ private: css::uno::Reference<css::frame::XController> mxController; css::uno::Reference<css::frame::XDispatch> mxDispatcher; VclPtr<vcl::Window> mpWindow; + bool mbNegativeX; public: - LokChartHelper(SfxViewShell* pViewShell) + LokChartHelper(SfxViewShell* pViewShell, bool bNegativeX = false) : mpViewShell(pViewShell) , mpWindow(nullptr) + , mbNegativeX(bNegativeX) {} css::uno::Reference<css::frame::XController>& GetXController(); @@ -43,7 +45,7 @@ public: void Invalidate(); bool Hit(const Point& aPos); - static bool HitAny(const Point& aPos); + static bool HitAny(const Point& aPos, bool bNegativeX = false); void PaintTile(VirtualDevice& rRenderContext, const tools::Rectangle& rTileRect); static void PaintAllChartsOnTile(VirtualDevice& rDevice, int nOutputWidth, int nOutputHeight, |