summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-03-27 08:53:30 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-03-27 08:53:30 +0000
commit0407046767488158bd3d84b4ee9e4705573d7ba6 (patch)
tree19eeb34e6499a5b6378cca442edd5ea352aeaa72 /vcl/win
parentd35e386afb19dab1d4a1cb0f9a173583afa3b401 (diff)
INTEGRATION: CWS mingwport03 (1.102.66); FILE MERGED
2007/03/20 11:40:32 vg 1.102.66.4: RESYNC: (1.103-1.105); FILE MERGED 2007/01/10 15:14:37 vg 1.102.66.3: RESYNC: (1.103-1.104); FILE MERGED 2006/11/08 14:51:51 vg 1.102.66.2: RESYNC: (1.102-1.103); FILE MERGED 2006/09/13 15:46:02 vg 1.102.66.1: #i53572# MinGW port
Diffstat (limited to 'vcl/win')
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 0af8fdce9bf7..7b4985a58cea 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: winlayout.cxx,v $
*
- * $Revision: 1.105 $
+ * $Revision: 1.106 $
*
- * last change: $Author: ihi $ $Date: 2006-12-21 12:05:56 $
+ * last change: $Author: vg $ $Date: 2007-03-27 09:53:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -56,7 +56,9 @@
#include <cstdio>
#include <malloc.h>
+#ifndef __MINGW32__
#define alloca _alloca
+#endif
#ifdef GCP_KERN_HACK
#include <algorithm>
@@ -414,7 +416,7 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
for( i = 0; i < mnGlyphCount; ++i )
{
// get the current UCS-4 code point, check for surrogate pairs
- const WCHAR* pCodes = &pBidiStr[i];
+ const WCHAR* pCodes = reinterpret_cast<LPCWSTR>(&pBidiStr[i]);
unsigned nCharCode = pCodes[0];
bool bSurrogate = ((nCharCode >= 0xD800) && (nCharCode <= 0xDFFF));
if( bSurrogate )
@@ -1318,7 +1320,7 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
{
mpScriptItems = new SCRIPT_ITEM[ nItemCapacity ];
HRESULT nRC = (*pScriptItemize)(
- rArgs.mpStr + mnSubStringMin, nSubStringEnd - mnSubStringMin,
+ reinterpret_cast<LPCWSTR>(rArgs.mpStr + mnSubStringMin), nSubStringEnd - mnSubStringMin,
nItemCapacity - 1, &aScriptControl, &aScriptState,
mpScriptItems, &mnItemCount );
if( !nRC ) // break loop when everything is correctly itemized
@@ -1455,7 +1457,7 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
int nGlyphCount = 0;
int nCharCount = rVisualItem.mnEndCharPos - rVisualItem.mnMinCharPos;
HRESULT nRC = (*pScriptShape)( mhDC, &rScriptCache,
- rArgs.mpStr + rVisualItem.mnMinCharPos,
+ reinterpret_cast<LPCWSTR>(rArgs.mpStr + rVisualItem.mnMinCharPos),
nCharCount,
mnGlyphCapacity - rVisualItem.mnMinGlyphPos, // problem when >0xFFFF
&rVisualItem.mpScriptItem->a,
@@ -1480,7 +1482,7 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
// the primitive layout engine is good enough for the default layout
rVisualItem.mpScriptItem->a.eScript = SCRIPT_UNDEFINED;
nRC = (*pScriptShape)( mhDC, &rScriptCache,
- rArgs.mpStr + rVisualItem.mnMinCharPos,
+ reinterpret_cast<LPCWSTR>(rArgs.mpStr + rVisualItem.mnMinCharPos),
nCharCount,
mnGlyphCapacity - rVisualItem.mnMinGlyphPos,
&rVisualItem.mpScriptItem->a,