summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFastContextHandler.cxx')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 388f02603f85..6958d15aaae2 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -387,6 +387,10 @@ void OOXMLFastContextHandler::endCharacterGroup()
}
}
+void OOXMLFastContextHandler::pushBiDiEmbedLevel() {}
+
+void OOXMLFastContextHandler::popBiDiEmbedLevel() {}
+
void OOXMLFastContextHandler::startParagraphGroup()
{
if (isForwardEvents())
@@ -1276,6 +1280,20 @@ void OOXMLFastContextHandlerValue::setDefaultStringValue()
setValue(pValue);
}
}
+
+// ECMA-376-1:2016 17.3.2.8; https://www.unicode.org/reports/tr9/#Explicit_Directional_Embeddings
+void OOXMLFastContextHandlerValue::pushBiDiEmbedLevel()
+{
+ const bool bRtl
+ = mpValue.get() && mpValue.get()->getInt() == NS_ooxml::LN_Value_ST_Direction_rtl;
+ OOXMLFactory::characters(this, OUString(sal_Unicode(bRtl ? 0x202B : 0x202A))); // RLE / LRE
+}
+
+void OOXMLFastContextHandlerValue::popBiDiEmbedLevel()
+{
+ OOXMLFactory::characters(this, OUString(sal_Unicode(0x202C))); // PDF (POP DIRECTIONAL FORMATTING)
+}
+
/*
class OOXMLFastContextHandlerTable
*/