Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2489e76b
Commit
2489e76b
authored
Feb 01, 2009
by
Aurimas Fischer
Committed by
Alexandre Julliard
Feb 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipSetStringFormatFlags with tests.
parent
63190063
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
1 deletion
+66
-1
stringformat.c
dlls/gdiplus/stringformat.c
+4
-1
stringformat.c
dlls/gdiplus/tests/stringformat.c
+62
-0
No files found.
dlls/gdiplus/stringformat.c
View file @
2489e76b
...
...
@@ -286,7 +286,10 @@ GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format,
GpStatus
WINGDIPAPI
GdipSetStringFormatFlags
(
GpStringFormat
*
format
,
INT
flags
)
{
FIXME
(
"format (%p) flags (%d)
\n
"
,
format
,
flags
);
if
(
!
format
)
return
InvalidParameter
;
format
->
attr
=
flags
;
return
Ok
;
}
...
...
dlls/gdiplus/tests/stringformat.c
View file @
2489e76b
...
...
@@ -318,6 +318,67 @@ static void test_getgenericdefault(void)
expect
(
Ok
,
stat
);
}
static
void
test_stringformatflags
(
void
)
{
GpStringFormat
*
format
;
GpStatus
stat
;
INT
flags
;
stat
=
GdipCreateStringFormat
(
0
,
LANG_NEUTRAL
,
&
format
);
expect
(
Ok
,
stat
);
/* NULL args */
stat
=
GdipSetStringFormatFlags
(
NULL
,
0
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetStringFormatFlags
(
format
,
0
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
(
0
,
flags
);
/* Check some valid flags */
stat
=
GdipSetStringFormatFlags
(
format
,
StringFormatFlagsDirectionRightToLeft
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
(
StringFormatFlagsDirectionRightToLeft
,
flags
);
stat
=
GdipSetStringFormatFlags
(
format
,
StringFormatFlagsNoFontFallback
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
(
StringFormatFlagsNoFontFallback
,
flags
);
/* Check some flag combinations */
stat
=
GdipSetStringFormatFlags
(
format
,
StringFormatFlagsDirectionVertical
|
StringFormatFlagsNoFitBlackBox
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
((
StringFormatFlagsDirectionVertical
|
StringFormatFlagsNoFitBlackBox
),
flags
);
stat
=
GdipSetStringFormatFlags
(
format
,
StringFormatFlagsDisplayFormatControl
|
StringFormatFlagsMeasureTrailingSpaces
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
((
StringFormatFlagsDisplayFormatControl
|
StringFormatFlagsMeasureTrailingSpaces
),
flags
);
/* Check invalid flags */
stat
=
GdipSetStringFormatFlags
(
format
,
0xdeadbeef
);
expect
(
Ok
,
stat
);
stat
=
GdipGetStringFormatFlags
(
format
,
&
flags
);
expect
(
Ok
,
stat
);
expect
(
0xdeadbeef
,
flags
);
stat
=
GdipDeleteStringFormat
(
format
);
expect
(
Ok
,
stat
);
}
START_TEST
(
stringformat
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -336,6 +397,7 @@ START_TEST(stringformat)
test_getgenerictypographic
();
test_tabstops
();
test_getgenericdefault
();
test_stringformatflags
();
GdiplusShutdown
(
gdiplusToken
);
}
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