Commit 6b8ee0e4 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

wordpad: Refuse to load OLE compound storage files like Windows does.

parent 7fa032d1
......@@ -229,4 +229,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -229,4 +229,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -229,4 +229,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -229,4 +229,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -223,4 +223,5 @@ BEGIN
"이것은 특수한 꾸밈을 없엘 것입니다. " \
"당신은 정말로 저장하기를 원합니까?"
STRING_INVALID_NUMBER, "올바르지 않은 수 형식"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -229,4 +229,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -229,4 +229,5 @@ BEGIN
"vil fre til at all formatering gr tapt. Er du " \
"sikker p at du vil fortsette?"
STRING_INVALID_NUMBER, "Ugyldig tallformat"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -230,4 +230,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -228,4 +228,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -232,4 +232,5 @@ BEGIN
"which will cause all formatting to be lost. " \
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not supported"
END
......@@ -180,3 +180,4 @@
#define STRING_LOAD_RICHED_FAILED 1703
#define STRING_SAVE_LOSEFORMATTING 1704
#define STRING_INVALID_NUMBER 1705
#define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
......@@ -1092,8 +1092,17 @@ static void DoOpenFile(LPCWSTR szOpenFileName)
} else if(readOut >= 5)
{
static const char header[] = "{\\rtf";
static const BYTE STG_magic[] = { 0xd0,0xcf,0x11,0xe0 };
if(!memcmp(header, fileStart, 5))
format = SF_RTF;
else if (!memcmp(STG_magic, fileStart, sizeof(STG_magic)))
{
CloseHandle(hFile);
MessageBoxW(hMainWnd, MAKEINTRESOURCEW(STRING_OLE_STORAGE_NOT_SUPPORTED), wszAppTitle,
MB_OK | MB_ICONEXCLAMATION);
return;
}
}
es.dwCookie = (DWORD_PTR)hFile;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment