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
b03718f0
Commit
b03718f0
authored
Jul 17, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledlg: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f7d8023
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
insobjdlg.c
dlls/oledlg/insobjdlg.c
+1
-1
oledlg_main.c
dlls/oledlg/oledlg_main.c
+4
-4
pastespl.c
dlls/oledlg/pastespl.c
+4
-4
No files found.
dlls/oledlg/insobjdlg.c
View file @
b03718f0
...
...
@@ -350,7 +350,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo)
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szClsid
,
0
,
KEY_READ
,
&
hkclsids
);
while
(
ERROR_SUCCESS
==
(
ret
=
RegEnumKeyW
(
hkclsids
,
index
,
szclsid
,
sizeof
(
szclsid
)
/
sizeof
(
szclsid
[
0
]
))))
while
(
ERROR_SUCCESS
==
(
ret
=
RegEnumKeyW
(
hkclsids
,
index
,
szclsid
,
ARRAY_SIZE
(
szclsid
))))
{
index
++
;
...
...
dlls/oledlg/oledlg_main.c
View file @
b03718f0
...
...
@@ -181,7 +181,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
if
(
object
)
IOleObject_EnumVerbs
(
object
,
&
enumverbs
);
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_OBJECT
,
resstrW
,
sizeof
(
resstrW
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_OBJECT
,
resstrW
,
ARRAY_SIZE
(
resstrW
));
/* no object, or object without enumeration support */
if
(
!
object
||
!
enumverbs
)
{
RemoveMenu
(
hMenu
,
uPos
,
MF_BYPOSITION
);
...
...
@@ -202,7 +202,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
singleverb
=
get_next_insertable_verb
(
enumverbs
,
idmin
,
idmax
,
&
verb
)
!=
S_OK
;
if
(
singleverb
&&
!
addConvert
)
{
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_SINGLEVERB_OBJECT
,
resstrW
,
sizeof
(
resstrW
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_SINGLEVERB_OBJECT
,
resstrW
,
ARRAY_SIZE
(
resstrW
));
args
[
0
]
=
(
DWORD_PTR
)
firstverb
.
lpszVerbName
;
args
[
1
]
=
(
DWORD_PTR
)
objecttype
;
...
...
@@ -235,7 +235,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
/* convert verb is at the bottom of a popup, separated from verbs */
if
(
addConvert
)
{
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_CONVERT
,
resstrW
,
sizeof
(
resstrW
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_CONVERT
,
resstrW
,
ARRAY_SIZE
(
resstrW
));
InsertMenuW
(
submenu
,
~
0
,
MF_BYPOSITION
|
MF_SEPARATOR
,
0
,
NULL
);
InsertMenuW
(
submenu
,
~
0
,
MF_BYPOSITION
|
MF_STRING
,
idConvert
,
resstrW
);
}
...
...
@@ -244,7 +244,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
*
ret_submenu
=
submenu
;
/* now submenu is ready, add root entry to original menu, attach submenu */
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_OBJECT_WITH_NAME
,
resstrW
,
sizeof
(
resstrW
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_VERBMENU_OBJECT_WITH_NAME
,
resstrW
,
ARRAY_SIZE
(
resstrW
));
args
[
0
]
=
(
DWORD_PTR
)
objecttype
;
FormatMessageW
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
...
...
dlls/oledlg/pastespl.c
View file @
b03718f0
...
...
@@ -182,14 +182,14 @@ static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct)
if
(
ps_struct
->
source_name
==
NULL
&&
ps_struct
->
link_source_name
==
NULL
)
{
WCHAR
buf
[
200
];
LoadStringW
(
OLEDLG_hInstance
,
IDS_PS_UNKNOWN_SRC
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_PS_UNKNOWN_SRC
,
buf
,
ARRAY_SIZE
(
buf
));
ps_struct
->
source_name
=
strdupW
(
buf
);
}
if
(
ps_struct
->
type_name
==
NULL
&&
ps_struct
->
link_type_name
==
NULL
)
{
WCHAR
buf
[
200
];
LoadStringW
(
OLEDLG_hInstance
,
IDS_PS_UNKNOWN_TYPE
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
IDS_PS_UNKNOWN_TYPE
,
buf
,
ARRAY_SIZE
(
buf
));
ps_struct
->
type_name
=
strdupW
(
buf
);
}
}
...
...
@@ -228,7 +228,7 @@ static DWORD init_pastelist(HWND hdlg, OLEUIPASTESPECIALW *ps)
}
/* The native version grabs only the first 20 fmts and we do the same */
hr
=
IEnumFORMATETC_Next
(
penum
,
sizeof
(
fmts
)
/
sizeof
(
fmts
[
0
]
),
fmts
,
&
fetched
);
hr
=
IEnumFORMATETC_Next
(
penum
,
ARRAY_SIZE
(
fmts
),
fmts
,
&
fetched
);
TRACE
(
"got %d formats hr %08x
\n
"
,
fetched
,
hr
);
if
(
SUCCEEDED
(
hr
))
...
...
@@ -431,7 +431,7 @@ static void update_result_text(HWND hdlg, const ps_struct_t *ps_struct)
res_id
=
IDS_PS_PASTE_LINK_DATA
;
}
LoadStringW
(
OLEDLG_hInstance
,
res_id
,
resource_txt
,
sizeof
(
resource_txt
)
/
sizeof
(
WCHAR
));
LoadStringW
(
OLEDLG_hInstance
,
res_id
,
resource_txt
,
ARRAY_SIZE
(
resource_txt
));
if
((
ptr
=
strstrW
(
resource_txt
,
percent_s
)))
{
/* FIXME handle %s in ResultText. Sub appname if IDS_PS_PASTE_OBJECT{_AS_ICON}. Else sub appropriate type name */
...
...
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