Index: filter/source/flash/swfwriter.cxx =================================================================== RCS file: /cvs/framework/filter/source/flash/swfwriter.cxx,v retrieving revision 1.4 diff -r1.4 swfwriter.cxx 73c73,74 < mnGlobalTransparency(0) --- > mnGlobalTransparency(0), > mbHadHebrew(false) Index: filter/source/flash/swfwriter.hxx =================================================================== RCS file: /cvs/framework/filter/source/flash/swfwriter.hxx,v retrieving revision 1.7 diff -r1.7 swfwriter.hxx 314a315,316 > BOOL mbHadHebrew; > Index: filter/source/flash/swfwriter1.cxx =================================================================== RCS file: /cvs/framework/filter/source/flash/swfwriter1.cxx,v retrieving revision 1.19 diff -r1.19 swfwriter1.cxx 74a75,76 > #include > 87a90 > 536a540,581 > // Hebrew hack: If there is any Hebrew in the presentation, from then on > // run the string through the bidi algorithm before exporting > // and switch the parentheses > > #define IS_HEBREW(x) (x >= 0x590) && (x <= 0x5FF) > const sal_Unicode *p = rText.GetBuffer(); > for (int i = 0; i < nLen && (!mbHadHebrew); i++, p++) > if (IS_HEBREW(*p)) > mbHadHebrew = TRUE; > > String reorderedText(rText); > if (mbHadHebrew) > { > int nDefaultDir = UBIDI_RTL; > > UErrorCode nError = U_ZERO_ERROR; > UBiDi* pBidi = ubidi_openSized( rText.Len(), 0, &nError ); > nError = U_ZERO_ERROR; > > ubidi_setPara( pBidi, rText.GetBuffer(), rText.Len(), > nDefaultDir, NULL, &nError ); > ubidi_writeReordered(pBidi, reorderedText.GetBufferAccess(), rText.Len(), 0, &nError); > ubidi_close( pBidi ); > > > // reverse the parentheses > sal_Int32 tmpChar; > // for (int i = 0; i < 256; i++) > int i = 0; > // Find a temp char > while (reorderedText.Search((sal_Char)i, 0) != STRING_NOTFOUND) > i++; > tmpChar = (sal_Int32)i; > > // Switch the parentheses > reorderedText.SearchAndReplaceAll('(', tmpChar); > reorderedText.SearchAndReplaceAll(')', '('); > reorderedText.SearchAndReplaceAll(tmpChar, ')'); > //} > } > // End Hebrew hack > 544,550d588 < if( pDXArray ) < { < pOwnArray = NULL; < aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 ); < pDX = (sal_Int32*) pDXArray; < } < else 553c591 < aNormSize = Size( mpVDev->GetTextArray( rText, pOwnArray ), 0 ); --- > aNormSize = Size( mpVDev->GetTextArray( reorderedText, pOwnArray ), 0 ); 559c597 < aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( rText.GetChar( (USHORT) nLen - 1 ) ); --- > aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( reorderedText.GetChar( (USHORT) nLen - 1 ) ); 606c644 < Size aTextSize( map( Size( mpVDev->GetTextWidth( rText ), mpVDev->GetTextHeight() ) ) ); --- > Size aTextSize( map( Size( mpVDev->GetTextWidth( reorderedText ), mpVDev->GetTextHeight() ) ) ); 700c738 < aBits.writeUB( rFlashFont.getGlyph(rText.GetChar(_uInt16(i)),mpVDev), nGlyphBits ); --- > aBits.writeUB( rFlashFont.getGlyph(reorderedText.GetChar(_uInt16(i)),mpVDev), nGlyphBits );