summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2013-12-20typo fixesAndras Timar
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-19Fix crash on AndroidTor Lillqvist
Fallout from 0e6a2601b39cbadaff7f7506ba9e804f108060db ("Convert code that calls OUString::getStr()[] to use the [] operator"). The code was a bit silly and "hand-optimized" in the first place so no wonder a bug was introduced accidentally in that commit. Make it simpler and more obvious. Change-Id: Idafb1c0741289e915dfbaa108383a926321764d2
2013-12-17fdo#72598 Remove SunStudio cruft from code baseJelle van der Waa
Change-Id: I6f75d0df0ddafc892fef0ce1bfdcdd6c70151afc Reviewed-on: https://gerrit.libreoffice.org/7104 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-12-17Remove unnecessary use of OUString constructor in + expressionsNoel Grandin
Convert code like aFilename = OUString::number(nFilePostfixCount) + OUString(".bmp"); to aFilename = OUString::number(nFilePostfixCount) + ".bmp"; Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-16fdo#72598 Remove SunStudio cruft from code baseJelle van der Waa
Change-Id: I5150eec33228e18e274a8ae4effd3f185851b7f4 Reviewed-on: https://gerrit.libreoffice.org/7103 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-12-13fdo#72598 Remove SunStudio cruft from code baseJelle van der Waa
Change-Id: Ia6799c852eb95d496fbc8dcfdabde62dffc263a6 Reviewed-on: https://gerrit.libreoffice.org/7066 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-12-12simplify - use OUString::startsWith where possibleNoel Grandin
Convert code like if( !aStr.isEmpty() && aStr[0] == 'x' ) to if( aStr.startsWith("x") ) Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf
2013-12-04HINSTANCE vs. HMODULE clean upStephan Bergmann
Change-Id: I6fc350f489863ec86c76822053f0a399cef5cd7f
2013-12-02Drop duplicate #includeTakeshi Abe
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
2013-11-27Unwind occurrences of deprecated sal_sChar, sal_uCharStephan Bergmann
Change-Id: I76be464200d486efef9c8a7e957c310c9adae3b8
2013-11-26No need for additional << overload hereStephan Bergmann
...non-explicit OString(rtl_String*) ctor already covers that Change-Id: I9e447795ddc585d765b48d1f7f41f3c795aecba2
2013-11-25WaE: C4100: 'pExcPtrs' : unreferenced formal parameterTor Lillqvist
Change-Id: Ic580c625c78802087a32f8669feec91fe79672cd
2013-11-25Related: #i123747# ignore single step and breakpoint SEH eventsHerbert Dürr
(cherry picked from commit 2a0a1e41bcca97caaf3fdfb375f5cebb330a0fcc) Change-Id: I107a73ad001647eeb25b44e521251ef9543cc83a
2013-11-25Resolves: #i123747# allow treating Window's SEH events as C++ exceptionsHerbert Dürr
The crash reporter facility can provide much better details about crashes. But if that facility is disabled then handling SEH events such as div-by-zero as C++ exceptions is a worthwhile alternative. It can provide a few interesting details and it allows a graceful shutdown of the application. (cherry picked from commit c9d10b167b37a9cb0bb310cafc8e80b6cce8ea7a) Conflicts: sal/osl/w32/signal.cxx Change-Id: I25324d6e02ab8acd8fd2b036b77039aac87cf262
2013-11-24this script talks about dmake. it must be out of its mind!Bjoern Michaelsen
Change-Id: Ic1863a2126c26cf703afc5fe250dea2bbddfef7d
2013-11-22remove unnecessary RTL_CONSTASCII_STRINGPARAMNoel Grandin
A final pass through the code, converting code to use the new OUString and OString methods that can detect string literals. Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
2013-11-20Windows: Require at least Windows XP SP2Thomas Arnhold
* Windows XP SP2 is 0x0502, see http://msdn.microsoft.com/en-us/library/aa383745.aspx * If a module changes the Windows SDK version setting, this is done module wide now. So the overall behavior is as before. This seems to be the best compromise for now. * We need at least SP2 because of the bluetooth stuff used in sd/source/ui/remotecontrol. * Now, we require at least Internet Explorer 7.0. IE6 has been outdated for a long time. * Leave StdAfx.h file definitions, as those are Microsoft project specific precompiled header files. * All local definitions of WINVER are removed, because the global WINVER setting makes them obsolete now. To the relation of the three macros: Setting _WIN32_WINNT sets WINVER and NTDDI_VERSION automatically to the same value as _WIN32_WINNT. WINVER and NTDDI_VERSION can be set idenpendently each for itself. Change-Id: Ibcc12493aae4fcaf7bcfda88be99c1b61bc326cb Reviewed-on: https://gerrit.libreoffice.org/6496 Reviewed-by: Thorsten Behrens <thb@documentfoundation.org> Tested-by: Thorsten Behrens <thb@documentfoundation.org>
2013-11-20remove RTL_CONSTASCII_STRINGPARAM in OString constructorNoel Grandin
Convert code like: OString aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX")); to: OString aKeyName("NDX"); which compiles down to the same code Change-Id: I1780264cae4484fc78f0586b0750c09f2dce135f
2013-11-20remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::appendNoel Grandin
Convert code like: aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); to: aOStringBuf.append( " is missing )" ); which compiles down to the same code. Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
2013-11-20remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii callsNoel Grandin
Convert code like: aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" )); to: aStrBuf.append( "ln(x)" ); which compiles down to the same code. Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
2013-11-20convert equalsAsciiL calls to startsWith callsNoel Grandin
Convert code like: aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) to aStr.startsWith( "ActiveConnection" ) which compiles down to the same machine code. Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-17bugs.freedesktop.org -> bugs.libreoffice.orgAndras Timar
Change-Id: I56c1190c93333636981acf2dd271515170a8a904
2013-11-14Use rtl::StaticStephan Bergmann
Change-Id: I391e027b2567c4239c1d02e132c6508b3f49d381
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann
Change-Id: I6197f2f9c3359ebe6c3c639f15c3e19d66434f3e
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann
Change-Id: I5dd8f718cb96c4442e2fce08a8dc4130e934c68d
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann
Change-Id: Id218a6123037bf624044a6297edaede924bd4a9a
2013-11-14remove unnecessary sal_Unicode casts in various placesNoel Grandin
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-12document the use of the strtmpl.cxx and remove unnecessary macro usageNoel Grandin
Document the "calling" macros for the strtmpl.cxx template file. And remove unnecessary use of those macros in the calling file. Change-Id: I20e0dd74150773363b9fb557884b84692ce22f11 Reviewed-on: https://gerrit.libreoffice.org/6504 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-07Name threads for debug purposeArnaud Versini
Change-Id: Id99ba394b898b7da0057d4a145ce8dce46122782 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-11-07fdo#42783: remove CPU variable from environmentMichael Stahl
Replace uses with CPUNAME instead, and get rid of the horrible postgresql patch that worked around environment leakage. Change-Id: I38ccabfc438360524a272901bb9332ea708e274c
2013-11-05windows: remove _CRTIMP and _NTSDK definitionsThomas Arnhold
Those have no effects with current windows SDKs. Change-Id: I6fb2f8045fe1fc0ed4beef51dde487b7a7dfdc28
2013-11-04Convert code that calls OUString::getStr()[] to use the [] operatorNoel Grandin
This also means that this code now gets bounds checked in debug builds. Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-10-31Convert indexOf->startsWith and lastIndexOf->endsWithNoel Grandin
This is both an optimisation and a cleanup. This converts code like aStr.indexOf("XX") == 0 to aStr.startsWith("XX") and converts code like aStr.lastIndexOf("XXX") == aStr.getLength() - 3 to aStr.endsWith("XXX") Note that in general aStr.lastIndexOf("X") == aStr.getLength() - 1 converts to aStr.isEmpty() || aStr.endsWith("X") so I used the surrounding context to determine if aStr could be empty when modifying the code. Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-28Related: fdo#69641 convert OSL_ASSERT into assertCaolán McNamara
Change-Id: I63c32289c7ac6a428c8c50e49650fbac98c8c5e3
2013-10-28windows: warning 4706 is disabled globally in com_MSC_defs.mkThomas Arnhold
So there is no need to do this locally, too. Change-Id: Ibc623235cae07a86dfd0dbc1d7672ca4273facec
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-17fdo#70319 "exponent followed by at least on digit" also for special case 0.0Stephan Bergmann
Change-Id: I07e7917417b8a22cf6d64f2b7a447f9084b9fa2d
2013-10-14resolved fdo#70319 exponent must be followed by at least one digitEike Rathke
Change-Id: Icdd22fa0f1efcdd18cfea7cb48e1cbf2cf8d3533
2013-10-13lo_dlcall_argc_argv() is unusedTor Lillqvist
Change-Id: I318bb78b148564f64373dcb87bfb458c10f87489
2013-10-10sal: fix osl_setCommandArgs() on WNTMichael Stahl
... was missing from 1acaa577b67158c060d2f57414f7aea86504a489. Change-Id: I9098f4587f1c201328abbbcfb34d42f09d2e8203
2013-10-10Adapt to C90Stephan Bergmann
Change-Id: I491ca9ccfc5622afcec163e75792aa03a3a24a4f
2013-10-10sal: add special handling of argc==0 to osl_setCommandArgs()Michael Stahl
... to set up a fake command line. This is used from pyuno, when invoked from the "python" executable as "import uno". On WNT there is an API to get the actual command line, so just use that even in the "fake" case; on UNX just fake something up. Just for the record the whole osl_setCommandArgs() is called exactly once assumption should work out _unless_ there is a program that uses SAL_MAIN _and_ does a python-level "import uno" _before_ it wants to create a python-based UNO service (via pyuno_loader::CreateInstance), since pyuno already takes care to call Runtime::initialize() at most once. Change-Id: Ifd23de733ea3e6b694d46ab039b6aa4fd3e7fc1b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-10Remove support for undocumented SOLAR_USER_RTL_TEXTENCODING env varStephan Bergmann
...introduced in 2001 with a Sun-internal bug ID as 3b1d10acc297db493b1f4e1999f6ba71f72db7f1 and 54007bb90c30469a5357c56056b8fdba3a233e24 "#84715# osl_getThreadTextEncoding first defaults to contents of environment variable SOLAR_USER_RTL_TEXTENCODING." Change-Id: I991b4777c27a24419bf066cf41b3c4545d0fa681
2013-10-09Fail fast at least in debug buildsStephan Bergmann
Change-Id: I266d5cf5b98827617f7ed65c94a772e28808f386
2013-10-09pyuno: set up fake command line in getComponentContext()Michael Stahl
Easy to trigger the assert in osl_getCommandArgCount(), just run instdir/*/program/python and "import unohelper". Avoid that by setting up a fake command line, hopefully nobody expects to be able to give relevant args to python... Change-Id: I0df6c23d6ecbb3c2bce81a9d5bcecdcb1729ddbb
2013-10-09Use SAL_WARN_IF() instead of assert() so that our Python unit tests don't failTor Lillqvist
In some (all?) Python unit tests (or subsequentchecks?) osl_getCommandArgCount() gets called even if osl_setCommandArgs() hasn't been called, sigh. Change-Id: I53ba20806da3168182fd2011397fd29e549869dc
2013-10-09Use assertions to ensure proper use of the osl command line arg APITor Lillqvist
Stephan says: I don't buy that argument of making things less fragile; IMO it's that "defensive programming" approach gone wrong, where you add complexity to mitigate a problem's effects in one place, instead of fixing the problem itself in the real place. [...] The better robustification is probably to turn the OSL_TRACE in osl_getCommandArgCount (sal/osl/unx/process_impl.cxx) into something stronger like SAL_WARN, assert, or std::abort Change-Id: I3ba6684b4921eb67c2f4534e29e33056e8a891b3
2013-10-09Revert "Don't ignore -env: command line parameters in some cases"Tor Lillqvist
This was the wrong way to fix the problem. The root cause was a static initialiser in the OpenCL code, and that code should not even have been built for iOS. This reverts commit 261f1439e5516f6d60317a675d261af330a9a74c.