summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2018-03-06ofz#6112 wrong start off sets for korean KSC5601 tableCaolán McNamara1-2/+2
Change-Id: If986352478f34f54015f1969c97c26e2ef05c06c Reviewed-on: https://gerrit.libreoffice.org/49446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit a704756d92d0dcb4822e7115a293192378151859)
2018-01-30tdf#49134 tdf#114466 Transfer privilege to become foreground processMike Kaganski1-0/+8
... to already open soffice process from newly spawned one on Windows. When an application takes user input, a timeout is started during which other processes cannot create foreground windows that might steal focus, and thus interrupt user input. The timeout is defined by SPI_SETFOREGROUNDLOCKTIMEOUT (see SystemParametersInfo) and ForegroundLockTimeout registry setting (see https://technet.microsoft.com/en-us/library/cc957208). If an application that currently doesn't have right to become foreground tries to show popups in this interval, the popup will stay on background, and only flash in taskbar. The application that has the right to steal focus (see the list in https://msdn.microsoft.com/en-us/library/ms632668) may transfer its right to another process using AllowSetForegroundWindow function. So, the intended effect is this: 1. User interacts with some foreground process (e.g., Explorer); a timeout is started to prevent non-privileged processes from stealing focus; 2. As the result, the process launches a new soffice process, which has privilege to create foreground windows (as it is started by foreground process); 3. It communicates with already started soffice process, which is currently in background, and so doesn't have privilege to create foreground windows until timeout expires; 4. It transfers its right to the already started soffice process, and then issues the required commands that might lead to need to show popup windows. Change-Id: I4208665c2ae4106fa06e72269f4c3804af40d582 Reviewed-on: https://gerrit.libreoffice.org/48849 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
2018-01-17-Werror=format-truncationStephan Bergmann1-2/+7
Change-Id: I1b27289724389018bd4048573e8c8e4cf28eb983 (cherry picked from commit 280cd27dbdab438e63ecb2599ab5dd20e04d71d5)
2018-01-17Work around GCC 7 mis-featureStephan Bergmann1-0/+7
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354> "Poor support to silence -Wformat-truncation=1" Change-Id: I486f8a3a12896df3d9506f53bca44a318e23c991 (cherry picked from commit 1b12d5ecb1be36267534e0b980d7c53d50645511)
2017-12-18sal: add pre-initialization scheme for allocations.Michael Meeks11-11/+218
This saves several megabytes of dirtied pages for each LOK client of Online. Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa Reviewed-on: https://gerrit.libreoffice.org/46592 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-05remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin4-16/+16
Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d) Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/45452 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
2017-12-05remove UL/L suffixes from shift-by-constant expressionsNoel Grandin2-20/+20
Change-Id: Ia470f643e3eefeccc14183133603db260460bd53 Reviewed-on: https://gerrit.libreoffice.org/41212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 224b770fa77fe12ad5dc543ce020aca316b6558d) (cherry picked from commit 58c171983d4f828d36bf1f6d8fb8329e69424c7e)
2017-12-05loplugin:useuniqueptr extend to check local varsNoel Grandin4-43/+27
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2489000d3fd66319a8355fd4e37cfdfda47296d0) Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 (cherry picked from commit e540ccfb5eb43bd4a3d6920074dce8436720ba8e)
2017-09-01ofz#3186: wrong starting offset for JOHAB 0x6D blockCaolán McNamara1-1/+1
Change-Id: I4de6d9d781b2f2313d8fd338b34dcb31434efe91 Reviewed-on: https://gerrit.libreoffice.org/41640 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4f982fb4f6ec635f8f900431761a55ab7d5cac2a)
2017-08-11ofz#2852 korean table entries start at 0xF not 0x7Caolán McNamara1-2/+2
Change-Id: Iaf3ed48d0eb0e5a57770af057c565a7310bb96d4 Reviewed-on: https://gerrit.libreoffice.org/40763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit c28ceacf6a1aedb4c965a513c72f7570244fbb6f)
2017-03-10ofz#770 JOHAB_73 table starts at 0xA not 0x2Caolán McNamara1-1/+1
the start value is out by one row Change-Id: I77ed154358516ccd47a090cf7ed45bb609bc81a3 Reviewed-on: https://gerrit.libreoffice.org/34993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 87c783c4a463969984e660f0b5bc57f4910f7856)
2017-02-01sal: add SAL_NO_ASSERT_DIALOGS variable to redirect...Michael Stahl1-0/+18
... the dialogs that pop up on assert() and abort() to stderr, which should work better in CI builds. Change-Id: I80ec95bae6cc21b8ac27f68ca93aa6c6cce707f4 (cherry picked from commit 2fc5a65a1808ce4304ea55f06c4587a2459b5d52) Reviewed-on: https://gerrit.libreoffice.org/33719 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-02ofz#358 SJIS_84 table mnLeadEnd is out by oneCaolán McNamara1-3/+3
sjis 82 and 83 correctly denote the last index available while 84 reports one past the last available index 0x84BE is the last value to map, not 0x84BF Change-Id: Idcadc2d554ee59586f6e2f2775301fe69c94d55a (cherry picked from commit 0f4eb22d5f3a86af9e5f8042c69e4ddf4a350b93) Reviewed-on: https://gerrit.libreoffice.org/32588 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-16Typo in meant-to-be-overloading function nameStephan Bergmann1-1/+1
Change-Id: I65ab9176b39a436afce23e6bd4423ebf76219166 (cherry picked from commit 0dc19268d2f82c4b95b1a0de28a19aea4e0f7e76) Reviewed-on: https://gerrit.libreoffice.org/32079 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-22trivial makefile cleanupsMichael Stahl1-3/+3
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-21remove dep on unotest from osl_Pipe testDavid Tardon2-2/+1
Change-Id: I5f5862a684e52bd3d1336fa9f8cffa77cdebbe4c
2016-11-21fix for 'warning C4702: unreachable code'Jochen Nitschke1-1/+1
on windows vista and higher only Change-Id: I19cc63ad7e96b58fa8eb341801f5ad55260abf85 Reviewed-on: https://gerrit.libreoffice.org/31021 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08Use the larger stack size for ASan/UBSan builds on macOS, tooStephan Bergmann1-3/+1
At least on my macOS 10.12.1, PTHREAD_STACK_MIN is 8192 (so stacksize was substantially smaller than 12MB), and without this change there were randomly looking failures in e.g. JunitTest_chart2_unoapi with a -fsanitize=address build. Change-Id: Icfe989a0e5097a9a0ae76c6e0f6ffcca18271245
2016-11-02loplugin:unusedfieldsNoel Grandin2-14/+0
Change-Id: I96634c18ba6600f8f7d5d04a162dcd7e1e312923 Reviewed-on: https://gerrit.libreoffice.org/30474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01loplugin:oncevar in sal..scriptingNoel Grandin2-9/+7
Change-Id: Id9ab12f3a61eb83a2288b2fd4d99ab77f5833e1b Reviewed-on: https://gerrit.libreoffice.org/30461 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26sal::detail::logFormat is no longer neededStephan Bergmann2-47/+9
...since 97354578d7195bce927f0c00c4e2ae9cd7344776 "Remove the obsolete functionality originally underlying osl/diagnose.h" Change-Id: I7c920bca9cdddb37fcbbc15d8629d01c21eb0787
2016-10-19loplugin:expandablemethodds in reportdesign..salNoel Grandin1-5/+0
Change-Id: Idb133e442b881d263fcb83a4858c4a08b451c0f0 Reviewed-on: https://gerrit.libreoffice.org/30032 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-14CppunitTest_desktop_lib: fix loplugin:cppunitassertequals warningsMiklos Vajna3-6/+6
And also address a few new warnings in sal, plus silence such warnings in salhelper till we can't print typeids out of the box. Change-Id: I38049146710b6885f6a874bf74eedbc38b4d4651 Reviewed-on: https://gerrit.libreoffice.org/29809 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-13approxEqual: check isFinite()Eike Rathke1-0/+2
Necessary as all comparisons involving a Nan evaluate to false and the assert() in isRepresentableInteger() was hit by crash test documents where approxEqual() was called with a least one Nan. Change-Id: I9e8f41c36c0cf14cabf47c3df773c601d32682d6
2016-10-13SOCKET_USE_AUTODIAL is dead codeStephan Bergmann2-231/+55
...ever since 010f71130b0d55079d01fbda38d45901de98b133 "INTEGRATION: CWS sal01: #105958# Remove usage of wininet.dll autodial functions" wrapped its central code in #ifdef SOCKET_USE_AUTODIAL instead of removing it properly. Change-Id: I4c077c71ce8eda3a3f8b83286178d0d7907a6e02 Reviewed-on: https://gerrit.libreoffice.org/29742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-12Don't allow O[U]StringBuffer in string concatenationStephan Bergmann2-6/+2
...as OStringBuffer b("foo"); b = "bar" + b; doesn't work as one might expect (see the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2016-October/075464.html> "concat of OUStringBuffer". That feature was LIBO_INTERNAL_ONLY, anyway. And of the affected places, MethodDescriptor::getSignature (codemaker/source/javamaker/javatype.cxx) was the only one that would actually have benefitted. Change-Id: Ib84266f43e40c42c2e428f0c0616db8cfa90adff
2016-10-10Handle loplugin:fpcomparison false positives by whitelistStephan Bergmann1-3/+1
Change-Id: I58e2beb0695a27922856bd8f8988d9e4508aceb6
2016-10-07New rtl::splitSurrogates, remove code duplicationStephan Bergmann1-7/+1
Change-Id: Ic96b64244f817196ccdfe06b97f7f31291adf372
2016-10-07tdf#100302: gbuild: always use $(LFS_CFLAGS)Michael Stahl4-10/+0
Currently LFS_CFLAGS are only used in a handful of libraries but there's no obvious reason why it can't just be set everywhere. Also set it in windows.mk, i have no idea if it's needed for MinGW (certainly not for MSVC). Change-Id: I5f62e3011c2089abbf5539fc54c7ff10e07b1599
2016-10-04isRepresentableInteger: assert(fAbsValue >= 0.0)Eike Rathke1-0/+1
Change-Id: Idf140b312617e2a3a739cb5571d1b29ef700315c
2016-10-04At least MSVC 2015 doesn't find sal/osl/w32/time.hStephan Bergmann1-1/+1
...when included as <time.h> (our rather sick convention, for include files other than standard headers) rather than "time.h" Change-Id: I5aacfb81de95ae4254e39badffc9c83c7ac0f58f
2016-10-04@since tag; sortingStephan Bergmann1-1/+1
follow-up to 2135eae2a97c17d89cb47a2074830fd2d7b2226f "let approxEqual() not scale too early for large representable integer values" Change-Id: I628e01297fea08915d0ca1c95f3ba13f7ce15db8
2016-10-04clang-cl loplugin: salStephan Bergmann38-949/+1075
Change-Id: If04d3f07dc8bffac8887773b5424c09848cd8f1a Reviewed-on: https://gerrit.libreoffice.org/29404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-03-Werror,-Wdeprecated-declarationTor Lillqvist1-1/+1
'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0. Change-Id: I3a95cbd4ff6ff4924bb7fe1a4c1bac4fad405856
2016-10-02unit test cases for approxEqual() and approxSub()Eike Rathke1-0/+23
Change-Id: I4aa53d83feaccd3d08c69a35cee2fa84f1ec0964 Reviewed-on: https://gerrit.libreoffice.org/29429 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-01let approxEqual() not scale too early for large representable integer valuesEike Rathke2-0/+40
And since this is now too much code for inline move implementation to math.cxx Which again made it necessary to give libreofficekit lokdocview.cxx its own implementation that doesn't even claim to build against sal ... Change-Id: I0f80be9d9172ee20693b9babde715206f2c3d8c1 Reviewed-on: https://gerrit.libreoffice.org/29428 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Fix typosAndrea Gelmini2-2/+2
Change-Id: Icfc61fcc5ace717bca4bea988243674afe31e6f8 Reviewed-on: https://gerrit.libreoffice.org/29435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30sal: WNT: print errno when oslCreateThread failsMichael Stahl1-0/+20
Change-Id: Iad0a2a7ba68b3f43c22e0b5a3cee646f8baba30e
2016-09-30osl_getSocketOption shall return the new lengthStephan Bergmann1-1/+1
regression introduced with c89f22ffcd4191f7cb8ef0e68adb2a0f0ec6c74e "INTEGRATION: CWS pj72" Change-Id: Icea8bc43e346dbe4cf7cbfdf1176704d52b339f4
2016-09-29tdf#83306 add unit test for compareWithLength and '\0'Michael Stahl2-1/+41
Change-Id: Iba48390035c560ea499c7fd793d5dd84d1f63cf0
2016-09-29tdf#83306: sal: fix compare of rtl::OUString/OString containing '\0'Michael Stahl1-4/+5
For whatever reason oox shape import code uses OUStrings that contain '\0' characters. The rtl_uString / rtl_String are allowed to contain '\0' but the strncmp/wcsncmp functions stop comparing on the first '\0', so use memcmp/wmemcmp instead. (regression from 281989007fd7dea997ed9a65f513f80b1aff67dd) Change-Id: If148927f19d065a21f32f3c14433b0bda7ae9301 Reviewed-on: https://gerrit.libreoffice.org/29384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-26sal: Mac OS X 10.8 fails test_log1pMichael Stahl1-0/+4
... because its libc log1p() does not return -0.0 unmodified but as +0.0 Change-Id: Ib3fcd005a9876e0e74775bf4f826a887cdd29279 Reviewed-on: https://gerrit.libreoffice.org/29237 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-09-23-Werror,-Wunused-variable (clang-cl)Stephan Bergmann1-1/+0
Change-Id: I829e2d45ac9fabc8fe1a26bebd9e6ce8c2af29c7
2016-09-23This is fixed with MSVC 2015Stephan Bergmann1-1/+1
Change-Id: I032b872f75b59904c1c81e8932ad8058ece301b0
2016-09-20CPPUNIT_ASSERT_EQUAL disambiguationStephan Bergmann1-12/+12
Change-Id: I31d30627badb08469f7e0fd3ded957df78b58275
2016-09-20Related cid#1371289: Work around missing OUStringBuffer move semanticsStephan Bergmann2-0/+83
...by adding more assign op overloads instead Change-Id: I2d2e1b7f19d1b57528707ed5a5cce94b5fa5c2d0
2016-09-18loplugin:unusedenumvaluesNoel Grandin1-2/+1
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b Reviewed-on: https://gerrit.libreoffice.org/28942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15Remove outdated commentTor Lillqvist1-1/+0
Change-Id: I8547760d4ea24205e21f215f25f0c58757bd9329
2016-09-15loplugin:singlevalfields in l10ntools..saxNoel Grandin3-13/+6
and ignore URE headers in the plugin Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588