summaryrefslogtreecommitdiffstats
path: root/sal
Commit message (Collapse)AuthorAgeFilesLines
* fix system-clucene/-boost build with gcc 4.4Rene Engelhard2012-09-191-0/+3
| | | | Change-Id: I95d23e6728571b3f3a6421a05fec814f7c5d059c
* dung out no longer needed initUCBHelper methods; thanks to sberg.Michael Meeks2012-09-191-21/+0
|
* deprecate oustringostreaminserter.hxxNorbert Thiebaud2012-09-185-31/+14
| | | | | | | | | | | | | | | | | | | the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
* move ostream OUString operator<< directly to ustring.hxxLuboš Luňák2012-09-182-46/+34
| | | | | | | It apparently works that way, so there's no need to have an #include loop. Change-Id: I58d4f0461c14637872a139f0fbfb78f2a99fe28a
* migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud2012-09-172-4/+4
| | | | | | | Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
* Some comment clean upStephan Bergmann2012-09-171-13/+14
| | | | Change-Id: I33fbe68b17e9a1c457b37c6d81619f2df67fbe8d
* add osl_atomic_* api to allow for inlined atomic increment/decrementNorbert Thiebaud2012-09-171-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | atomic increment/decrement is provided by osl_increment/decrementInterlockedCount() but that is a exported dll function, so it cannot be inlined. valgrind analysis of a run, loading a medium sized spreadsheet, shows that these 2 functions were called 3.5 millions times for a total cost of 55 millions of instructions... a cost of 8 instructions per call, which is at least a 300% overhead since an atomic inc/dec is 2 instructions iow we could save about 1% of the total instruction count of that run(4.6B) We cannot change the existing api, as this would break ABI. but we can add a new api. and migrate internal user to it. osl_atomic_decrement/osl_atomic_increment do the same task, than osl_*IntelockedCount() but do that inlined if possible. Note that this version only optimize the case GCC with atomic built-in. but support for other case should not be very hard. follows-up patches will replace the use of the osl_*InterlockedCount() in the product with their osl_atomic_* equivalent. Change-Id: If4dcbf94ea6f62eb6d55d30613fe65878ffb8023 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* update unused code listCaolán McNamara2012-09-171-40/+0
| | | | Change-Id: I4d6ad11fbe68420931e88defa20afbef290d4d24
* Include header with prototypes of defined functionsStephan Bergmann2012-09-172-4/+6
| | | | Change-Id: Ia28c36b1627ef944adecd5c8a55c150bd0f9aa02
* export sal init and deinit functionsDavid Tardon2012-09-162-4/+4
| | | | | | | Linking of cppunittester (and any other executable that uses SAL_IMPLEMENT_MAIN or SAL_IMPLEMENT_MAIN_WITH_ARGS) fails otherwise. Change-Id: I778941ab2069819789f96ab04f364ea61cf4a3cb
* Let --enable-assert-always-abort affect setting NDEBUG directlyStephan Bergmann2012-09-151-17/+0
| | | | | | | | | | | For one, assert.h is designed to be includeable multiple times with changing NDEBUG settings, so it is not robust to include it early in sal/macros.h with "correct" NDEBUG settings and potentially include it again later. For another, there is #ifndef NDEBUG code providing functionality used exclusively within assert calls, which must be compiled with the same NDEBUG-setting as the relevant #include <assert.h>. Change-Id: I7b2f9c85f8e2155051274757c64162ed5a5e9d1b
* Include saldllapi.h explicitly where neededStephan Bergmann2012-09-1547-79/+189
| | | | Change-Id: I7ba421479cd332e059ed9da1c6090e2df420347e
* Revert "saldllapi.h is really not included outside of sal itself"Stephan Bergmann2012-09-156-5/+26
| | | | | | | | | | | | | | This reverts commit 2dfe34ce0efef6ec0412130a32f755657710363d: * sal/saldllapi.h is about something different than sal/types.h (it is rather a mistake of cf77e8a0b9dc26d5007c76388c3f09231f048bdd "sal: add visibility symbols" to shortcut the #include of sal/saldllapi.h into sal/types.h instead of the headers that actually need it), not every header needs to include sal/types.h * sal/config.h is the header to always include first (not sal/types.h) Change-Id: I217f2540197ddb682c6c00e529b812b04b327d73
* Fix comparisonJulien Nabet2012-09-151-1/+1
| | | | Change-Id: Id2db7abdec7373082f85fb9d8479427d09cc0a12
* typo: Uniocde -> UnicodeAndras Timar2012-09-141-1/+1
| | | | Change-Id: I1befdc4c9772c4bf66ee12bf0d2d4aa303903099
* sal_rtl_uri unittest seems to depend on sal_textenc library tooLuboš Luňák2012-09-141-0/+8
| | | | Change-Id: I3b85f3916d49a1853d073879a906506bee0d4fba
* better debug message when textenc module loading failsLuboš Luňák2012-09-141-3/+2
| | | | | | | This is at least the second time there's a race condition during build, and OSL_TRACE is just SAL_INFO, i.e. not printed by default. Change-Id: I1c683cf463665c6e36097025756c3aeab3a2c330
* Adapt for DISABLE_DYNLOADING possibility on AndroidTor Lillqvist2012-09-142-3/+3
| | | | Change-Id: I7fcea698c3d89c5b84b38a708502bcdf4526a614
* add a configure option to make assert() abort in release codeNorbert Thiebaud2012-09-141-0/+16
| | | | Change-Id: I93720ee3338426174b31a6ea6dba3af7ffb7e207
* remove use of SAL_MIN() macroNorbert Thiebaud2012-09-145-9/+8
| | | | Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
* remove SAL_MAX() macros and few usersNorbert Thiebaud2012-09-143-9/+25
| | | | Change-Id: I5ece116a66ab37fe64aac6c60bc38244677d499a
* removed unused sal macro (SAL_FIELDOFFSET)Norbert Thiebaud2012-09-141-4/+0
| | | | Change-Id: I5b4b70ecc87efc943afe8a408140ef91e108e0a3
* saldllapi.h is really not included outside of sal itselfNorbert Thiebaud2012-09-146-26/+5
| | | | | | | furthermore sal/config.h is already included by sal/types.h so no need to include it twice Change-Id: Id84122eb102eececc1001ea4a56c556ff775defa
* WaE: unused parameter 'uFlags'Tor Lillqvist2012-09-121-0/+1
| | | | Change-Id: Ifb3569201ea5d96c2ff293bf0f8ba74e6205dc15
* Work around some potential problems with thread-unsafe getenvStephan Bergmann2012-09-124-27/+42
| | | | | | | I have seen at least one failure of one of our unoapi tests where soffice.bin crashed in getenv(3). This patch is just a drop in the ocean, though. Change-Id: Iac8a2283b0a62e4fa95a0d063c1676af6c2390be
* diagnose.c -> diagnose.cxx (to ease further modification)Stephan Bergmann2012-09-122-1/+1
| | | | Change-Id: I6c050c0cedab6aeed556dc770c3700e6fbbb4731
* Simplify osl_searchPath_implStephan Bergmann2012-09-121-21/+6
| | | | Change-Id: I78a97b5a1abbcb7921eba60b8014a21373c0b596
* no ascii >127 chars in string literalsLuboš Luňák2012-09-111-1/+1
| | | | Change-Id: Icf7fadc27823b0cd32795f3ab685602f9ad6c99c
* fdo#39625 Make existing cppunittests workRadu Ioan2012-09-114-21/+49
| | | | | | | | | | | | | | Make sal_rtl_uri cppunittest work - removed call to simpleheader.hxx - added call in Module_sal.mk for sal_rtl_uri - created mk for cppunittest for sal_rtl_uri - removed duplicate include - change from t_print to printf Change-Id: I928ade62eb51ba1cb0a74e347411b344d57e97d0 Reviewed-on: https://gerrit.libreoffice.org/590 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
* Missing "include"Stephan Bergmann2012-09-111-2/+2
| | | | Change-Id: I93baa875c15ea2186f7e738bfa48457e7fa09f88
* what gets tested here turns out to be out of date nowCaolán McNamara2012-09-105-617/+0
| | | | Change-Id: I61b96b8d0e9c821f0e6228430eece1617871a916
* fdo#39625 Make existing cppunittests workRadu Ioan2012-09-104-27/+63
| | | | | | | | | | | | | | | | | Make sal testHelperFunctions cppunit work - removed call to simpleheader.hxx - added call in Module_sal.mk for sal_testHelperFunctions - created mk for cppunittest for sal_testHelperFunctions - removed unused and unusefull function Patch#2 - remove some unusefull include - add bug number to commit message Change-Id: I2f4e831cea0213a07f440bb00e0302eb1c4d7dc1 Reviewed-on: https://gerrit.libreoffice.org/588 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* use new file header, this is actually a new fileLuboš Luňák2012-09-071-31/+6
| | | | Change-Id: If12e05b0d46fbbd815b9af5dc9551e2f07d859be
* add O(U)String::startsWith() to complement endsWith()Luboš Luňák2012-09-066-0/+156
| | | | | | | There's match(), with the second argument defaulting to 0, which does the same, but that's pretty non-obvious. Change-Id: Idd4de9388f53e1b5dc5d48446d1001af32c0af3d
* Detach thread before returning from android_main()Tor Lillqvist2012-09-051-0/+1
| | | | Change-Id: I593e94e90971b6be681de48dce74f7df2293c10e
* fdo#38913: Prevent invalid parameter handler crashesStephan Bergmann2012-09-051-0/+29
| | | | | | | | | | It appears that on Windows at least some jvm.dll versions can cause calls to _fileno(NULL), which leads to a call of the invalid parameter handler (see <http://msdn.microsoft.com/en-us/library/ksazx244%28v=vs.80%29.aspx> "Parameter Validation: Visual Studio 2005"). The default handler causes the application to crash, so install a "harmless" one instead. Change-Id: Id6a3ffb63f70b0c65546bc933e994c8dbf35203c
* allow NULL pModuleName for WNT in osl_getModuleHandleCaolán McNamara2012-08-291-1/+2
| | | | | | | osl_getModuleHandle under unix can have a NULL pModuleName and the underlying GetModuleHandle on windows allows a NULL modulename as well Change-Id: Iaf154e635e9c96cbc62d525a7552339ce132f3dc
* callcatcher: make VCLXPrinterServer an XTypeProviderCaolán McNamara2012-08-281-12/+0
| | | | Change-Id: Ib6e4e4c61c56cea9c6171f36989e903f3c35aa4e
* Move -DHAVE_GCC_BUILTIN_ATOMIC to solenv/gbuildStephan Bergmann2012-08-271-3/+0
| | | | Change-Id: I82f62c998837783ac69317123268b0c87f74425f
* fdo#53855: Use the newly added HAVE_GCC_BUILTIN_ATOMIC for salJung-uk Kim2012-08-272-11/+16
| | | | | | | | Signed-off-by: Stephan Bergmann <sbergman@redhat.com>: * nCount is needed in else branches after all * tabs -> spaces Change-Id: Iaa39ba9e1ed645819905f0e484fa4f1812271700
* Perhaps this will fix the windows build?Kohei Yoshida2012-08-251-5/+6
| | | | Change-Id: Ia57ab6bfa9e7fa663b699627cec07d19a378b293
* fdo#39625 Make existing cppunittests workRadu Ioan2012-08-254-72/+37
| | | | | | | | | | | | | | | Make rtl uuid cppunit work - removed call to simpleheader.hxx - added call in Module_sal.mk for rtl_uuid - created mk for cppunittest for sal_rtl_uuid Second patch: - removed makefile.mk as Stephan suggested - modified CppunitTest_sal_rtl_uuid.mk header Change-Id: If090843203e38d3eced14941b58e6122d27bdb09 Reviewed-on: https://gerrit.libreoffice.org/422 Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com> Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
* Related fdo#46249: FileStatus can have fewer fields than requestedStephan Bergmann2012-08-211-20/+47
| | | | | | | | | | | Turns out 608fe962cc649ad62c489811d3a8666e0e06e5e7 "Let osl::FileStatus getters assert programming errors" was overly optimistic and misunderstood that osl_getFileStatus(..., nMask) /can/ return a FileStatus for which isValid(nMask) is false, esp. for stuff like file names and URLs of Windows drives and servers. That in turn leads to existing code now calling rtl::OUString(_aStatus.ustrFileName) etc. with null argument and crashing. Change-Id: Icd2168e209aa1c7a6df30cd954513d01034923db
* mingw doesn't know __uuidofLuboš Luňák2012-08-211-0/+2
| | | | | | | Copied from fpicker/source/win32/filepicker/comptr.hxx, which otherwise seems to be the same file. Change-Id: I51ca96c1280e75f9318fcbc74997b2bf755fff95
* fdo#53252: _toupper is unreliableStephan Bergmann2012-08-201-1/+1
| | | | | | | | | | | | | | | <http://msdn.microsoft.com/en-us/library/45119yx3%28v=vs.80%29.aspx> "toupper, _toupper, towupper, _toupper_l, _towupper_l: Visual Studio 2005" states: "In order for toupper to give the expected results, __isascii and isupper must both return nonzero." But a community comment clarifies: "This is incorrect, and should refer to '_toupper' (the macro form), not 'toupper'." (Which makes sense, as otherwise toupper would violate the C Standard.) And indeed, at least for some LO built against MSVC 2008 Express on Windows 7, _toupper('C') = '#' is broken, while toupper('C') = 'C' is good. (And the unexpected '#' then causes all sorts of errors in the code.) Change-Id: Iddaddcaf0cc3ffb30e55b0f410a6cfe9118accc8
* Handle CppUnit::DynamicLibraryManagerExceptionTor Lillqvist2012-08-171-1/+7
| | | | Change-Id: I81f9b133ffb03c225b276639f60ad5e7f38ec1ef
* For kicks, enable cross-building for Android on MIPSTor Lillqvist2012-08-161-3/+3
| | | | Change-Id: I6fa2b9a50c525fb2d8666a144409eb9a3ad2698a
* -Werror,-Wstrncat-size (Clang towards 3.2)Stephan Bergmann2012-08-151-3/+3
| | | | Change-Id: Ifdf0c47b38621835d6c6fa3a180d78f3f14edabf
* Remove some dead assignements in sal/cipher.cxxOlivier Hallot2012-08-141-4/+0
| | | | | | | | Remove some dead assignements indicated by clang scan-build report. Thanks to John Smith clang investigation Patch corrected Change-Id: Icbee3a65b6753d45433f1a4ca30567675e27e6d9
* -Werror,-Wunused-private-field (Clang towards 3.2)Stephan Bergmann2012-08-141-17/+16
| | | | Change-Id: Ib98c4d608f15980449a6949615a38cd8a436012f