tdf#45147 - CSV Import: Remove special handling for mixed script types

In the CSV import dialog, remove the special handling for mixed script types. Otherwise, right-to-left words appear in the wrong order.

The special handling of mixed script types was introduced in https://bz.apache.org/ooo/show_bug.cgi?id=60296 which is handled in the edit engine now.

Change-Id: Ic6dc3f2051ea41f79db5398a8442f78116da52de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146096
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index b44cca0..16b7ca6 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1130,22 +1130,8 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const OUString& rText )
    OUString aPlainText = rText.replaceAll( "\t", " " );
    aPlainText = aPlainText.replaceAll( "\n", " " );
    mpEditEngine->SetPaperSize( maEdEngSize );

    /*  #i60296# If string contains mixed script types, the space character
        U+0020 may be drawn with a wrong width (from non-fixed-width Asian or
        Complex font). Now we draw every non-space portion separately. */
    sal_Int32 nCharIxInt {aPlainText.isEmpty() ? -1 : 0};
    while (nCharIxInt>=0)
    {
        sal_Int32 nBeginIx = nCharIxInt;
        const OUString aToken = aPlainText.getToken( 0, ' ', nCharIxInt );
        if( !aToken.isEmpty() )
        {
            sal_Int32 nX = rPos.X() + GetCharWidth() * nBeginIx;
            mpEditEngine->SetTextCurrentDefaults( aToken );
            mpEditEngine->Draw(*mpBackgrDev, Point(nX, rPos.Y()));
        }
    }
    mpEditEngine->SetTextCurrentDefaults(aPlainText);
    mpEditEngine->Draw(*mpBackgrDev, rPos);

    sal_Int32 nCharIx = 0;
    while( (nCharIx = rText.indexOf( '\t', nCharIx )) != -1 )