summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host/config_mingw.h.in6
-rw-r--r--configure.ac18
-rw-r--r--vcl/win/source/gdi/winlayout.cxx4
3 files changed, 28 insertions, 0 deletions
diff --git a/config_host/config_mingw.h.in b/config_host/config_mingw.h.in
new file mode 100644
index 000000000000..5a050252c15f
--- /dev/null
+++ b/config_host/config_mingw.h.in
@@ -0,0 +1,6 @@
+#ifndef CONFIG_MINGW
+#define CONFIG_MINGW
+
+#undef HAVE_FMERGENEUTRALITEMS
+
+#endif
diff --git a/configure.ac b/configure.ac
index de10a0e20511..5b503c931310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5350,6 +5350,23 @@ using namespace std;
AC_SUBST(MINGW_GXXDLL)
fi
+if test "$WITH_MINGW" = "yes"; then
+ AC_MSG_CHECKING([for fMergeNeutralItems in SCRIPT_CONTROL])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [
+ #include <usp10.h>
+ ],
+ [
+ SCRIPT_CONTROL c;
+ c.fMergeNeutralItems = 1;
+ ])],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_FMERGENEUTRALITEMS)
+ ],
+ [AC_MSG_RESULT(no)])
+fi
+
dnl ===================================================================
dnl Extra checking for the SunOS compiler
dnl ===================================================================
@@ -11842,6 +11859,7 @@ AC_CONFIG_FILES([solenv/inc/minor.mk.tmp:solenv/inc/minor.mk.in],
AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_graphite.h])
+AC_CONFIG_HEADERS([config_host/config_mingw.h])
AC_CONFIG_HEADERS([config_host/config_telepathy.h])
AC_CONFIG_HEADERS([config_host/config_typesizes.h])
AC_CONFIG_HEADERS([config_host/config_vclplug.h])
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 1404c2c1244b..63f8a6559241 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -63,6 +63,8 @@ using ::rtl::OUString;
using ::rtl::OString;
using ::rtl::OUStringToOString;
+#include <config_mingw.h>
+
// =======================================================================
// win32 specific physical font instance
@@ -1189,7 +1191,9 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
SCRIPT_CONTROL aScriptControl = {nLangId,false,false,false,false,false,false,false,false,0};
aScriptControl.fNeutralOverride = aScriptState.fOverrideDirection;
aScriptControl.fContextDigits = (0 != (rArgs.mnFlags & SAL_LAYOUT_SUBSTITUTE_DIGITS));
+#ifdef HAVE_FMERGENEUTRALITEMS
aScriptControl.fMergeNeutralItems = true;
+#endif
// determine relevant substring and work only on it
// when Bidi status is unknown we need to look at the whole string though
mnSubStringMin = 0;