Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed May 16, 2024
1 parent 505e7b9 commit f07e14b
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 20 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ add_executable(wordpad WIN32

target_compile_definitions(wordpad PRIVATE
UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS STRSAFE_NO_DEPRECATE __REACTOS__
__RWORDPAD__
RICHEDIT_CLASS20W=RICHEDIT_CLASSW
LANGUAGE_BG_BG
LANGUAGE_CS_CZ
Expand Down
73 changes: 73 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Independent ReactOS WordPad

This is "Independent ReactOS WordPad"` from WineHQ and ReactOS.

It's a free and open source software for Windows XP and later.

- Donate ReactOS: https://reactos.org/donate/
- Follow on Twitter: https://twitter.com/reactos

## Main code contributors

- Copyright 1993-2023 the Wine project authors
- Copyright ReactOS Development Team
- Copyright 2004 Krzysztof Foltman
- Copyright 2007 Alexander N. Sørnes ([email protected])
- Copyright 2007-2008 Alexander N. Sørnes ([email protected])
- Copyright 2010 Dylan Smith ([email protected])
- Copyright 2020 Katayama Hirofumi MZ ([email protected])
- and more!

## Translators

- Copyright 2004 Krzysztof Foltman
- Copyright 2006 Andras Kovacs
- Copyright 2006 Fatih Aşıcı (fasici [at] linux-sevenler [dot] org)
- Copyright 2006 Hans Leidekker
- Copyright 2006 Henning Gerhardt
- Copyright 2006 Mikolaj Zalewski
- Copyright 2006 Phil Krylov
- Copyright 2006,2007 YunSong Hwang
- Copyright 2006-2009 Jonathan Ernst
- Copyright 2006-2010 Alexander N. Sørnes ([email protected])
- Copyright 2008 Frans Kool
- Copyright 2008 Hongbo Ni (hongbo.at.njstar.com)
- Copyright 2008 Jens Albretsen ([email protected])
- Copyright 2008 Katayama Hirofumi MZ
- Copyright 2008 Ricardo Filipe
- Copyright 2008 Rok Mandeljc
- Copyright 2009 Anders Jonsson
- Copyright 2009 Aurimas Fišeras ([email protected])
- Copyright 2010 Cheer Xiao (xiaqqaix.at.gmail.com)
- Copyright 2010 Claudia Cotună
- Copyright 2010 Frédéric Delanoy
- Copyright 2010 Gustavo Henrique Milaré
- Copyright 2010 Igor Paliychuk
- Copyright 2010 Luca Bennati
- Copyright 2010 Thomas Larsen
- Copyright 2010 Łukasz Wojniłowicz
- Copyright 2011 Ștefan Fulea
- Copyright 2013-2016, 2019 Erdem Ersoy (eersoy93) (erdemersoy [at] erdemersoy [dot] net)
- Copyright 2014 Ismael Ferreras Morezuelas
- Copyright 2017 Li Keqing (auroracloud4096.at.gmail.com)
- Copyright 2020 Tibor Lajos Füzi
- Copyright 2020-2021 Chan Chilung (eason066.at.gmail.com)
- Copyright Ardit Dani
- Copyright Michael Stefaniuc
- and more!

## How to build?

Please use ReactOS Build Environment (RosBE).

git clone https://github.com/katahiromz/RWordPad
cd RWordPad
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .
ninja
strip wordpad.exe

Tested on RosBE, Visual Studio 2015, and Visual Studio 2019.

## License

- LGPL 2.1 and later
21 changes: 13 additions & 8 deletions lang/ro-RO.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/*
* Copyright 2004 Krzysztof Foltman
* Copyright 2010 Claudia Cotună
* Michael Stefaniuc
* 2011 Ștefan Fulea
* PROJECT: ReactOS Wordpad
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2004 Krzysztof Foltman
* Copyright 2010 Claudia Cotună
* Copyright 2010 Michael Stefaniuc
* Copyright 2011 Ștefan Fulea <[email protected]>
* Copyright 2023 Andrei Miloiu <[email protected]>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -27,8 +32,8 @@ BEGIN
BEGIN
MENUITEM "&Nou…\tCtrl+N", ID_FILE_NEW
MENUITEM "&Deschidere…\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Pătrează\tCtrl+S", ID_FILE_SAVE
MENUITEM "Păst&rare în…", ID_FILE_SAVEAS
MENUITEM "S&alvează\tCtrl+S", ID_FILE_SAVE
MENUITEM "Salvea&ză ca…", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "I&mprimare…\tCtrl+P", ID_PRINT
MENUITEM "Pre&vizionare imprimare…", ID_PREVIEW
Expand Down Expand Up @@ -178,13 +183,13 @@ END
STRINGTABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
STRING_PROMPT_SAVE_CHANGES, "Păstrați modificările la „%s”?"
STRING_PROMPT_SAVE_CHANGES, "Salvați modificările la „%s”?"
STRING_SEARCH_FINISHED, "Căutarea în document a fost finalizată."
STRING_LOAD_RICHED_FAILED, "Biblioteca RichEdit nu a putut fi încărcată."
STRING_SAVE_LOSEFORMATTING, "Ați ales să salvați în formatul de text simplu, care va pierde formatarea. Sigur doriți să continuați?"
STRING_INVALID_NUMBER, "Formatul de număr nu este valid."
STRING_OLE_STORAGE_NOT_SUPPORTED, "Documentele de depozitare OLE nu sunt suportate."
STRING_WRITE_FAILED, "Fișierul nu a putut fi păstrat."
STRING_WRITE_FAILED, "Fișierul nu a putut fi salvat."
STRING_WRITE_ACCESS_DENIED, "Nu aveți permisiunea să salvați fișierul."
STRING_OPEN_FAILED, "Fișierul nu a putut fi deschis."
STRING_OPEN_ACCESS_DENIED, "Nu aveți permisiunea de a deschide fișierul."
Expand Down
12 changes: 6 additions & 6 deletions reactos/buildno.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#ifndef _INC_REACTOS_BUILDNO
#define _INC_REACTOS_BUILDNO

#define KERNEL_VERSION_BUILD 20230905
#define KERNEL_VERSION_BUILD_STR "20230905-0.4.15-dev-6584-g2508cdf"
#define KERNEL_VERSION_BUILD_RC "20230905-0.4.15-dev-6584-g2508cdf\0"
#define KERNEL_VERSION_BUILD 20240515
#define KERNEL_VERSION_BUILD_STR "20240515-0.4.15-dev-8089-g48a0d8e"
#define KERNEL_VERSION_BUILD_RC "20240515-0.4.15-dev-8089-g48a0d8e\0"

#define KERNEL_VERSION_RC "0.4.15-x86-dev\0"
#define KERNEL_VERSION_STR "0.4.15-x86-dev"

#define KERNEL_VERSION_REVISION_RC "0.4.15-dev-6584-g2508cdf\0"
#define KERNEL_VERSION_REVISION_STR "0.4.15-dev-6584-g2508cdf"
#define KERNEL_VERSION_REVISION_RC "0.4.15-dev-8089-g48a0d8e\0"
#define KERNEL_VERSION_REVISION_STR "0.4.15-dev-8089-g48a0d8e"

#define KERNEL_VERSION_COMMIT_HASH "2508cdfe2e4e99ef76a060dff58d8a136112890d"
#define KERNEL_VERSION_COMMIT_HASH "48a0d8e012f77b5d7fb11d58141e1fdd5de27254"

#define REACTOS_DLL_VERSION_MAJOR 42
#define REACTOS_DLL_VERSION_RC "42.4.15-dev\0"
Expand Down
2 changes: 1 addition & 1 deletion reactos/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define KERNEL_VERSION_MINOR 4
#define KERNEL_VERSION_PATCH_LEVEL 15

#define COPYRIGHT_YEAR "2023"
#define COPYRIGHT_YEAR "2024"

#endif

Expand Down
18 changes: 13 additions & 5 deletions wordpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
#include <shellapi.h>
#include <shlobj.h>
#include <wine/unicode.h>
#ifdef __REACTOS__
#include <strsafe.h>
#endif

#include "wordpad.h"

Expand Down Expand Up @@ -846,8 +843,15 @@ static BOOL DoSaveFile(LPCWSTR wszSaveFileName, WPARAM format)
EDITSTREAM stream;
LRESULT ret;

#ifdef __REACTOS__
/* Use OPEN_ALWAYS instead of CREATE_ALWAYS in order to succeed
* even if the file has HIDDEN or SYSTEM attributes */
hFile = CreateFileW(wszSaveFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
#else
hFile = CreateFileW(wszSaveFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
#endif

if(hFile == INVALID_HANDLE_VALUE)
{
Expand All @@ -873,6 +877,10 @@ static BOOL DoSaveFile(LPCWSTR wszSaveFileName, WPARAM format)

ret = SendMessageW(hEditorWnd, EM_STREAMOUT, format, (LPARAM)&stream);

#ifdef __REACTOS__
/* Truncate the file and close it */
SetEndOfFile(hFile);
#endif
CloseHandle(hFile);

SetFocus(hEditorWnd);
Expand Down Expand Up @@ -1386,8 +1394,8 @@ static void number_with_units(LPWSTR buffer, int number)
static const WCHAR fmt[] = {'%','.','2','f',' ','%','s','\0'};
float converted = (float)number / (float)TWIPS_PER_INCH *(float)CENTMM_PER_INCH / 1000.0;

#ifdef __REACTOS__
StringCchPrintfW(buffer, MAX_STRING_LEN, fmt, converted, units_cmW);
#ifdef __RWORDPAD__
_swprintf(buffer, fmt, converted, units_cmW);
#else
sprintfW(buffer, fmt, converted, units_cmW);
#endif
Expand Down

0 comments on commit f07e14b

Please sign in to comment.