summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-03-01 18:24:23 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-03-01 18:25:25 +0100
commitf6deda85ef4f28426c09fab7205f274922af3d96 (patch)
treecb7def324321c1981bb410d9816e35e202046441
parentec583253c3d761847c93a77fa10c065fc334fab9 (diff)
current mingw headers don't have fMergeNeutralItems
Reported upstream by Kendy (r5626), for now do not use the field if not present, seems to be not that important.
-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;