summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 15:32:46 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 15:32:46 +0000
commit882d9e3392c1cd2cd28130c5471e5712ca2b4317 (patch)
tree044222fe510ece763dc64b3cc961719bdca87a12 /vcl
parent20838a94f2d53ad6a448c97f4e7438b96d2258b8 (diff)
INTEGRATION: CWS fontlists04 (1.72.8); FILE MERGED
2004/11/02 08:56:28 hdu 1.72.8.2: #i33265# also mirror chars for latin in RTL text 2004/09/29 11:45:44 hdu 1.72.8.1: #i33265# in an RTL also mirror characters when layouting text for for the PDF builtin fonts
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 7bcc936b9557..8c96f6d0f7f0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pdfwriter_impl.cxx,v $
*
- * $Revision: 1.73 $
+ * $Revision: 1.74 $
*
- * last change: $Author: pjunck $ $Date: 2004-10-28 10:33:26 $
+ * last change: $Author: hr $ $Date: 2004-11-09 16:32:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1485,15 +1485,20 @@ bool PDFSalLayout::LayoutText( ImplLayoutArgs& rArgs )
SetText( aText );
SetUnitsPerPixel( 1000 );
+ rtl_UnicodeToTextConverter aConv = rtl_createTextToUnicodeConverter( RTL_TEXTENCODING_MS_1252 );
+
Point aNewPos( 0, 0 );
bool bRightToLeft;
for( int nCharPos = -1; rArgs.GetNextPos( &nCharPos, &bRightToLeft ); )
{
sal_Unicode cChar = rArgs.mpStr[ nCharPos ];
+ if( bRightToLeft )
+ cChar = GetMirroredChar( cChar );
+
if( cChar & 0xff00 )
{
// some characters can be used by conversion
- if( (cChar >= 0xf000) && mbIsSymbolFont )
+ if( (cChar >= 0xf000) && mbIsSymbolFont )
cChar -= 0xf000;
else
{
@@ -1501,7 +1506,6 @@ bool PDFSalLayout::LayoutText( ImplLayoutArgs& rArgs )
sal_uInt32 nInfo;
sal_Size nSrcCvtChars;
- rtl_UnicodeToTextConverter aConv = rtl_createTextToUnicodeConverter( RTL_TEXTENCODING_MS_1252 );
sal_Size nConv = rtl_convertUnicodeToText( aConv,
NULL,
&cChar, 1,
@@ -1513,8 +1517,6 @@ bool PDFSalLayout::LayoutText( ImplLayoutArgs& rArgs )
// are handled via WinAnsi encoding
if( nConv > 0 )
cChar = ((sal_Unicode)aBuf[0]) & 0x00ff;
-
- rtl_destroyUnicodeToTextConverter( aConv );
}
}
if( cChar & 0xff00 )
@@ -1534,6 +1536,8 @@ bool PDFSalLayout::LayoutText( ImplLayoutArgs& rArgs )
aNewPos.X() += nGlyphWidth;
}
+ rtl_destroyUnicodeToTextConverter( aConv );
+
return true;
}