summaryrefslogtreecommitdiff
path: root/include/sfx2/lokcharthelper.hxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2022-02-09 12:31:49 +0530
committerDennis Francis <dennis.francis@collabora.com>2022-02-10 11:29:17 +0100
commit4fd2a14c6ee68f0574766ec7ec3dca35debe9d20 (patch)
tree2065d966b8ff0b28297a435b1fea01b7a7e686b3 /include/sfx2/lokcharthelper.hxx
parent38e4d2f422afdeced7904b44687800d308b93249 (diff)
lokCalcRTL: global RTL: fix chart edit mode rendering cp-21.06.16-1
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. 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>
Diffstat (limited to 'include/sfx2/lokcharthelper.hxx')
-rw-r--r--include/sfx2/lokcharthelper.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
index aa7cfb5867ac..e447562e3dfd 100644
--- a/include/sfx2/lokcharthelper.hxx
+++ b/include/sfx2/lokcharthelper.hxx
@@ -28,11 +28,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();
@@ -42,7 +44,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,