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
December 2007
----- 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
3 participants
824 discussions
Start a n
N
ew thread
Alexandre Julliard : wordpad: Fix a compiler warning.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 2702da697753e2694ce9c10b737e00f965153a18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2702da697753e2694ce9c10b7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 10 15:15:42 2007 +0100 wordpad: Fix a compiler warning. --- programs/wordpad/wordpad.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index ce3e161..8c97ae5 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -724,7 +724,7 @@ static void set_default_font(void) SendMessageW(hEditorWnd, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&fmt); } -static void add_font(LPWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETRICEXW *ntmc) +static void add_font(LPCWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETRICEXW *ntmc) { COMBOBOXEXITEMW cbItem; WCHAR buffer[MAX_PATH]; @@ -742,7 +742,8 @@ static void add_font(LPWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETR else break; } - cbItem.pszText = fontName; + cbItem.pszText = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(fontName) + 1)*sizeof(WCHAR) ); + lstrcpyW( cbItem.pszText, fontName ); cbItem.mask |= CBEIF_LPARAM; if(fontType & RASTER_FONTTYPE) @@ -750,6 +751,7 @@ static void add_font(LPWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETR cbItem.lParam = MAKELONG(fontType,fontHeight); SendMessageW(hListWnd, CBEM_INSERTITEMW, 0, (LPARAM)&cbItem); + HeapFree( GetProcessHeap(), 0, cbItem.pszText ); } static void dialog_choose_font(void)
1
0
0
0
Rob Shearman : widl: iid_is should take expressions, not just identifiers.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 85e87ae82913295811e64715eaf935263e16f499 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85e87ae82913295811e64715e…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Dec 10 13:30:48 2007 +0000 widl: iid_is should take expressions, not just identifiers. --- tools/widl/parser.y | 2 +- tools/widl/proxy.c | 12 ++++++++---- tools/widl/typegen.c | 26 ++++++++++++++------------ 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index ffeca26..0a8af54 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -470,7 +470,7 @@ attribute: { $$ = NULL; } | tHIDDEN { $$ = make_attr(ATTR_HIDDEN); } | tID '(' expr_const ')' { $$ = make_attrp(ATTR_ID, $3); } | tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); } - | tIIDIS '(' ident ')' { $$ = make_attrp(ATTR_IIDIS, $3); } + | tIIDIS '(' expr ')' { $$ = make_attrp(ATTR_IIDIS, $3); } | tIMMEDIATEBIND { $$ = make_attr(ATTR_IMMEDIATEBIND); } | tIMPLICITHANDLE '(' tHANDLET aIDENTIFIER ')' { $$ = make_attrp(ATTR_IMPLICIT_HANDLE, $4); } | tIN { $$ = make_attr(ATTR_IN); } diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 8a81885..c940474 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -188,7 +188,7 @@ static void proxy_check_pointers( const var_list_t *args ) static void free_variable( const var_t *arg ) { unsigned int type_offset = arg->type->typestring_offset; - var_t *constraint; + expr_t *iid; type_t *type = arg->type; expr_t *size = get_size_is_expr(type, arg->name); @@ -219,9 +219,13 @@ static void free_variable( const var_t *arg ) case RPC_FC_FP: case RPC_FC_IP: - constraint = get_attrp( arg->attrs, ATTR_IIDIS ); - if( constraint ) - print_proxy( "_StubMsg.MaxCount = (unsigned long) ( %s );\n",constraint->name); + iid = get_attrp( arg->attrs, ATTR_IIDIS ); + if( iid ) + { + print_proxy( "_StubMsg.MaxCount = (unsigned long) " ); + write_expr(proxy, iid, 1); + print_proxy( ";\n\n" ); + } print_proxy( "NdrClearOutParameters( &_StubMsg, "); fprintf(proxy, "&__MIDL_TypeFormatString.Format[%u], ", type_offset ); fprintf(proxy, "(void*)%s );\n", arg->name ); diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 1988f36..5043bd5 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1972,20 +1972,14 @@ static size_t write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *type, { size_t i; size_t start_offset = *typeformat_offset; - const var_t *iid = get_attrp(attrs, ATTR_IIDIS); + expr_t *iid = get_attrp(attrs, ATTR_IIDIS); if (iid) { - expr_t expr; - - expr.type = EXPR_IDENTIFIER; - expr.ref = NULL; - expr.u.sval = iid->name; - expr.is_const = FALSE; print_file(file, 2, "0x2f, /* FC_IP */\n"); print_file(file, 2, "0x5c, /* FC_PAD */\n"); *typeformat_offset - += write_conf_or_var_desc(file, NULL, 0, type, &expr) + 2; + += write_conf_or_var_desc(file, NULL, 0, type, iid) + 2; } else { @@ -2839,9 +2833,13 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func, } else { - const var_t *iid; + expr_t *iid; if ((iid = get_attrp( var->attrs, ATTR_IIDIS ))) - print_file( file, indent, "_StubMsg.MaxCount = (unsigned long)%s;\n", iid->name ); + { + print_file( file, indent, "_StubMsg.MaxCount = (unsigned long) " ); + write_expr( file, iid, 1 ); + fprintf( file, ";\n\n" ); + } print_phase_function(file, indent, "Pointer", phase, var, start_offset); } break; @@ -2862,11 +2860,15 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func, } else { - const var_t *iid; + expr_t *iid; expr_t *sx = get_size_is_expr(type, var->name); if ((iid = get_attrp( var->attrs, ATTR_IIDIS ))) - print_file( file, indent, "_StubMsg.MaxCount = (unsigned long)%s;\n", iid->name ); + { + print_file( file, indent, "_StubMsg.MaxCount = (unsigned long) " ); + write_expr( file, iid, 1 ); + fprintf( file, ";\n\n" ); + } else if (sx) { print_file(file, indent, "_StubMsg.MaxCount = (unsigned long) ");
1
0
0
0
Rob Shearman : widl: Support the address-of operator in expressions.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 72d9569cc43304e8b37c798e25e65706907d383b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72d9569cc43304e8b37c798e2…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Dec 10 13:30:42 2007 +0000 widl: Support the address-of operator in expressions. --- tools/widl/header.c | 4 ++++ tools/widl/parser.y | 4 ++++ tools/widl/typegen.c | 5 +++++ tools/widl/widltypes.h | 1 + 4 files changed, 14 insertions(+), 0 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index 7d224fe..16bf82b 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -483,6 +483,10 @@ void write_expr(FILE *h, const expr_t *e, int brackets) write_expr(h, e->ext2, 1); if (brackets) fprintf(h, ")"); break; + case EXPR_ADDRESSOF: + fprintf(h, "&"); + write_expr(h, e->ref, 1); + break; } } diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 06f0035..ffeca26 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -280,6 +280,7 @@ static void check_all_user_types(ifref_list_t *ifaces); %right CAST %right PPTR %right NEG +%right ADDRESSOF %% @@ -612,6 +613,7 @@ expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } | expr SHR expr { $$ = make_expr2(EXPR_SHR, $1, $3); } | '~' expr { $$ = make_expr1(EXPR_NOT, $2); } | '-' expr %prec NEG { $$ = make_expr1(EXPR_NEG, $2); } + | '&' expr %prec ADDRESSOF { $$ = make_expr1(EXPR_ADDRESSOF, $2); } | '*' expr %prec PPTR { $$ = make_expr1(EXPR_PPTR, $2); } | '(' type ')' expr %prec CAST { $$ = make_exprt(EXPR_CAST, $2, $4); } | tSIZEOF '(' type ')' { $$ = make_exprt(EXPR_SIZEOF, $3, NULL); } @@ -1138,6 +1140,8 @@ static expr_t *make_exprt(enum expr_type type, type_t *tref, expr_t *expr) static expr_t *make_expr1(enum expr_type type, expr_t *expr) { expr_t *e; + if (type == EXPR_ADDRESSOF && expr->type != EXPR_IDENTIFIER) + error("address-of operator applied to invalid expression\n"); e = xmalloc(sizeof(expr_t)); e->type = type; e->ref = expr; diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 346318f..1988f36 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -288,6 +288,7 @@ static int compare_expr(const expr_t *a, const expr_t *b) case EXPR_NOT: case EXPR_NEG: case EXPR_PPTR: + case EXPR_ADDRESSOF: return compare_expr(a->ref, b->ref); case EXPR_SIZEOF: return compare_type(a->u.tref, b->u.tref); @@ -3023,6 +3024,10 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets, write_struct_expr(h, e->ext2, 1, fields, structvar); if (brackets) fprintf(h, ")"); break; + case EXPR_ADDRESSOF: + fprintf(h, "&"); + write_struct_expr(h, e->ref, 1, fields, structvar); + break; } } diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 4145be2..6930f71 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -154,6 +154,7 @@ enum expr_type EXPR_OR, EXPR_COND, EXPR_TRUEFALSE, + EXPR_ADDRESSOF, }; enum type_kind
1
0
0
0
Rob Shearman : widl: Make sure to generate freeing calls for all non-simple structures with pointers and pointers to user marshalled types .
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 8ead7fe797fb83974a767f09986876c3c34166ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ead7fe797fb83974a767f099…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Dec 10 13:30:36 2007 +0000 widl: Make sure to generate freeing calls for all non-simple structures with pointers and pointers to user marshalled types. --- tools/widl/typegen.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index e40ac79..346318f 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2601,7 +2601,9 @@ static int needs_freeing(const attr_list_t *attrs, const type_t *t, int out) (is_user_type(t) || (is_ptr(t) && (t->ref->type == RPC_FC_IP - || is_ptr(t->ref)))) + || (is_struct(t->ref->type) && t->ref->type != RPC_FC_STRUCT) + || is_ptr(t->ref) + || is_user_type(t->ref)))) || (out && is_string_type(attrs, t)) || is_array(t); }
1
0
0
0
Rob Shearman : widl: Arrays should have freeing code generated on the server side, even if they are [in] parameters.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: e6f23296762be53bf184d5a0f3d64c3b0bb8d421 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6f23296762be53bf184d5a0f…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Dec 10 13:30:28 2007 +0000 widl: Arrays should have freeing code generated on the server side, even if they are [in] parameters. --- tools/widl/typegen.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index ae80f93..e40ac79 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2602,8 +2602,8 @@ static int needs_freeing(const attr_list_t *attrs, const type_t *t, int out) || (is_ptr(t) && (t->ref->type == RPC_FC_IP || is_ptr(t->ref)))) - || (out && (is_string_type(attrs, t) - || is_array(t))); + || (out && is_string_type(attrs, t)) + || is_array(t); } expr_t *get_size_is_expr(const type_t *t, const char *name)
1
0
0
0
Rob Shearman : widl: Always write a freeing function for arrays in generated code.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 701a25c4b2b208e43a059b4ff8092972ab4b3c0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=701a25c4b2b208e43a059b4ff…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Dec 10 13:30:23 2007 +0000 widl: Always write a freeing function for arrays in generated code. Fix the conditions under which pfnFree is called to only include arrays that will have been allocated, instead of being pointed to the buffer. --- tools/widl/typegen.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 1078ede..ae80f93 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2755,7 +2755,7 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func, } else if (tc == RPC_FC_CARRAY) { - if (is_size_needed_for_phase(phase) && phase != PHASE_FREE) + if (is_size_needed_for_phase(phase)) { print_file(file, indent, "_StubMsg.MaxCount = (unsigned long)"); write_expr(file, type->size_is, 1); @@ -2786,16 +2786,20 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func, : "ConformantVaryingArray"); } - if (!in_attr && phase == PHASE_FREE) - { - print_file(file, indent, "if (%s)\n", var->name); - indent++; - print_file(file, indent, "_StubMsg.pfnFree(%s);\n", var->name); - } - else if (phase != PHASE_FREE) + if (pointer_type != RPC_FC_RP) array_type = "Pointer"; + print_phase_function(file, indent, array_type, phase, var, start_offset); + if (phase == PHASE_FREE && type->declarray && pointer_type == RPC_FC_RP) { - const char *t = pointer_type == RPC_FC_RP ? array_type : "Pointer"; - print_phase_function(file, indent, t, phase, var, start_offset); + /* these are all unmarshalled by pointing into the buffer on the + * server side */ + if (type->type != RPC_FC_SMFARRAY && + type->type != RPC_FC_LGFARRAY && + type->type != RPC_FC_CARRAY) + { + print_file(file, indent, "if (%s)\n", var->name); + indent++; + print_file(file, indent, "_StubMsg.pfnFree(%s);\n", var->name); + } } } else if (!is_ptr(var->type) && is_base_type(rtype))
1
0
0
0
Alistair Leslie-Hughes : msxml3: Implement IPersistStream.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 7ec06c8442c151a97688b35e0a8012ce5dd8b6de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ec06c8442c151a97688b35e0…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Dec 10 09:31:38 2007 +1100 msxml3: Implement IPersistStream. --- dlls/msxml3/domdoc.c | 194 ++++++++++++++++++++++++++++++++++++++++++- dlls/msxml3/msxml_private.h | 2 + dlls/msxml3/xmldoc.c | 9 +- 3 files changed, 200 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index b4b8962..af5097c 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -168,6 +168,7 @@ static bsc domdoc_bsc = { &bsc_vtbl }; typedef struct _domdoc { const struct IXMLDOMDocument2Vtbl *lpVtbl; + const struct IPersistStreamVtbl *lpvtblIPersistStream; LONG ref; VARIANT_BOOL async; VARIANT_BOOL validating; @@ -178,6 +179,9 @@ typedef struct _domdoc IXMLDOMNode *node; IXMLDOMSchemaCollection *schema; HRESULT error; + + /* IPersistStream */ + IStream *stream; } domdoc; LONG xmldoc_add_ref(xmlDocPtr doc) @@ -210,6 +214,131 @@ static inline xmlDocPtr get_doc( domdoc *This ) return (xmlDocPtr) xmlNodePtr_from_domnode( This->node, XML_DOCUMENT_NODE ); } +static inline domdoc *impl_from_IPersistStream(IPersistStream *iface) +{ + return (domdoc *)((char*)iface - FIELD_OFFSET(domdoc, lpvtblIPersistStream)); +} + +/************************************************************************ + * xmldoc implementation of IPersistStream. + */ +static HRESULT WINAPI xmldoc_IPersistStream_QueryInterface( + IPersistStream *iface, REFIID riid, LPVOID *ppvObj) +{ + domdoc *this = impl_from_IPersistStream(iface); + return IXMLDocument_QueryInterface((IXMLDocument *)this, riid, ppvObj); +} + +static ULONG WINAPI xmldoc_IPersistStream_AddRef( + IPersistStream *iface) +{ + domdoc *this = impl_from_IPersistStream(iface); + return IXMLDocument_AddRef((IXMLDocument *)this); +} + +static ULONG WINAPI xmldoc_IPersistStream_Release( + IPersistStream *iface) +{ + domdoc *this = impl_from_IPersistStream(iface); + return IXMLDocument_Release((IXMLDocument *)this); +} + +static HRESULT WINAPI xmldoc_IPersistStream_GetClassID( + IPersistStream *iface, CLSID *classid) +{ + FIXME("(%p,%p): stub!\n", iface, classid); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmldoc_IPersistStream_IsDirty( + IPersistStream *iface) +{ + domdoc *This = impl_from_IPersistStream(iface); + + FIXME("(%p->%p): stub!\n", iface, This); + + return S_FALSE; +} + +static HRESULT WINAPI xmldoc_IPersistStream_Load( + IPersistStream *iface, LPSTREAM pStm) +{ + domdoc *This = impl_from_IPersistStream(iface); + HRESULT hr; + HGLOBAL hglobal; + DWORD read, written, len; + BYTE buf[4096]; + char *ptr; + xmlDocPtr xmldoc = NULL; + + TRACE("(%p, %p)\n", iface, pStm); + + if (!pStm) + return E_INVALIDARG; + + hr = CreateStreamOnHGlobal(NULL, TRUE, &This->stream); + if (FAILED(hr)) + return hr; + + do + { + IStream_Read(pStm, buf, sizeof(buf), &read); + hr = IStream_Write(This->stream, buf, read, &written); + } while(SUCCEEDED(hr) && written != 0 && read != 0); + + if (FAILED(hr)) + { + ERR("Failed to copy stream\n"); + return hr; + } + + hr = GetHGlobalFromStream(This->stream, &hglobal); + if (FAILED(hr)) + return hr; + + len = GlobalSize(hglobal); + ptr = GlobalLock(hglobal); + if (len != 0) + xmldoc = parse_xml(ptr, len); + GlobalUnlock(hglobal); + + if (!xmldoc) + { + ERR("Failed to parse xml\n"); + return E_FAIL; + } + + attach_xmlnode( This->node, (xmlNodePtr)xmldoc ); + + return S_OK; +} + +static HRESULT WINAPI xmldoc_IPersistStream_Save( + IPersistStream *iface, LPSTREAM pStm, BOOL fClearDirty) +{ + FIXME("(%p, %p, %d): stub!\n", iface, pStm, fClearDirty); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmldoc_IPersistStream_GetSizeMax( + IPersistStream *iface, ULARGE_INTEGER *pcbSize) +{ + TRACE("(%p, %p): stub!\n", iface, pcbSize); + return E_NOTIMPL; +} + +static const IPersistStreamVtbl xmldoc_IPersistStream_VTable = +{ + xmldoc_IPersistStream_QueryInterface, + xmldoc_IPersistStream_AddRef, + xmldoc_IPersistStream_Release, + xmldoc_IPersistStream_GetClassID, + xmldoc_IPersistStream_IsDirty, + xmldoc_IPersistStream_Load, + xmldoc_IPersistStream_Save, + xmldoc_IPersistStream_GetSizeMax, +}; + static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID riid, void** ppvObject ) { domdoc *This = impl_from_IXMLDOMDocument2( iface ); @@ -227,6 +356,10 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID rii { return IUnknown_QueryInterface(This->node_unk, riid, ppvObject); } + else if (IsEqualGUID(&IID_IPersistStream, riid)) + { + *ppvObject = (IPersistStream*)&(This->lpvtblIPersistStream); + } else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); @@ -261,6 +394,7 @@ static ULONG WINAPI domdoc_Release( { IUnknown_Release( This->node_unk ); if(This->schema) IXMLDOMSchemaCollection_Release( This->schema ); + if (This->stream) IStream_Release(This->stream); HeapFree( GetProcessHeap(), 0, This ); } @@ -1023,6 +1157,8 @@ static HRESULT WINAPI domdoc_load( LPWSTR filename = NULL; xmlDocPtr xmldoc = NULL; HRESULT hr = S_FALSE; + IXMLDOMDocument2 *pNewDoc = NULL; + IStream *pStream = NULL; TRACE("type %d\n", V_VT(&xmlSource) ); @@ -1036,7 +1172,59 @@ static HRESULT WINAPI domdoc_load( { case VT_BSTR: filename = V_BSTR(&xmlSource); - } + break; + case VT_UNKNOWN: + hr = IUnknown_QueryInterface(V_UNKNOWN(&xmlSource), &IID_IXMLDOMDocument2, (void**)&pNewDoc); + if(hr == S_OK) + { + if(pNewDoc) + { + domdoc *newDoc = impl_from_IXMLDOMDocument2( pNewDoc ); + xmldoc = xmlCopyDoc(get_doc(newDoc), 1); + attach_xmlnode(This->node, (xmlNodePtr) xmldoc); + + *isSuccessful = VARIANT_TRUE; + + return S_OK; + } + } + hr = IUnknown_QueryInterface(V_UNKNOWN(&xmlSource), &IID_IStream, (void**)&pStream); + if(hr == S_OK) + { + IPersistStream *pDocStream; + hr = IUnknown_QueryInterface(iface, &IID_IPersistStream, (void**)&pDocStream); + if(hr == S_OK) + { + hr = xmldoc_IPersistStream_Load(pDocStream, pStream); + IStream_Release(pStream); + if(hr == S_OK) + { + *isSuccessful = VARIANT_TRUE; + + TRACE("Using ID_IStream to load Document\n"); + return S_OK; + } + else + { + ERR("xmldoc_IPersistStream_Load failed (%d)\n", hr); + } + } + else + { + ERR("QueryInterface IID_IPersistStream failed (%d)\n", hr); + } + } + else + { + /* ISequentialStream */ + FIXME("Unknown type not supported (%d) (%p)(%p)\n", hr, pNewDoc, V_UNKNOWN(&xmlSource)->lpVtbl); + } + break; + default: + FIXME("VT type not supported (%d)\n", V_VT(&xmlSource)); + } + + TRACE("filename (%s)\n", debugstr_w(filename)); if ( filename ) { @@ -1057,6 +1245,8 @@ static HRESULT WINAPI domdoc_load( xmldoc->_private = 0; attach_xmlnode(This->node, (xmlNodePtr) xmldoc); + TRACE("ret (%d)\n", hr); + return hr; } @@ -1562,6 +1752,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) return E_OUTOFMEMORY; doc->lpVtbl = &domdoc_vtbl; + doc->lpvtblIPersistStream = &xmldoc_IPersistStream_VTable; doc->ref = 1; doc->async = 0; doc->validating = 0; @@ -1570,6 +1761,7 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) doc->bUseXPath = FALSE; doc->error = S_OK; doc->schema = NULL; + doc->stream = NULL; xmldoc = xmlNewDoc(NULL); if(!xmldoc) diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 2d574ff..4914a58 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -61,6 +61,8 @@ extern LONG xmldoc_release( xmlDocPtr doc ); extern HRESULT XMLElement_create( IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj ); extern HRESULT XMLElementCollection_create( IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj ); +extern xmlDocPtr parse_xml(char *ptr, int len); + #endif extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText, diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c index 6d44c78..a4c0850 100644 --- a/dlls/msxml3/xmldoc.c +++ b/dlls/msxml3/xmldoc.c @@ -44,7 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); /* FIXME: IXMLDocument needs to implement * - IXMLError * - IPersistMoniker - * - IPersistStream */ typedef struct _xmldoc @@ -79,11 +78,13 @@ static HRESULT WINAPI xmldoc_QueryInterface(IXMLDocument *iface, REFIID riid, vo TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject); if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IXMLDocument)) + IsEqualGUID(riid, &IID_IXMLDocument) || + IsEqualGUID(riid, &IID_IXMLDOMDocument)) { *ppvObject = iface; } - else if (IsEqualGUID(&IID_IPersistStreamInit, riid)) + else if (IsEqualGUID(&IID_IPersistStreamInit, riid) || + IsEqualGUID(&IID_IPersistStream, riid)) { *ppvObject = (IPersistStreamInit *)&(This->lpvtblIPersistStreamInit); } @@ -522,7 +523,7 @@ static HRESULT WINAPI xmldoc_IPersistStreamInit_IsDirty( return E_NOTIMPL; } -static xmlDocPtr parse_xml(char *ptr, int len) +xmlDocPtr parse_xml(char *ptr, int len) { #ifdef HAVE_XMLREADMEMORY return xmlReadMemory(ptr, len, NULL, NULL,
1
0
0
0
Roy Shea : qmgrprxy: Queue manager proxy generated using an IDL compiler and bits.idl.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 00ef4e5829305f77b5eafb796a07de84eb92877c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00ef4e5829305f77b5eafb796…
Author: Roy Shea <roy(a)cs.hmc.edu> Date: Sun Dec 9 13:16:07 2007 -0800 qmgrprxy: Queue manager proxy generated using an IDL compiler and bits.idl. --- .gitignore | 3 +++ Makefile.in | 2 ++ configure | 3 +++ configure.ac | 1 + dlls/Makefile.in | 1 + dlls/qmgrprxy/Makefile.in | 16 ++++++++++++++++ dlls/qmgrprxy/qmgrprxy.idl | 19 +++++++++++++++++++ dlls/qmgrprxy/qmgrprxy.spec | 5 +++++ 8 files changed, 50 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 6be21d5..93227f6 100644 --- a/.gitignore +++ b/.gitignore @@ -381,6 +381,9 @@ dlls/psapi/tests/*.ok dlls/psapi/tests/psapi_crosstest.exe dlls/psapi/tests/testlist.c dlls/qcap/version.res +dlls/qmgrprxy/qmgrprxy.h +dlls/qmgrprxy/qmgrprxy_i.c +dlls/qmgrprxy/qmgrprxy_p.c dlls/quartz/libquartz.def dlls/quartz/tests/*.ok dlls/quartz/tests/quartz_crosstest.exe diff --git a/Makefile.in b/Makefile.in index 207ce95..18d1b60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -357,6 +357,7 @@ ALL_MAKEFILES = \ dlls/pstorec/Makefile \ dlls/qcap/Makefile \ dlls/qmgr/Makefile \ + dlls/qmgrprxy/Makefile \ dlls/quartz/Makefile \ dlls/quartz/tests/Makefile \ dlls/query/Makefile \ @@ -739,6 +740,7 @@ dlls/psapi/tests/Makefile: dlls/psapi/tests/Makefile.in dlls/Maketest.rules dlls/pstorec/Makefile: dlls/pstorec/Makefile.in dlls/Makedll.rules dlls/qcap/Makefile: dlls/qcap/Makefile.in dlls/Makedll.rules dlls/qmgr/Makefile: dlls/qmgr/Makefile.in dlls/Makedll.rules +dlls/qmgrprxy/Makefile: dlls/qmgrprxy/Makefile.in dlls/Makedll.rules dlls/quartz/Makefile: dlls/quartz/Makefile.in dlls/Makedll.rules dlls/quartz/tests/Makefile: dlls/quartz/tests/Makefile.in dlls/Maketest.rules dlls/query/Makefile: dlls/query/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index b020270..0b2e0b4 100755 --- a/configure +++ b/configure @@ -20923,6 +20923,8 @@ ac_config_files="$ac_config_files dlls/qcap/Makefile" ac_config_files="$ac_config_files dlls/qmgr/Makefile" +ac_config_files="$ac_config_files dlls/qmgrprxy/Makefile" + ac_config_files="$ac_config_files dlls/quartz/Makefile" ac_config_files="$ac_config_files dlls/quartz/tests/Makefile" @@ -22024,6 +22026,7 @@ do "dlls/pstorec/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/pstorec/Makefile" ;; "dlls/qcap/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/qcap/Makefile" ;; "dlls/qmgr/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/qmgr/Makefile" ;; + "dlls/qmgrprxy/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/qmgrprxy/Makefile" ;; "dlls/quartz/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/quartz/Makefile" ;; "dlls/quartz/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/quartz/tests/Makefile" ;; "dlls/query/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/query/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8d6e1b4..492d363 100644 --- a/configure.ac +++ b/configure.ac @@ -1778,6 +1778,7 @@ AC_CONFIG_FILES([dlls/psapi/tests/Makefile]) AC_CONFIG_FILES([dlls/pstorec/Makefile]) AC_CONFIG_FILES([dlls/qcap/Makefile]) AC_CONFIG_FILES([dlls/qmgr/Makefile]) +AC_CONFIG_FILES([dlls/qmgrprxy/Makefile]) AC_CONFIG_FILES([dlls/quartz/Makefile]) AC_CONFIG_FILES([dlls/quartz/tests/Makefile]) AC_CONFIG_FILES([dlls/query/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 8d5c891..d7b0976 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -163,6 +163,7 @@ BASEDIRS = \ pstorec \ qcap \ qmgr \ + qmgrprxy \ quartz \ query \ rasapi32 \ diff --git a/dlls/qmgrprxy/Makefile.in b/dlls/qmgrprxy/Makefile.in new file mode 100644 index 0000000..18d7b11 --- /dev/null +++ b/dlls/qmgrprxy/Makefile.in @@ -0,0 +1,16 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = qmgrprxy.dll +IMPORTS = rpcrt4 kernel32 +EXTRADEFS = -DREGISTER_PROXY_DLL + +IDL_I_SRCS = qmgrprxy.idl +IDL_P_SRCS = qmgrprxy.idl + +EXTRA_OBJS = dlldata.o + +@MAKE_DLL_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qmgrprxy/qmgrprxy.idl b/dlls/qmgrprxy/qmgrprxy.idl new file mode 100644 index 0000000..4b47b18 --- /dev/null +++ b/dlls/qmgrprxy/qmgrprxy.idl @@ -0,0 +1,19 @@ +/* + * Copyright 2007 Google (Roy Shea) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "bits.idl" diff --git a/dlls/qmgrprxy/qmgrprxy.spec b/dlls/qmgrprxy/qmgrprxy.spec new file mode 100644 index 0000000..7c7a65b --- /dev/null +++ b/dlls/qmgrprxy/qmgrprxy.spec @@ -0,0 +1,5 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() +@ stdcall -private GetProxyDllInfo(ptr ptr)
1
0
0
0
Alexander Nicolaysen Sørnes : comdlg32: PageSetupDlgW: Swap margins when changing orientation.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 507aeb6855a6e2be5730d924d602bc3ff3a74fe1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=507aeb6855a6e2be5730d924d…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Dec 9 18:15:36 2007 +0100 comdlg32: PageSetupDlgW: Swap margins when changing orientation. --- dlls/comdlg32/printdlg.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index dcea25e..dd290d5 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -2340,6 +2340,7 @@ typedef struct { typedef struct { LPPAGESETUPDLGW dlga; PRINTDLGW pdlg; + PAGESETUPDLGW curdlg; /* Current dialog state */ } PageSetupDataW; @@ -2930,6 +2931,30 @@ PRINTDLG_PS_WMCommandW( EndDialog(hDlg, FALSE); return FALSE ; + case rad1: + case rad2: + if((LOWORD(wParam) == rad1 && pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y) || + (LOWORD(wParam) == rad2 && pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x)) + { + WCHAR tmpText[25]; + WCHAR tmpText2[25]; + DWORD tmp = pda->curdlg.ptPaperSize.y; + + pda->curdlg.ptPaperSize.y = pda->curdlg.ptPaperSize.x; + pda->curdlg.ptPaperSize.x = tmp; + + GetDlgItemTextW(hDlg, edt4, tmpText, sizeof(tmpText)/sizeof(WCHAR)); + GetDlgItemTextW(hDlg, edt5, tmpText2, sizeof(tmpText2)/sizeof(WCHAR)); + SetDlgItemTextW(hDlg, edt5, tmpText); + SetDlgItemTextW(hDlg, edt4, tmpText2); + + GetDlgItemTextW(hDlg, edt6, tmpText, sizeof(tmpText)/sizeof(WCHAR)); + GetDlgItemTextW(hDlg, edt7, tmpText2, sizeof(tmpText2)/sizeof(WCHAR)); + SetDlgItemTextW(hDlg, edt7, tmpText); + SetDlgItemTextW(hDlg, edt6, tmpText2); + } + break; + case psh3: { pda->pdlg.Flags = 0; pda->pdlg.hwndOwner = hDlg; @@ -3283,6 +3308,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) if (uMsg==WM_INITDIALOG) { res = TRUE; pda = (PageSetupDataW*)lParam; + memcpy(&pda->curdlg, pda, sizeof(pda->curdlg)); SetPropW(hDlg, __WINE_PAGESETUPDLGDATA, pda); if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) { res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,(LPARAM)pda->dlga); @@ -3304,15 +3330,31 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hDlg, edt7), FALSE); } + PRINTDLG_PS_ChangePrinterW(hDlg,pda); + if(pda->dlga->hDevMode) { + WCHAR PaperName[64]; + dm = GlobalLock(pda->dlga->hDevMode); /* Landscape orientation */ if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE) CheckRadioButton(hDlg, rad1, rad2, rad2); else /* this is default if papersize is not set */ CheckRadioButton(hDlg, rad1, rad2, rad1); + + GetDlgItemTextW(hDlg, cmb2, PaperName, sizeof(PaperName)/sizeof(WCHAR)); + PRINTDLG_PaperSizeW(&pda->pdlg, PaperName, &pda->curdlg.ptPaperSize); + pda->curdlg.ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga, pda->curdlg.ptPaperSize.x); + pda->curdlg.ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga, pda->curdlg.ptPaperSize.y); GlobalUnlock(pda->dlga->hDevMode); + + if(IsDlgButtonChecked(hDlg, rad2)) + { + DWORD tmp = pda->curdlg.ptPaperSize.x; + pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y; + pda->curdlg.ptPaperSize.y = tmp; + } } if (pda->dlga->Flags & PSD_DISABLEORIENTATION) { @@ -3340,7 +3382,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) SetDlgItemTextW(hDlg,edt6,str); SetDlgItemTextW(hDlg,edt7,str); } - PRINTDLG_PS_ChangePrinterW(hDlg,pda); + if (pda->dlga->Flags & PSD_DISABLEPAPER) { EnableWindow(GetDlgItem(hDlg,cmb2),FALSE); EnableWindow(GetDlgItem(hDlg,cmb3),FALSE);
1
0
0
0
Alexander Nicolaysen Sørnes : comdlg32: PageSetupDlgA: Swap margins when changing orientation.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 74d99ac3ac913d3aa4d7d8e44bfbbc10ad6dd897 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74d99ac3ac913d3aa4d7d8e44…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sat Dec 8 14:16:41 2007 +0100 comdlg32: PageSetupDlgA: Swap margins when changing orientation. --- dlls/comdlg32/printdlg.c | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index 5baa90e..dcea25e 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -2791,21 +2791,30 @@ PRINTDLG_PS_WMCommandA( } return TRUE; case rad1: - if (pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y){ - DWORD tmp = pda->curdlg.ptPaperSize.x; - pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y; - pda->curdlg.ptPaperSize.y = tmp; - } - PRINTDLG_PS_ChangePaperPrev(pda); - break; case rad2: - if (pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x){ - DWORD tmp = pda->curdlg.ptPaperSize.x; - pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y; - pda->curdlg.ptPaperSize.y = tmp; - } + if((id == rad1 && pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y) || + (id == rad2 && pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x)) + { + char TmpText[25]; + char TmpText2[25]; + DWORD tmp = pda->curdlg.ptPaperSize.x; + + pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y; + pda->curdlg.ptPaperSize.y = tmp; + + GetDlgItemTextA(hDlg, edt4, TmpText, sizeof(TmpText)); + GetDlgItemTextA(hDlg, edt5, TmpText2, sizeof(TmpText2)); + SetDlgItemTextA(hDlg, edt5, TmpText); + SetDlgItemTextA(hDlg, edt4, TmpText2); + + GetDlgItemTextA(hDlg, edt6, TmpText, sizeof(TmpText)); + GetDlgItemTextA(hDlg, edt7, TmpText2, sizeof(TmpText2)); + SetDlgItemTextA(hDlg, edt7, TmpText); + SetDlgItemTextA(hDlg, edt6, TmpText2); + PRINTDLG_PS_ChangePaperPrev(pda); - break; + } + break; case cmb1: /* Printer combo */ if(msg == CBN_SELCHANGE){ char crPrinterName[256];
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
83
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200