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
October 2020
----- 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
1 participants
796 discussions
Start a n
N
ew thread
Huw Davies : riched20: Use cell ptrs in the wrapping functions.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 2809ac2b78c426a35d0a15d871f3f0443eed4c6d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2809ac2b78c426a35d0a15d8…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 23 10:25:03 2020 +0100 riched20: Use cell ptrs in the wrapping functions. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/wrap.c | 105 +++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 4f6eb82cea7..046a7fd5423 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -185,6 +185,8 @@ static ME_DisplayItem *ME_MakeRow(int height, int baseline, int width) static void ME_BeginRow(ME_WrapContext *wc) { + ME_Cell *cell; + wc->pRowStart = NULL; wc->bOverflown = FALSE; wc->pLastSplittableRun = NULL; @@ -195,19 +197,18 @@ static void ME_BeginRow(ME_WrapContext *wc) wc->bWordWrap = FALSE; if (wc->para->nFlags & MEPF_ROWEND) { - ME_Cell *cell = &ME_FindItemBack( para_get_di( wc->para ), diCell)->member.cell; + cell = table_row_end_cell( wc->para ); cell->nWidth = 0; } } - else if (wc->para->pCell) + else if (para_cell( wc->para )) { - ME_Cell *cell = &wc->para->pCell->member.cell; int width; + cell = para_cell( wc->para ); width = cell->nRightBoundary; - if (cell->prev_cell) - width -= cell->prev_cell->member.cell.nRightBoundary; - if (!cell->prev_cell) + if (cell_prev( cell )) width -= cell_prev( cell )->nRightBoundary; + else { int rowIndent = table_row_end( wc->para )->fmt.dxStartIndent; width -= rowIndent; @@ -217,13 +218,14 @@ static void ME_BeginRow(ME_WrapContext *wc) wc->nAvailWidth = cell->nWidth - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; wc->bWordWrap = TRUE; - } else { + } + else wc->nAvailWidth = wc->context->nAvailWidth - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; - } + wc->pt.x = wc->context->pt.x; if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ - wc->para->fmt.dwMask & PFM_TABLE && wc->para->fmt.wEffects & PFE_TABLE) + para_in_table( wc->para )) /* Shift the text down because of the border. */ wc->pt.y++; } @@ -843,7 +845,7 @@ static void ME_WrapTextParagraph( ME_TextEditor *editor, ME_Context *c, ME_Parag else { int dxStartIndent = para->fmt.dxStartIndent; - if (para->pCell) dxStartIndent += table_row_end( para )->fmt.dxOffset; + if (para_cell( wc.para )) dxStartIndent += table_row_end( para )->fmt.dxOffset; wc.nLeftMargin = ME_twips2pointsX( c, dxStartIndent + para->fmt.dxOffset ); wc.nFirstMargin = ME_twips2pointsX( c, dxStartIndent ); @@ -916,33 +918,36 @@ static void update_repaint( ME_Paragraph *para, struct repaint_range *repaint ) static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_range *repaint ) { + ME_Cell *cell; + if (para->nFlags & MEPF_ROWSTART) { - ME_DisplayItem *cell = ME_FindItemFwd( para_get_di( para ), diCell); ME_Paragraph *end_row_para = table_row_end( para ); int borderWidth = 0; - cell->member.cell.pt = c->pt; + + cell = table_row_first_cell( para ); + cell->pt = c->pt; /* Offset the text by the largest top border width. */ - while (cell->member.cell.next_cell) + while (cell_next( cell )) { - borderWidth = max(borderWidth, cell->member.cell.border.top.width); - cell = cell->member.cell.next_cell; + borderWidth = max( borderWidth, cell->border.top.width ); + cell = cell_next( cell ); } if (borderWidth > 0) { borderWidth = max(ME_twips2pointsY(c, borderWidth), 1); while (cell) { - cell->member.cell.yTextOffset = borderWidth; - cell = cell->member.cell.prev_cell; + cell->yTextOffset = borderWidth; + cell = cell_prev( cell ); } c->pt.y += borderWidth; } if (end_row_para->fmt.dxStartIndent > 0) { - cell = ME_FindItemFwd( para_get_di( para ), diCell); - cell->member.cell.pt.x += ME_twips2pointsX( c, end_row_para->fmt.dxStartIndent ); - c->pt.x = cell->member.cell.pt.x; + cell = table_row_first_cell( para ); + cell->pt.x += ME_twips2pointsX( c, end_row_para->fmt.dxStartIndent ); + c->pt.x = cell->pt.x; } } else if (para->nFlags & MEPF_ROWEND) @@ -950,74 +955,66 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran /* Set all the cells to the height of the largest cell */ ME_Paragraph *start_row_para = table_row_start( para ); int prevHeight, nHeight, bottomBorder = 0; - ME_DisplayItem *cell = ME_FindItemBack( para_get_di( para ), diCell ); - para->nWidth = cell->member.cell.pt.x + cell->member.cell.nWidth; + + cell = table_row_end_cell( para ); + para->nWidth = cell->pt.x + cell->nWidth; if (!(para_next( para )->nFlags & MEPF_ROWSTART)) { /* Last row, the bottom border is added to the height. */ - cell = cell->member.cell.prev_cell; - while (cell) - { - bottomBorder = max(bottomBorder, cell->member.cell.border.bottom.width); - cell = cell->member.cell.prev_cell; - } + while ((cell = cell_prev( cell ))) + bottomBorder = max( bottomBorder, cell->border.bottom.width ); + bottomBorder = ME_twips2pointsY(c, bottomBorder); - cell = ME_FindItemBack( para_get_di( para ), diCell ); + cell = table_row_end_cell( para ); } - prevHeight = cell->member.cell.nHeight; - nHeight = cell->member.cell.prev_cell->member.cell.nHeight + bottomBorder; - cell->member.cell.nHeight = nHeight; + prevHeight = cell->nHeight; + nHeight = cell_prev( cell )->nHeight + bottomBorder; + cell->nHeight = nHeight; para->nHeight = nHeight; - cell = cell->member.cell.prev_cell; - cell->member.cell.nHeight = nHeight; - while (cell->member.cell.prev_cell) + while (cell_prev( cell )) { - cell = cell->member.cell.prev_cell; - cell->member.cell.nHeight = nHeight; + cell = cell_prev( cell ); + cell->nHeight = nHeight; } + /* Also set the height of the start row paragraph */ start_row_para->nHeight = nHeight; c->pt.x = start_row_para->pt.x; - c->pt.y = cell->member.cell.pt.y + nHeight; + c->pt.y = cell->pt.y + nHeight; if (prevHeight < nHeight) { /* The height of the cells has grown, so invalidate the bottom of * the cells. */ update_repaint( para, repaint ); - cell = ME_FindItemBack( para_get_di( para ), diCell ); + cell = cell_prev( table_row_end_cell( para ) ); while (cell) { - update_repaint( &ME_FindItemBack(cell, diParagraph)->member.para, repaint ); - cell = cell->member.cell.prev_cell; + update_repaint( cell_end_para( cell ), repaint ); + cell = cell_prev( cell ); } } } - else if (para->pCell && para->pCell != para_next( para )->pCell) + else if ((cell = para_cell( para )) && para == cell_end_para( cell )) { /* The next paragraph is in the next cell in the table row. */ - ME_Cell *cell = ¶->pCell->member.cell; cell->nHeight = c->pt.y + para->nHeight - cell->pt.y; /* Propagate the largest height to the end so that it can be easily * sent back to all the cells at the end of the row. */ - if (cell->prev_cell) - cell->nHeight = max(cell->nHeight, cell->prev_cell->member.cell.nHeight); + if (cell_prev( cell )) + cell->nHeight = max( cell->nHeight, cell_prev( cell )->nHeight ); c->pt.x = cell->pt.x + cell->nWidth; c->pt.y = cell->pt.y; - cell->next_cell->member.cell.pt = c->pt; - if (!(para->next_para->member.para.nFlags & MEPF_ROWEND)) + cell_next( cell )->pt = c->pt; + if (!(para_next( para )->nFlags & MEPF_ROWEND)) c->pt.y += cell->yTextOffset; } else { - if (para->pCell) - { - /* Next paragraph in the same cell. */ - c->pt.x = para->pCell->member.cell.pt.x; - } - else - /* Normal paragraph */ + if ((cell = para_cell( para ))) /* Next paragraph in the same cell. */ + c->pt.x = cell->pt.x; + else /* Normal paragraph */ c->pt.x = 0; c->pt.y += para->nHeight; }
1
0
0
0
Huw Davies : riched20: Use cell and para ptrs in the table border drawing function.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: ff23a6d79290a5d0f689af2b8dca98d868665dcf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ff23a6d79290a5d0f689af2b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 23 10:25:02 2020 +0100 riched20: Use cell and para ptrs in the table border drawing function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/paint.c | 84 +++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 30c0d7f57fd..42f370c857c 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -689,30 +689,31 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT } } -static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) +static void draw_table_borders( ME_Context *c, ME_Paragraph *para ) { if (!c->editor->bEmulateVersion10) /* v4.1 */ { - if (para->pCell) + if (para_cell( para )) { RECT rc; - ME_Cell *cell = ¶->pCell->member.cell; - ME_DisplayItem *paraAfterRow; + ME_Cell *cell = para_cell( para ); + ME_Paragraph *after_row; HPEN pen, oldPen; LOGBRUSH logBrush; HBRUSH brush; COLORREF color; POINT oldPt; int width; - BOOL atTop = (para->pCell != para->prev_para->member.para.pCell); - BOOL atBottom = (para->pCell != para->next_para->member.para.pCell); + BOOL atTop = (para == cell_first_para( cell )); + BOOL atBottom = (para == cell_end_para( cell )); int top = c->pt.y + (atTop ? cell->pt.y : para->pt.y); int bottom = (atBottom ? c->pt.y + cell->pt.y + cell->nHeight : top + para->nHeight + (atTop ? cell->yTextOffset : 0)); rc.left = c->pt.x + cell->pt.x; rc.right = rc.left + cell->nWidth; - if (atTop) { + if (atTop) + { /* Erase gap before text if not all borders are the same height. */ width = max(ME_twips2pointsY(c, cell->border.top.width), 1); rc.top = top + width; @@ -725,14 +726,17 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) * The order borders are draw in is left, top, bottom, right in order * to be consistent with native richedit. This is noticeable from the * overlap of borders of different colours. */ - if (!(para->nFlags & MEPF_ROWEND)) { + if (!(para->nFlags & MEPF_ROWEND)) + { rc.top = top; rc.bottom = bottom; if (cell->border.left.width > 0) { color = cell->border.left.colorRef; width = max(ME_twips2pointsX(c, cell->border.left.width), 1); - } else { + } + else + { color = RGB(192,192,192); width = 1; } @@ -749,12 +753,15 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) MoveToEx(c->hDC, oldPt.x, oldPt.y, NULL); } - if (atTop) { + if (atTop) + { if (cell->border.top.width > 0) { brush = CreateSolidBrush(cell->border.top.colorRef); width = max(ME_twips2pointsY(c, cell->border.top.width), 1); - } else { + } + else + { brush = GetStockObject(LTGRAY_BRUSH); width = 1; } @@ -767,29 +774,24 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) /* Draw the bottom border if at the last paragraph in the cell, and when * in the last row of the table. */ - if (atBottom) { + if (atBottom) + { int oldLeft = rc.left; width = max(ME_twips2pointsY(c, cell->border.bottom.width), 1); - paraAfterRow = table_row_end( para )->next_para; - if (paraAfterRow->member.para.nFlags & MEPF_ROWSTART) { - ME_DisplayItem *nextEndCell; - nextEndCell = ME_FindItemBack( para_get_di( table_row_end( ¶AfterRow->member.para ) ), diCell ); - assert(nextEndCell && !nextEndCell->member.cell.next_cell); - rc.left = c->pt.x + nextEndCell->member.cell.pt.x; - /* FIXME: Native draws FROM the bottom of the table rather than - * TO the bottom of the table in this case, but just doing so here - * will cause the next row to erase the border. */ - /* - rc.top = bottom; - rc.bottom = rc.top + width; - */ + after_row = para_next( table_row_end( para ) ); + if (after_row->nFlags & MEPF_ROWSTART) + { + ME_Cell *next_end; + next_end = table_row_end_cell( after_row ); + assert( next_end && !cell_next( next_end ) ); + rc.left = c->pt.x + next_end->pt.x; } - if (rc.left < rc.right) { - if (cell->border.bottom.width > 0) { + if (rc.left < rc.right) + { + if (cell->border.bottom.width > 0) brush = CreateSolidBrush(cell->border.bottom.colorRef); - } else { + else brush = GetStockObject(LTGRAY_BRUSH); - } rc.bottom = bottom; rc.top = rc.bottom - width; FillRect(c->hDC, &rc, brush); @@ -800,15 +802,17 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) } /* Right border only drawn if at the end of the table row. */ - if (!cell->next_cell->member.cell.next_cell && - !(para->nFlags & MEPF_ROWSTART)) + if (!cell_next( cell_next( cell ) ) && !(para->nFlags & MEPF_ROWSTART)) { rc.top = top; rc.bottom = bottom; - if (cell->border.right.width > 0) { + if (cell->border.right.width > 0) + { color = cell->border.right.colorRef; width = max(ME_twips2pointsX(c, cell->border.right.width), 1); - } else { + } + else + { color = RGB(192,192,192); width = 1; } @@ -825,13 +829,15 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) MoveToEx(c->hDC, oldPt.x, oldPt.y, NULL); } } - } else { /* v1.0 - 3.0 */ + } + else /* v1.0 - 3.0 */ + { /* Draw simple table border */ - if (para->fmt.dwMask & PFM_TABLE && para->fmt.wEffects & PFE_TABLE) { + if (para_in_table( para )) + { HPEN pen = NULL, oldpen = NULL; int i, firstX, startX, endX, rowY, rowBottom, nHeight; POINT oldPt; - PARAFORMAT2 *pNextFmt; pen = CreatePen(PS_SOLID, 0, para->border.top.colorRef); oldpen = SelectObject(c->hDC, pen); @@ -853,11 +859,9 @@ static void ME_DrawTableBorders( ME_Context *c, ME_Paragraph *para ) i = para->fmt.cTabCount - 1; endX = startX + ME_twips2pointsX(c, para->fmt.rgxTabs[i] & 0x00ffffff) + 1; LineTo(c->hDC, endX, rowY); - pNextFmt = ¶->next_para->member.para.fmt; /* The bottom of the row only needs to be drawn if the next row is * not a table. */ - if (!(pNextFmt && pNextFmt->dwMask & PFM_TABLE && pNextFmt->wEffects && - para->nRows == 1)) + if (!(para_next( para ) && para_in_table( para_next( para ) ) && para->nRows == 1)) { /* Decrement rowBottom to draw the bottom line within the row, and * to not draw over this line when drawing the vertical lines. */ @@ -1026,7 +1030,7 @@ static void draw_paragraph( ME_Context *c, ME_Paragraph *para ) no++; } - ME_DrawTableBorders( c, para ); + draw_table_borders( c, para ); draw_para_number( c, para ); SetTextAlign(c->hDC, align);
1
0
0
0
Michael Stefaniuc : inetcomm: Use wide-char string literals.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 33ab097d6de5d5bd318ce15db9f04658b1cccafc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=33ab097d6de5d5bd318ce15d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Oct 23 11:20:01 2020 +0200 inetcomm: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/internettransport.c | 2 +- dlls/inetcomm/tests/mimeintl.c | 2 +- dlls/inetcomm/tests/mimeole.c | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/inetcomm/internettransport.c b/dlls/inetcomm/internettransport.c index dcce0d9df17..f7060abe9e7 100644 --- a/dlls/inetcomm/internettransport.c +++ b/dlls/inetcomm/internettransport.c @@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); -static const WCHAR wszClassName[] = {'T','h','o','r','C','o','n','n','W','n','d','C','l','a','s','s',0}; +static const WCHAR wszClassName[] = L"ThorConnWndClass"; #define IX_READ (WM_USER + 0) #define IX_READLINE (WM_USER + 1) diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c index 09f9dae8d8c..11ec68d3223 100644 --- a/dlls/inetcomm/tests/mimeintl.c +++ b/dlls/inetcomm/tests/mimeintl.c @@ -235,7 +235,7 @@ static void test_convert(void) ULONG read; PROPVARIANT prop_in, prop_out; static char test_string[] = "test string"; - static WCHAR test_stringW[] = {'t','e','s','t',' ','s','t','r','i','n','g',0}; + static WCHAR test_stringW[] = L"test string"; hr = MimeOleGetInternat(&internat); ok(hr == S_OK, "ret %08x\n", hr); diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c index afd25af015c..04edd3773fd 100644 --- a/dlls/inetcomm/tests/mimeole.c +++ b/dlls/inetcomm/tests/mimeole.c @@ -826,7 +826,6 @@ static void test_mhtml_message(void) static void test_MessageSetProp(void) { static const char topic[] = "wine topic"; - static const WCHAR topicW[] = {'w','i','n','e',' ','t','o','p','i','c',0}; HRESULT hr; IMimeMessage *msg; IMimeBody *body; @@ -906,7 +905,7 @@ static void test_MessageSetProp(void) if(hr == S_OK) { ok(prop.vt == VT_LPWSTR, "type %d\n", prop.vt); - ok(!lstrcmpW(prop.u.pwszVal, topicW), "got %s\n", wine_dbgstr_w(prop.u.pwszVal)); + ok(!lstrcmpW(prop.u.pwszVal, L"wine topic"), "got %s\n", wine_dbgstr_w(prop.u.pwszVal)); PropVariantClear(&prop); } @@ -1488,8 +1487,6 @@ static void test_mhtml_protocol_info(void) unsigned i, exlen; HRESULT hres; - static const WCHAR http_url[] = {'h','t','t','p',':','/','/','t','e','s','t','.','o','r','g',0}; - hres = CoCreateInstance(&CLSID_IMimeHtmlProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocolInfo, (void**)&protocol_info); ok(hres == S_OK, "Could not create protocol info: %08x\n", hres); @@ -1516,8 +1513,9 @@ static void test_mhtml_protocol_info(void) } } - hres = IInternetProtocolInfo_CombineUrl(protocol_info, http_url, http_url, ICU_BROWSER_MODE, - combined_url, ARRAY_SIZE(combined_url), &combined_len, 0); + hres = IInternetProtocolInfo_CombineUrl(protocol_info, L"
http://test.org
", L"
http://test.org
", + ICU_BROWSER_MODE, combined_url, ARRAY_SIZE(combined_url), + &combined_len, 0); ok(hres == E_FAIL, "CombineUrl failed: %08x\n", hres); IInternetProtocolInfo_Release(protocol_info);
1
0
0
0
Michael Stefaniuc : inetcomm: Zero terminate the mhtml WCHAR strings.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 87fc5320d68ec4f1624388435ac5db76010932c5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=87fc5320d68ec4f162438843…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Oct 23 11:20:00 2020 +0200 inetcomm: Zero terminate the mhtml WCHAR strings. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/mimeole.c | 8 +++----- dlls/inetcomm/protocol.c | 27 +++++++++++++-------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index eda9a911bbf..74c5c670d15 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -3697,8 +3697,6 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx size_t len; HRESULT hres; - static const WCHAR mhtml_prefixW[] = {'m','h','t','m','l',':'}; - WARN("(0x%08x, %p, %p, %s, %p, %p) semi-stub\n", bindf, moniker, binding, debugstr_guid(riid), out, moniker_new); if(!IsEqualGUID(&IID_IUnknown, riid)) { @@ -3713,12 +3711,12 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx TRACE("display name %s\n", debugstr_w(display_name)); len = lstrlenW(display_name); - mhtml_url = heap_alloc((len+1)*sizeof(WCHAR) + sizeof(mhtml_prefixW)); + mhtml_url = heap_alloc(len*sizeof(WCHAR) + sizeof(L"mhtml:")); if(!mhtml_url) return E_OUTOFMEMORY; - memcpy(mhtml_url, mhtml_prefixW, sizeof(mhtml_prefixW)); - lstrcpyW(mhtml_url + ARRAY_SIZE(mhtml_prefixW), display_name); + lstrcpyW(mhtml_url, L"mhtml:"); + lstrcatW(mhtml_url, display_name); HeapFree(GetProcessHeap(), 0, display_name); hres = CreateURLMoniker(NULL, mhtml_url, moniker_new); diff --git a/dlls/inetcomm/protocol.c b/dlls/inetcomm/protocol.c index e50e5a625c3..e272689a9ac 100644 --- a/dlls/inetcomm/protocol.c +++ b/dlls/inetcomm/protocol.c @@ -59,8 +59,8 @@ typedef struct { WCHAR url[1]; } MimeHtmlBinding; -static const WCHAR mhtml_prefixW[] = {'m','h','t','m','l',':'}; -static const WCHAR mhtml_separatorW[] = {'!','x','-','u','s','c',':'}; +static const WCHAR mhtml_prefixW[] = L"mhtml:"; +static const WCHAR mhtml_separatorW[] = L"!x-usc:"; static inline LPWSTR heap_strdupW(LPCWSTR str) { @@ -82,16 +82,16 @@ static HRESULT parse_mhtml_url(const WCHAR *url, mhtml_url_t *r) { const WCHAR *p; - if(wcsnicmp(url, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) + if(wcsnicmp(url, mhtml_prefixW, lstrlenW(mhtml_prefixW))) return E_FAIL; - r->mhtml = url + ARRAY_SIZE(mhtml_prefixW); + r->mhtml = url + lstrlenW(mhtml_prefixW); p = wcschr(r->mhtml, '!'); if(p) { r->mhtml_len = p - r->mhtml; /* FIXME: We handle '!' and '!x-usc:' in URLs as the same thing. Those should not be the same. */ - if(!wcsncmp(p, mhtml_separatorW, ARRAY_SIZE(mhtml_separatorW))) - p += ARRAY_SIZE(mhtml_separatorW); + if(!wcsncmp(p, mhtml_separatorW, lstrlenW(mhtml_separatorW))) + p += lstrlenW(mhtml_separatorW); else p++; }else { @@ -656,7 +656,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa DWORD cchResult, DWORD* pcchResult, DWORD dwReserved) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - size_t len = ARRAY_SIZE(mhtml_prefixW); + size_t len = lstrlenW(mhtml_prefixW); mhtml_url_t url; WCHAR *p; HRESULT hres; @@ -669,27 +669,26 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa if(FAILED(hres)) return hres; - if(!wcsnicmp(pwzRelativeUrl, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) { + if(!wcsnicmp(pwzRelativeUrl, mhtml_prefixW, len)) { FIXME("Relative URL is mhtml protocol\n"); return INET_E_USE_DEFAULT_PROTOCOLHANDLER; } len += url.mhtml_len; if(*pwzRelativeUrl) - len += lstrlenW(pwzRelativeUrl) + ARRAY_SIZE(mhtml_separatorW); + len += lstrlenW(pwzRelativeUrl) + lstrlenW(mhtml_separatorW); if(len >= cchResult) { *pcchResult = 0; return E_FAIL; } - memcpy(pwzResult, mhtml_prefixW, sizeof(mhtml_prefixW)); - p = pwzResult + ARRAY_SIZE(mhtml_prefixW); + lstrcpyW(pwzResult, mhtml_prefixW); + p = pwzResult + lstrlenW(mhtml_prefixW); memcpy(p, url.mhtml, url.mhtml_len*sizeof(WCHAR)); p += url.mhtml_len; if(*pwzRelativeUrl) { - memcpy(p, mhtml_separatorW, sizeof(mhtml_separatorW)); - p += ARRAY_SIZE(mhtml_separatorW); - lstrcpyW(p, pwzRelativeUrl); + lstrcpyW(p, mhtml_separatorW); + lstrcatW(p, pwzRelativeUrl); }else { *p = 0; }
1
0
0
0
Zebediah Figura : quartz/tests: Use compare_double() to test IBasicVideo::get_AvgTimePerFrame().
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: f4b04e2e84e55d2e35d183c7c8a22b0a2e3bb9e2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4b04e2e84e55d2e35d183c7…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Oct 22 15:16:42 2020 -0500 quartz/tests: Use compare_double() to test IBasicVideo::get_AvgTimePerFrame(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr7.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index f1b19aa6634..d7eafe53be8 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdint.h> #define COBJMACROS #include "dshow.h" #include "d3d9.h" @@ -65,6 +66,23 @@ static inline BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TY && !memcmp(a->pbFormat, b->pbFormat, a->cbFormat); } +static BOOL compare_double(double f, double g, unsigned int ulps) +{ + uint64_t x = *(ULONGLONG *)&f; + uint64_t y = *(ULONGLONG *)&g; + + if (f < 0) + x = ~x + 1; + else + x |= ((ULONGLONG)1)<<63; + if (g < 0) + y = ~y + 1; + else + y |= ((ULONGLONG)1)<<63; + + return (x>y ? x-y : y-x) <= ulps; +} + static IFilterGraph2 *create_graph(void) { IFilterGraph2 *ret; @@ -2707,7 +2725,7 @@ static void test_basic_video(void) reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(reftime == 0.02, "Got frame rate %.16e.\n", reftime); + ok(compare_double(reftime, 0.02, 1 << 28), "Got frame rate %.16e.\n", reftime); l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l);
1
0
0
0
Hans Leidekker : wbemprox: Implement IWbemClassObject::GetMethodQualifierSet.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 09e32f57b713a55bcb7487c1e1dff987d02438d6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=09e32f57b713a55bcb7487c1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 23 11:15:56 2020 +0200 wbemprox: Implement IWbemClassObject::GetMethodQualifierSet. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/class.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index e048fb3db82..d24d8cbb5ca 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -971,8 +971,11 @@ static HRESULT WINAPI class_object_GetMethodQualifierSet( LPCWSTR wszMethod, IWbemQualifierSet **ppQualSet) { - FIXME("%p, %s, %p\n", iface, debugstr_w(wszMethod), ppQualSet); - return E_NOTIMPL; + struct class_object *co = impl_from_IWbemClassObject( iface ); + + TRACE("%p, %s, %p\n", iface, debugstr_w(wszMethod), ppQualSet); + + return WbemQualifierSet_create( co->name, wszMethod, (void **)ppQualSet ); } static HRESULT WINAPI class_object_GetMethodOrigin(
1
0
0
0
Hans Leidekker : wbemprox: Also return system properties from IWbemClassObject::GetNames.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: b1ceb7853cf0d7abe99fd917e65a22507795f7de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b1ceb7853cf0d7abe99fd917…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Oct 22 21:25:49 2020 +0200 wbemprox: Also return system properties from IWbemClassObject::GetNames. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50038
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/query.c | 61 ++++++++++++++++++++++++++++++--------------- dlls/wbemprox/tests/query.c | 17 +++++++++++++ 2 files changed, 58 insertions(+), 20 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 525381d88d2..3d60825f24e 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -1375,40 +1375,61 @@ HRESULT put_propval( const struct view *view, UINT index, const WCHAR *name, VAR HRESULT get_properties( const struct view *view, UINT index, LONG flags, SAFEARRAY **props ) { + static const WCHAR * const system_props[] = + { L"__GENUS", L"__CLASS", L"__RELPATH", L"__PROPERTY_COUNT", L"__SERVER", L"__NAMESPACE", L"__PATH" }; SAFEARRAY *sa; BSTR str; - UINT i, table_index, result_index, num_props; + UINT i, table_index, result_index, count = 0; struct table *table; HRESULT hr; - LONG j; + LONG j = 0; if ((hr = map_view_index( view, index, &table_index, &result_index )) != S_OK) return hr; - - num_props = count_result_properties( view, table_index ); - if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, num_props ))) return E_OUTOFMEMORY; - table = view->table[table_index]; - for (i = 0, j = 0; i < table->num_cols; i++) - { - BOOL is_system; - if (is_method( table, i )) continue; - if (!is_result_prop( view, table->columns[i].name )) continue; + if (!(flags & WBEM_FLAG_NONSYSTEM_ONLY)) count += ARRAY_SIZE(system_props); + if (!(flags & WBEM_FLAG_SYSTEM_ONLY)) + { + for (i = 0; i < table->num_cols; i++) + { + if (!is_method( table, i ) && is_result_prop( view, table->columns[i].name )) count++; + } + } - is_system = is_system_prop( table->columns[i].name ); - if ((flags & WBEM_FLAG_NONSYSTEM_ONLY) && is_system) continue; - else if ((flags & WBEM_FLAG_SYSTEM_ONLY) && !is_system) continue; + if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, count ))) return E_OUTOFMEMORY; - str = SysAllocString( table->columns[i].name ); - if (!str || SafeArrayPutElement( sa, &j, str ) != S_OK) + if (!(flags & WBEM_FLAG_NONSYSTEM_ONLY)) + { + for (j = 0; j < ARRAY_SIZE(system_props); j++) + { + str = SysAllocString( system_props[j] ); + if (!str || SafeArrayPutElement( sa, &j, str ) != S_OK) + { + SysFreeString( str ); + SafeArrayDestroy( sa ); + return E_OUTOFMEMORY; + } + SysFreeString( str ); + } + } + if (!(flags & WBEM_FLAG_SYSTEM_ONLY)) + { + for (i = 0; i < table->num_cols; i++) { + if (is_method( table, i ) || !is_result_prop( view, table->columns[i].name )) continue; + + str = SysAllocString( table->columns[i].name ); + if (!str || SafeArrayPutElement( sa, &j, str ) != S_OK) + { + SysFreeString( str ); + SafeArrayDestroy( sa ); + return E_OUTOFMEMORY; + } SysFreeString( str ); - SafeArrayDestroy( sa ); - return E_OUTOFMEMORY; + j++; } - SysFreeString( str ); - j++; } + *props = sa; return S_OK; } diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index d1ce42d64cb..7ba55dffdfb 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -460,6 +460,8 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path ) IWbemClassObject *process, *sig_in, *out; IWbemQualifierSet *qualifiers; VARIANT retval, val; + SAFEARRAY *names; + LONG bound, i; DWORD full_path_len = 0; LONG flavor; CIMTYPE type; @@ -484,6 +486,21 @@ static void test_Win32_Process( IWbemServices *services, BOOL use_full_path ) win_skip( "Win32_Process not available\n" ); return; } + names = NULL; + hr = IWbemClassObject_GetNames( process, NULL, 0, NULL, &names ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( names != NULL, "names not set\n" ); + hr = SafeArrayGetUBound( names, 1, &bound ); + ok( hr == S_OK, "got %08x\n", hr ); + for (i = 0; i <= bound; i++) + { + BSTR str; + hr = SafeArrayGetElement( names, &i, &str ); + ok( hr == S_OK, "%d: got %08x\n", i, hr ); + SysFreeString( str ); + } + SafeArrayDestroy( names ); + sig_in = (void*)0xdeadbeef; hr = IWbemClassObject_GetMethod( process, L"GetOwner", 0, &sig_in, NULL ); ok( hr == S_OK, "failed to get GetOwner method %08x\n", hr );
1
0
0
0
Lauri Kenttä : po: Update Finnish translation.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 3f2ff588bae7d580d8c726162c732f5e176b1f3e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f2ff588bae7d580d8c72616…
Author: Lauri Kenttä <lauri.kentta(a)gmail.com> Date: Fri Oct 23 07:47:27 2020 +0300 po: Update Finnish translation. Signed-off-by: Lauri Kenttä <lauri.kentta(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/fi.po | 150 +++++++++++++++++++-------------------------------------------- 1 file changed, 45 insertions(+), 105 deletions(-) diff --git a/po/fi.po b/po/fi.po index 6bfb480ee59..846a3149b1f 100644 --- a/po/fi.po +++ b/po/fi.po @@ -5025,11 +5025,11 @@ msgstr "DLL:n alustus epäonnistui.\n" #: dlls/kernel32/winerror.mc:1373 msgid "Shutdown in progress.\n" -msgstr "Sulkeminen meneillään.\n" +msgstr "Sammutus meneillään.\n" #: dlls/kernel32/winerror.mc:1378 msgid "No shutdown in progress.\n" -msgstr "Sulkeminen ei meneillään.\n" +msgstr "Ei sammutusta meneillään.\n" #: dlls/kernel32/winerror.mc:1383 msgid "I/O device error.\n" @@ -6924,16 +6924,12 @@ msgid "No Signature found in file.\n" msgstr "Tiedostosta ei löytynyt allekirjoitusta.\n" #: dlls/kernel32/winerror.mc:3774 -#, fuzzy -#| msgid "Invalid level.\n" msgid "Invalid call.\n" -msgstr "Taso ei kelpaa.\n" +msgstr "Kutsu ei kelpaa.\n" #: dlls/kernel32/winerror.mc:3781 -#, fuzzy -#| msgid "Value is not available.\n" msgid "Resource is not currently available.\n" -msgstr "Arvo ei saatavilla.\n" +msgstr "Resurssi ei ole nyt saatavilla.\n" #: dlls/localspl/localspl.rc:31 dlls/localui/localui.rc:31 #: dlls/winspool.drv/winspool.rc:30 @@ -7107,11 +7103,11 @@ msgstr "Objektia tai arvoa ei löydy.\n" #: dlls/mferror/mferror.mc:235 msgid "Value is not available.\n" -msgstr "Arvo ei saatavilla.\n" +msgstr "Arvo ei ole saatavilla.\n" #: dlls/mferror/mferror.mc:242 msgid "Clock is not available.\n" -msgstr "Kello ei saatavilla.\n" +msgstr "Kello ei ole saatavilla.\n" #: dlls/mferror/mferror.mc:263 msgid "Multiple subscribers are not supported.\n" @@ -10032,16 +10028,12 @@ msgid "Line Islands Daylight Time" msgstr "Linesaarten kesäaika" #: dlls/tzres/tzres.rc:90 -#, fuzzy -#| msgid "China Standard Time" msgid "Cuba Standard Time" -msgstr "Kiinan normaaliaika" +msgstr "Kuuban normaaliaika" #: dlls/tzres/tzres.rc:91 -#, fuzzy -#| msgid "China Daylight Time" msgid "Cuba Daylight Time" -msgstr "Kiinan kesäaika" +msgstr "Kuuban kesäaika" #: dlls/tzres/tzres.rc:134 msgid "Jordan Standard Time" @@ -10240,16 +10232,12 @@ msgid "US Eastern Daylight Time" msgstr "Itäinen kesäaika (USA)" #: dlls/tzres/tzres.rc:176 -#, fuzzy -#| msgid "Korea Standard Time" msgid "North Korea Standard Time" -msgstr "Korean normaaliaika" +msgstr "Pohjois-Korean normaaliaika" #: dlls/tzres/tzres.rc:177 -#, fuzzy -#| msgid "Korea Daylight Time" msgid "North Korea Daylight Time" -msgstr "Korean kesäaika" +msgstr "Pohjois-Korean kesäaika" #: dlls/tzres/tzres.rc:212 msgid "Tasmania Standard Time" @@ -10564,16 +10552,12 @@ msgid "Egypt Daylight Time" msgstr "Egyptin kesäaika" #: dlls/tzres/tzres.rc:104 -#, fuzzy -#| msgid "Central Standard Time (Mexico)" msgid "Eastern Standard Time (Mexico)" -msgstr "Keskinen normaaliaika (Meksiko)" +msgstr "Itäinen normaaliaika (Meksiko)" #: dlls/tzres/tzres.rc:105 -#, fuzzy -#| msgid "Central Daylight Time (Mexico)" msgid "Eastern Daylight Time (Mexico)" -msgstr "Keskinen kesäaika (Meksiko)" +msgstr "Itäinen kesäaika (Meksiko)" #: dlls/tzres/tzres.rc:148 msgid "Mauritius Standard Time" @@ -10778,153 +10762,115 @@ msgstr "&Lisää ikkunoita..." #: dlls/vbscript/vbscript.rc:30 msgid "Overflow" -msgstr "" +msgstr "Ylivuoto" #: dlls/vbscript/vbscript.rc:31 -#, fuzzy -#| msgid "Out of memory." msgid "Out of memory" -msgstr "Muisti ei riitä." +msgstr "Muisti ei riitä" #: dlls/vbscript/vbscript.rc:33 msgid "This array is fixed or temporarily locked" -msgstr "" +msgstr "Tämä taulukko on kiinteä tai väliaikaisesti lukittu" #: dlls/vbscript/vbscript.rc:34 -#, fuzzy -#| msgid "Data type mismatch.\n" msgid "Type mismatch" -msgstr "Tietotyyppi ei täsmää.\n" +msgstr "Tyyppi ei täsmää" #: dlls/vbscript/vbscript.rc:36 -#, fuzzy -#| msgid "I/O device error.\n" msgid "Device I/O error" -msgstr "I/O-laitteen virhe.\n" +msgstr "Laitteen I/O-virhe" #: dlls/vbscript/vbscript.rc:37 -#, fuzzy -#| msgid "File already exists.\n" msgid "File already exists" -msgstr "Tiedosto on jo olemassa.\n" +msgstr "Tiedosto on jo olemassa" #: dlls/vbscript/vbscript.rc:38 -#, fuzzy -#| msgid "Disk full.\n" msgid "Disk full" -msgstr "Levy täynnä.\n" +msgstr "Levy täynnä" #: dlls/vbscript/vbscript.rc:39 -#, fuzzy -#| msgid "Too many open files.\n" msgid "Too many files" -msgstr "Liian monta avointa tiedostoa.\n" +msgstr "Liian monta tiedostoa" #: dlls/vbscript/vbscript.rc:40 -#, fuzzy -#| msgid "Access denied.\n" msgid "Permission denied" -msgstr "Pääsy estetty.\n" +msgstr "Pääsy estetty" #: dlls/vbscript/vbscript.rc:41 msgid "Path/File access error" -msgstr "" +msgstr "Polun-/tiedostonkäyttövirhe" #: dlls/vbscript/vbscript.rc:42 -#, fuzzy -#| msgid "Path not found.\n" msgid "Path not found" -msgstr "Polkua ei löydy.\n" +msgstr "Polkua ei löydy" #: dlls/vbscript/vbscript.rc:43 -#, fuzzy -#| msgid "(value not set)" msgid "Object variable not set" -msgstr "(arvoa ei asetettu)" +msgstr "Objektimuuttujaa ei ole asetettu" #: dlls/vbscript/vbscript.rc:44 -#, fuzzy -#| msgid "Invalid user buffer.\n" msgid "Invalid use of Null" -msgstr "Annettu puskuri ei kelpaa.\n" +msgstr "Null-arvon käyttö ei kelpaa" #: dlls/vbscript/vbscript.rc:45 msgid "Can't create necessary temporary file" -msgstr "" +msgstr "Tarvittavaa väliaikaistiedostoa ei voida luoda" #: dlls/vbscript/vbscript.rc:46 -#, fuzzy -#| msgid "Automation server can't create object" msgid "ActiveX component can't create object" -msgstr "Automaatiopalvelin ei voi luoda objektia" +msgstr "ActiveX-komponentti ei voi luoda objektia" #: dlls/vbscript/vbscript.rc:47 -#, fuzzy -#| msgid "Object doesn't support this action" msgid "Class doesn't support Automation" -msgstr "Objekti ei tue tätä toimintoa" +msgstr "Luokka ei tue automaatiota" #: dlls/vbscript/vbscript.rc:48 msgid "File name or class name not found during Automation operation" -msgstr "" +msgstr "Tiedostonimeä tai luokan nimeä ei löydy automaatio-operaatiossa" #: dlls/vbscript/vbscript.rc:51 -#, fuzzy -#| msgid "Object doesn't support this action" msgid "Object doesn't support named arguments" -msgstr "Objekti ei tue tätä toimintoa" +msgstr "Objekti ei tue nimettyjä argumentteja" #: dlls/vbscript/vbscript.rc:52 -#, fuzzy -#| msgid "Object doesn't support this action" msgid "Object doesn't support current locale setting" -msgstr "Objekti ei tue tätä toimintoa" +msgstr "Objekti ei tue nykyistä alueellista asetusta" #: dlls/vbscript/vbscript.rc:53 dlls/vbscript/vbscript.rc:54 -#, fuzzy -#| msgid "Element not found.\n" msgid "Named argument not found" -msgstr "Elementtiä ei löydy.\n" +msgstr "Nimettyä argumenttia ei löydy" #: dlls/vbscript/vbscript.rc:55 msgid "Wrong number of arguments or invalid property assignment" -msgstr "" +msgstr "Väärä määrä argumentteja tai virhe ominaisuuden asettamisessa" #: dlls/vbscript/vbscript.rc:56 -#, fuzzy -#| msgid "Object Class Violation" msgid "Object not a collection" -msgstr "Objektiluokkarikkomus" +msgstr "Objekti ei ole kokoelma" #: dlls/vbscript/vbscript.rc:57 -#, fuzzy -#| msgid "Specified control was not found in message" msgid "Specified DLL function not found" -msgstr "Viestistä ei löytynyt määriteltyä kontrollia" +msgstr "Määriteltyä DLL-funktiota ei löydy" #: dlls/vbscript/vbscript.rc:58 msgid "Variable uses an Automation type not supported in VBScript" -msgstr "" +msgstr "Muuttuja käyttää automaatiotyyppiä, jota VBScript ei tue" #: dlls/vbscript/vbscript.rc:59 msgid "The remote server machine does not exist or is unavailable" -msgstr "" +msgstr "Etäpalvelinta ei ole tai se ei ole tavoitettavissa" #: dlls/vbscript/vbscript.rc:60 msgid "Invalid or unqualified reference" -msgstr "" +msgstr "Viallinen tai määrittämätön viittaus" #: dlls/vbscript/vbscript.rc:62 -#, fuzzy -#| msgid "Microsoft JScript compilation error" msgid "Microsoft VBScript compilation error" -msgstr "Microsoft JScript -käännösvirhe" +msgstr "Microsoft VBScript -käännösvirhe" #: dlls/vbscript/vbscript.rc:63 -#, fuzzy -#| msgid "Microsoft JScript runtime error" msgid "Microsoft VBScript runtime error" -msgstr "Microsoft JScript -suoritusvirhe" +msgstr "Microsoft VBScript -suoritusvirhe" #: dlls/winemac.drv/winemac.rc:33 msgid "Hide %@" @@ -11022,33 +10968,27 @@ msgstr "" #: dlls/wininet/wininet.rc:35 msgid "Effective Date" -msgstr "" +msgstr "Voimaantulopäiväys" #: dlls/wininet/wininet.rc:37 -#, fuzzy -#| msgid "Security" msgid "Security Protocol" -msgstr "Turvallisuus" +msgstr "Salausprotokolla" #: dlls/wininet/wininet.rc:38 -#, fuzzy -#| msgid "Signature" msgid "Signature Type" msgstr "Allekirjoitus" #: dlls/wininet/wininet.rc:39 -#, fuzzy -#| msgid "Encrypting File System" msgid "Encryption Type" -msgstr "Tiedostojärjestelmän salaus" +msgstr "Salauksen tyyppi" #: dlls/wininet/wininet.rc:40 msgid "Privacy Strength" -msgstr "" +msgstr "Yksityisyyden vahvuus" #: dlls/wininet/wininet.rc:43 msgid "bits" -msgstr "" +msgstr "bittiä" #: dlls/wininet/winineterror.mc:26 msgid "The request has timed out.\n"
1
0
0
0
Ziqing Hui : gdiplus: Support StringFormatNoWrap for GdipMeasureString.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: c509060f52eb2c2e8f95111046c5010f9686eb31 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c509060f52eb2c2e8f951110…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Oct 23 10:22:10 2020 +0800 gdiplus: Support StringFormatNoWrap for GdipMeasureString. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/graphics.c | 2 +- dlls/gdiplus/tests/graphics.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 190f45d64a2..291f6a94b9d 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5270,7 +5270,7 @@ GpStatus gdip_format_string(HDC hdc, if(*(stringdup + sum + fit) == ' ') while(*(stringdup + sum + fit) == ' ') fit++; - else + else if (!(format->attr & StringFormatFlagsNoWrap)) while(*(stringdup + sum + fit - 1) != ' '){ fit--; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 24fc91a1bfe..d1022b1af5b 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4900,10 +4900,8 @@ todo_wine rect.Height = 32000.0; status = GdipMeasureString(graphics, string2, -1, font, &rect, format_no_wrap, &bounds, &glyphs, &lines); expect(Ok, status); - todo_wine { expectf_(width_M_M, bounds.Width, 0.1); expect(3, glyphs); - } expect(1, lines); status = GdipDeleteFont(font);
1
0
0
0
Ziqing Hui : gdiplus/tests: Add tests for GdipMeasureString with StringFormatFlagsNoWrap.
by Alexandre Julliard
23 Oct '20
23 Oct '20
Module: wine Branch: master Commit: 3f228497a891fd135cbad4674f23afed0119fe72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f228497a891fd135cbad467…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Oct 23 10:22:00 2020 +0800 gdiplus/tests: Add tests for GdipMeasureString with StringFormatFlagsNoWrap. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/graphics.c | 55 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 1dbb0ae279f..24fc91a1bfe 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -4449,8 +4449,9 @@ static void test_measure_string(void) { static const WCHAR tahomaW[] = { 'T','a','h','o','m','a',0 }; static const WCHAR string[] = { 'A','0','1',0 }; + static const WCHAR string2[] = { 'M',' ','M','M',0 }; HDC hdc; - GpStringFormat *format; + GpStringFormat *format, *format_no_wrap; CharacterRange range; GpRegion *region; GpGraphics *graphics; @@ -4458,7 +4459,7 @@ static void test_measure_string(void) GpFont *font; GpStatus status; RectF bounds, rect; - REAL width, height, width_1, width_2; + REAL width, height, width_1, width_2, width_MM, width_M_M; REAL margin_x, margin_y, width_rgn, height_rgn; int lines, glyphs; @@ -4856,6 +4857,55 @@ todo_wine expectf_(width_rgn, bounds.Width, 1.0); expectf_(height_rgn, bounds.Height, 1.0); + /* Measure "MM" */ + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 32000.0; + rect.Height = 32000.0; + status = GdipMeasureString(graphics, string2 + 2, 2, font, &rect, NULL, &bounds, &glyphs, &lines); + expect(Ok, status); + expect(2, glyphs); + expect(1, lines); + width_MM = bounds.Width; + + /* Measure "M M" */ + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = 32000.0; + rect.Height = 32000.0; + status = GdipMeasureString(graphics, string2, 3, font, &rect, NULL, &bounds, &glyphs, &lines); + expect(Ok, status); + expect(3, glyphs); + expect(1, lines); + width_M_M = bounds.Width; + + /* With wrap */ + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = width_M_M; + rect.Height = 32000.0; + status = GdipMeasureString(graphics, string2, -1, font, &rect, NULL, &bounds, &glyphs, &lines); + expect(Ok, status); + expectf_(width_MM, bounds.Width, 0.1); + expect(4, glyphs); + expect(2, lines); + + /* Without wrap */ + status = GdipCreateStringFormat(StringFormatFlagsNoWrap, LANG_NEUTRAL, &format_no_wrap); + expect(Ok, status); + + rect.X = 5.0; + rect.Y = 5.0; + rect.Width = width_M_M; + rect.Height = 32000.0; + status = GdipMeasureString(graphics, string2, -1, font, &rect, format_no_wrap, &bounds, &glyphs, &lines); + expect(Ok, status); + todo_wine { + expectf_(width_M_M, bounds.Width, 0.1); + expect(3, glyphs); + } + expect(1, lines); + status = GdipDeleteFont(font); expect(Ok, status); @@ -4866,6 +4916,7 @@ todo_wine GdipDeleteFontFamily(family); GdipDeleteRegion(region); GdipDeleteStringFormat(format); + GdipDeleteStringFormat(format_no_wrap); } static void test_measured_extra_space(void)
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
80
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
Results per page:
10
25
50
100
200