diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-03 19:21:01 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-03 19:22:52 +0200 |
commit | 6324efd70dfa8c6be84cba1fa29658e3373cbbe3 (patch) | |
tree | 1a4c1586abc0afcde38d7b57d735ea844ef047f2 | |
parent | 43532a0944b0ee4727ea2ae480e54687e41d9201 (diff) |
tdf#89870: Add config option for layout engine
The env variable takes precedence.
Change-Id: I273ec867725dd012b005d49fbfaa1dc27203c021
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 7 | ||||
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 5 |
2 files changed, 11 insertions, 1 deletions
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 @@ <info> <desc>Contains settings for VCL.</desc> </info> + <prop oor:name="TextLayoutEngine" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Specifies which text layout engine should be use. Possible + values are ("old", "new").</desc> + </info> + <value>new</value> + </prop> <prop oor:name="UseOpenGL" oor:type="xs:boolean" oor:nillable="false"> <info> <desc>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 <i18nlangtag/lang.h> +#include <officecfg/Office/Common.hxx> + #include <tools/debug.hxx> #include <vcl/svapp.hxx> @@ -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; } |