diff options
author | Henry Castro <hcastro@collabora.com> | 2023-04-27 15:59:43 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-06-20 14:37:35 +0200 |
commit | baf500ba9abed7f32439a1be60a1c51cc10f9d67 (patch) | |
tree | ce789a87d4ee6b8175e0132d31ddd2e16a7f9106 /editeng | |
parent | 1afc13b0b84353109827d78807836c01f030ab66 (diff) |
lok: editeng: add LOK special flags
The function "IsRightToLeft" fails in Hebrew language
when Calc has a layout RTL, create a special flag to handle.
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I661f49dc5990f39807c6dba10970dea8c502643c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151971
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153322
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index f6c90309747c..72e9aec2dc3d 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1727,6 +1727,11 @@ bool EditView::HasLOKSpecialPositioning() const return pImpEditView->HasLOKSpecialPositioning(); } +void EditView::SetLOKSpecialFlags(LOKSpecialFlags eFlags) +{ + pImpEditView->SetLOKSpecialFlags(eFlags); +} + void EditView::SuppressLOKMessages(bool bSet) { pImpEditView->SuppressLOKMessages(bSet); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 3074ca53d1ad..98ac03aceab6 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -2749,4 +2749,10 @@ bool ImpEditView::HasLOKSpecialPositioning() const return bool(mpLOKSpecialPositioning); } +void ImpEditView::SetLOKSpecialFlags(LOKSpecialFlags eFlags) +{ + assert(mpLOKSpecialPositioning); + mpLOKSpecialPositioning->SetFlags(eFlags); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index a5e2e3c89593..1a8f7fdc48f4 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -233,6 +233,9 @@ public: Point GetWindowPos(const Point& rDocPos, MapUnit eDocPosUnit) const; tools::Rectangle GetWindowPos(const tools::Rectangle& rDocRect, MapUnit eDocRectUnit) const; + void SetFlags(LOKSpecialFlags eFlags) { meFlags = eFlags; } + bool IsLayoutRTL() { return bool(meFlags & LOKSpecialFlags::LayoutRTL); } + Point GetRefPoint() const; private: @@ -243,6 +246,7 @@ private: tools::Rectangle maOutArea; Point maVisDocStartPos; MapUnit meUnit; + LOKSpecialFlags meFlags; }; @@ -466,6 +470,8 @@ public: tools::Rectangle GetLOKSpecialVisArea() const; bool HasLOKSpecialPositioning() const; + void SetLOKSpecialFlags(LOKSpecialFlags eFlags); + void SuppressLOKMessages(bool bSet) { mbSuppressLOKMessages = bSet; } bool IsSuppressLOKMessages() const { return mbSuppressLOKMessages; } |