winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1278 discussions
Start a n
N
ew thread
Rob Shearman : widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 14dd441c5b6f2a4303ae128883469f4f09dbc32b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14dd441c5b6f2a4303ae12888…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:40 2008 +0100 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. --- tools/widl/parser.y | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 461483c..1732eae 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -287,8 +287,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %type <type> type %type <ifref> coclass_int %type <ifref_list> coclass_ints -%type <var> arg field s_field case enum constdef externdef -%type <var_list> m_args no_args args fields cases enums enum_list dispint_props +%type <var> arg field ne_union_field union_field s_field case enum constdef externdef +%type <var_list> m_args no_args args fields ne_union_fields cases enums enum_list dispint_props %type <var> m_ident t_ident ident %type <declarator> declarator func_declarator direct_declarator %type <declarator_list> declarator_list @@ -576,11 +576,11 @@ cases: { $$ = NULL; } | cases case { $$ = append_var( $1, $2 ); } ; -case: tCASE expr_const ':' field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); +case: tCASE expr_const ':' union_field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); $$ = $4; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } - | tDEFAULT ':' field { attr_t *a = make_attr(ATTR_DEFAULT); + | tDEFAULT ':' union_field { attr_t *a = make_attr(ATTR_DEFAULT); $$ = $3; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } @@ -707,10 +707,20 @@ fields: { $$ = NULL; } field: s_field ';' { $$ = $1; } | m_attributes uniondef ';' { $$ = make_var(NULL); $$->type = $2; $$->attrs = $1; } + ; + +ne_union_field: + s_field ';' { $$ = $1; } | attributes ';' { $$ = make_var(NULL); $$->attrs = $1; } - | ';' { $$ = NULL; } + +ne_union_fields: { $$ = NULL; } + | ne_union_fields ne_union_field { $$ = append_var( $1, $2 ); } ; +union_field: + s_field ';' { $$ = $1; } + | ';' { $$ = NULL; } + s_field: m_attributes type declarator { $$ = $3->var; $$->attrs = check_field_attrs($$->name, $1); set_type($$, $2, $3, FALSE); @@ -990,7 +1000,8 @@ typedef: tTYPEDEF m_attributes type declarator_list } ; -uniondef: tUNION t_ident '{' fields '}' { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); +uniondef: tUNION t_ident '{' ne_union_fields '}' + { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); $$->kind = TKIND_UNION; $$->fields_or_args = $4; $$->defined = TRUE;
1
0
0
0
Rob Shearman : widl: Consolidate most of the inner loop of reg_typedefs into set_type.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2f381f30a69beb2ff79deb7bdb685cd73e409fac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f381f30a69beb2ff79deb7bd…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:08 2008 +0100 widl: Consolidate most of the inner loop of reg_typedefs into set_type. --- tools/widl/parser.y | 40 ++++++++++------------------------------ 1 files changed, 10 insertions(+), 30 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index b4805ed..5545e7d 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1266,6 +1266,10 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); } + if (is_attr(v->attrs, ATTR_STRING) && !is_ptr(v->type) && !arr) + error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", + v->name); + sizeless = FALSE; if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) { @@ -1592,7 +1596,6 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a { const pident_t *pident; int is_str = is_attr(attrs, ATTR_STRING); - unsigned char ptr_type = get_attrv(attrs, ATTR_POINTERTYPE); if (is_str) { @@ -1628,36 +1631,13 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a var_t *name = pident->var; if (name->name) { - type_t *cur = append_ptrchain_type(pident->type, type); - if (pident->func_type) - { - type_t *t; - type_t *return_type = cur; - cur = pident->func_type; - for (t = cur; is_ptr(t); t = t->ref) - ; - assert(t->type == RPC_FC_FUNCTION); - t->ref = return_type; - if (is_object_interface && !is_attr(t->attrs, ATTR_CALLCONV)) - { - static char *stdmethodcalltype; - if (!stdmethodcalltype) stdmethodcalltype = strdup("STDMETHODCALLTYPE"); - t->attrs = append_attr(NULL, make_attrp(ATTR_CALLCONV, stdmethodcalltype)); - } - } - cur = alias(cur, name->name); + type_t *cur; + + /* set the attributes to allow set_type to do some checks on them */ + name->attrs = attrs; + set_type(name, type, pident, NULL, 0); + cur = alias(name->type, name->name); cur->attrs = attrs; - if (ptr_type) - { - if (is_ptr(cur)) - cur->type = ptr_type; - else - error_loc("'%s': pointer attribute applied to non-pointer type\n", - cur->name); - } - else if (is_str && ! is_ptr(cur)) - error_loc("'%s': [string] attribute applied to non-pointer type\n", - cur->name); if (is_incomplete(cur)) add_incomplete(cur);
1
0
0
0
Alexandre Julliard : oleaut32/tests: Store the test typelib in resources instead of depending on an external file .
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: c76de89885c4c8cd97204d5e09b22ca0e3588b02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c76de89885c4c8cd97204d5e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 25 12:09:03 2008 +0200 oleaut32/tests: Store the test typelib in resources instead of depending on an external file. --- dlls/oleaut32/tests/tmarshal.rc | 3 +++ dlls/oleaut32/tests/typelib.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.rc b/dlls/oleaut32/tests/tmarshal.rc index 30c2a9b..707895f 100644 --- a/dlls/oleaut32/tests/tmarshal.rc +++ b/dlls/oleaut32/tests/tmarshal.rc @@ -29,3 +29,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: tmarshal.tlb */ 1 TYPELIB LOADONCALL DISCARDABLE tmarshal.tlb + +/* @makedep: test_tlb.tlb */ +2 TYPELIB LOADONCALL DISCARDABLE test_tlb.tlb diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a30b275..74a7812 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1337,13 +1337,41 @@ static void test_dump_typelib(const char *name) #endif +static const char *create_test_typelib(void) +{ + static char filename[MAX_PATH]; + HANDLE file; + HRSRC res; + void *ptr; + DWORD written; + + GetTempFileNameA( ".", "tlb", 0, filename ); + file = CreateFile( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" ); + if (file == INVALID_HANDLE_VALUE) return NULL; + res = FindResource( GetModuleHandle(0), MAKEINTRESOURCE(2), "TYPELIB" ); + ok( res != 0, "couldn't find resource\n" ); + ptr = LockResource( LoadResource( GetModuleHandle(0), res )); + WriteFile( file, ptr, SizeofResource( GetModuleHandle(0), res ), &written, NULL ); + ok( written == SizeofResource( GetModuleHandle(0), res ), "couldn't write resource\n" ); + CloseHandle( file ); + return filename; +} + START_TEST(typelib) { + const char *filename; + ref_count_test(wszStdOle2); test_TypeComp(); test_CreateDispTypeInfo(); test_TypeInfo(); test_QueryPathOfRegTypeLib(); test_inheritance(); - test_dump_typelib("test_tlb.tlb"); + + if ((filename = create_test_typelib())) + { + test_dump_typelib( filename ); + DeleteFile( filename ); + } }
1
0
0
0
Eric Pouech : richedit: Ensure wrapping is done all the time after inserting an RTF stream.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 046cfcfd22c8ff7abdbbf7694add3089f6b5d899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=046cfcfd22c8ff7abdbbf7694…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:36 2008 +0200 richedit: Ensure wrapping is done all the time after inserting an RTF stream. --- dlls/riched20/editor.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e635e9f..dcb21d1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1140,10 +1140,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_ReleaseStyle(style); editor->nEventMask = nEventMask; - if (editor->bRedraw) - { - ME_UpdateRepaint(editor); - } + ME_UpdateRepaint(editor); if (!(format & SFF_SELECTION)) { ME_ClearTempStyle(editor); }
1
0
0
0
Eric Pouech : richedit: Properly handle the background in case of border in paragraph.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 60234f8fc4b1b50b3f3dfd7e27b2973746008ef6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60234f8fc4b1b50b3f3dfd7e2…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:26 2008 +0200 richedit: Properly handle the background in case of border in paragraph. --- dlls/riched20/paint.c | 114 +++++++++++++++++++++++++++++-------------------- 1 files changed, 67 insertions(+), 47 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index ddd7de7..2ec7fb9 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -373,47 +373,51 @@ int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para) return sp * c->editor->nZoomNumerator / c->editor->nZoomDenominator; } -static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) +static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT* bounds) { - int idx, border_width; - int ybefore, yafter; + int idx, border_width, top_border, bottom_border; RECT rc; - if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return 0; + SetRectEmpty(bounds); + if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return; + + border_width = top_border = bottom_border = 0; + idx = (para->pFmt->wBorders >> 8) & 0xF; + if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) + { + if (para->pFmt->wBorders & 0x00B0) + FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); + border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); + if (para->pFmt->wBorders & 4) top_border = border_width; + if (para->pFmt->wBorders & 8) bottom_border = border_width; + } if (para->pFmt->dwMask & PFM_SPACEBEFORE) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.top = y; - ybefore = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); - rc.bottom = y + ybefore; + bounds->top = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); + rc.bottom = y + bounds->top + top_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else ybefore = 0; + if (para->pFmt->dwMask & PFM_SPACEAFTER) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.bottom = y + para->nHeight; - yafter = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); - rc.top = rc.bottom - yafter; + bounds->bottom = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); + rc.top = rc.bottom - bounds->bottom - bottom_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else yafter = 0; - border_width = 0; - idx = (para->pFmt->wBorders >> 8) & 0xF; if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) { int pen_width; COLORREF pencr; HPEN pen = NULL, oldpen = NULL; POINT pt; - if (para->pFmt->wBorders & 0x00B0) - FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); - border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); - if (para->pFmt->wBorders & 64) /* autocolor */ pencr = GetSysColor(COLOR_WINDOWTEXT); else @@ -425,50 +429,66 @@ static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) MoveToEx(c->hDC, 0, 0, &pt); /* before & after spaces are not included in border */ + + /* helper to draw the double lines in case of corner */ +#define DD(x) ((para->pFmt->wBorders & (x)) ? (pen_width + 1) : 0) + if (para->pFmt->wBorders & 1) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.left, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.left + 1; + rc.right = rc.left + border_width; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->left += border_width; } if (para->pFmt->wBorders & 2) { - MoveToEx(c->hDC, c->rcView.right, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.right - 1, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right - 1, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.right - pen_width - 1; + rc.right = c->rcView.right - 1; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.right - 1 - pen_width - 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.right - 1 - pen_width - 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->right += border_width; } if (para->pFmt->wBorders & 4) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + ybefore); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right, y + bounds->top); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + bounds->top + pen_width + 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + bounds->top + pen_width + 1); } + bounds->top += border_width; } if (para->pFmt->wBorders & 8) { - MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - yafter - 1, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter - 1); + MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom - 1, NULL); + LineTo(c->hDC, c->rcView.right, y + para->nHeight - bounds->bottom - 1); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - 1 - pen_width - 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - 1 - pen_width - 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + para->nHeight - bounds->bottom - 1 - pen_width - 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + para->nHeight - bounds->bottom - 1 - pen_width - 1); } + bounds->bottom += border_width; } +#undef DD MoveToEx(c->hDC, pt.x, pt.y, NULL); SelectObject(c->hDC, oldpen); DeleteObject(pen); } - return ybefore + - ((para->pFmt->dwMask & PFM_BORDER) && (para->pFmt->wBorders & 4) ? - border_width : 0); } void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { @@ -476,12 +496,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { ME_DisplayItem *p; ME_Run *run; ME_Paragraph *para = NULL; - RECT rc, rcPara; + RECT rc, rcPara, bounds; int y = c->pt.y; int height = 0, baseline = 0, no=0, pno = 0; - int xe = 0; + int xs = 0, xe = 0; BOOL visible = FALSE; - int nMargWidth = 0; c->pt.x = c->rcView.left; rcPara.left = c->rcView.left; @@ -491,11 +510,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { case diParagraph: para = &p->member.para; assert(para); - nMargWidth = ME_twips2pointsX(c, para->pFmt->dxStartIndent); - if (pno != 0) - nMargWidth += ME_twips2pointsX(c, para->pFmt->dxOffset); + pno = 0; + xs = c->rcView.left + ME_twips2pointsX(c, para->pFmt->dxStartIndent); xe = c->rcView.right - ME_twips2pointsX(c, para->pFmt->dxRightIndent); - y += ME_DrawParaDecoration(c, para, y); + ME_DrawParaDecoration(c, para, y, &bounds); + y += bounds.top; break; case diStartRow: y += height; @@ -504,16 +523,16 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { visible = RectVisible(c->hDC, &rcPara); if (visible) { /* left margin */ - rc.left = c->rcView.left; - rc.right = c->rcView.left+nMargWidth; + rc.left = c->rcView.left + bounds.left; + rc.right = xs; rc.top = y; rc.bottom = y+p->member.row.nHeight; FillRect(c->hDC, &rc, c->editor->hbrBackground); /* right margin */ rc.left = xe; - rc.right = c->rcView.right; + rc.right = c->rcView.right - bounds.right; FillRect(c->hDC, &rc, c->editor->hbrBackground); - rc.left = c->rcView.left+nMargWidth; + rc.left = xs; rc.right = xe; FillRect(c->hDC, &rc, c->editor->hbrBackground); } @@ -529,7 +548,8 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { height = p->member.row.nHeight; baseline = p->member.row.nBaseline; - pno++; + if (!pno++) + xe += ME_twips2pointsX(c, para->pFmt->dxOffset); break; case diRun: assert(para);
1
0
0
0
John Klehm : winex11: Add support for IsXExtensionPointer tablet devices.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2c26ea609d6b2b8a25be20984c0014ceb202466a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c26ea609d6b2b8a25be20984…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Tue Apr 22 20:11:28 2008 -0500 winex11: Add support for IsXExtensionPointer tablet devices. --- dlls/winex11.drv/wintab.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 37596ba..b086e44 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -530,14 +530,15 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) devices[loop].use == IsXKeyboard ? "IsXKeyboard" : devices[loop].use == IsXPointer ? "IsXPointer" : devices[loop].use == IsXExtensionDevice ? "IsXExtensionDevice" : + devices[loop].use == IsXExtensionPointer ? "IsXExtensionPointer" : "Unknown" ); - if (devices[loop].use == IsXExtensionDevice) + if ((devices[loop].use == IsXExtensionDevice) || (devices[loop].use == IsXExtensionPointer)) { LPWTI_CURSORS_INFO cursor; - TRACE("Is Extension Device\n"); + TRACE("Is XExtension%s\n", (devices[loop].use == IsXExtensionDevice)? "Device":"Pointer"); cursor_target++; target = &devices[loop]; cursor = &gSysCursor[cursor_target];
1
0
0
0
John Klehm : winex11: Allow wizardpen to be detected as a stylus.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 33d4117e1b988edbe0f7fa09817d97dcd920117d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33d4117e1b988edbe0f7fa098…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Thu Apr 17 09:48:50 2008 -0500 winex11: Allow wizardpen to be detected as a stylus. --- dlls/winex11.drv/wintab.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 8a2afd1..37596ba 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -414,10 +414,20 @@ static BOOL is_tablet_cursor(const char *name, const char *type) static BOOL is_stylus(const char *name, const char *type) { - if (name && match_token(name, "stylus")) - return TRUE; - if (type && match_token(type, "stylus")) - return TRUE; + int i; + static const char* tablet_stylus_whitelist[] = { + "stylus", + "wizardpen", + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + return FALSE; }
1
0
0
0
John Klehm : winex11: Allow wintab devices with less than 5 axes.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: b95c091dbf7669361a3f720083cac52989866b0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b95c091dbf7669361a3f72008…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Wed Apr 16 02:26:37 2008 -0500 winex11: Allow wintab devices with less than 5 axes. --- dlls/winex11.drv/wintab.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 16e369b..8a2afd1 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -620,7 +620,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) ** the various inputs to see what the values are. Odds are that a ** more 'correct' algorithm would condense to this one anyway. */ - if (!axis_read_complete && Val->num_axes >= 5 && cursor->TYPE == CSR_TYPE_PEN) + if (!axis_read_complete && cursor->TYPE == CSR_TYPE_PEN) { Axis = (XAxisInfoPtr) ((char *) Val + sizeof (XValuatorInfo));
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 8cf5608089ad40f842ff8d518f428efebc95c517 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8cf5608089ad40f842ff8d518…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:36 2008 +0400 gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/graphics.c | 27 ++++++++++++++++++++++++++- include/gdiplusflat.h | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 9fdd4be..bdead36 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -181,8 +181,8 @@ @ stub GdipDrawImagePointsI @ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr) @ stub GdipDrawImagePointsRectI -@ stub GdipDrawImageRect -@ stub GdipDrawImageRectI +@ stdcall GdipDrawImageRect(ptr ptr long long long long) +@ stdcall GdipDrawImageRectI(ptr ptr long long long long) @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawImageRectRectI(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawLine(ptr ptr long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index ef57def..b8a2efa 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1100,7 +1100,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); - if(!graphics || !image || !points || !imageAttributes || count != 3) + if(!graphics || !image || !points || count != 3) return InvalidParameter; if(srcUnit == UnitInch) @@ -1177,6 +1177,31 @@ GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); } +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics *graphics, GpImage *image, + REAL x, REAL y, REAL width, REAL height) +{ + RectF bounds; + GpUnit unit; + GpStatus ret; + + if(!graphics || !image) + return InvalidParameter; + + ret = GdipGetImageBounds(image, &bounds, &unit); + if(ret != Ok) + return ret; + + return GdipDrawImageRectRect(graphics, image, x, y, width, height, + bounds.X, bounds.Y, bounds.Width, bounds.Height, + unit, NULL, NULL, NULL); +} + +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, + INT x, INT y, INT width, INT height) +{ + return GdipDrawImageRect(graphics, image, (REAL)x, (REAL)y, (REAL)width, (REAL)height); +} + GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, REAL x2, REAL y2) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index cd349ea..8df6c5b 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -87,6 +87,8 @@ GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL, GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT, INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort, VOID*); +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipAddPathBezier.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 19cc99c33387a3f0d7de208f6586ebac1081a61f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19cc99c33387a3f0d7de208f6…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:26 2008 +0400 gdiplus: Implemented GdipAddPathBezier. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 27 +++++++++++++++++---------- include/gdiplusflat.h | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 3905c74..9fdd4be 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -1,6 +1,6 @@ @ stdcall GdipAddPathArc(ptr long long long long long long) @ stdcall GdipAddPathArcI(ptr long long long long long long) -@ stub GdipAddPathBezier +@ stdcall GdipAddPathBezier(ptr long long long long long long long long) @ stdcall GdipAddPathBezierI(ptr long long long long long long long long) @ stdcall GdipAddPathBeziers(ptr ptr long) @ stub GdipAddPathBeziersI diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index d7be43e..3f83bea 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -103,8 +103,8 @@ GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x1, INT y1, INT x2, return GdipAddPathArc(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,startAngle,sweepAngle); } -GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, - INT y2, INT x3, INT y3, INT x4, INT y4) +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, + REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { INT old_count; @@ -116,14 +116,14 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, old_count = path->pathdata.Count; - path->pathdata.Points[old_count].X = (REAL) x1; - path->pathdata.Points[old_count].Y = (REAL) y1; - path->pathdata.Points[old_count + 1].X = (REAL) x2; - path->pathdata.Points[old_count + 1].Y = (REAL) y2; - path->pathdata.Points[old_count + 2].X = (REAL) x3; - path->pathdata.Points[old_count + 2].Y = (REAL) y3; - path->pathdata.Points[old_count + 3].X = (REAL) x4; - path->pathdata.Points[old_count + 3].Y = (REAL) y4; + path->pathdata.Points[old_count].X = x1; + path->pathdata.Points[old_count].Y = y1; + path->pathdata.Points[old_count + 1].X = x2; + path->pathdata.Points[old_count + 1].Y = y2; + path->pathdata.Points[old_count + 2].X = x3; + path->pathdata.Points[old_count + 2].Y = y3; + path->pathdata.Points[old_count + 3].X = x4; + path->pathdata.Points[old_count + 3].Y = y4; path->pathdata.Types[old_count] = (path->newfigure ? PathPointTypeStart : PathPointTypeLine); @@ -137,6 +137,13 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, + INT y2, INT x3, INT y3, INT x4, INT y4) +{ + return GdipAddPathBezier(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,(REAL)x3,(REAL)y3, + (REAL)x4,(REAL)y4); +} + GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 366e8a5..cd349ea 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -189,6 +189,7 @@ GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
1
0
0
0
Erik de Castro Lopo : dbghelp: Fix pointer cast.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: ab2424710f7f76443aecdb5d0c6a69118e799116 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab2424710f7f76443aecdb5d0…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 10:36:03 2008 +1000 dbghelp: Fix pointer cast. --- dlls/dbghelp/dbghelp_private.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index c81f778..e4cae5b 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -106,7 +106,7 @@ void hash_table_iter_init(const struct hash_table* ht, void* hash_table_iter_up(struct hash_table_iter* hti); #define GET_ENTRY(__i, __t, __f) \ - ((__t*)((char*)(__i) - (unsigned int)(&((__t*)0)->__f))) + ((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f))) extern unsigned dbghelp_options;
1
0
0
0
Erik de Castro Lopo : ntdll: Win64 fix for get_pointer_obfuscator.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: eba704b8bb756a91c455483a48d2e3bc30ec15c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eba704b8bb756a91c455483a4…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 11:54:30 2008 +1000 ntdll: Win64 fix for get_pointer_obfuscator. --- dlls/ntdll/rtl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 1390c64..a4d1dac 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -904,10 +904,10 @@ static DWORD_PTR get_pointer_obfuscator( void ) rand = RtlUniform( &seed ); /* handle 64bit pointers */ - rand ^= RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand ^= (ULONG_PTR)RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); /* set the high bits so dereferencing obfuscated pointers will (usually) crash */ - rand |= 0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand |= (ULONG_PTR)0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); interlocked_cmpxchg_ptr( (void**) &pointer_obfuscator, (void*) rand, NULL ); }
1
0
0
0
Erik de Castro Lopo : crypt32: Use LOWORD on LPCSTR type instead of casting to int.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 0ef69ef9dd04af37fedc0fbec1b40c98b2a7f11d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ef69ef9dd04af37fedc0fbec…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 11:14:35 2008 +1000 crypt32: Use LOWORD on LPCSTR type instead of casting to int. --- dlls/crypt32/chain.c | 8 ++++---- dlls/crypt32/store.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 362eddc..a13a896 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1780,16 +1780,16 @@ BOOL WINAPI CertVerifyCertificateChainPolicy(LPCSTR szPolicyOID, { switch (LOWORD(szPolicyOID)) { - case (int)CERT_CHAIN_POLICY_BASE: + case LOWORD(CERT_CHAIN_POLICY_BASE): verifyPolicy = verify_base_policy; break; - case (int)CERT_CHAIN_POLICY_AUTHENTICODE: + case LOWORD(CERT_CHAIN_POLICY_AUTHENTICODE): verifyPolicy = verify_authenticode_policy; break; - case (int)CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: + case LOWORD(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS): verifyPolicy = verify_basic_constraints_policy; break; - case (int)CERT_CHAIN_POLICY_MICROSOFT_ROOT: + case LOWORD(CERT_CHAIN_POLICY_MICROSOFT_ROOT): verifyPolicy = verify_ms_root_policy; break; default: diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 84d326c..9534e5c 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -674,43 +674,43 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, { switch (LOWORD(lpszStoreProvider)) { - case (int)CERT_STORE_PROV_MSG: + case LOWORD(CERT_STORE_PROV_MSG): openFunc = CRYPT_MsgOpenStore; break; - case (int)CERT_STORE_PROV_MEMORY: + case LOWORD(CERT_STORE_PROV_MEMORY): openFunc = CRYPT_MemOpenStore; break; - case (int)CERT_STORE_PROV_FILE: + case LOWORD(CERT_STORE_PROV_FILE): openFunc = CRYPT_FileOpenStore; break; - case (int)CERT_STORE_PROV_PKCS7: + case LOWORD(CERT_STORE_PROV_PKCS7): openFunc = CRYPT_PKCSOpenStore; break; - case (int)CERT_STORE_PROV_REG: + case LOWORD(CERT_STORE_PROV_REG): openFunc = CRYPT_RegOpenStore; break; - case (int)CERT_STORE_PROV_FILENAME_A: + case LOWORD(CERT_STORE_PROV_FILENAME_A): openFunc = CRYPT_FileNameOpenStoreA; break; - case (int)CERT_STORE_PROV_FILENAME_W: + case LOWORD(CERT_STORE_PROV_FILENAME_W): openFunc = CRYPT_FileNameOpenStoreW; break; - case (int)CERT_STORE_PROV_COLLECTION: + case LOWORD(CERT_STORE_PROV_COLLECTION): openFunc = CRYPT_CollectionOpenStore; break; - case (int)CERT_STORE_PROV_SYSTEM_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_A): openFunc = CRYPT_SysOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_W): openFunc = CRYPT_SysOpenStoreW; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_A): openFunc = CRYPT_SysRegOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_W): openFunc = CRYPT_SysRegOpenStoreW; break; - case (int)CERT_STORE_PROV_PHYSICAL_W: + case LOWORD(CERT_STORE_PROV_PHYSICAL_W): openFunc = CRYPT_PhysOpenStoreW; break; default:
1
0
0
0
Erik de Castro Lopo : user32/tests: Use SetWindowLongPtr instead of SetWindowLong.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 56797f9c65e0611cccf5f3e77865a9e465583b85 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56797f9c65e0611cccf5f3e77…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 17:13:39 2008 +1000 user32/tests: Use SetWindowLongPtr instead of SetWindowLong. --- dlls/user32/tests/edit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 9f40416..0c5a678 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1930,7 +1930,7 @@ static void test_child_edit_wmkeydown(void) hwEdit = create_child_editcontrol(0, 0); hwParent = GetParent(hwEdit); - SetWindowLong(hwParent, GWL_WNDPROC, (LONG)child_edit_wmkeydown_proc); + SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)child_edit_wmkeydown_proc); r = SendMessage(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); ok(1 == r, "expected 1, got %d\n", r); ok(0 == child_edit_wmkeydown_num_messages, "expected 0, got %d\n", child_edit_wmkeydown_num_messages);
1
0
0
0
James Hawkins : winmm: Remove a failing test that is driver-specific.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 4daec079c17c6e4644620b92132dc584f892b433 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4daec079c17c6e4644620b921…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Apr 25 03:35:38 2008 -0500 winmm: Remove a failing test that is driver-specific. --- dlls/winmm/tests/mixer.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/dlls/winmm/tests/mixer.c b/dlls/winmm/tests/mixer.c index 6cd1c7a..89ac7c9 100644 --- a/dlls/winmm/tests/mixer.c +++ b/dlls/winmm/tests/mixer.c @@ -382,12 +382,6 @@ static void mixer_test_deviceA(int device) ok(rc==MMSYSERR_INVALFLAG, "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n", mmsys_error(rc)); - /* Shouldn't open without a valid HWND */ - rc=mixerOpen(&mix, device, 0, 0, CALLBACK_WINDOW); - ok(rc==MMSYSERR_INVALPARAM, - "mixerOpen: MMSYSERR_INVALPARAM expected, got %s\n", mmsys_error(rc)); - - for (d=0;d<capsA.cDestinations;d++) { MIXERLINEA mixerlineA; mixerlineA.cbStruct = 0; @@ -775,11 +769,6 @@ static void mixer_test_deviceW(int device) ok(rc==MMSYSERR_INVALFLAG, "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n", mmsys_error(rc)); - /* Shouldn't open without a valid HWND */ - rc=mixerOpen(&mix, device, 0, 0, CALLBACK_WINDOW); - ok(rc==MMSYSERR_INVALPARAM, - "mixerOpen: MMSYSERR_INVALPARAM expected, got %s\n", mmsys_error(rc)); - for (d=0;d<capsW.cDestinations;d++) { MIXERLINEW mixerlineW; mixerlineW.cbStruct = 0;
1
0
0
0
James Hawkins : winspool.drv: Disable a test for capabilities not available on all printer drivers.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 1cf567ecc901239cc9a890636ea2d444bc95156c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cf567ecc901239cc9a890636…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Apr 25 01:10:02 2008 -0500 winspool.drv: Disable a test for capabilities not available on all printer drivers. --- dlls/winspool.drv/tests/info.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index cd93f16..f0f4754 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -2345,15 +2345,19 @@ static void test_DeviceCapabilities(void) ok(n_copies > 0, "DeviceCapabilities DC_COPIES failed\n"); trace("n_copies = %d\n", n_copies); - ret = DeviceCapabilities(device, port, DC_MAXEXTENT, NULL, NULL); - ok(ret != -1, "DeviceCapabilities DC_MAXEXTENT failed\n"); - ext = MAKEPOINTS(ret); - trace("max ext = %d x %d\n", ext.x, ext.y); - - ret = DeviceCapabilities(device, port, DC_MINEXTENT, NULL, NULL); - ok(ret != -1, "DeviceCapabilities DC_MINEXTENT failed\n"); - ext = MAKEPOINTS(ret); - trace("min ext = %d x %d\n", ext.x, ext.y); + /* these capabilities not available on all printer drivers */ + if (0) + { + ret = DeviceCapabilities(device, port, DC_MAXEXTENT, NULL, NULL); + ok(ret != -1, "DeviceCapabilities DC_MAXEXTENT failed\n"); + ext = MAKEPOINTS(ret); + trace("max ext = %d x %d\n", ext.x, ext.y); + + ret = DeviceCapabilities(device, port, DC_MINEXTENT, NULL, NULL); + ok(ret != -1, "DeviceCapabilities DC_MINEXTENT failed\n"); + ext = MAKEPOINTS(ret); + trace("min ext = %d x %d\n", ext.x, ext.y); + } fields = DeviceCapabilities(device, port, DC_FIELDS, NULL, NULL); ok(fields != (DWORD)-1, "DeviceCapabilities DC_FIELDS failed\n");
1
0
0
0
James Hawkins : gdi32: Remove a dependence on the amount of available memory.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: b48118b4727373309f7e64aa8b5a622d9b24cc69 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b48118b4727373309f7e64aa8…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:47:44 2008 -0500 gdi32: Remove a dependence on the amount of available memory. --- dlls/gdi32/tests/bitmap.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index f7bfdfd..00441c0 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -974,9 +974,13 @@ static void test_bitmap(void) SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL); - ok(!hbmp, "CreateBitmap should fail\n"); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + if (!hbmp) + { + ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, + "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + } + else + DeleteObject(hbmp); SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL);
1
0
0
0
James Hawkins : d3d8: Fix a few test failures in win2k3.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 537c4babed22fec1f31fb3414528f4153b676045 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=537c4babed22fec1f31fb3414…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:36:04 2008 -0500 d3d8: Fix a few test failures in win2k3. --- dlls/d3d8/tests/device.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 8617c0c..9ce967a 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1174,7 +1174,8 @@ static void test_lights(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &d3dpp, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n"); @@ -1252,7 +1253,8 @@ static void test_render_zero_triangles(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &d3dpp, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n"); @@ -1302,7 +1304,8 @@ static void test_set_material(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n");
1
0
0
0
James Hawkins : advapi32: Fix a test that fails in win2k3 SP2.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 76dfff11a34a321040f6e7348dbafabdb09d9295 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76dfff11a34a321040f6e7348…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:19:35 2008 -0500 advapi32: Fix a test that fails in win2k3 SP2. --- dlls/advapi32/tests/registry.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index e027a97..fe3d3ff 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -806,8 +806,9 @@ static void test_get_value(void) size = 0; ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, NULL, NULL, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath2 length + 1 here. */ - ok((size == strlen(expanded2)+1) || (size == strlen(sTestpath2)+1), + ok((size == strlen(expanded2)+1) || /* win2k3 SP1 */ + (size == strlen(expanded2)+2) || /* win2k3 SP2 */ + (size == strlen(sTestpath2)+1), "strlen(expanded2)=%d, strlen(sTestpath2)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands) */
1
0
0
0
Robert Reif : winmm: Fix a test failure on Windows with Terminal Server.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: fa9a26921c5021c3f227f44bc12b2a5b75c79be9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa9a26921c5021c3f227f44bc…
Author: Robert Reif <reif(a)earthlink.net> Date: Thu Apr 24 19:39:43 2008 -0400 winmm: Fix a test failure on Windows with Terminal Server. --- dlls/winmm/tests/wave.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index 60f0622..2844be4 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -854,9 +854,9 @@ static void wave_out_test_device(int device) } rc=waveOutGetDevCapsA(device,&capsA,4); - ok(rc==MMSYSERR_NOERROR, - "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n", - dev_name(device),wave_out_error(rc)); + ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_INVALPARAM, + "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR or MMSYSERR_INVALPARAM " + "expected, got %s\n", dev_name(device),wave_out_error(rc)); rc=waveOutGetDevCapsW(device,&capsW,4); ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED, @@ -888,6 +888,13 @@ static void wave_out_test_device(int device) nameA=strdup("not supported"); } + rc=waveOutGetDevCapsA(device,&capsA,sizeof(capsA)); + ok(rc==MMSYSERR_NOERROR, + "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n", + dev_name(device),wave_out_error(rc)); + if (rc!=MMSYSERR_NOERROR) + return; + trace(" %s: \"%s\" (%s) %d.%d (%d:%d)\n",dev_name(device),capsA.szPname, (nameA?nameA:"failed"),capsA.vDriverVersion >> 8, capsA.vDriverVersion & 0xff, capsA.wMid,capsA.wPid);
1
0
0
0
Andrew Talbot : secur32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 49939ed5445cbe37c08d7222e7cf0c9ede5d92ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49939ed5445cbe37c08d7222e…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:45 2008 +0100 secur32: Remove unused variables. --- dlls/secur32/ntlm.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index f971fc1..bcd65ef 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -615,8 +615,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( lstrcpyA(want_flags, "SF"); if(fContextReq & ISC_REQ_CONFIDENTIALITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SEAL")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SEAL") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SEAL"); } if(fContextReq & ISC_REQ_CONNECTION) @@ -625,22 +624,19 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ctxt_attr |= ISC_RET_EXTENDED_ERROR; if(fContextReq & ISC_REQ_INTEGRITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_MUTUAL_AUTH) ctxt_attr |= ISC_RET_MUTUAL_AUTH; if(fContextReq & ISC_REQ_REPLAY_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_SEQUENCE_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_STREAM) @@ -1974,7 +1970,6 @@ static const SecPkgInfoA infoA = { void SECUR32_initNTLMSP(void) { - SECURITY_STATUS ret; PNegoHelper helper; static CHAR version[] = "--version"; @@ -1983,7 +1978,7 @@ void SECUR32_initNTLMSP(void) version, NULL }; - if((ret = fork_helper(&helper, ntlm_auth, args)) != SEC_E_OK) + if(fork_helper(&helper, ntlm_auth, args) != SEC_E_OK) { /* Cheat and allocate a helper anyway, so cleanup later will work. */ helper = HeapAlloc(GetProcessHeap(),0, sizeof(PNegoHelper));
1
0
0
0
Andrew Talbot : setupapi: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 362cd67d3b689b26d91db6974f2fd7da4b176ee8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=362cd67d3b689b26d91db6974…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:51 2008 +0100 setupapi: Remove unused variables. --- dlls/setupapi/parser.c | 4 ++-- dlls/setupapi/setupx_main.c | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c index a00e068..8c8a518 100644 --- a/dlls/setupapi/parser.c +++ b/dlls/setupapi/parser.c @@ -778,7 +778,7 @@ static const WCHAR *eol_backslash_state( struct parser *parser, const WCHAR *pos /* handler for parser QUOTES state */ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) { - const WCHAR *p, *token_end = parser->start; + const WCHAR *p; for (p = pos; !is_eol( parser, p ); p++) { @@ -787,7 +787,7 @@ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) if (p+1 < parser->end && p[1] == '"') /* double quotes */ { push_token( parser, p + 1 ); - parser->start = token_end = p + 2; + parser->start = p + 2; p++; } else /* end of quotes */ diff --git a/dlls/setupapi/setupx_main.c b/dlls/setupapi/setupx_main.c index 606ffb8..82593f3 100644 --- a/dlls/setupapi/setupx_main.c +++ b/dlls/setupapi/setupx_main.c @@ -401,7 +401,7 @@ RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid) */ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; TRACE("(%p)\n", pldd); @@ -414,10 +414,7 @@ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; pCurr = pCurr->next; - } if ( (pCurr == NULL) /* hit end of list */ || (pldd->ldid != pCurr->pldd->ldid) ) return ERR_VCP_LDDFIND; /* correct ? */ @@ -534,7 +531,7 @@ RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd) */ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; if (!std_LDDs_done) SETUPX_CreateStandardLDDs(); @@ -545,10 +542,7 @@ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } + pCurr = pCurr->next; if (pCurr == NULL) /* hit end of list */ return ERR_VCP_LDDFIND; /* correct ? */
1
0
0
0
Andrew Talbot : shell32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: f692f19531fb1c552758e112608be24a2815d73a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f692f19531fb1c552758e1126…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:56 2008 +0100 shell32: Remove unused variables. --- dlls/shell32/shlfileop.c | 4 ++-- dlls/shell32/shlmenu.c | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 76f1309..7c10588 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1002,7 +1002,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) { LPCWSTR ptr = szFiles; WCHAR szCurFile[MAX_PATH]; - DWORD i = 0, dwDirLen; + DWORD i = 0; if (!szFiles) return ERROR_INVALID_PARAMETER; @@ -1027,7 +1027,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) /* change relative to absolute path */ if (PathIsRelativeW(ptr)) { - dwDirLen = GetCurrentDirectoryW(MAX_PATH, szCurFile) + 1; + GetCurrentDirectoryW(MAX_PATH, szCurFile); PathCombineW(szCurFile, szCurFile, ptr); flList->feFiles[i].bFromRelative = TRUE; } diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index cdd08c9..c44f8c1 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -132,7 +132,7 @@ static LPFMINFO FM_SetMenuParameter( static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) { IShellFolder *lpsf, *lpsf2; ULONG ulItemAttr = SFGAO_FOLDER; - UINT uID, uFlags, uEnumFlags; + UINT uID, uEnumFlags; LPFNFMCALLBACK lpfnCallback; LPCITEMIDLIST pidl; WCHAR sTemp[MAX_PATH]; @@ -164,7 +164,6 @@ static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) return 0; uID = menudata->uID; - uFlags = menudata->uFlags; uEnumFlags = menudata->uEnumFlags; lpfnCallback = menudata->lpfnCallback; menudata->bInitialized = FALSE; @@ -593,7 +592,7 @@ LRESULT WINAPI FileMenu_DrawItem( COLORREF clrPrevText, clrPrevBkgnd; int xi,yi,xt,yt; HIMAGELIST hImageList; - RECT TextRect, BorderRect; + RECT TextRect; LPFMINFO menuinfo; TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); @@ -616,9 +615,6 @@ LRESULT WINAPI FileMenu_DrawItem( if (menuinfo->nBorderWidth) TextRect.left += menuinfo->nBorderWidth; - BorderRect.right = menuinfo->nBorderWidth; -/* FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor)); -*/ TextRect.left += FM_LEFTBORDER; xi = TextRect.left + FM_SPACE1; yi = TextRect.top + FM_Y_SPACE/2;
1
0
0
0
Andrew Talbot : rpcrt4: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 649c7aeb7c1fda49a76ad02105adde12baa2cf9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=649c7aeb7c1fda49a76ad0210…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:40 2008 +0100 rpcrt4: Remove unused variables. --- dlls/rpcrt4/ndr_marshall.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index d2ef11b..25e6853 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2996,7 +2996,6 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { unsigned size = *(const WORD*)(pFormat+2); PFORMAT_STRING conf_array = NULL; - PFORMAT_STRING pointer_desc = NULL; TRACE("(%p,%p)\n", pStubMsg, pFormat); @@ -3004,9 +3003,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pFormat += 4; if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; - pFormat += 2; - if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; - pFormat += 2; + pFormat += 4; ComplexStructMemorySize(pStubMsg, pFormat); @@ -4124,7 +4121,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CSTRUCT_FORMAT *pCStructFormat = (const NDR_CSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4144,7 +4140,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, RpcRaiseException(RPC_S_INTERNAL_ERROR); return; } - esize = *(const WORD*)(pCArrayFormat+2); ComputeConformance(pStubMsg, pMemory + pCStructFormat->memory_size, pCArrayFormat + 4, 0); @@ -4490,7 +4485,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CVSTRUCT_FORMAT *pCVStructFormat = (const NDR_CVSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCVArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4507,8 +4501,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, switch (*pCVArrayFormat) { case RPC_FC_CVARRAY: - esize = *(const WORD*)(pCVArrayFormat+2); - pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 4, 0); pCVArrayFormat = ComputeVariance(pStubMsg, pMemory + pCVStructFormat->memory_size, @@ -4517,7 +4509,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_CSTRING: TRACE("string=%s\n", debugstr_a((char*)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlen((char*)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(char); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -4527,7 +4518,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_WSTRING: TRACE("string=%s\n", debugstr_w((LPWSTR)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlenW((LPWSTR)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(WCHAR); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -5012,7 +5002,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) { - unsigned char alignment; DWORD elements; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -5025,8 +5014,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, return; } - alignment = pFormat[1] + 1; - if (pFormat[0] == RPC_FC_SMVARRAY) { pFormat += 2;
1
0
0
0
Eric Pouech : winhelp: Emit the proper RTF stream for a metafile to RichEdit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 5da401950c65a250af986f1469515313cca2ef47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5da401950c65a250af986f146…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:34 2008 +0200 winhelp: Emit the proper RTF stream for a metafile to RichEdit. --- programs/winhelp/hlpfile.c | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 6417c90..f5935a1 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -806,7 +806,43 @@ done: */ static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack) { - return TRUE; + BYTE* ptr; + unsigned long size, csize; + unsigned long off, hsoff; + BYTE* bits; + char tmp[256]; + unsigned mm; + BOOL ret; + + WINE_TRACE("Loading metafile\n"); + + ptr = beg + 2; /* for type and pack */ + + mm = fetch_ushort(&ptr); /* mapping mode */ + sprintf(tmp, "{\\pict\\wmetafile%d\\picw%d\\pich%d", + mm, GET_USHORT(ptr, 0), GET_USHORT(ptr, 2)); + if (!HLPFILE_RtfAddControl(rd, tmp)) return FALSE; + ptr += 4; + + size = fetch_ulong(&ptr); /* decompressed size */ + csize = fetch_ulong(&ptr); /* compressed size */ + fetch_ulong(&ptr); /* hotspot size */ + off = GET_UINT(ptr, 0); + hsoff = GET_UINT(ptr, 4); + ptr += 8; + + WINE_TRACE("sz=%lu csz=%lu offs=%lu/%u,%lu\n", + size, csize, off, ptr - beg, hsoff); + + bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack); + if (!bits) return FALSE; + + ret = HLPFILE_RtfAddHexBytes(rd, bits, size) && + HLPFILE_RtfAddControl(rd, "}"); + + if (bits != beg + off) HeapFree(GetProcessHeap(), 0, bits); + + return ret; } /******************************************************************
1
0
0
0
Eric Pouech : winhelp: Emit proper RTF tokens for a bitmap.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 5309ad1c8f77cb29a208d68630aa747482ec44d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5309ad1c8f77cb29a208d6863…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:28 2008 +0200 winhelp: Emit proper RTF tokens for a bitmap. --- programs/winhelp/hlpfile.c | 207 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 206 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 2230cf6..6417c90 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -679,6 +679,203 @@ static BOOL HLPFILE_RtfAddText(struct RtfData* rd, const char* str) } /****************************************************************** + * RtfAddHexBytes + * + */ +static BOOL HLPFILE_RtfAddHexBytes(struct RtfData* rd, const void* _ptr, unsigned sz) +{ + char tmp[512]; + unsigned i, step; + const BYTE* ptr = _ptr; + static const char* _2hex = "0123456789abcdef"; + + if (!rd) return TRUE; /* FIXME: TEMP */ + if (!rd->in_text) + { + if (!HLPFILE_RtfAddRawString(rd, " ", 1)) return FALSE; + rd->in_text = TRUE; + } + for (; sz; sz -= step) + { + step = min(256, sz); + for (i = 0; i < step; i++) + { + tmp[2 * i + 0] = _2hex[*ptr >> 4]; + tmp[2 * i + 1] = _2hex[*ptr++ & 0xF]; + } + if (!HLPFILE_RtfAddRawString(rd, tmp, 2 * step)) return FALSE; + } + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddBitmap + * + */ +static BOOL HLPFILE_RtfAddBitmap(struct RtfData* rd, BYTE* beg, BYTE type, BYTE pack) +{ + BYTE* ptr; + BYTE* pict_beg; + BITMAPINFO* bi; + unsigned long off, csz; + unsigned nc = 0; + BOOL ret = FALSE; + char tmp[256]; + + bi = HeapAlloc(GetProcessHeap(), 0, sizeof(*bi)); + if (!bi) return FALSE; + + ptr = beg + 2; /* for type and pack */ + + bi->bmiHeader.biSize = sizeof(bi->bmiHeader); + bi->bmiHeader.biXPelsPerMeter = fetch_ulong(&ptr); + bi->bmiHeader.biYPelsPerMeter = fetch_ulong(&ptr); + bi->bmiHeader.biPlanes = fetch_ushort(&ptr); + bi->bmiHeader.biBitCount = fetch_ushort(&ptr); + bi->bmiHeader.biWidth = fetch_ulong(&ptr); + bi->bmiHeader.biHeight = fetch_ulong(&ptr); + bi->bmiHeader.biClrUsed = fetch_ulong(&ptr); + bi->bmiHeader.biClrImportant = fetch_ulong(&ptr); + bi->bmiHeader.biCompression = BI_RGB; + if (bi->bmiHeader.biBitCount > 32) WINE_FIXME("Unknown bit count %u\n", bi->bmiHeader.biBitCount); + if (bi->bmiHeader.biPlanes != 1) WINE_FIXME("Unsupported planes %u\n", bi->bmiHeader.biPlanes); + bi->bmiHeader.biSizeImage = (((bi->bmiHeader.biWidth * bi->bmiHeader.biBitCount + 31) & ~31) / 8) * bi->bmiHeader.biHeight; + WINE_TRACE("planes=%d bc=%d size=(%d,%d)\n", + bi->bmiHeader.biPlanes, bi->bmiHeader.biBitCount, + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + + csz = fetch_ulong(&ptr); + fetch_ulong(&ptr); /* hotspot size */ + + off = GET_UINT(ptr, 0); ptr += 4; + /* GET_UINT(ptr, 0); hotspot offset */ ptr += 4; + + /* now read palette info */ + if (type == 0x06) + { + unsigned i; + + nc = bi->bmiHeader.biClrUsed; + /* not quite right, especially for bitfields type of compression */ + if (!nc && bi->bmiHeader.biBitCount <= 8) + nc = 1 << bi->bmiHeader.biBitCount; + + bi = HeapReAlloc(GetProcessHeap(), 0, bi, sizeof(*bi) + nc * sizeof(RGBQUAD)); + if (!bi) return FALSE; + for (i = 0; i < nc; i++) + { + bi->bmiColors[i].rgbBlue = ptr[0]; + bi->bmiColors[i].rgbGreen = ptr[1]; + bi->bmiColors[i].rgbRed = ptr[2]; + bi->bmiColors[i].rgbReserved = 0; + ptr += 4; + } + } + pict_beg = HLPFILE_DecompressGfx(beg + off, csz, bi->bmiHeader.biSizeImage, pack); + + + if (!HLPFILE_RtfAddControl(rd, "{\\pict")) goto done; + if (type == 0x06) + { + sprintf(tmp, "\\dibitmap0\\picw%d\\pich%d", + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + if (!HLPFILE_RtfAddHexBytes(rd, bi, sizeof(*bi) + nc * sizeof(RGBQUAD))) goto done; + } + else + { + sprintf(tmp, "\\wbitmap0\\wbmbitspixel%d\\wbmplanes%d\\picw%d\\pich%d", + bi->bmiHeader.biBitCount, bi->bmiHeader.biPlanes, + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (!HLPFILE_RtfAddHexBytes(rd, pict_beg, bi->bmiHeader.biSizeImage)) goto done; + if (!HLPFILE_RtfAddControl(rd, "}")) goto done; + + ret = TRUE; +done: + HeapFree(GetProcessHeap(), 0, bi); + if (pict_beg != beg + off) HeapFree(GetProcessHeap(), 0, pict_beg); + + return ret; +} + +/****************************************************************** + * HLPFILE_RtfAddMetaFile + * + */ +static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack) +{ + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddGfxByAddr + * + */ +static BOOL HLPFILE_RtfAddGfxByAddr(struct RtfData* rd, HLPFILE *hlpfile, + BYTE* ref, unsigned long size) +{ + unsigned i, numpict; + + numpict = GET_USHORT(ref, 2); + WINE_TRACE("Got picture magic=%04x #=%d\n", GET_USHORT(ref, 0), numpict); + + for (i = 0; i < numpict; i++) + { + BYTE* beg; + BYTE* ptr; + BYTE type, pack; + + WINE_TRACE("Offset[%d] = %x\n", i, GET_UINT(ref, (1 + i) * 4)); + beg = ptr = ref + GET_UINT(ref, (1 + i) * 4); + + type = *ptr++; + pack = *ptr++; + + switch (type) + { + case 5: /* device dependent bmp */ + case 6: /* device independent bmp */ + HLPFILE_RtfAddBitmap(rd, beg, type, pack); + break; + case 8: + HLPFILE_RtfAddMetaFile(rd, beg, pack); + break; + default: WINE_FIXME("Unknown type %u\n", type); return FALSE; + } + + /* FIXME: hotspots */ + + /* FIXME: implement support for multiple picture format */ + if (numpict != 1) WINE_FIXME("Supporting only one bitmap format per logical bitmap (for now). Using first format\n"); + break; + } + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddGfxByIndex + * + * + */ +static BOOL HLPFILE_RtfAddGfxByIndex(struct RtfData* rd, HLPFILE *hlpfile, + unsigned index) +{ + char tmp[16]; + BYTE *ref, *end; + + WINE_TRACE("Loading picture #%d\n", index); + + sprintf(tmp, "|bm%u", index); + + if (!HLPFILE_FindSubFile(hlpfile, tmp, &ref, &end)) {WINE_WARN("no sub file\n"); return FALSE;} + + ref += 9; + return HLPFILE_RtfAddGfxByAddr(rd, hlpfile, ref, end - ref); +} + +/****************************************************************** * HLPFILE_LoadBitmap * * @@ -1273,6 +1470,10 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE case 0: HLPFILE_LoadGfxByIndex(page->file, GET_SHORT(format, 2), paragraph); + if (rd) { /* FIXME: TEMP */ + HLPFILE_RtfAddGfxByIndex(rd, page->file, GET_SHORT(format, 2)); + rd->char_pos++; + } break; case 1: WINE_FIXME("does it work ??? %x<%lu>#%u\n", @@ -1280,7 +1481,11 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE size, GET_SHORT(format, 2)); HLPFILE_LoadGfxByAddr(page->file, format + 2, size - 4, paragraph); - break; + if (rd) { /* FIXME: TEMP */ + HLPFILE_RtfAddGfxByAddr(rd, page->file, format + 2, size - 4); + rd->char_pos++; + } + break; default: WINE_FIXME("??? %u\n", GET_SHORT(format, 0)); break;
1
0
0
0
Eric Pouech : winhelp: Properly decode the keep bit in paragraph style.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 666bf7b8925e52186477ab5ac2db4427bf60ca1a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=666bf7b8925e52186477ab5ac…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:22 2008 +0200 winhelp: Properly decode the keep bit in paragraph style. --- programs/winhelp/hlpfile.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 1f5b735..2230cf6 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1122,6 +1122,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE } /* 0x1000 doesn't need space */ + if ((bits & 0x1000) && !HLPFILE_RtfAddControl(rd, "\\keep")) goto done; if ((bits & 0xE080) != 0) WINE_FIXME("Unsupported bits %04x, potential trouble ahead\n", bits);
1
0
0
0
Eric Pouech : winhelp: Set the borders of a paragraph in richedit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 3299f1b8694074bd024cdee9691985c6fcdb587b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3299f1b8694074bd024cdee96…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:16 2008 +0200 winhelp: Set the borders of a paragraph in richedit. --- programs/winhelp/hlpfile.c | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index cbac2c3..1f5b735 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1067,7 +1067,28 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } - if (bits & 0x0100) format += 3; + if (bits & 0x0100) + { + BYTE brdr = *format++; + short w; + + if (brdr & 0x01 && !HLPFILE_RtfAddControl(rd, "\\box")) goto done; + if (brdr & 0x02 && !HLPFILE_RtfAddControl(rd, "\\brdrt")) goto done; + if (brdr & 0x04 && !HLPFILE_RtfAddControl(rd, "\\brdrl")) goto done; + if (brdr & 0x08 && !HLPFILE_RtfAddControl(rd, "\\brdrb")) goto done; + if (brdr & 0x10 && !HLPFILE_RtfAddControl(rd, "\\brdrr")) goto done; + if (brdr & 0x20 && !HLPFILE_RtfAddControl(rd, "\\brdrth")) goto done; + if (!(brdr & 0x20) && !HLPFILE_RtfAddControl(rd, "\\brdrs")) goto done; + if (brdr & 0x40 && !HLPFILE_RtfAddControl(rd, "\\brdrdb")) goto done; + /* 0x80: unknown */ + + w = GET_SHORT(format, 0); format += 2; + if (w) + { + sprintf(tmp, "\\brdrw%d", HLPFILE_HalfPointsToTwips(w)); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + } if (bits & 0x0200) { int i, ntab = fetch_short(&format);
1
0
0
0
Eric Pouech : winhelp: Set the alignment of paragraph in richedit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 300fa962452985e8e2775867d36c92423fc9bb98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=300fa962452985e8e2775867d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:10 2008 +0200 winhelp: Set the alignment of paragraph in richedit. --- programs/winhelp/hlpfile.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index cf9ab0b..cbac2c3 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1092,7 +1092,15 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } - /* 0x0400, 0x0800 and 0x1000 don't need space */ + switch (bits & 0xc00) + { + default: WINE_FIXME("Unsupported alignment 0xC00\n"); break; + case 0: if (!HLPFILE_RtfAddControl(rd, "\\ql")) goto done; break; + case 0x400: if (!HLPFILE_RtfAddControl(rd, "\\qr")) goto done; break; + case 0x800: if (!HLPFILE_RtfAddControl(rd, "\\qc")) goto done; break; + } + + /* 0x1000 doesn't need space */ if ((bits & 0xE080) != 0) WINE_FIXME("Unsupported bits %04x, potential trouble ahead\n", bits);
1
0
0
0
Eric Pouech : winhelp: Added support for paragraph information.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 26de7ddcd46172d5152ce970da6c77b86e2a923c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26de7ddcd46172d5152ce970d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:05 2008 +0200 winhelp: Added support for paragraph information. --- programs/winhelp/hlpfile.c | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 3e85dc3..cf9ab0b 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1037,12 +1037,36 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE format += 4; bits = GET_USHORT(format, 0); format += 2; if (bits & 0x0001) fetch_long(&format); - if (bits & 0x0002) fetch_short(&format); - if (bits & 0x0004) fetch_short(&format); - if (bits & 0x0008) fetch_short(&format); - if (bits & 0x0010) fetch_short(&format); - if (bits & 0x0020) fetch_short(&format); - if (bits & 0x0040) fetch_short(&format); + if (bits & 0x0002) + { + sprintf(tmp, "\\sb%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0004) + { + sprintf(tmp, "\\sa%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0008) + { + sprintf(tmp, "\\sl%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0010) + { + sprintf(tmp, "\\li%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0020) + { + sprintf(tmp, "\\ri%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0040) + { + sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } if (bits & 0x0100) format += 3; if (bits & 0x0200) {
1
0
0
0
Eric Pouech : winhelp: Added support for richedit tabs in paragraph format.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 523a5b3f3141a0f746256ff059df8eab3efe3d1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=523a5b3f3141a0f746256ff05…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:05:59 2008 +0200 winhelp: Added support for richedit tabs in paragraph format. --- programs/winhelp/hlpfile.c | 35 ++++++++++++++++++++++++++++++----- programs/winhelp/hlpfile.h | 6 ++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 78a9643..3e85dc3 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -943,6 +943,18 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie, return link; } +unsigned HLPFILE_HalfPointsToTwips(unsigned pts) +{ + static unsigned logPxY; + if (!logPxY) + { + HDC hdc = GetDC(NULL); + logPxY = GetDeviceCaps(hdc, LOGPIXELSY); + ReleaseDC(NULL, hdc); + } + return MulDiv(pts, 72 * 10, logPxY); +} + /*********************************************************************** * * HLPFILE_BrowseParagraph @@ -1034,13 +1046,26 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE if (bits & 0x0100) format += 3; if (bits & 0x0200) { - int ntab = fetch_short(&format); - unsigned short ts; + int i, ntab = fetch_short(&format); + unsigned tab, ts; + const char* kind; - while (ntab-- > 0) + for (i = 0; i < ntab; i++) { - ts = fetch_ushort(&format); - if (ts & 0x4000) fetch_ushort(&format); + tab = fetch_ushort(&format); + ts = (tab & 0x4000) ? fetch_ushort(&format) : 0 /* left */; + switch (ts) + { + default: WINE_FIXME("Unknown tab style %x\n", ts); + /* fall through */ + case 0: kind = ""; break; + case 1: kind = "\\tqr"; break; + case 2: kind = "\\tqc"; break; + } + /* FIXME: do kind */ + sprintf(tmp, "%s\\tx%d", + kind, HLPFILE_HalfPointsToTwips(tab & 0x3FFF)); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } /* 0x0400, 0x0800 and 0x1000 don't need space */ diff --git a/programs/winhelp/hlpfile.h b/programs/winhelp/hlpfile.h index 63ddc0c..7b67259 100644 --- a/programs/winhelp/hlpfile.h +++ b/programs/winhelp/hlpfile.h @@ -201,6 +201,12 @@ HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset, ULONG* relativ LONG HLPFILE_Hash(LPCSTR lpszContext); void HLPFILE_FreeLink(HLPFILE_LINK* link); void HLPFILE_FreeHlpFile(HLPFILE*); +unsigned HLPFILE_HalfPointsToTwips(unsigned pts); + +static inline unsigned HLPFILE_PointsToTwips(unsigned pts) +{ + return HLPFILE_HalfPointsToTwips(2 * pts); +} void* HLPFILE_BPTreeSearch(BYTE*, const void*, HLPFILE_BPTreeCompare); void HLPFILE_BPTreeEnum(BYTE*, HLPFILE_BPTreeCallback cb, void *cookie);
1
0
0
0
Alexandre Julliard : makedep: Don't try to open .tlb files.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 5f4f2c0b9268427ebc91a7fb4118850b44d65713 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f4f2c0b9268427ebc91a7fb4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 24 23:43:04 2008 +0200 makedep: Don't try to open .tlb files. --- tools/makedep.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index e311058..d7f820e 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -727,6 +727,13 @@ static void parse_file( INCL_FILE *pFile, int src ) return; } + /* don't try to open .tlb files */ + if (strendswith( pFile->name, ".tlb" )) + { + pFile->filename = xstrdup( pFile->name ); + return; + } + file = src ? open_src_file( pFile ) : open_include_file( pFile ); if (!file) return;
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipSetLineColors.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 59ef3c920d2eb0f43d28387b78cf73c31aed3bff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59ef3c920d2eb0f43d28387b7…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 22:43:41 2008 +0400 gdiplus: Implemented GdipSetLineColors. --- dlls/gdiplus/brush.c | 9 +++++---- include/gdiplusflat.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index d2097eb..727d12d 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -675,12 +675,13 @@ GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *texture, GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient *brush, ARGB color1, ARGB color2) { - static int calls; + if(!brush) + return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); + brush->startcolor = color1; + brush->endcolor = color2; - return NotImplemented; + return Ok; } GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient *brush, ARGB *colors) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index c369377..366e8a5 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -175,6 +175,7 @@ GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient*,GDIPCONST REAL*, GpStatus WINGDIPAPI GdipSetLineGammaCorrection(GpLineGradient*,BOOL); GpStatus WINGDIPAPI GdipSetLineSigmaBlend(GpLineGradient*,REAL,REAL); GpStatus WINGDIPAPI GdipSetLineWrapMode(GpLineGradient*,GpWrapMode); +GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient*,ARGB,ARGB); GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient*,ARGB); GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipSetPathGradientFocusScales(GpPathGradient*,REAL,REAL);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipGetLineColors.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: b31f2250dda236aa19f24b58cae46923bd02e3b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b31f2250dda236aa19f24b58c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 22:43:36 2008 +0400 gdiplus: Implemented GdipGetLineColors. --- dlls/gdiplus/brush.c | 11 +++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 15180e6..d2097eb 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -683,6 +683,17 @@ GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient *brush, ARGB color1, return NotImplemented; } +GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient *brush, ARGB *colors) +{ + if(!brush || !colors) + return InvalidParameter; + + colors[0] = brush->startcolor; + colors[1] = brush->endcolor; + + return Ok; +} + GpStatus WINGDIPAPI GdipSetLineLinearBlend(GpLineGradient *brush, REAL focus, REAL scale) { diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 1353a87..3905c74 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -302,7 +302,7 @@ @ stdcall GdipGetInterpolationMode(ptr ptr) @ stub GdipGetLineBlend @ stub GdipGetLineBlendCount -@ stub GdipGetLineColors +@ stdcall GdipGetLineColors(ptr ptr) @ stdcall GdipGetLineGammaCorrection(ptr ptr) @ stub GdipGetLinePresetBlend @ stub GdipGetLinePresetBlendCount diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 16a10b6..c369377 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -159,6 +159,7 @@ GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*); GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*); GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*); +GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipGetLineRect/GdipGetLineRectI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 3d274bc1cf16653acc2c230e46870f5ca927e10f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d274bc1cf16653acc2c230e4…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 22:43:26 2008 +0400 gdiplus: Implemented GdipGetLineRect/GdipGetLineRectI. --- dlls/gdiplus/brush.c | 31 +++++++++++++++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 4 ++-- include/gdiplusflat.h | 2 ++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 1c69518..15180e6 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -715,3 +715,34 @@ GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient *brush, return NotImplemented; } + +GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient *brush, GpRectF *rect) +{ + if(!brush || !rect) + return InvalidParameter; + + rect->X = (brush->startpoint.X < brush->endpoint.X ? brush->startpoint.X: brush->endpoint.X); + rect->Y = (brush->startpoint.Y < brush->endpoint.Y ? brush->startpoint.Y: brush->endpoint.Y); + + rect->Width = fabs(brush->startpoint.X - brush->endpoint.X); + rect->Height = fabs(brush->startpoint.Y - brush->endpoint.Y); + + return Ok; +} + +GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient *brush, GpRect *rect) +{ + GpRectF rectF; + GpStatus ret; + + ret = GdipGetLineRect(brush, &rectF); + + if(ret == Ok){ + rect->X = roundr(rectF.X); + rect->Y = roundr(rectF.Y); + rect->Width = roundr(rectF.Width); + rect->Height = roundr(rectF.Height); + } + + return ret; +} diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 66eb23d..1353a87 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -306,8 +306,8 @@ @ stdcall GdipGetLineGammaCorrection(ptr ptr) @ stub GdipGetLinePresetBlend @ stub GdipGetLinePresetBlendCount -@ stub GdipGetLineRect -@ stub GdipGetLineRectI +@ stdcall GdipGetLineRect(ptr ptr) +@ stdcall GdipGetLineRectI(ptr ptr) @ stub GdipGetLineSpacing @ stub GdipGetLineTransform @ stub GdipGetLineWrapMode diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 1e04a23..16a10b6 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -157,6 +157,8 @@ GpStatus WINGDIPAPI GdipCreateTextureIAI(GpImage*,GDIPCONST GpImageAttributes*, GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*); +GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*); +GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*); GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipFillPieI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 2c059d7f526a7c8a603b13d1e584165e1a25784e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c059d7f526a7c8a603b13d1e…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 20:48:23 2008 +0400 gdiplus: Implemented GdipFillPieI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4ce7989..66eb23d 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -221,7 +221,7 @@ @ stub GdipFillEllipseI @ stdcall GdipFillPath(ptr ptr ptr) @ stdcall GdipFillPie(ptr ptr long long long long long long) -@ stub GdipFillPieI +@ stdcall GdipFillPieI(ptr ptr long long long long long long) @ stub GdipFillPolygon2 @ stub GdipFillPolygon2I @ stdcall GdipFillPolygon(ptr ptr ptr long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c6a4e33..ef57def 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1626,6 +1626,12 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, return Ok; } +GpStatus WINGDIPAPI GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x, + INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) +{ + return GdipFillPie(graphics,brush,(REAL)x,(REAL)y,(REAL)width,(REAL)height,startAngle,sweepAngle); +} + GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPointF *points, INT count, GpFillMode fillMode) {
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawPolygon/GdipDrawPolygonI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 4697593e859920ebba73138253d01450546b0d21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4697593e859920ebba7313825…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 20:48:17 2008 +0400 gdiplus: Implemented GdipDrawPolygon/GdipDrawPolygonI. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/graphics.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/gdiplusflat.h | 2 ++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 2e747ce..4ce7989 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -192,8 +192,8 @@ @ stdcall GdipDrawPath(ptr ptr ptr) @ stdcall GdipDrawPie(ptr ptr long long long long long long) @ stdcall GdipDrawPieI(ptr ptr long long long long long long) -@ stub GdipDrawPolygon -@ stub GdipDrawPolygonI +@ stdcall GdipDrawPolygon(ptr ptr ptr long) +@ stdcall GdipDrawPolygonI(ptr ptr ptr long) @ stdcall GdipDrawRectangle(ptr ptr long long long long) @ stdcall GdipDrawRectangleI(ptr ptr long long long long) @ stdcall GdipDrawRectangles(ptr ptr ptr long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 238712a..c6a4e33 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2161,3 +2161,47 @@ GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpGraphics *graph return NotImplemented; } + +GpStatus WINGDIPAPI GdipDrawPolygon(GpGraphics *graphics,GpPen *pen,GDIPCONST GpPointF *points, + INT count) +{ + INT save_state; + POINT *pti; + + if(!graphics || !pen || count<=0) + return InvalidParameter; + + pti = GdipAlloc(sizeof(POINT) * count); + + save_state = prepare_dc(graphics, pen); + SelectObject(graphics->hdc, GetStockObject(NULL_BRUSH)); + + transform_and_round_points(graphics, pti, (GpPointF*)points, count); + Polygon(graphics->hdc, pti, count); + + restore_dc(graphics, save_state); + GdipFree(pti); + + return Ok; +} + +GpStatus WINGDIPAPI GdipDrawPolygonI(GpGraphics *graphics,GpPen *pen,GDIPCONST GpPoint *points, + INT count) +{ + GpStatus ret; + GpPointF *ptf; + INT i; + + if(count<=0) return InvalidParameter; + ptf = GdipAlloc(sizeof(GpPointF) * count); + + for(i = 0;i < count; i++){ + ptf[i].X = (REAL)points[i].X; + ptf[i].Y = (REAL)points[i].Y; + } + + ret = GdipDrawPolygon(graphics,pen,ptf,count); + GdipFree(ptf); + + return ret; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index ba2c6ee..1e04a23 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -94,6 +94,8 @@ GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*); GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawPolygon(GpGraphics*,GpPen*,GDIPCONST GpPointF*, INT); +GpStatus WINGDIPAPI GdipDrawPolygonI(GpGraphics*,GpPen*,GDIPCONST GpPoint*, INT); GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics*,GpPen*,GDIPCONST GpRectF*,INT);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawRectanglesI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 3903ac6ee819c8be3888168c3dfe936879ce619b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3903ac6ee819c8be3888168c3…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 20:48:08 2008 +0400 gdiplus: Implemented GdipDrawRectanglesI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 0ac4314..2e747ce 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -197,7 +197,7 @@ @ stdcall GdipDrawRectangle(ptr ptr long long long long) @ stdcall GdipDrawRectangleI(ptr ptr long long long long) @ stdcall GdipDrawRectangles(ptr ptr ptr long) -@ stub GdipDrawRectanglesI +@ stdcall GdipDrawRectanglesI(ptr ptr ptr long) @ stdcall GdipDrawString(ptr ptr long ptr ptr ptr ptr) @ stub GdipEmfToWmfBits @ stub GdipEndContainer diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 691cefc..238712a 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1392,6 +1392,33 @@ GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, return Ok; } +GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics *graphics, GpPen *pen, + GDIPCONST GpRect* rects, INT count) +{ + GpRectF *rectsF; + GpStatus ret; + INT i; + + if(!rects || count<=0) + return InvalidParameter; + + rectsF = GdipAlloc(sizeof(GpRectF) * count); + if(!rectsF) + return OutOfMemory; + + for(i = 0;i < count;i++){ + rectsF[i].X = (REAL)rects[i].X; + rectsF[i].Y = (REAL)rects[i].Y; + rectsF[i].Width = (REAL)rects[i].Width; + rectsF[i].Height = (REAL)rects[i].Height; + } + + ret = GdipDrawRectangles(graphics, pen, rectsF, count); + GdipFree(rectsF); + + return ret; +} + GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush)
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawPieI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 71931613f9b79501c48eadb21050ac18e8f8fa7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71931613f9b79501c48eadb21…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 20:48:00 2008 +0400 gdiplus: Implemented GdipDrawPieI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 14f600a..0ac4314 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -191,7 +191,7 @@ @ stdcall GdipDrawLinesI(ptr ptr ptr long) @ stdcall GdipDrawPath(ptr ptr ptr) @ stdcall GdipDrawPie(ptr ptr long long long long long long) -@ stub GdipDrawPieI +@ stdcall GdipDrawPieI(ptr ptr long long long long long long) @ stub GdipDrawPolygon @ stub GdipDrawPolygonI @ stdcall GdipDrawRectangle(ptr ptr long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4912759..691cefc 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1308,6 +1308,12 @@ GpStatus WINGDIPAPI GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, return Ok; } +GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, + INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) +{ + return GdipDrawPie(graphics,pen,(REAL)x,(REAL)y,(REAL)width,(REAL)height,startAngle,sweepAngle); +} + GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height) {
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipTransformMatrixPointsI.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 3aa94d33e488f4437de85d8abc386371caddc681 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3aa94d33e488f4437de85d8ab…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Apr 24 20:47:52 2008 +0400 gdiplus: Implemented GdipTransformMatrixPointsI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 27 +++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index e301f57..14f600a 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -604,7 +604,7 @@ @ stub GdipStringFormatGetGenericTypographic @ stub GdipTestControl @ stdcall GdipTransformMatrixPoints(ptr ptr long) -@ stub GdipTransformMatrixPointsI +@ stdcall GdipTransformMatrixPointsI(ptr ptr long) @ stdcall GdipTransformPath(ptr ptr) @ stub GdipTransformPoints @ stub GdipTransformPointsI diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index e80031f..e04e2cd 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -259,6 +259,33 @@ GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, return Ok; } +GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count) +{ + GpPointF *ptsF; + GpStatus ret; + INT i; + + ptsF = GdipAlloc(sizeof(GpPointF) * count); + if(!ptsF) + return OutOfMemory; + + for(i = 0; i < count; i++){ + ptsF[i].X = (REAL)pts[i].X; + ptsF[i].Y = (REAL)pts[i].Y; + } + + ret = GdipTransformMatrixPoints(matrix, ptsF, count); + + if(ret == Ok) + for(i = 0; i < count; i++){ + pts[i].X = roundr(ptsF[i].X); + pts[i].Y = roundr(ptsF[i].Y); + } + GdipFree(ptsF); + + return ret; +} + GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 5765795..ba2c6ee 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -229,6 +229,7 @@ GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); +GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT); GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
1
0
0
0
Rob Shearman : widl: Add typedef statements to the statement lists.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 1fcc2084e849ba9b4e245029f0290c61ef8dcbc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fcc2084e849ba9b4e245029f…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Apr 24 19:06:42 2008 +0100 widl: Add typedef statements to the statement lists. --- tools/widl/parser.y | 61 +++++++++++++++++++++++++++++------------------- tools/widl/widltypes.h | 7 +++++ 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index a9c7d02..b4805ed 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -124,7 +124,7 @@ static void write_iid(type_t *iface); static int compute_method_indexes(type_t *iface); static char *gen_name(void); -static void process_typedefs(var_list_t *names); +static statement_t *process_typedefs(var_list_t *names); static void check_arg(var_t *arg); static void check_functions(const type_t *iface); static void check_all_user_types(const statement_list_t *stmts); @@ -301,7 +301,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %type <uuid> uuid_string %type <num> import_start %type <typelib> library_start librarydef -%type <statement> statement +%type <statement> statement typedef %type <stmt_list> gbl_statements imp_statements %left ',' @@ -393,7 +393,7 @@ statement: constdef ';' { $$ = make_statement_init_decl($1); fprintf(header, ";\n\n"); } } - | typedef ';' { $$ = NULL; /* FIXME */ } + | typedef ';' { $$ = $1; } | uniondef ';' { $$ = make_statement_type_decl($1); if (!parse_only && do_header) { write_type_def_or_decl(header, $1, FALSE, NULL); @@ -989,7 +989,7 @@ type: tVOID { $$ = duptype(find_type("void", 0), 1); } ; typedef: tTYPEDEF m_attributes type pident_list { reg_typedefs($3, $4, check_typedef_attrs($2)); - process_typedefs($4); + $$ = process_typedefs($4); } ; @@ -1989,26 +1989,6 @@ static char *gen_name(void) return name; } -static void process_typedefs(pident_list_t *pidents) -{ - pident_t *pident, *next; - - if (!pidents) return; - LIST_FOR_EACH_ENTRY_SAFE( pident, next, pidents, pident_t, entry ) - { - var_t *var = pident->var; - type_t *type = find_type(var->name, 0); - - if (! parse_only && do_header) - write_typedef(type); - if (in_typelib && type->attrs) - add_typelib_entry(type); - - free(pident); - free(var); - } -} - struct allowed_attr { unsigned int dce_compatible : 1; @@ -2603,6 +2583,39 @@ static statement_t *make_statement_module(type_t *type) return stmt; } +static statement_t *process_typedefs(pident_list_t *pidents) +{ + pident_t *pident, *next; + statement_t *stmt; + type_list_t **type_list; + + if (!pidents) return NULL; + + stmt = make_statement(STMT_TYPEDEF); + stmt->u.type_list = NULL; + type_list = &stmt->u.type_list; + + LIST_FOR_EACH_ENTRY_SAFE( pident, next, pidents, pident_t, entry ) + { + var_t *var = pident->var; + type_t *type = find_type(var->name, 0); + *type_list = xmalloc(sizeof(type_list_t)); + (*type_list)->type = type; + (*type_list)->next = NULL; + + if (! parse_only && do_header) + write_typedef(type); + if (in_typelib && type->attrs) + add_typelib_entry(type); + + type_list = &(*type_list)->next; + free(pident); + free(var); + } + + return stmt; +} + static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) { if (!stmt) return list; diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 10064b7..ab4acde 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -52,6 +52,7 @@ typedef struct _importinfo_t importinfo_t; typedef struct _typelib_t typelib_t; typedef struct _user_type_t user_type_t; typedef struct _user_type_t context_handle_t; +typedef struct _type_list_t type_list_t; typedef struct _statement_t statement_t; typedef struct list attr_list_t; @@ -357,6 +358,11 @@ struct _user_type_t { const char *name; }; +struct _type_list_t { + type_t *type; + struct _type_list_t *next; +}; + struct _statement_t { struct list entry; enum statement_type type; @@ -367,6 +373,7 @@ struct _statement_t { const char *str; var_t *var; typelib_t *lib; + type_list_t *type_list; } u; };
1
0
0
0
Rob Shearman : widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: df0e38c0670a40eb5892e53ffb506bb1f4bc33ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df0e38c0670a40eb5892e53ff…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Apr 24 19:06:28 2008 +0100 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. --- tools/widl/client.c | 75 ++++++++++------- tools/widl/header.c | 6 +- tools/widl/header.h | 6 +- tools/widl/parser.y | 211 +++++++++++++++++++++++++++++++++++++---------- tools/widl/proxy.c | 132 +++++++++++++++++++---------- tools/widl/server.c | 75 ++++++++++------- tools/widl/typegen.c | 117 +++++++++++++++++--------- tools/widl/typegen.h | 10 +- tools/widl/typelib.c | 14 +--- tools/widl/typelib.h | 2 +- tools/widl/widl.c | 4 +- tools/widl/widl.h | 8 +- tools/widl/widltypes.h | 31 +++++++ tools/widl/write_msft.c | 7 +- 14 files changed, 470 insertions(+), 228 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=df0e38c0670a40eb5892e…
1
0
0
0
Rob Shearman : widl: Allow NULL to be used in expressions.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 58be89230e29689eedb84d5f97710b33f101bd06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58be89230e29689eedb84d5f9…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Apr 24 19:04:14 2008 +0100 widl: Allow NULL to be used in expressions. --- tools/widl/parser.l | 1 + tools/widl/parser.y | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 4e2a6f4..4ae37ef 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -191,6 +191,7 @@ struct keyword { static const struct keyword keywords[] = { {"FALSE", tFALSE}, + {"NULL", tNULL}, {"TRUE", tTRUE}, {"__cdecl", tCDECL}, {"__fastcall", tFASTCALL}, diff --git a/tools/widl/parser.y b/tools/widl/parser.y index f514701..0514d9c 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -219,6 +219,7 @@ static void add_explicit_handle_if_necessary(func_t *func); %token tNONBROWSABLE %token tNONCREATABLE %token tNONEXTENSIBLE +%token tNULL %token tOBJECT tODL tOLEAUTOMATION %token tOPTIONAL %token tOUT @@ -624,6 +625,7 @@ expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } | aHEXNUM { $$ = make_exprl(EXPR_HEXNUM, $1); } | aDOUBLE { $$ = make_exprd(EXPR_DOUBLE, $1); } | tFALSE { $$ = make_exprl(EXPR_TRUEFALSE, 0); } + | tNULL { $$ = make_exprl(EXPR_NUM, 0); } | tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); } | aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); } | expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); }
1
0
0
0
Rob Shearman : widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: ec81a78f017f169954d792dcbed62f87eb30c3d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec81a78f017f169954d792dcb…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Apr 24 19:03:50 2008 +0100 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. --- tools/widl/parser.y | 175 +++++++++++++++++++++++++---------------------- tools/widl/widltypes.h | 9 +-- 2 files changed, 95 insertions(+), 89 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ec81a78f017f169954d79…
1
0
0
0
Rob Shearman : widl: Implement lcid property on library declarations.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 02f5412a535315bfd3ef6ad57f1962dce0ef9775 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02f5412a535315bfd3ef6ad57…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Apr 24 19:03:07 2008 +0100 widl: Implement lcid property on library declarations. --- tools/widl/parser.y | 2 ++ tools/widl/widltypes.h | 1 + tools/widl/write_msft.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index bce194c..99be1f2 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -493,6 +493,7 @@ attribute: { $$ = NULL; } | tIN { $$ = make_attr(ATTR_IN); } | tINPUTSYNC { $$ = make_attr(ATTR_INPUTSYNC); } | tLENGTHIS '(' m_exprs ')' { $$ = make_attrp(ATTR_LENGTHIS, $3); } + | tLCID '(' expr_const ')' { $$ = make_attrp(ATTR_LIBLCID, $3); } | tLOCAL { $$ = make_attr(ATTR_LOCAL); } | tNONBROWSABLE { $$ = make_attr(ATTR_NONBROWSABLE); } | tNONCREATABLE { $$ = make_attr(ATTR_NONCREATABLE); } @@ -2010,6 +2011,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "in" }, /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "length_is" }, + /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "local" }, /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" }, /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" }, diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index fd8b8dd..bf28a01 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -104,6 +104,7 @@ enum attr_type ATTR_IN, ATTR_INPUTSYNC, ATTR_LENGTHIS, + ATTR_LIBLCID, ATTR_LOCAL, ATTR_NONBROWSABLE, ATTR_NONCREATABLE, diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 56bff46..accb648 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -2322,8 +2322,8 @@ static void set_help_string_context(msft_typelib_t *typelib) static void set_lcid(msft_typelib_t *typelib) { - typelib->typelib_header.lcid2 = 0x0; - return; + const expr_t *lcid_expr = get_attrp( typelib->typelib->attrs, ATTR_LIBLCID ); + typelib->typelib_header.lcid2 = lcid_expr ? lcid_expr->cval : 0x0; } static void set_lib_flags(msft_typelib_t *typelib)
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLElementCollection object.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 989574510cdc8627b09b6ee94d1120ed1f334f73 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=989574510cdc8627b09b6ee94…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 24 18:26:56 2008 +0200 mshtml: Added IDispatchEx support to HTMLElementCollection object. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlelem.c | 15 +++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 ++ 4 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index eb973b8..153d864 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -53,6 +53,7 @@ static REFIID tid_ids[] = { &IID_NULL, &DIID_DispHTMLDocument, &DIID_DispHTMLDOMTextNode, + &DIID_DispHTMLElementCollection, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -64,6 +65,7 @@ static REFIID tid_ids[] = { &IID_IHTMLDOMTextNode, &IID_IHTMLElement, &IID_IHTMLElement2, + &IID_IHTMLElementCollection, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 82acb53..c44e2e5 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1363,6 +1363,7 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode) } typedef struct { + DispatchEx dispex; const IHTMLElementCollectionVtbl *lpHTMLElementCollectionVtbl; IUnknown *ref_unk; @@ -1389,6 +1390,9 @@ static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollectio }else if(IsEqualGUID(&IID_IDispatch, riid)) { TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); *ppv = HTMLELEMCOL(This); + }else if(IsEqualGUID(&IID_IDispatchEx, riid)) { + TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + *ppv = DISPATCHEX(&This->dispex); }else if(IsEqualGUID(&IID_IHTMLElementCollection, riid)) { TRACE("(%p)->(IID_IHTMLElementCollection %p)\n", This, ppv); *ppv = HTMLELEMCOL(This); @@ -1664,6 +1668,15 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { HTMLElementCollection_tags }; +static dispex_static_data_t HTMLElementCollection_dispex = { + DispHTMLElementCollection_tid, + NULL, + { + IHTMLElementCollection_tid, + 0 + } +}; + IHTMLElementCollection *create_all_collection(HTMLDOMNode *node) { elem_vector buf = {NULL, 0, 8}; @@ -1687,6 +1700,8 @@ static IHTMLElementCollection *HTMLElementCollection_Create(IUnknown *ref_unk, ret->elems = elems; ret->len = len; + init_dispex(&ret->dispex, (IUnknown*)HTMLELEMCOL(ret), &HTMLElementCollection_dispex); + IUnknown_AddRef(ref_unk); ret->ref_unk = ref_unk; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index e6041a0..126bc2e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -63,6 +63,7 @@ typedef enum { NULL_tid, DispHTMLDocument_tid, DispHTMLDOMTextNode_tid, + DispHTMLElementCollection_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -74,6 +75,7 @@ typedef enum { IHTMLDOMTextNode_tid, IHTMLElement_tid, IHTMLElement2_tid, + IHTMLElementCollection_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 620ad97..8c6f60f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -709,6 +709,8 @@ static void _test_elem_collection(unsigned line, IHTMLElementCollection *col, IDispatch *disp; HRESULT hres; + test_disp((IUnknown*)col, &DIID_DispHTMLElementCollection); + hres = IHTMLElementCollection_get_length(col, &len); ok_(__FILE__,line) (hres == S_OK, "get_length failed: %08x\n", hres); ok_(__FILE__,line) (len == exlen, "len=%ld, expected %ld\n", len, exlen);
1
0
0
0
Jacek Caban : mshtml.idl: Added DispHTMLElementCollection declaration.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 74c571a441545997796b790e55ccb2851c7c2aaf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74c571a441545997796b790e5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 24 18:26:37 2008 +0200 mshtml.idl: Added DispHTMLElementCollection declaration. --- include/mshtmdid.h | 6 ++++++ include/mshtml.idl | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index e269091..23ffe9c 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -986,6 +986,12 @@ #define DISPID_IHTMLELEMENTCOLLECTION__NEWENUM DISPID_NEWENUM #define DISPID_IHTMLELEMENTCOLLECTION_ITEM DISPID_VALUE +/* IHTMLElementCollection2 */ +#define DISPID_IHTMLELEMENTCOLLECTION2_URNS DISPID_COLLECTION+5 + +/* IHTMLElementCollection3 */ +#define DISPID_IHTMLELEMENTCOLLECTION3_NAMEDITEM DISPID_COLLECTION+6 + /* HTMLElementEvents */ #define DISPID_HTMLELEMENTEVENTS_ONHELP DISPID_EVMETH_ONHELP #define DISPID_HTMLELEMENTEVENTS_ONCLICK DISPID_EVMETH_ONCLICK diff --git a/include/mshtml.idl b/include/mshtml.idl index 4a30f0d..6eb4b5a 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -3378,6 +3378,45 @@ interface IHTMLElementCollection : IDispatch } /***************************************************************************** + * DispHTMLElementCollection dispinterface + */ +[ + hidden, + uuid(3050f56b-98b5-11cf-bb82-00aa00bdce0b) +] +dispinterface DispHTMLElementCollection +{ +properties: +methods: + [id(DISPID_IHTMLELEMENTCOLLECTION_TOSTRING)] + BSTR toString(); + + [propput, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)] + void length(long v); + + [propget, id(DISPID_IHTMLELEMENTCOLLECTION_LENGTH)] + long length(); + + [propget, id(DISPID_IHTMLELEMENTCOLLECTION__NEWENUM), hidden, restricted] + IUnknown *_newEnum(); + + [id(DISPID_IHTMLELEMENTCOLLECTION_ITEM)] + IDispatch *item( + [in, optional] VARIANT name, + [in, optional] VARIANT index); + + [id(DISPID_IHTMLELEMENTCOLLECTION_TAGS)] + IDispatch *tags( + [in] VARIANT tagName); + + [id(DISPID_IHTMLELEMENTCOLLECTION2_URNS)] + IDispatch *urns([in] VARIANT urn); + + [id(DISPID_IHTMLELEMENTCOLLECTION3_NAMEDITEM)] + IDispatch *namedItem([in] BSTR name); +} + +/***************************************************************************** * IHTMLSelectElement interface */ [
1
0
0
0
Jacek Caban : mshtml: Added get_nodeType implementation.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: bb05803a2ac56c078393803503fc73400c51c9c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb05803a2ac56c07839380350…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 24 18:26:18 2008 +0200 mshtml: Added get_nodeType implementation. --- dlls/mshtml/htmlnode.c | 26 ++++++++++++++++++++++++-- dlls/mshtml/tests/dom.c | 26 ++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index ee0d727..7abf2ef 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -104,8 +104,30 @@ static HRESULT WINAPI HTMLDOMNode_Invoke(IHTMLDOMNode *iface, DISPID dispIdMembe static HRESULT WINAPI HTMLDOMNode_get_nodeType(IHTMLDOMNode *iface, long *p) { HTMLDOMNode *This = HTMLDOMNODE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + PRUint16 type = -1; + + TRACE("(%p)->(%p)\n", This, p); + + nsIDOMNode_GetNodeType(This->nsnode, &type); + + switch(type) { + case ELEMENT_NODE: + *p = 1; + break; + case TEXT_NODE: + *p = 3; + break; + default: + /* + * FIXME: + * According to MSDN only ELEMENT_NODE and TEXT_NODE are supported. + * It needs more tests. + */ + FIXME("type %u\n", type); + *p = 0; + } + + return S_OK; } static HRESULT WINAPI HTMLDOMNode_get_parentNode(IHTMLDOMNode *iface, IHTMLDOMNode **p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index f91da86..620ad97 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -763,6 +763,24 @@ static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk) return child; } +#define get_node_type(n) _get_node_type(__LINE__,n) +static long _get_node_type(unsigned line, IUnknown *unk) +{ + IHTMLDOMNode *node; + long type = -1; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode, (void**)&node); + ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMNode: %08x\n", hres); + + hres = IHTMLDOMNode_get_nodeType(node, &type); + ok(hres == S_OK, "get_nodeType failed: %08x\n", hres); + + IHTMLDOMNode_Release(node); + + return type; +} + static void test_elem_col_item(IHTMLElementCollection *col, LPCWSTR n, const elem_type_t *elem_types, long len) { @@ -1406,6 +1424,7 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLElement *elem; IHTMLDOMNode *node, *node2; IDispatch *disp; + long type; HRESULT hres; static const WCHAR xW[] = {'x',0}; @@ -1484,6 +1503,9 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLDOMNode_Release(node); } + type = get_node_type((IUnknown*)select); + ok(type == 1, "type=%ld\n", type); + IHTMLSelectElement_Release(select); IHTMLElement_Release(elem); } @@ -1512,9 +1534,13 @@ static void test_elems(IHTMLDocument2 *doc) if(node) { test_ifaces((IUnknown*)node, text_iids); test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode); + node2 = get_first_child((IUnknown*)node); ok(!node2, "node2 != NULL\n"); + type = get_node_type((IUnknown*)node); + ok(type == 3, "type=%ld\n", type); + IHTMLDOMNode_Release(node); }
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to text node.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: af271b3b45b195243a1798b4c111a94e41838877 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af271b3b45b195243a1798b4c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 24 18:25:51 2008 +0200 mshtml: Added IDispatchEx support to text node. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmltextnode.c | 13 +++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 1 + 4 files changed, 18 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 949d7b8..eb973b8 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -52,6 +52,7 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list); static REFIID tid_ids[] = { &IID_NULL, &DIID_DispHTMLDocument, + &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -60,6 +61,7 @@ static REFIID tid_ids[] = { &IID_IHTMLDocument5, &IID_IHTMLDOMNode, &IID_IHTMLDOMNode2, + &IID_IHTMLDOMTextNode, &IID_IHTMLElement, &IID_IHTMLElement2, &IID_IHTMLWindow2, diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c index 585d84f..fa6308e 100644 --- a/dlls/mshtml/htmltextnode.c +++ b/dlls/mshtml/htmltextnode.c @@ -185,6 +185,17 @@ static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = { HTMLDOMTextNode_destructor }; +static dispex_static_data_t HTMLDOMTextNode_dispex = { + DispHTMLDOMTextNode_tid, + 0, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLDOMTextNode_tid, + 0 + } +}; + HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode) { HTMLDOMTextNode *ret ; @@ -193,5 +204,7 @@ HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode) ret->node.vtbl = &HTMLDOMTextNodeImplVtbl; ret->lpIHTMLDOMTextNodeVtbl = &HTMLDOMTextNodeVtbl; + init_dispex(&ret->node.dispex, (IUnknown*)HTMLTEXT(ret), &HTMLDOMTextNode_dispex); + return &ret->node; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index cf3cfba..e6041a0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -62,6 +62,7 @@ typedef struct event_target_t event_target_t; typedef enum { NULL_tid, DispHTMLDocument_tid, + DispHTMLDOMTextNode_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -70,6 +71,7 @@ typedef enum { IHTMLDocument5_tid, IHTMLDOMNode_tid, IHTMLDOMNode2_tid, + IHTMLDOMTextNode_tid, IHTMLElement_tid, IHTMLElement2_tid, IHTMLWindow2_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 346ee5d..f91da86 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -1511,6 +1511,7 @@ static void test_elems(IHTMLDocument2 *doc) ok(node != NULL, "node == NULL\n"); if(node) { test_ifaces((IUnknown*)node, text_iids); + test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode); node2 = get_first_child((IUnknown*)node); ok(!node2, "node2 != NULL\n");
1
0
0
0
Jacek Caban : mshtml: Added IHTMLDOMTextNode stub implementation.
by Alexandre Julliard
24 Apr '08
24 Apr '08
Module: wine Branch: master Commit: 754adce78190c726db510873af89ba389b7d2b0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=754adce78190c726db510873a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 24 18:25:34 2008 +0200 mshtml: Added IHTMLDOMTextNode stub implementation. --- dlls/mshtml/Makefile.in | 3 +- dlls/mshtml/htmlnode.c | 3 + dlls/mshtml/htmltextnode.c | 197 ++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/tests/dom.c | 29 ++++++- 5 files changed, 231 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=754adce78190c726db510…
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
26
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Results per page:
10
25
50
100
200