summaryrefslogtreecommitdiffstats
path: root/starmath/source
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
commit91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch)
tree7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /starmath/source
parentReleasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff)
downloadlibreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz
libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/document.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index ff28f448cb..2c5399ba1c 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -263,10 +263,10 @@ void SmDocShell::ArrangeFormula()
const SmFormat &rFormat = GetFormat();
mpTree->Prepare(rFormat, *this, 0);
- pOutDev->Push(vcl::PushFlags::TEXTLAYOUTMODE | vcl::PushFlags::TEXTLANGUAGE |
- vcl::PushFlags::RTLENABLED);
+ pOutDev->Push(vcl::PushFlags::TEXTLAYOUTMODE | vcl::PushFlags::TEXTLANGUAGE);
// We want the device to always be LTR, we handle RTL formulas ourselves.
+ bool bOldRTL = pOutDev->IsRTLEnabled();
pOutDev->EnableRTL(false);
// For RTL formulas, we want the brackets to be mirrored.
@@ -279,6 +279,7 @@ void SmDocShell::ArrangeFormula()
mpTree->Arrange(*pOutDev, rFormat);
+ pOutDev->EnableRTL(bOldRTL);
pOutDev->Pop();
SetFormulaArranged(true);
@@ -353,10 +354,10 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
bRestoreDrawMode = true;
}
- rDev.Push(vcl::PushFlags::TEXTLAYOUTMODE | vcl::PushFlags::TEXTLANGUAGE |
- vcl::PushFlags::RTLENABLED);
+ rDev.Push(vcl::PushFlags::TEXTLAYOUTMODE | vcl::PushFlags::TEXTLANGUAGE);
// We want the device to always be LTR, we handle RTL formulas ourselves.
+ bool bOldRTL = rDev.IsRTLEnabled();
if (rDev.GetOutDevType() == OUTDEV_WINDOW)
rDev.EnableRTL(bRTL);
else
@@ -385,6 +386,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
//Drawing using visitor
SmDrawingVisitor(rDev, aPosition, mpTree.get(), GetFormat());
+ rDev.EnableRTL(bOldRTL);
rDev.Pop();
if (bRestoreDrawMode)