Author: akhaldi
Date: Sun May 24 20:51:18 2015
New Revision: 67891
URL: http://svn.reactos.org/svn/reactos?rev=67891&view=rev
Log:
[README.WINE] Mark some modules as synced with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/media/doc/README.WINE
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun May 24 20:51:18 2015
@@ -17,7 +17,7 @@
reactos/tools/unicode # Synced to WineStaging-1.7.37
reactos/tools/widl # Synced to Wine-1.7.17
-reactos/tools/wpp # Synced to Wine-1.7.27
+reactos/tools/wpp # Synced to WineStaging-1.7.37
The following libraries are shared with Wine.
@@ -43,8 +43,8 @@
reactos/dll/directx/wine/quartz # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/wined3d # Synced to WineStaging-1.7.37
-reactos/dll/win32/activeds # Synced to Wine-1.7.27
-reactos/dll/win32/actxprxy # Synced to Wine-1.7.27
+reactos/dll/win32/activeds # Synced to WineStaging-1.7.37
+reactos/dll/win32/actxprxy # Synced to WineStaging-1.7.37
reactos/dll/win32/advpack # Synced to WineStaging-1.7.37
reactos/dll/win32/atl # Synced to WineStaging-1.7.37
reactos/dll/win32/atl80 # Synced to WineStaging-1.7.37
@@ -53,15 +53,15 @@
reactos/dll/win32/bcrypt # Synced to WineStaging-1.7.37
reactos/dll/win32/browseui # Out of sync
reactos/dll/win32/cabinet # Synced to WineStaging-1.7.37
-reactos/dll/win32/clusapi # Synced to Wine-1.7.27
-reactos/dll/win32/comcat # Synced to Wine-1.7.27
+reactos/dll/win32/clusapi # Synced to WineStaging-1.7.37
+reactos/dll/win32/comcat # Synced to WineStaging-1.7.37
reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.37
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.37
-reactos/dll/win32/compstui # Synced to Wine-1.7.27
-reactos/dll/win32/credui # Synced to Wine-1.7.27
+reactos/dll/win32/compstui # Synced to WineStaging-1.7.37
+reactos/dll/win32/credui # Synced to WineStaging-1.7.37
reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.37
-reactos/dll/win32/cryptdlg # Synced to Wine-1.7.27
-reactos/dll/win32/cryptdll # Synced to Wine-1.7.27
+reactos/dll/win32/cryptdlg # Synced to WineStaging-1.7.37
+reactos/dll/win32/cryptdll # Synced to WineStaging-1.7.37
reactos/dll/win32/cryptnet # Synced to WineStaging-1.7.37
reactos/dll/win32/cryptui # Synced to Wine-1.7.27
reactos/dll/win32/dbghelp # Synced to WineStaging-1.7.37
Author: akhaldi
Date: Sun May 24 20:37:29 2015
New Revision: 67890
URL: http://svn.reactos.org/svn/reactos?rev=67890&view=rev
Log:
[NOTEPAD] Printer output improvements by Ricardo Hanke. See CORE-9088 for more details.
Modified:
trunk/reactos/base/applications/notepad/dialog.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Sun May 24 20:37:29 2015
@@ -515,6 +515,7 @@
VOID DIALOG_FilePrint(VOID)
{
DOCINFO di;
+ TEXTMETRIC tm;
PRINTDLG printer;
SIZE szMetric;
int cWidthPels, cHeightPels, border;
@@ -557,7 +558,7 @@
printer.nFromPage = 0;
printer.nMinPage = 1;
/* we really need to calculate number of pages to set nMaxPage and nToPage */
- printer.nToPage = 0;
+ printer.nToPage = (WORD)-1;
printer.nMaxPage = (WORD)-1;
/* Let commdlg manage copy settings */
@@ -622,22 +623,39 @@
size = GetWindowText(Globals.hEdit, pTemp, size);
}
+ /* Ensure that each logical unit maps to one pixel */
+ SetMapMode(printer.hDC, MM_TEXT);
+
+ /* Needed to get the correct height of a text line */
+ GetTextMetrics(printer.hDC, &tm);
+
border = 150;
for (copycount=1; copycount <= printer.nCopies; copycount++) {
i = 0;
pagecount = 1;
do {
- static const TCHAR letterM[] = _T("M");
-
- if (pagecount >= printer.nFromPage &&
- /* ((printer.Flags & PD_PAGENUMS) == 0 || pagecount <= printer.nToPage))*/
- pagecount <= printer.nToPage)
+ /* Don't start a page if none of the conditions below are true */
+ dopage = 0;
+
+ /* The user wants to print the current selection */
+ if (printer.Flags & PD_SELECTION)
+ {
dopage = 1;
- else
- dopage = 0;
+ }
+
+ /* The user wants to print the entire document */
+ if (!(printer.Flags & PD_PAGENUMS) && !(printer.Flags & PD_SELECTION))
+ {
+ dopage = 1;
+ }
+
+ /* The user wants to print a specified range of pages */
+ if ((pagecount >= printer.nFromPage && pagecount <= printer.nToPage))
+ {
+ dopage = 1;
+ }
old_font = SelectObject(printer.hDC, font);
- GetTextExtentPoint32(printer.hDC, letterM, 1, &szMetric);
if (dopage) {
if (StartPage(printer.hDC) <= 0) {
@@ -650,35 +668,44 @@
return;
}
/* Write a rectangle and header at the top of each page */
- Rectangle(printer.hDC, border, border, cWidthPels-border, border+szMetric.cy*2);
+ Rectangle(printer.hDC, border, border, cWidthPels-border, border + tm.tmHeight * 2);
/* I don't know what's up with this TextOut command. This comes out
kind of mangled.
*/
TextOut(printer.hDC,
border * 2,
- border + szMetric.cy / 2,
+ border + tm.tmHeight / 2,
Globals.szFileTitle,
lstrlen(Globals.szFileTitle));
}
/* The starting point for the main text */
xLeft = border * 2;
- yTop = border + szMetric.cy * 4;
+ yTop = border + tm.tmHeight * 4;
SelectObject(printer.hDC, old_font);
- GetTextExtentPoint32(printer.hDC, letterM, 1, &szMetric);
/* Since outputting strings is giving me problems, output the main
* text one character at a time. */
do {
if (pTemp[i] == '\n') {
xLeft = border * 2;
- yTop += szMetric.cy;
+ yTop += tm.tmHeight;
}
else if (pTemp[i] != '\r') {
if (dopage)
TextOut(printer.hDC, xLeft, yTop, &pTemp[i], 1);
+
+ /* We need to get the width for each individual char, since a proportional font may be used */
+ GetTextExtentPoint32(printer.hDC, &pTemp[i], 1, &szMetric);
xLeft += szMetric.cx;
+
+ /* Insert a line break if the current line does not fit into the printing area */
+ if (xLeft > (cWidthPels - border * 2))
+ {
+ xLeft = border * 2;
+ yTop = yTop + tm.tmHeight;
+ }
}
} while (i++ < size && yTop < (cHeightPels - border * 2));