Bug 461839 - uniscribe breaker on windows mobile r+sr=roc
authorDoug Turner <dougt@meer.net>
Wed, 03 Dec 2008 08:42:03 -0500
changeset 22247 988768b8910f130748fc668a812213eea4cce049
parent 22246 cb109c0b73f09ae5c7cbb6706b8e298d1408b478
child 22248 3ba7d5a29839fb5cc73c2a63c3bc3306a3fdc466
push idunknown
push userunknown
push dateunknown
bugs461839
milestone1.9.2a1pre
Bug 461839 - uniscribe breaker on windows mobile r+sr=roc
intl/lwbrk/src/nsUniscribeBreaker.cpp
--- a/intl/lwbrk/src/nsUniscribeBreaker.cpp
+++ b/intl/lwbrk/src/nsUniscribeBreaker.cpp
@@ -36,26 +36,35 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsComplexBreaker.h"
 
+#include <windows.h>
+
+#ifndef WINCE
 #include <usp10.h>
+#endif
+
 #include "nsUTF8Utils.h"
 #include "nsString.h"
 #include "nsTArray.h"
 
 void
 NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
                         PRPackedBool* aBreakBefore)
 {
   NS_ASSERTION(aText, "aText shouldn't be null"); 
+
+#ifdef WINCE
+  memset(aBreakBefore, PR_FALSE, aLength);
+#else
   int outItems = 0;
   HRESULT result;
   nsAutoTArray<SCRIPT_ITEM, 64> items;
 
   memset(aBreakBefore, PR_FALSE, aLength);
 
   if (!items.AppendElements(64))
     return;
@@ -80,10 +89,10 @@ NS_GetComplexLineBreaks(const PRUnichar*
     if (ScriptBreak(aText + startOffset, endOffset - startOffset,
                     &items[iItem].a,  sla.Elements()) < 0) 
       return;
 
     for (PRUint32 j=0; j+startOffset < endOffset; ++j) {
        aBreakBefore[j+startOffset] = sla[j].fSoftBreak;
     }
   }
-  
+#endif  
 }