View | Details | Raw Unified | Return to issue 39516
Collapse All | Expand All

(-)sd/source/filter/eppt/epptso.cxx (-1 / +12 lines)
Lines 1773-1778 Link Here
1773
{
1808
{
1774
    String aString( rXTextRange->getString() );
1809
    String aString( rXTextRange->getString() );
1775
    String aURL;
1810
    String aURL;
1811
	BOOL bRTL_endingParen = FALSE;
1776
1812
1777
    mnTextSize = aString.Len();
1813
    mnTextSize = aString.Len();
1778
    if ( bLast )
1814
    if ( bLast )
Lines 1821-1828 Link Here
1821
        }
1857
        }
1822
        else
1858
        else
1823
        {
1859
        {
1824
            mpText = new sal_uInt16[ mnTextSize ];
1825
            const sal_Unicode* pText = aString.GetBuffer();
1860
            const sal_Unicode* pText = aString.GetBuffer();
1861
			// For i39516 - a closing parenthesis that ends an RTL string is displayed backwards by PPT
1862
			// Solution: add a Unicode Right-to-Left Mark, following the method described in i18024
1863
			if (mbLastPortion && pText[ aString.Len() - 1 ] == sal_uInt16(')') && mnAsianOrComplexFont)
1864
			{
1865
				mnTextSize++;
1866
				bRTL_endingParen = TRUE;
1867
			}
1868
            mpText = new sal_uInt16[ mnTextSize ];
1826
            sal_uInt16 nChar;
1869
            sal_uInt16 nChar;
1827
            for ( int i = 0; i < aString.Len(); i++ )
1870
            for ( int i = 0; i < aString.Len(); i++ )
1828
            {
1871
            {
Lines 1873-1878 Link Here
1873
                mpText[ i ] = nChar;
1916
                mpText[ i ] = nChar;
1874
            }
1917
            }
1875
        }
1918
        }
1919
		if (bRTL_endingParen)
1920
            mpText[ mnTextSize - 2 ] = 0x200F; // Unicode Right-to-Left mark
1921
1876
        if ( bLast )
1922
        if ( bLast )
1877
            mpText[ mnTextSize - 1 ] = 0xd;
1923
            mpText[ mnTextSize - 1 ] = 0xd;
1878
1924

Return to issue 39516