Lines 2628-2634
Link Here
|
2628 |
|
2628 |
|
2629 |
if( bOutChar ) |
2629 |
if( bOutChar ) |
2630 |
{ |
2630 |
{ |
2631 |
sal_Unicode c = rStr.GetChar( nStrPos ); |
2631 |
sal_uInt64 c = rStr.GetChar( nStrPos ); |
|
|
2632 |
//For bug 120442, if the unicode is equal or larger than 0xd800 and smaller equal or than 0xdbff, |
2633 |
//and the next unicode is equal or larger then 0xdc00 and equal or smaller than 0xdfff, |
2634 |
//need to convert two 16-bit unicode to a 32-bit unicode to show the content. |
2635 |
if( nStrPos < nEnde - 1 ) |
2636 |
{ |
2637 |
sal_Unicode d = rStr.GetChar( nStrPos + 1 ); |
2638 |
if ( c >= 0xd800 && c <= 0xdbff && d >= 0xdc00 && d <= 0xdfff) |
2639 |
{ |
2640 |
sal_uInt64 templow = d&0x03ff; |
2641 |
sal_uInt64 temphi = ((c&0x03ff) + 0x0040)<<10; |
2642 |
c = temphi|templow; |
2643 |
nStrPos++; |
2644 |
} |
2645 |
} |
2646 |
|
2632 |
// versuche nach ungefaehr 255 Zeichen eine neue Zeile zu |
2647 |
// versuche nach ungefaehr 255 Zeichen eine neue Zeile zu |
2633 |
// beginnen, aber nicht in PRE und nur bei Spaces |
2648 |
// beginnen, aber nicht in PRE und nur bei Spaces |
2634 |
if( ' '==c && !rHTMLWrt.nLastParaToken ) |
2649 |
if( ' '==c && !rHTMLWrt.nLastParaToken ) |
Lines 2662-2669
Link Here
|
2662 |
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext ); |
2677 |
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext ); |
2663 |
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_linebreak ); |
2678 |
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_linebreak ); |
2664 |
} |
2679 |
} |
|
|
2680 |
//For bug 120442, if c is larger than 0xffff, means it is a 32-bit unicode, so output it stream as "&#******;" |
2681 |
else if( c > 0xffff) |
2682 |
{ |
2683 |
ByteString sOut(""); |
2684 |
(((sOut += '&') += '#') += |
2685 |
ByteString::CreateFromInt64( (sal_uInt64)c )) += ';'; |
2686 |
rWrt.Strm() << sOut.GetBuffer(); |
2687 |
} |
2665 |
else |
2688 |
else |
2666 |
HTMLOutFuncs::Out_Char( rWrt.Strm(), c, aContext, &rHTMLWrt.aNonConvertableCharacters ); |
2689 |
HTMLOutFuncs::Out_Char( rWrt.Strm(), (sal_Unicode)c, aContext, &rHTMLWrt.aNonConvertableCharacters ); |
2667 |
|
2690 |
|
2668 |
// Wenn das letzte Zeichen eines Absatzed ein harter |
2691 |
// Wenn das letzte Zeichen eines Absatzed ein harter |
2669 |
// Zeilen-Umbruch ist brauchen wir noch ein <BR> mehr, weil |
2692 |
// Zeilen-Umbruch ist brauchen wir noch ein <BR> mehr, weil |