summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-08-17 17:39:29 +0300
committerخالد حسني <khaled@libreoffice.org>2023-08-24 13:17:49 +0200
commit611694b707eb43e4c0f20b781f6869016a3ba099 (patch)
treeb73b989f25430077088ba467a6b5d4cff2af4440 /vcl
parenta21ae72ab208b60bfd284d4630295f06e21c3481 (diff)
vcl: Allow pushing/popping OutputDevice’s RTLEnabled state
Change-Id: Icafdc307c5c9df768f00c3ac0d128936607bf3e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155794 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/mtfxmldump.cxx2
-rw-r--r--vcl/source/outdev/stack.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index c26a44310774..f507fddb284e 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -63,6 +63,8 @@ OUString collectPushFlags(vcl::PushFlags nFlags)
aStrings.emplace_back("PushTextLanguage");
if (nFlags & vcl::PushFlags::OVERLINECOLOR)
aStrings.emplace_back("PushOverlineColor");
+ if (nFlags & vcl::PushFlags::RTLENABLED)
+ aStrings.emplace_back("PushRTLEnabled");
OUString aString;
diff --git a/vcl/source/outdev/stack.cxx b/vcl/source/outdev/stack.cxx
index 72ef63af551d..129348051e3d 100644
--- a/vcl/source/outdev/stack.cxx
+++ b/vcl/source/outdev/stack.cxx
@@ -84,6 +84,9 @@ void OutputDevice::Push(vcl::PushFlags nFlags)
if (nFlags & vcl::PushFlags::REFPOINT && mbRefPoint)
rState.mpRefPoint = maRefPoint;
+ if (nFlags & vcl::PushFlags::RTLENABLED)
+ rState.mbRTLEnabled = IsRTLEnabled();
+
if (mpAlphaVDev)
mpAlphaVDev->Push();
}
@@ -184,6 +187,9 @@ void OutputDevice::Pop()
SetRefPoint();
}
+ if ( rState.mnFlags & vcl::PushFlags::RTLENABLED )
+ EnableRTL( rState.mbRTLEnabled );
+
maOutDevStateStack.pop_back();
mpMetaFile = pOldMetaFile;