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
9ed8a2b6
Commit
9ed8a2b6
authored
Jul 29, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: GdipGetStringFormatDigitSubstitution implemented.
parent
923918da
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
1 deletion
+75
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+2
-0
stringformat.c
dlls/gdiplus/stringformat.c
+14
-0
stringformat.c
dlls/gdiplus/tests/stringformat.c
+47
-0
gdiplusenums.h
include/gdiplusenums.h
+9
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
9ed8a2b6
...
@@ -387,7 +387,7 @@
...
@@ -387,7 +387,7 @@
@ stdcall GdipGetSmoothingMode(ptr ptr)
@ stdcall GdipGetSmoothingMode(ptr ptr)
@ stdcall GdipGetSolidFillColor(ptr ptr)
@ stdcall GdipGetSolidFillColor(ptr ptr)
@ stdcall GdipGetStringFormatAlign(ptr ptr)
@ stdcall GdipGetStringFormatAlign(ptr ptr)
@ st
ub GdipGetStringFormatDigitSubstitution
@ st
dcall GdipGetStringFormatDigitSubstitution(ptr ptr ptr)
@ stdcall GdipGetStringFormatFlags(ptr ptr)
@ stdcall GdipGetStringFormatFlags(ptr ptr)
@ stdcall GdipGetStringFormatHotkeyPrefix(ptr ptr)
@ stdcall GdipGetStringFormatHotkeyPrefix(ptr ptr)
@ stdcall GdipGetStringFormatLineAlign(ptr ptr)
@ stdcall GdipGetStringFormatLineAlign(ptr ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
9ed8a2b6
...
@@ -188,10 +188,12 @@ struct GpFont{
...
@@ -188,10 +188,12 @@ struct GpFont{
struct
GpStringFormat
{
struct
GpStringFormat
{
INT
attr
;
INT
attr
;
LANGID
lang
;
LANGID
lang
;
LANGID
digitlang
;
StringAlignment
align
;
StringAlignment
align
;
StringTrimming
trimming
;
StringTrimming
trimming
;
HotkeyPrefix
hkprefix
;
HotkeyPrefix
hkprefix
;
StringAlignment
vertalign
;
StringAlignment
vertalign
;
StringDigitSubstitute
digitsub
;
};
};
struct
GpFontCollection
{
struct
GpFontCollection
{
...
...
dlls/gdiplus/stringformat.c
View file @
9ed8a2b6
...
@@ -43,7 +43,9 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT attr, LANGID lang,
...
@@ -43,7 +43,9 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT attr, LANGID lang,
(
*
format
)
->
attr
=
attr
;
(
*
format
)
->
attr
=
attr
;
(
*
format
)
->
lang
=
lang
;
(
*
format
)
->
lang
=
lang
;
(
*
format
)
->
digitlang
=
LANG_NEUTRAL
;
(
*
format
)
->
trimming
=
StringTrimmingCharacter
;
(
*
format
)
->
trimming
=
StringTrimmingCharacter
;
(
*
format
)
->
digitsub
=
StringDigitSubstituteUser
;
return
Ok
;
return
Ok
;
}
}
...
@@ -79,6 +81,18 @@ GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format,
...
@@ -79,6 +81,18 @@ GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format,
return
Ok
;
return
Ok
;
}
}
GpStatus
WINGDIPAPI
GdipGetStringFormatDigitSubstitution
(
GDIPCONST
GpStringFormat
*
format
,
LANGID
*
language
,
StringDigitSubstitute
*
substitute
)
{
if
(
!
format
)
return
InvalidParameter
;
if
(
language
)
*
language
=
format
->
digitlang
;
if
(
substitute
)
*
substitute
=
format
->
digitsub
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetStringFormatFlags
(
GDIPCONST
GpStringFormat
*
format
,
GpStatus
WINGDIPAPI
GdipGetStringFormatFlags
(
GDIPCONST
GpStringFormat
*
format
,
INT
*
flags
)
INT
*
flags
)
{
{
...
...
dlls/gdiplus/tests/stringformat.c
View file @
9ed8a2b6
...
@@ -31,6 +31,8 @@ static void test_constructor(void)
...
@@ -31,6 +31,8 @@ static void test_constructor(void)
INT
n
;
INT
n
;
StringAlignment
align
,
valign
;
StringAlignment
align
,
valign
;
StringTrimming
trimming
;
StringTrimming
trimming
;
StringDigitSubstitute
digitsub
;
LANGID
digitlang
;
stat
=
GdipCreateStringFormat
(
0
,
0
,
&
format
);
stat
=
GdipCreateStringFormat
(
0
,
0
,
&
format
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
@@ -39,11 +41,14 @@ static void test_constructor(void)
...
@@ -39,11 +41,14 @@ static void test_constructor(void)
GdipGetStringFormatLineAlign
(
format
,
&
valign
);
GdipGetStringFormatLineAlign
(
format
,
&
valign
);
GdipGetStringFormatHotkeyPrefix
(
format
,
&
n
);
GdipGetStringFormatHotkeyPrefix
(
format
,
&
n
);
GdipGetStringFormatTrimming
(
format
,
&
trimming
);
GdipGetStringFormatTrimming
(
format
,
&
trimming
);
GdipGetStringFormatDigitSubstitution
(
format
,
&
digitlang
,
&
digitsub
);
expect
(
HotkeyPrefixNone
,
n
);
expect
(
HotkeyPrefixNone
,
n
);
expect
(
StringAlignmentNear
,
align
);
expect
(
StringAlignmentNear
,
align
);
expect
(
StringAlignmentNear
,
align
);
expect
(
StringAlignmentNear
,
align
);
expect
(
StringTrimmingCharacter
,
trimming
);
expect
(
StringTrimmingCharacter
,
trimming
);
expect
(
StringDigitSubstituteUser
,
digitsub
);
expect
(
LANG_NEUTRAL
,
digitlang
);
stat
=
GdipDeleteStringFormat
(
format
);
stat
=
GdipDeleteStringFormat
(
format
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
@@ -70,6 +75,47 @@ todo_wine
...
@@ -70,6 +75,47 @@ todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
}
}
static
void
test_digitsubstitution
(
void
)
{
GpStringFormat
*
format
;
GpStatus
stat
;
StringDigitSubstitute
digitsub
;
LANGID
digitlang
;
stat
=
GdipCreateStringFormat
(
0
,
LANG_RUSSIAN
,
&
format
);
expect
(
Ok
,
stat
);
/* NULL arguments */
stat
=
GdipGetStringFormatDigitSubstitution
(
NULL
,
NULL
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetStringFormatDigitSubstitution
(
format
,
NULL
,
NULL
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatDigitSubstitution
(
NULL
,
&
digitlang
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetStringFormatDigitSubstitution
(
NULL
,
NULL
,
&
digitsub
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetStringFormatDigitSubstitution
(
NULL
,
&
digitlang
,
&
digitsub
);
expect
(
InvalidParameter
,
stat
);
/* try to get both and one by one */
stat
=
GdipGetStringFormatDigitSubstitution
(
format
,
&
digitlang
,
&
digitsub
);
expect
(
Ok
,
stat
);
expect
(
StringDigitSubstituteUser
,
digitsub
);
expect
(
LANG_NEUTRAL
,
digitlang
);
digitsub
=
StringDigitSubstituteNone
;
stat
=
GdipGetStringFormatDigitSubstitution
(
format
,
NULL
,
&
digitsub
);
expect
(
Ok
,
stat
);
expect
(
StringDigitSubstituteUser
,
digitsub
);
digitlang
=
LANG_RUSSIAN
;
stat
=
GdipGetStringFormatDigitSubstitution
(
format
,
&
digitlang
,
NULL
);
expect
(
Ok
,
stat
);
expect
(
LANG_NEUTRAL
,
digitlang
);
stat
=
GdipDeleteStringFormat
(
format
);
expect
(
Ok
,
stat
);
}
START_TEST
(
stringformat
)
START_TEST
(
stringformat
)
{
{
...
@@ -85,6 +131,7 @@ START_TEST(stringformat)
...
@@ -85,6 +131,7 @@ START_TEST(stringformat)
test_constructor
();
test_constructor
();
test_characterrange
();
test_characterrange
();
test_digitsubstitution
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
include/gdiplusenums.h
View file @
9ed8a2b6
...
@@ -227,6 +227,14 @@ enum StringAlignment
...
@@ -227,6 +227,14 @@ enum StringAlignment
StringAlignmentFar
=
2
StringAlignmentFar
=
2
};
};
enum
StringDigitSubstitute
{
StringDigitSubstituteUser
=
0
,
StringDigitSubstituteNone
=
1
,
StringDigitSubstituteNational
=
2
,
StringDigitSubstituteTraditional
=
3
};
enum
StringFormatFlags
enum
StringFormatFlags
{
{
StringFormatFlagsDirectionRightToLeft
=
0x00000001
,
StringFormatFlagsDirectionRightToLeft
=
0x00000001
,
...
@@ -346,6 +354,7 @@ typedef enum EmfType EmfType;
...
@@ -346,6 +354,7 @@ typedef enum EmfType EmfType;
typedef
enum
CompositingMode
CompositingMode
;
typedef
enum
CompositingMode
CompositingMode
;
typedef
enum
TextRenderingHint
TextRenderingHint
;
typedef
enum
TextRenderingHint
TextRenderingHint
;
typedef
enum
StringAlignment
StringAlignment
;
typedef
enum
StringAlignment
StringAlignment
;
typedef
enum
StringDigitSubstitute
StringDigitSubstitute
;
typedef
enum
StringTrimming
StringTrimming
;
typedef
enum
StringTrimming
StringTrimming
;
typedef
enum
FontStyle
FontStyle
;
typedef
enum
FontStyle
FontStyle
;
typedef
enum
StringFormatFlags
StringFormatFlags
;
typedef
enum
StringFormatFlags
StringFormatFlags
;
...
...
include/gdiplusflat.h
View file @
9ed8a2b6
...
@@ -436,6 +436,8 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
...
@@ -436,6 +436,8 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus
WINGDIPAPI
GdipDeleteStringFormat
(
GpStringFormat
*
);
GpStatus
WINGDIPAPI
GdipDeleteStringFormat
(
GpStringFormat
*
);
GpStatus
WINGDIPAPI
GdipStringFormatGetGenericDefault
(
GpStringFormat
**
);
GpStatus
WINGDIPAPI
GdipStringFormatGetGenericDefault
(
GpStringFormat
**
);
GpStatus
WINGDIPAPI
GdipGetStringFormatAlign
(
GpStringFormat
*
,
StringAlignment
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatAlign
(
GpStringFormat
*
,
StringAlignment
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatDigitSubstitution
(
GDIPCONST
GpStringFormat
*
,
LANGID
*
,
StringDigitSubstitute
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatFlags
(
GDIPCONST
GpStringFormat
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatFlags
(
GDIPCONST
GpStringFormat
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatHotkeyPrefix
(
GDIPCONST
GpStringFormat
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatHotkeyPrefix
(
GDIPCONST
GpStringFormat
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatLineAlign
(
GpStringFormat
*
,
StringAlignment
*
);
GpStatus
WINGDIPAPI
GdipGetStringFormatLineAlign
(
GpStringFormat
*
,
StringAlignment
*
);
...
...
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