Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6b2a6a2b
Commit
6b2a6a2b
authored
Sep 27, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Oct 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix meaning and use of bidirectionality flags.
parent
455a4994
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
21 deletions
+14
-21
bidi.c
dlls/gdi32/bidi.c
+10
-19
gdi_private.h
dlls/gdi32/gdi_private.h
+4
-2
No files found.
dlls/gdi32/bidi.c
View file @
6b2a6a2b
...
...
@@ -1054,7 +1054,7 @@ BOOL BIDI_Reorder(
{
WORD
*
levels
;
WORD
*
chartype
;
unsigned
i
,
baselevel
=
0
,
forcedir
=
0
,
done
;
unsigned
i
,
baselevel
=
0
,
done
;
TRACE
(
"%s, %d, 0x%08x lpOutString=%p, lpOrder=%p
\n
"
,
debugstr_wn
(
lpString
,
uCount
),
uCount
,
dwFlags
,
lpOutString
,
lpOrder
);
...
...
@@ -1081,14 +1081,8 @@ BOOL BIDI_Reorder(
memcpy
(
lpOutString
,
lpString
,
uCount
*
sizeof
(
WCHAR
));
switch
(
dwWineGCP_Flags
&
WINE_GCPW_DIR_MASK
)
{
/* force means initial level is set directly,
* loose means initial level is determined by first character that has a direction */
case
WINE_GCPW_FORCE_LTR
:
forcedir
=
L
;
break
;
case
WINE_GCPW_FORCE_RTL
:
forcedir
=
R
;
baselevel
=
1
;
break
;
default:
break
;
}
if
(
WINE_GCPW_FORCE_RTL
==
(
dwWineGCP_Flags
&
WINE_GCPW_DIR_MASK
))
baselevel
=
1
;
i
=
done
=
0
;
while
(
done
<
uCount
)
...
...
@@ -1107,29 +1101,26 @@ BOOL BIDI_Reorder(
default:
continue
;
}
if
(
!
forcedir
)
{
if
((
dwWineGCP_Flags
&
WINE_GCPW_DIR_MASK
)
==
WINE_GCPW_LOOSE_RTL
)
baselevel
=
1
;
else
baselevel
=
0
;
if
((
dwWineGCP_Flags
&
WINE_GCPW_DIR_MASK
)
==
WINE_GCPW_LOOSE_RTL
)
baselevel
=
1
;
else
if
((
dwWineGCP_Flags
&
WINE_GCPW_DIR_MASK
)
==
WINE_GCPW_LOOSE_LTR
)
baselevel
=
0
;
if
(
dwWineGCP_Flags
&
WINE_GCPW_LOOSE_MASK
)
for
(
j
=
0
;
j
<
i
;
++
j
)
{
if
(
chartype
[
j
]
==
L
)
{
baselevel
=
0
;
break
;
}
if
(
chartype
[
j
]
==
R
)
else
if
(
chartype
[
j
]
==
R
)
{
baselevel
=
1
;
break
;
}
}
}
/* resolve explicit */
resolveExplicit
(
baselevel
,
forcedir
,
chartype
,
levels
,
i
,
0
);
resolveExplicit
(
baselevel
,
N
,
chartype
,
levels
,
i
,
0
);
/* resolve weak */
resolveWeak
(
baselevel
,
chartype
,
levels
,
i
);
...
...
dlls/gdi32/gdi_private.h
View file @
6b2a6a2b
...
...
@@ -373,14 +373,16 @@ typedef struct tagBITMAPOBJ
/* Wine_GCPW Flags */
/* Directionality -
* LOOSE means t
hat the paragraph dir is only set if there is no strong character
.
* FORCE means
override the characters in the paragraph.
* LOOSE means t
aking the directionality of the first strong character, if there is found one
.
* FORCE means
the paragraph direction is forced. (RLE/LRE)
*/
#define WINE_GCPW_FORCE_LTR 0
#define WINE_GCPW_FORCE_RTL 1
#define WINE_GCPW_LOOSE_LTR 2
#define WINE_GCPW_LOOSE_RTL 3
#define WINE_GCPW_DIR_MASK 3
#define WINE_GCPW_LOOSE_MASK 2
extern
BOOL
BIDI_Reorder
(
LPCWSTR
lpString
,
INT
uCount
,
DWORD
dwFlags
,
DWORD
dwWineGCP_Flags
,
LPWSTR
lpOutString
,
INT
uCountOut
,
UINT
*
lpOrder
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment