There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.
Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This reverts commit 65e294e221e0ad1d37c6667eecb995817ace870d, which
breaks several widely used Basic extensions and hundreds of anonymous
macros that miss closing parenthesis here and there
(cherry picked from commit 660e394b893a045a077ccded263f94a1be03fcf9)
Change-Id: I5d27e6d4e7c8aea3f0762c41ede46e35a5a24aaa
Reviewed-on: https://gerrit.libreoffice.org/35970
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
...that would implicitly be sign extended (for plain char only if it is signed),
so non-ASCII char values would trigger the isUnicodeCodePoint assert.
Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91
Reviewed-on: https://gerrit.libreoffice.org/35523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Allow lowercase argument. (And properly check the sal_Unicode value with
rtl::isAsciiUpperCase instead of with isalpha, which would cause UB for values
outside of unsigned char + EOF).
* Use _wgetdcwd to get a UTF-16 path in the first place (instead of erroneously
converting via createFromAscii and assuming the path only contains 7-bit ASCII
characters).
* At least with a MSVC 2015 Update 3 --enable-dbgutil build, a call like
CurDir("A")
for a non-existent drive A will cause a failure message box
Microsoft Visual C++ Runtime Library
Debug Assertion Failed!
Program: ...\instdir\program\soffice.bin
File: minkernel\crts\ucrt\src\desktopcrt\misc\getcwd.cpp
Line: 225
Expression: ("Invalid Drive", 0)
though, which appears it can't be intercepted---trying with a
_set_thread_local_invalid_parameter_handler around the call to _wgetdcwd
didn't have any effect.
Change-Id: I666f84b0695152c0f2c25de3bae100e58929594a
...from function definitions occurring within class definitions. Done with
a rewriting Clang plugin (to be pushed later).
Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
and related css::util::SearchOptions2
The TransliterationModules enum has it's constants spread over multiple
UNO enum/constant-collections - TransliterationModules and
TransliterationModulesExtra, which means that most code simply uses
sal_Int32.
Wrap them up into a better bundle so that only the lowest layer needs to
deal directly with the UNO constants.
Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b
Reviewed-on: https://gerrit.libreoffice.org/34582
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Instead of erroring out on this:
#If Win64 Then
Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll"
#Else
Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll"
#End If
just treat the # commands as remarks and continue on.
This type of coding will become more common as 64bit versions of
Office require such constructs.
Change-Id: I63bfb8cbe9ad3ef35bab4c041d9d94daa7fbba18
Reviewed-on: https://gerrit.libreoffice.org/34518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
64bit MSOffice VBA7 requires the PtrSafe Declare attribute
#If Win64 Then
Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll"
#Else
Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll"
#End If
Accept this new keyword to enable compatibility with macros adjusted
to work in a 64bit MSOffice environment.
Change-Id: I9e64cb5339075cdda2ec91e8128fd0a35d458432
Reviewed-on: https://gerrit.libreoffice.org/34519
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
after commit dc21a49ea3a5a655e6bf70860b1b99c20e5b7473
"convert SbxDecimal::CmpResult to scoped enum"
Change-Id: I874976a30a57589cabd37f659a48a81933d867a7