summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2009-04-20 16:57:13 +0000
committerPhilipp Lohmann <pl@openoffice.org>2009-04-20 16:57:13 +0000
commit198632aa538edc6804909fe7330fc122b769398b (patch)
treea17a85241b51e3a8380f9bdb7b706b8054ec4340 /vcl/win/source
parenta8b3bdded3b8a0fa7cfd12e52b9d60ce3658019e (diff)
CWS-TOOLING: rebase CWS printerpullpages to trunk@270723 (milestone: DEV300:m46)
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx5
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx20
2 files changed, 15 insertions, 10 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 70701e2ee19a..16c055209088 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -64,8 +64,7 @@
#include "basegfx/polygon/b2dpolypolygon.hxx"
#include "basegfx/matrix/b2dhommatrix.hxx"
-#include <list.h>
-#include <sft.h>
+#include "sft.hxx"
#ifdef GCP_KERN_HACK
#include <algorithm>
@@ -76,6 +75,8 @@
#include <map>
+using namespace vcl;
+
static const int MAXFONTHEIGHT = 2048;
// -----------
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 34900aaa951a..0689b8710655 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -36,7 +36,7 @@
#include "salgdi.h"
#include "saldata.hxx"
// for GetMirroredChar
-#include "sft.h"
+#include "sft.hxx"
#include "vcl/sallayout.hxx"
#include "vcl/svapp.hxx"
@@ -2441,9 +2441,9 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
if( rVisualItem.IsRTL() )
{
for( i = rVisualItem.mnMinGlyphPos; i < rVisualItem.mnEndGlyphPos; ++i )
- if ( (1U << mpVisualAttrs[i].uJustification) & 0xFF89 ) // any Arabic justification ?
- { // the last SCRIPT_JUSTIFY_xxx
- // yes // == 15 (usp 1.6)
+ if ( (1U << mpVisualAttrs[i].uJustification) & 0xFF82 ) // any Arabic justification
+ { // excluding SCRIPT_JUSTIFY_NONE
+ // yes
rVisualItem.mbHasKashidas = true;
// so prepare for kashida handling
InitKashidaHandling();
@@ -2509,10 +2509,14 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
for( i = nMinGlyphPos; i < nEndGlyphPos; ++i )
{
const int nXOffsetAdjust = mpJustifications[i] - mpGlyphAdvances[i];
- if( i == nMinGlyphPos )
+ // #i99862# skip diacritics, we mustn't add extra justification to diacritics
+ int nIdxAdd = i - 1;
+ while( (nIdxAdd >= nMinGlyphPos) && !mpGlyphAdvances[nIdxAdd] )
+ --nIdxAdd;
+ if( nIdxAdd < nMinGlyphPos )
rVisualItem.mnXOffset += nXOffsetAdjust;
else
- mpJustifications[i-1] += nXOffsetAdjust;
+ mpJustifications[nIdxAdd] += nXOffsetAdjust;
mpJustifications[i] -= nXOffsetAdjust;
}
}
@@ -2540,8 +2544,8 @@ void UniscribeLayout::KashidaItemFix( int nMinGlyphPos, int nEndGlyphPos )
{
// check for vowels
if( (i > nMinGlyphPos && !mpGlyphAdvances[ i-1 ])
- && (1U << mpVisualAttrs[i].uJustification) & 0xFF89 )
- {
+ && (1U << mpVisualAttrs[i].uJustification) & 0xFF83 ) // all Arabic justifiction types
+ { // including SCRIPT_JUSTIFY_NONE
// vowel, we do it like ScriptJustify does
// the vowel gets the extra width
long nSpaceAdded = mpJustifications[ i ] - mpGlyphAdvances[ i ];