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
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
January 2013
----- 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
2 participants
736 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Set _BrowseProperty to INSTALLDIR.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 166a7e993cb0033fac7ec2712c346558fb7bd100 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=166a7e993cb0033fac7ec2712…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 30 16:28:17 2013 +0100 msi: Set _BrowseProperty to INSTALLDIR. --- dlls/msi/package.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index f8f818d..db0ec25 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -749,6 +749,8 @@ static VOID set_installer_properties(MSIPACKAGE *package) static const WCHAR szPrintHoodFolder[] = {'P','r','i','n','t','H','o','o','d','F','o','l','d','e','r',0}; static const WCHAR szRecentFolder[] = {'R','e','c','e','n','t','F','o','l','d','e','r',0}; static const WCHAR szComputerName[] = {'C','o','m','p','u','t','e','r','N','a','m','e',0}; + static const WCHAR szBrowseProperty[] = {'_','B','r','o','w','s','e','P','r','o','p','e','r','t','y',0}; + static const WCHAR szInstallDir[] = {'I','N','S','T','A','L','L','D','I','R',0}; /* * Other things that probably should be set: @@ -1020,6 +1022,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) msi_free( computername ); } } + msi_set_property( package->db, szBrowseProperty, szInstallDir, -1 ); } static UINT msi_load_summary_properties( MSIPACKAGE *package )
1
0
0
0
Hans Leidekker : wbemprox: Build a PNP device ID that better matches the graphics card.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 71f0dd6044d6d01f5d274e7fadc425116fe73722 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71f0dd6044d6d01f5d274e7fa…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 30 16:27:22 2013 +0100 wbemprox: Build a PNP device ID that better matches the graphics card. --- dlls/wbemprox/builtin.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 699d051..d97ca67 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -343,7 +343,7 @@ static const struct column col_videocontroller[] = { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, - { prop_pnpdeviceidW, CIM_STRING } + { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC } }; static const WCHAR baseboard_manufacturerW[] = @@ -395,10 +395,6 @@ static const WCHAR sounddevice_productnameW[] = {'W','i','n','e',' ','A','u','d','i','o',' ','D','e','v','i','c','e',0}; static const WCHAR videocontroller_deviceidW[] = {'V','i','d','e','o','C','o','n','t','r','o','l','l','e','r','1',0}; -static const WCHAR videocontroller_pnpdeviceidW[] = - {'P','C','I','\\','V','E','N','_','1','0','0','2','&','D','E','V','_','6','7','1','8','&', - 'S','U','B','S','Y','S','_','2','2','0','1','1','4','5','8','&','R','E','V','_','0','0','\\', - '4','&','3','8','A','C','1','8','A','C','&','0','&','0','0','0','9',0}; #include "pshpack1.h" struct record_baseboard @@ -1206,6 +1202,19 @@ static UINT32 get_bits_per_pixel( UINT *hres, UINT *vres ) return ret; } +static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc ) +{ + static const WCHAR fmtW[] = + {'P','C','I','\\','V','E','N','_','%','0','4','X','&','D','E','V','_','%','0','4','X', + '&','S','U','B','S','Y','S','_','%','0','8','X','&','R','E','V','_','%','0','2','X','\\', + '0','&','D','E','A','D','B','E','E','F','&','0','&','D','E','A','D',0}; + WCHAR *ret; + + if (!(ret = heap_alloc( sizeof(fmtW) + 2 * sizeof(WCHAR) ))) return NULL; + sprintfW( ret, fmtW, desc->VendorId, desc->DeviceId, desc->SubSysId, desc->Revision ); + return ret; +} + static void fill_videocontroller( struct table *table ) { @@ -1241,7 +1250,7 @@ done: rec->description = heap_strdupW( name ); rec->device_id = videocontroller_deviceidW; rec->name = heap_strdupW( name ); - rec->pnpdevice_id = videocontroller_pnpdeviceidW; + rec->pnpdevice_id = get_pnpdeviceid( &desc ); TRACE("created 1 row\n"); table->num_rows = 1;
1
0
0
0
Hans Leidekker : msi: Avoid a crash in msi_dialog_handle_event.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 8df6708af44bdd4850cda3b1533c614bc586c1ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8df6708af44bdd4850cda3b15…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 30 16:27:54 2013 +0100 msi: Avoid a crash in msi_dialog_handle_event. --- dlls/msi/dialog.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 4d8564d..1e0e23e 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -692,7 +692,7 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control, else if ( !strcmpW( attribute, szProperty ) ) { MSIFEATURE *feature = msi_seltree_get_selected_feature( ctrl ); - msi_dialog_set_property( dialog->package, ctrl->property, feature->Directory ); + if (feature) msi_dialog_set_property( dialog->package, ctrl->property, feature->Directory ); } else if ( !strcmpW( attribute, szSelectionPath ) ) {
1
0
0
0
Huw Davies : riched20: Add a helper to retrieve the run text.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 27578f8bb61fa12cf949d26758b2d7285747e414 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27578f8bb61fa12cf949d2675…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jan 30 15:10:20 2013 +0000 riched20: Add a helper to retrieve the run text. --- dlls/riched20/caret.c | 2 +- dlls/riched20/editor.c | 34 +++++++++++++++++----------------- dlls/riched20/editor.h | 10 +++++++++- dlls/riched20/paint.c | 5 ++--- dlls/riched20/run.c | 48 +++++++++++++++++++++++++++--------------------- dlls/riched20/wrap.c | 2 +- dlls/riched20/writer.c | 8 ++++---- 7 files changed, 61 insertions(+), 48 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=27578f8bb61fa12cf949d…
1
0
0
0
Huw Davies : riched20: Add a helper to debug the run text.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: c17af77b5ce7be2067b8eb5c35d11e82f5408fb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c17af77b5ce7be2067b8eb5c3…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jan 30 15:10:19 2013 +0000 riched20: Add a helper to debug the run text. --- dlls/riched20/caret.c | 6 +++--- dlls/riched20/editor.h | 2 ++ dlls/riched20/list.c | 2 +- dlls/riched20/para.c | 2 +- dlls/riched20/run.c | 12 ++++++------ dlls/riched20/wrap.c | 8 ++++---- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index b7dcaf7..d2203e2 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -374,15 +374,15 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, nCharsToDelete is a number of chars to delete from THIS run */ nChars -= nCharsToDelete; shift -= nCharsToDelete; - TRACE("Deleting %d (remaning %d) chars at %d in '%s' (%d)\n", + TRACE("Deleting %d (remaning %d) chars at %d in %s (%d)\n", nCharsToDelete, nChars, c.nOffset, - debugstr_w(run->strText->szData), run->strText->nLen); + debugstr_run( run ), run->strText->nLen); /* nOfs is a character offset (from the start of the document to the current (deleted) run */ add_undo_insert_run( editor, nOfs + nChars, run->strText->szData + c.nOffset, nCharsToDelete, run->nFlags, run->style ); - TRACE("Post deletion string: %s (%d)\n", debugstr_w(run->strText->szData), run->strText->nLen); + TRACE("Post deletion string: %s (%d)\n", debugstr_run( run ), run->strText->nLen); TRACE("Shift value: %d\n", shift); ME_StrDeleteV(run->strText, c.nOffset, nCharsToDelete); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 87e6351..0dba15f 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -56,6 +56,8 @@ static inline void * __WINE_ALLOC_SIZE(2) heap_realloc( void *ptr, size_t len ) (fe).lindex=-1;\ }; +static inline const char *debugstr_run( const ME_Run *run ) { return debugstr_w( run->strText->szData ); } + /* style.c */ ME_Style *ME_MakeStyle(CHARFORMAT2W *style) DECLSPEC_HIDDEN; void ME_AddRefStyle(ME_Style *item) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/list.c b/dlls/riched20/list.c index 15e9194..ef07420 100644 --- a/dlls/riched20/list.c +++ b/dlls/riched20/list.c @@ -211,7 +211,7 @@ void ME_DumpDocument(ME_TextBuffer *buffer) TRACE(" - StartRow\n"); break; case diRun: - TRACE(" - Run(\"%s\", %d, flags=%x)\n", debugstr_w(pItem->member.run.strText->szData), + TRACE(" - Run(%s, %d, flags=%x)\n", debugstr_run( &pItem->member.run ), pItem->member.run.nCharOfs, pItem->member.run.nFlags); break; case diTextEnd: diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index c909358..2d572c9 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -410,7 +410,7 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, pTmp = ME_FindItemFwd(pTmp, diRunOrParagraphOrEnd); if (pTmp->type != diRun) break; - TRACE("shifting \"%s\" by %d (previous %d)\n", debugstr_w(pTmp->member.run.strText->szData), shift, pTmp->member.run.nCharOfs); + TRACE("shifting %s by %d (previous %d)\n", debugstr_run( &pTmp->member.run ), shift, pTmp->member.run.nCharOfs); pTmp->member.run.nCharOfs += shift; pTmp->member.run.para = &tp->member.para; } while(1); diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 0c594d3..3167c86 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -64,7 +64,7 @@ void ME_PropagateCharOffset(ME_DisplayItem *p, int shift) */ if (p->type == diRun) /* propagate in all runs in this para */ { - TRACE("PropagateCharOffset(%s, %d)\n", debugstr_w(p->member.run.strText->szData), shift); + TRACE("PropagateCharOffset(%s, %d)\n", debugstr_run( &p->member.run ), shift); do { p->member.run.nCharOfs += shift; assert(p->member.run.nCharOfs >= 0); @@ -121,9 +121,9 @@ void ME_CheckCharOffsets(ME_TextEditor *editor) ofs = 0; break; case diRun: - TRACE_(richedit_check)("run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt = \"%s\", flags=%08x, fx&mask = %08x\n", + TRACE_(richedit_check)("run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt = %s, flags=%08x, fx&mask = %08x\n", p->member.run.nCharOfs, p->member.run.nCharOfs+ofsp, ofsp+ofs, - p->member.run.strText->nLen, debugstr_w(p->member.run.strText->szData), + p->member.run.strText->nLen, debugstr_run( &p->member.run ), p->member.run.nFlags, p->member.run.style->fmt.dwMask & p->member.run.style->fmt.dwEffects); assert(ofs == p->member.run.nCharOfs); @@ -265,7 +265,7 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar run = &item->member.run; - TRACE("Before split: %s(%d, %d)\n", debugstr_w(run->strText->szData), + TRACE("Before split: %s(%d, %d)\n", debugstr_run( run ), run->pt.x, run->pt.y); ME_SplitRunSimple(editor, &cursor); @@ -283,8 +283,8 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar ME_CheckCharOffsets(editor); TRACE("After check after split\n"); TRACE("After split: %s(%d, %d), %s(%d, %d)\n", - debugstr_w(run->strText->szData), run->pt.x, run->pt.y, - debugstr_w(run2->strText->szData), run2->pt.x, run2->pt.y); + debugstr_run( run ), run->pt.x, run->pt.y, + debugstr_run( run2 ), run2->pt.x, run2->pt.y); } return cursor.pRun; diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 8ac14f9..b62d30b 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -189,7 +189,7 @@ static void ME_WrapEndParagraph(ME_WrapContext *wc, ME_DisplayItem *p) if (p->type == diRun) { ME_Run *run = &p->member.run; - TRACE("%s - (%d, %d)\n", debugstr_w(run->strText->szData), run->pt.x, run->pt.y); + TRACE("%s - (%d, %d)\n", debugstr_run(run), run->pt.x, run->pt.y); } p = p->next; } @@ -241,7 +241,7 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i /* this run is the end of spaces, so the run edge is a good point to split */ wc->pt = pp->member.run.pt; wc->bOverflown = TRUE; - TRACE("Split point is: %s|%s\n", debugstr_w(piter->member.run.strText->szData), debugstr_w(pp->member.run.strText->szData)); + TRACE("Split point is: %s|%s\n", debugstr_run( &piter->member.run ), debugstr_run( &pp->member.run )); return pp; } wc->pt = piter->member.run.pt; @@ -266,7 +266,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem if (pp) return pp; } - TRACE("Must backtrack to split at: %s\n", debugstr_w(p->member.run.strText->szData)); + TRACE("Must backtrack to split at: %s\n", debugstr_run( &p->member.run )); if (wc->pLastSplittableRun) { if (wc->pLastSplittableRun->member.run.nFlags & (MERF_GRAPHICS|MERF_TAB)) @@ -303,7 +303,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem return wc->pLastSplittableRun; } } - TRACE("Backtracking failed, trying desperate: %s\n", debugstr_w(p->member.run.strText->szData)); + TRACE("Backtracking failed, trying desperate: %s\n", debugstr_run( &p->member.run )); /* OK, no better idea, so assume we MAY split words if we can split at all*/ if (idesp) return ME_SplitRun(wc, piter, idesp);
1
0
0
0
Huw Davies : riched20: Add a paragraph ptr to each run.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 95938b7a10ce4f6e0fa1f2214ee53061e7df64b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95938b7a10ce4f6e0fa1f2214…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jan 30 15:10:18 2013 +0000 riched20: Add a paragraph ptr to each run. --- dlls/riched20/editstr.h | 1 + dlls/riched20/para.c | 10 +++++++--- dlls/riched20/run.c | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 0c49d30..49b461d 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -143,6 +143,7 @@ typedef struct tagME_Run { ME_String *strText; ME_Style *style; + struct tagME_Paragraph *para; /* ptr to the run's paragraph */ int nCharOfs; /* relative to para's offset */ int nWidth; /* width of full run, width of leading&trailing ws */ int nFlags; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 0539431..c909358 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -67,6 +67,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) eol_str = ME_MakeStringN(cr_lf, editor->bEmulateVersion10 ? 2 : 1); run = ME_MakeRun(style, eol_str, MERF_ENDPARA); run->member.run.nCharOfs = 0; + run->member.run.para = ¶->member.para; ME_InsertBefore(text->pLast, para); ME_InsertBefore(text->pLast, run); @@ -213,16 +214,17 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, } else { /* v1.0 - v3.0 */ assert(!(paraFlags & (MEPF_CELL|MEPF_ROWSTART|MEPF_ROWEND))); } - end_run = ME_MakeRun(style, eol_str, run_flags); - assert(run->type == diRun); run_para = ME_GetParagraph(run); assert(run_para->member.para.pFmt->cbSize == sizeof(PARAFORMAT2)); + end_run = ME_MakeRun(style, eol_str, run_flags); ofs = end_run->member.run.nCharOfs = run->member.run.nCharOfs; + end_run->member.run.para = run->member.run.para; + next_para = run_para->member.para.next_para; assert(next_para == ME_FindItemFwd(run_para, diParagraphOrEnd)); - + add_undo_join_paras( editor, run_para->member.para.nCharOfs + ofs ); /* Update selection cursors to point to the correct paragraph. */ @@ -238,6 +240,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, pp = run; while(pp->type == diRun) { pp->member.run.nCharOfs -= ofs; + pp->member.run.para = &new_para->member.para; pp = ME_FindItemFwd(pp, diRunOrParagraphOrEnd); } new_para->member.para.nCharOfs = run_para->member.para.nCharOfs + ofs; @@ -409,6 +412,7 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, break; TRACE("shifting \"%s\" by %d (previous %d)\n", debugstr_w(pTmp->member.run.strText->szData), shift, pTmp->member.run.nCharOfs); pTmp->member.run.nCharOfs += shift; + pTmp->member.run.para = &tp->member.para; } while(1); ME_Remove(pRun); diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 10c3da3..0c594d3 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -310,6 +310,7 @@ ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_Cursor *cursor) run->member.run.nFlags & MERF_SPLITMASK); new_run->member.run.nCharOfs = run->member.run.nCharOfs + nOffset; + new_run->member.run.para = run->member.run.para; cursor->pRun = new_run; cursor->nOffset = 0; @@ -341,6 +342,7 @@ ME_DisplayItem *ME_MakeRun(ME_Style *s, ME_String *strData, int nFlags) item->member.run.strText = strData; item->member.run.nFlags = nFlags; item->member.run.nCharOfs = -1; + item->member.run.para = NULL; ME_AddRefStyle(s); return item; } @@ -366,6 +368,7 @@ ME_InsertRunAtCursor(ME_TextEditor *editor, ME_Cursor *cursor, ME_Style *style, pDI = ME_MakeRun(style, ME_MakeStringN(str, len), flags); pDI->member.run.nCharOfs = cursor->pRun->member.run.nCharOfs; + pDI->member.run.para = cursor->pRun->member.run.para; ME_InsertBefore(cursor->pRun, pDI); TRACE("Shift length:%d\n", len); ME_PropagateCharOffset(cursor->pRun, len);
1
0
0
0
Ludger Sprenker : windowscodecs: Implement IPropertyBag2::Read.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 2ee3e8073fe5b5adc2b48f382eec50c21550fdbb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ee3e8073fe5b5adc2b48f382…
Author: Ludger Sprenker <ludger(a)sprenker.net> Date: Fri Jan 25 00:05:15 2013 +0100 windowscodecs: Implement IPropertyBag2::Read. --- dlls/windowscodecs/propertybag.c | 32 ++++++++++++++++++++++++++++++-- dlls/windowscodecs/tests/propertybag.c | 1 - 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index f5729af..02914ec 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -128,8 +128,36 @@ static LONG find_item(PropertyBag *This, LPCOLESTR name) static HRESULT WINAPI PropertyBag_Read(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, IErrorLog *pErrLog, VARIANT *pvarValue, HRESULT *phrError) { - FIXME("(%p,%u,%p,%p,%p,%p): stub\n", iface, cProperties, pPropBag, pErrLog, pvarValue, phrError); - return E_NOTIMPL; + HRESULT res = S_OK; + ULONG i; + PropertyBag *This = impl_from_IPropertyBag2(iface); + + TRACE("(%p,%u,%p,%p,%p,%p)\n", iface, cProperties, pPropBag, pErrLog, pvarValue, phrError); + + for (i=0; i < cProperties; i++) + { + LONG idx; + if (pPropBag[i].dwHint && pPropBag[i].dwHint <= This->prop_count) + idx = pPropBag[i].dwHint-1; + else + idx = find_item(This, pPropBag[i].pstrName); + + if (idx > -1) + { + VariantInit(pvarValue+i); + res = VariantCopy(pvarValue+i, This->values+idx); + if (FAILED(res)) + break; + phrError[i] = res; + } + else + { + res = E_FAIL; + break; + } + } + + return res; } static HRESULT WINAPI PropertyBag_Write(IPropertyBag2 *iface, ULONG cProperties, diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c index aa62c8c..b3cf191 100644 --- a/dlls/windowscodecs/tests/propertybag.c +++ b/dlls/windowscodecs/tests/propertybag.c @@ -271,7 +271,6 @@ static void test_filled_propertybag(void) test_propertybag_write(property); -todo_wine test_propertybag_read(property); IPropertyBag2_Release(property);
1
0
0
0
Ludger Sprenker : windowscodecs: Implement IPropertyBag2::Write.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: d27fe13ffb643a5e0bc1360f1230d756ab976003 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d27fe13ffb643a5e0bc1360f1…
Author: Ludger Sprenker <ludger(a)sprenker.net> Date: Fri Jan 25 00:05:08 2013 +0100 windowscodecs: Implement IPropertyBag2::Write. --- dlls/windowscodecs/propertybag.c | 63 ++++++++++++++++++++++++++++++-- dlls/windowscodecs/tests/propertybag.c | 1 - 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index 077c600..f5729af 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -40,6 +40,7 @@ typedef struct PropertyBag { LONG ref; UINT prop_count; PROPBAG2 *properties; + VARIANT *values; } PropertyBag; static inline PropertyBag *impl_from_IPropertyBag2(IPropertyBag2 *iface) @@ -90,21 +91,40 @@ static ULONG WINAPI PropertyBag_Release(IPropertyBag2 *iface) if (ref == 0) { ULONG i; - if (This->properties) + if (This->properties && This->values) { for (i=0; i < This->prop_count; i++) { HeapFree(GetProcessHeap(), 0, This->properties[i].pstrName); + VariantClear( This->values+i ); } } HeapFree(GetProcessHeap(), 0, This->properties); + HeapFree(GetProcessHeap(), 0, This->values); HeapFree(GetProcessHeap(), 0, This); } return ref; } +static LONG find_item(PropertyBag *This, LPCOLESTR name) +{ + LONG i; + if (!This->properties) + return -1; + if (!name) + return -1; + + for (i=0; i < This->prop_count; i++) + { + if (strcmpW(name, This->properties[i].pstrName) == 0) + return i; + } + + return -1; +} + static HRESULT WINAPI PropertyBag_Read(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, IErrorLog *pErrLog, VARIANT *pvarValue, HRESULT *phrError) { @@ -115,8 +135,41 @@ static HRESULT WINAPI PropertyBag_Read(IPropertyBag2 *iface, ULONG cProperties, static HRESULT WINAPI PropertyBag_Write(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, VARIANT *pvarValue) { - FIXME("(%p,%u,%p,%p): stub\n", iface, cProperties, pPropBag, pvarValue); - return E_NOTIMPL; + HRESULT res = S_OK; + ULONG i; + PropertyBag *This = impl_from_IPropertyBag2(iface); + + TRACE("(%p,%u,%p,%p)\n", iface, cProperties, pPropBag, pvarValue); + + for (i=0; i < cProperties; i++) + { + LONG idx; + if (pPropBag[i].dwHint && pPropBag[i].dwHint <= This->prop_count) + idx = pPropBag[i].dwHint-1; + else + idx = find_item(This, pPropBag[i].pstrName); + + if (idx > -1) + { + if (This->properties[idx].vt != V_VT(pvarValue+i)) + return WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE; + res = VariantCopy(This->values+idx, pvarValue+i); + if (FAILED(res)) + return E_FAIL; + } + else + { + if (pPropBag[i].pstrName) + FIXME("Application tried to set the unknown option %s.\n", + debugstr_w(pPropBag[i].pstrName)); + + /* FIXME: Function is not atomar on error, but MSDN does not say anything about it + * (no reset of items between 0 and i-1) */ + return E_FAIL; + } + } + + return res; } static HRESULT WINAPI PropertyBag_CountProperties(IPropertyBag2 *iface, ULONG *pcProperties) @@ -219,12 +272,14 @@ HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, if (count == 0) { This->properties = NULL; + This->values = NULL; } else { This->properties = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PROPBAG2)*count); + This->values = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(VARIANT)*count); - if (!This->properties) + if (!This->properties || !This->values) res = E_OUTOFMEMORY; else for (i=0; i < count; i++) diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c index 7115f65..aa62c8c 100644 --- a/dlls/windowscodecs/tests/propertybag.c +++ b/dlls/windowscodecs/tests/propertybag.c @@ -269,7 +269,6 @@ static void test_filled_propertybag(void) test_propertybag_getpropertyinfo(property, 2); -todo_wine test_propertybag_write(property); todo_wine
1
0
0
0
Ludger Sprenker : windowscodecs: Implement IPropertyBag2::GetPropertyInfo.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 987c81bae56601efaf98f81c79892373bfffdba4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=987c81bae56601efaf98f81c7…
Author: Ludger Sprenker <ludger(a)sprenker.net> Date: Fri Jan 25 00:04:55 2013 +0100 windowscodecs: Implement IPropertyBag2::GetPropertyInfo. --- dlls/windowscodecs/propertybag.c | 92 ++++++++++++++++++++++++++++++-- dlls/windowscodecs/tests/propertybag.c | 2 - 2 files changed, 88 insertions(+), 6 deletions(-) diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index f95e7eb..077c600 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -27,6 +27,7 @@ #include "winbase.h" #include "objbase.h" #include "wincodec.h" +#include "wine/unicode.h" #include "wincodecs_private.h" @@ -38,6 +39,7 @@ typedef struct PropertyBag { IPropertyBag2 IPropertyBag2_iface; LONG ref; UINT prop_count; + PROPBAG2 *properties; } PropertyBag; static inline PropertyBag *impl_from_IPropertyBag2(IPropertyBag2 *iface) @@ -87,6 +89,16 @@ static ULONG WINAPI PropertyBag_Release(IPropertyBag2 *iface) if (ref == 0) { + ULONG i; + if (This->properties) + { + for (i=0; i < This->prop_count; i++) + { + HeapFree(GetProcessHeap(), 0, This->properties[i].pstrName); + } + } + + HeapFree(GetProcessHeap(), 0, This->properties); HeapFree(GetProcessHeap(), 0, This); } @@ -121,11 +133,55 @@ static HRESULT WINAPI PropertyBag_CountProperties(IPropertyBag2 *iface, ULONG *p return S_OK; } +static HRESULT copy_propbag2(PROPBAG2 *dest, PROPBAG2 *src, BOOL useCoAlloc) +{ + dest->cfType = src->cfType; + dest->clsid = src->clsid; + dest->dwHint = src->dwHint; + dest->dwType = src->dwType; + dest->vt = src->vt; + if(useCoAlloc) + dest->pstrName = CoTaskMemAlloc((strlenW(src->pstrName)+1) * sizeof(WCHAR)); + else + dest->pstrName = HeapAlloc(GetProcessHeap(), 0, (strlenW(src->pstrName)+1) * sizeof(WCHAR)); + + if(!dest->pstrName) + return E_OUTOFMEMORY; + + strcpyW(dest->pstrName, src->pstrName); + + return S_OK; +} + static HRESULT WINAPI PropertyBag_GetPropertyInfo(IPropertyBag2 *iface, ULONG iProperty, ULONG cProperties, PROPBAG2 *pPropBag, ULONG *pcProperties) { - FIXME("(%p,%u,%u,%p,%p): stub\n", iface, iProperty, cProperties, pPropBag, pcProperties); - return E_NOTIMPL; + HRESULT res = S_OK; + ULONG i; + PropertyBag *This = impl_from_IPropertyBag2(iface); + + TRACE("(%p,%u,%u,%p,%p)\n", iface, iProperty, cProperties, pPropBag, pcProperties); + + if (iProperty >= This->prop_count && iProperty > 0) + return WINCODEC_ERR_VALUEOUTOFRANGE; + if (iProperty+cProperties > This->prop_count ) + return WINCODEC_ERR_VALUEOUTOFRANGE; + + *pcProperties = max(cProperties, This->prop_count-iProperty); + + for (i=0; i < *pcProperties; i++) + { + res = copy_propbag2(pPropBag+i, This->properties+iProperty+i, TRUE); + if (FAILED(res)) + { + do { + CoTaskMemFree( pPropBag[--i].pstrName ); + } while (i); + break; + } + } + + return res; } static HRESULT WINAPI PropertyBag_LoadObject(IPropertyBag2 *iface, LPCOLESTR pstrName, @@ -149,6 +205,8 @@ static const IPropertyBag2Vtbl PropertyBag_Vtbl = { HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, IPropertyBag2 **ppPropertyBag2) { + UINT i; + HRESULT res = S_OK; PropertyBag *This; This = HeapAlloc(GetProcessHeap(), 0, sizeof(PropertyBag)); @@ -158,7 +216,33 @@ HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, This->ref = 1; This->prop_count = count; - *ppPropertyBag2 = &This->IPropertyBag2_iface; + if (count == 0) + { + This->properties = NULL; + } + else + { + This->properties = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PROPBAG2)*count); + + if (!This->properties) + res = E_OUTOFMEMORY; + else + for (i=0; i < count; i++) + { + res = copy_propbag2(This->properties+i, options+i, FALSE); + if (FAILED(res)) + break; + This->properties[i].dwHint = i+1; /* 0 means unset, so we start with 1 */ + } + } - return S_OK; + if (FAILED(res)) + { + PropertyBag_Release(&This->IPropertyBag2_iface); + *ppPropertyBag2 = NULL; + } + else + *ppPropertyBag2 = &This->IPropertyBag2_iface; + + return res; } diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c index 83141a2..7115f65 100644 --- a/dlls/windowscodecs/tests/propertybag.c +++ b/dlls/windowscodecs/tests/propertybag.c @@ -239,7 +239,6 @@ static void test_empty_propertybag(void) test_propertybag_countproperties(property, 0); -todo_wine test_propertybag_getpropertyinfo(property, 0); IPropertyBag2_Release(property); @@ -268,7 +267,6 @@ static void test_filled_propertybag(void) test_propertybag_countproperties(property, 2); -todo_wine test_propertybag_getpropertyinfo(property, 2); todo_wine
1
0
0
0
Ludger Sprenker : windowscodecs: Implement IPropertyBag2::CountProperties.
by Alexandre Julliard
30 Jan '13
30 Jan '13
Module: wine Branch: master Commit: 71bd7fdf7745c2524e221c99be155df587a270a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71bd7fdf7745c2524e221c99b…
Author: Ludger Sprenker <Ludger(a)sprenker.net> Date: Wed Jan 23 23:35:19 2013 +0100 windowscodecs: Implement IPropertyBag2::CountProperties. --- dlls/windowscodecs/propertybag.c | 14 ++++++++++++-- dlls/windowscodecs/tests/propertybag.c | 2 -- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index 1c90b15..f95e7eb 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); typedef struct PropertyBag { IPropertyBag2 IPropertyBag2_iface; LONG ref; + UINT prop_count; } PropertyBag; static inline PropertyBag *impl_from_IPropertyBag2(IPropertyBag2 *iface) @@ -108,8 +109,16 @@ static HRESULT WINAPI PropertyBag_Write(IPropertyBag2 *iface, ULONG cProperties, static HRESULT WINAPI PropertyBag_CountProperties(IPropertyBag2 *iface, ULONG *pcProperties) { - FIXME("(%p,%p): stub\n", iface, pcProperties); - return E_NOTIMPL; + PropertyBag *This = impl_from_IPropertyBag2(iface); + + TRACE("(%p,%p)\n", iface, pcProperties); + + if (!pcProperties) + return E_INVALIDARG; + + *pcProperties = This->prop_count; + + return S_OK; } static HRESULT WINAPI PropertyBag_GetPropertyInfo(IPropertyBag2 *iface, ULONG iProperty, @@ -147,6 +156,7 @@ HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, This->IPropertyBag2_iface.lpVtbl = &PropertyBag_Vtbl; This->ref = 1; + This->prop_count = count; *ppPropertyBag2 = &This->IPropertyBag2_iface; diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c index d5ac809..83141a2 100644 --- a/dlls/windowscodecs/tests/propertybag.c +++ b/dlls/windowscodecs/tests/propertybag.c @@ -237,7 +237,6 @@ static void test_empty_propertybag(void) ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr); if (FAILED(hr)) return; -todo_wine test_propertybag_countproperties(property, 0); todo_wine @@ -267,7 +266,6 @@ static void test_filled_propertybag(void) ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr); if (FAILED(hr)) return; -todo_wine test_propertybag_countproperties(property, 2); todo_wine
1
0
0
0
← Newer
1
2
3
4
5
6
...
74
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
Results per page:
10
25
50
100
200