diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index e8a9fae680a5..0e645ad9b9e1 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -851,6 +851,13 @@
Contains settings for VCL.
+
+
+ Specifies which text layout engine should be use. Possible
+ values are ("old", "new").
+
+ new
+
Specifies if OpenGL rendering should be used in VCL backends
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 2e09aaf45436..ef9bbc01b7f8 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -34,6 +34,8 @@
#include
+#include
+
#include
#include
@@ -770,7 +772,8 @@ bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph )
bool SalLayout::UseCommonLayout()
{
- static bool bUse = getenv("SAL_NO_COMMON_LAYOUT") == nullptr;
+ static bool bUse = (getenv("SAL_NO_COMMON_LAYOUT") == nullptr) &&
+ (officecfg::Office::Common::VCL::TextLayoutEngine::get() == "new");
return bUse;
}