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
114ef068
Commit
114ef068
authored
Oct 07, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement GetStringLength method.
parent
98ce55c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
main.c
dlls/dwrite/main.c
+10
-2
font.c
dlls/dwrite/tests/font.c
+17
-1
No files found.
dlls/dwrite/main.c
View file @
114ef068
...
...
@@ -271,8 +271,16 @@ static HRESULT WINAPI localizedstrings_GetLocaleName(IDWriteLocalizedStrings *if
static
HRESULT
WINAPI
localizedstrings_GetStringLength
(
IDWriteLocalizedStrings
*
iface
,
UINT32
index
,
UINT32
*
length
)
{
struct
localizedstrings
*
This
=
impl_from_IDWriteLocalizedStrings
(
iface
);
FIXME
(
"(%p)->(%u %p): stub
\n
"
,
This
,
index
,
length
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
index
,
length
);
if
(
index
>=
This
->
count
)
{
*
length
=
(
UINT32
)
-
1
;
return
E_FAIL
;
}
*
length
=
strlenW
(
This
->
data
[
index
].
string
);
return
S_OK
;
}
static
HRESULT
WINAPI
localizedstrings_GetString
(
IDWriteLocalizedStrings
*
iface
,
UINT32
index
,
WCHAR
*
buffer
,
UINT32
size
)
...
...
dlls/dwrite/tests/font.c
View file @
114ef068
...
...
@@ -321,6 +321,7 @@ static void test_GetFamilyNames(void)
IDWriteFont
*
font
;
LOGFONTW
logfont
;
HRESULT
hr
;
UINT32
len
;
hr
=
IDWriteFactory_GetGdiInterop
(
factory
,
&
interop
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
@@ -350,9 +351,24 @@ if (0) /* crashes on native */
EXPECT_REF
(
names2
,
1
);
ok
(
names
!=
names2
,
"got %p, was %p
\n
"
,
names2
,
names
);
IDWriteLocalizedStrings_Release
(
names
);
IDWriteLocalizedStrings_Release
(
names2
);
/* GetStringLength */
if
(
0
)
/* crashes on native */
hr
=
IDWriteLocalizedStrings_GetStringLength
(
names
,
0
,
NULL
);
len
=
0
;
hr
=
IDWriteLocalizedStrings_GetStringLength
(
names
,
0
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
>
0
,
"got %u
\n
"
,
len
);
len
=
100
;
hr
=
IDWriteLocalizedStrings_GetStringLength
(
names
,
10
,
&
len
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
(
UINT32
)
-
1
,
"got %u
\n
"
,
len
);
IDWriteLocalizedStrings_Release
(
names
);
IDWriteFontFamily_Release
(
family
);
IDWriteFont_Release
(
font
);
IDWriteGdiInterop_Release
(
interop
);
...
...
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