Bug 461839 - uniscribe breaker on windows mobile r+sr=roc
--- 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
}