From 65129e0bc5abfe7afc612eb46f1434e627265a7d Mon Sep 17 00:00:00 2001 From: Regina Henschel Date: Tue, 26 Jan 2021 14:28:40 +0100 Subject: tdf#137081, tdf137082 fixes shape handling in RTL sheets The patch introduces an enum ScObjectHandling as parameter of ScDrawLayer::SetPageSize to distinguish page size changes from show or hide col/row from changes because of sheet flip for RTL. RTL is now handled this way: On save/reload objects are not mirrored but only shifted between positive and negative part of draw page. When a user flips sheet to RTL or back, the objects are mirrored. The 'noRotate' anchor is set to this meaning: maShapeRect contains the logic rectangle of the object at time the anchor was created. It is used to detect position relevant object changes in ScDrawView::Notify(). maStart contains the address of that cell, which is parent element of the object in xml. The logic rectangle need not be in that cell. Handling of DetectiveArrow and CellNote is not changed. Validation circles were not drawn, when switching to RTL mode (no bug report). That is fixed. SetVisualCellAnchored handles 'noRotate' anchor. That anchor is not visible on screen. I have changed the misleading name to SetNonRotatedAnchor. Change-Id: I3dd2d3e37c138c8418369c760293a1f19dddb753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109959 Reviewed-by: Regina Henschel Tested-by: Regina Henschel --- sc/inc/table.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sc/inc/table.hxx') diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index a09781366821..309d49d4f140 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -34,6 +34,7 @@ #include "calcmacros.hxx" #include #include "document.hxx" +#include "drwlayer.hxx" #include #include @@ -965,7 +966,8 @@ public: bool IsSortCollatorGlobal() const; void InitSortCollator( const ScSortParam& rPar ); void DestroySortCollator(); - void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true ); + void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true, + const ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode); void SetRangeName(std::unique_ptr pNew); ScRangeName* GetRangeName() const; -- cgit