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>
they are only needed where type deduction fails.
left them in defines for now.
Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Translate German comments and terms in basic/
Change-Id: I8baf76ea866823a155dfa25c74149dac989c841c
Reviewed-on: https://gerrit.libreoffice.org/35793
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
...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
use OUStringLiteral to store format names.
just create ResMgr, no need to check if its gone.
Change-Id: Ie3e33bc70b975d8ee49f47dcf23737ca56652f1a
Reviewed-on: https://gerrit.libreoffice.org/35007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...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
...ever since 79d3bc479950127ecfd40f73978c0fc84c1e7908 "INTEGRATION: CWS
visibility03: #i45006# Moved from svtools/source/sbx/", at least
Change-Id: If39462e5907817d6a77c98b212d5031610716a7c
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW. Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux. That attempt can be considered abandoned, and
the relevant code rotting.
Due to this heritage, there are now three kinds of MinGW-specific code in LO:
* Code from the original OOo native Windows effort that is no longer relevant
for the LO cross-compilation effort, but has never been removed properly.
* Code from the original OOo native Windows effort that is re-purposed for the
LO cross-compilation effort.
* Code that has been added specifially for the LO cross-compilation effort.
All three kinds of code are removed.
(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)
Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This reverts commit b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc.
The problem is this:
==24217== Conditional jump or move depends on uninitialised value(s)
==24217== at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220)
==24217== by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun:⭐:uno::Reference<com::sun:⭐:text::XTextRange> const&) (objstor.cxx:2300)
==24217== by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765)
==24217== by 0x29A6BC48:
SfxBaseModel::load(com::sun:⭐:uno::Sequence<com::sun:⭐🫘:PropertyValue> const&) (sfxbasemodel.cxx:1802)
The commit is bogus because it introduces a
DynamicErrorInfo::GetErrorCode(), which overloads
ErrorInfo::GetErrorCode(), which is used at least in
DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor
argument of DynamicErrorInfo but now returns pImpl->lErrId,
which is what this statement is trying to initialize.
Ultimately this causes my clang+ASAN build to fail because the
uninitialized error code happens to be detected as a mere Warning:
Test name: testMathMalformedXml::Import
assertion failed
- Expression: !xComponent.is()
- loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx
Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
I can see why you'd want to hide this horrible tunnelling of
information with objects registering themselves in a global list.
Urrgh.
Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095
Reviewed-on: https://gerrit.libreoffice.org/33984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This reverts commit fce604c8ae11b462113305aba080d77f8193cfea,
and fixes
tdf#105735 - xray ThisComponent no longer works
in the process.
It turns out Basic doesn't support sal_uInt64 very well, so lets rather
have a small possibility of bad timestamps instead of broken scripts.
Change-Id: Ic00485bd517a4fc61e05632001c9a5f92e05ddd6
Reviewed-on: https://gerrit.libreoffice.org/33972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".
Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
fixes this bt:
3 0x00002aaaab314ef2 in __GI___assert_fail (assertion=assertion@entry=0x2aaaaf8dc448 "index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())",
file=file@entry=0x2aaaaf8ac488 "/home/julien/lo/libreoffice/include/rtl/ustring.hxx", line=line@entry=678,
function=function@entry=0x2aaaaf8dc800 <rtl::OUString::operator[](int) const::__PRETTY_FUNCTION__> "sal_Unicode rtl::OUString::operator[](sal_Int32) const")
at assert.c:101
4 0x00002aaaaf810383 in rtl::OUString::operator[] (this=this@entry=0x55555d39c9f8, index=index@entry=0) at /home/julien/lo/libreoffice/include/rtl/ustring.hxx:678
5 0x00002aaaaf822f4e in SbiScanner::NextSym (this=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/scanner.cxx:572
6 0x00002aaaaf82771e in SbiTokenizer::Next (this=this@entry=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/token.cxx:339
7 0x00002aaaaf827d23 in SbiTokenizer::Peek (this=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/token.cxx:266
8 0x00002aaaaf8175d0 in SbiExpression::Unary (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:581
9 0x00002aaaaf8178a4 in SbiExpression::Exp (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:633
10 0x00002aaaaf81792c in SbiExpression::MulDiv (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:647
11 0x00002aaaaf8179b6 in SbiExpression::IntDiv (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:666
Change-Id: Ib56063b3106bd077cda215e34ab763bae1f33c33
Reviewed-on: https://gerrit.libreoffice.org/33933
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
Foo(OUString("xxx"), 1)
Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>