summaryrefslogtreecommitdiff
path: root/include/osl/file.hxx
AgeCommit message (Collapse)AuthorFilesLines
2024-07-20Remove now unneeded osl/diagnose.hGabor Kelemen1-1/+0
followup to commit 57c228803e55ed343c6693de7d0857ad7d3cd9e3 Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998 Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins
2024-06-07tdf#43157 Use SAL_WARN_IF instead of OSL_PRECONDGabor Kelemen1-1/+1
Change-Id: I9876ac2bb83f8dc96c41c20dfd2bf779ffe105fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167997 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-14osl_replaceFile: fallback to osl_moveFile in more cases on WindowsMike Kaganski1-1/+1
E.g., calling it with files residing on different volumes, ReplaceFileW will fail with ERROR_UNABLE_TO_MOVE_REPLACEMENT. Handle that error, and also the two other error codes specifically described at [1], to allow more universal use of osl_replaceFile / osl::File::replace, which is "atomic" on Windows, since it uses ReplaceFileW that is suggested as a replacement for Transactional NTFS [2]. [1] https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-replacefilew [2] https://docs.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf Change-Id: I501c267e5bdd88a33560d2bb916db1a0b6e01831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126800 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-02tdf#130978 Added comment to all published APImsrijita181-0/+4
Change-Id: I744788bde9778f85ccd9d7667e19d16842900a29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110248 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-24Fix typosAndrea Gelmini1-1/+1
Change-Id: I9385704bea54ff504457f7ac1ec39ed98cfdaf97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101276 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-24Fix typoAndrea Gelmini1-1/+1
Change-Id: I5a430d2e681b0c95476b4b59ca5281da6a05ee8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90924 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-19Fix multiple documentation sections (osl)Julien Nabet1-2/+0
Fix these warnings: Line 45: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.h:1308: warning: return value 'osl_File_E_LOOP' of osl_removeFile has multiple documentation sections Line 49: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1893: warning: return value 'E_BUSY' of osl::Directory::remove has multiple documentation sections Line 50: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1361: warning: return value 'E_LOOP' of osl::File::remove has multiple documentation sections Change-Id: Id82280efd9c6d1e33df966159dbef677839f6083 Reviewed-on: https://gerrit.libreoffice.org/83229 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-10Adapt osl_replaceFile documentationStephan Bergmann1-1/+1
...to eedf523c123a82bf3cbc5f389783e22d75b2e2c5 "tdf#127069 sal: preserve gid of files in the unx osl_replaceFile()" Change-Id: I47627418a9cd662802e4de3aa4cad4128af82ad4 Reviewed-on: https://gerrit.libreoffice.org/80606 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-14Fix typoAndrea Gelmini1-3/+3
Change-Id: I151f472d5c542b989e858da22b29140c8e1b9b5b Reviewed-on: https://gerrit.libreoffice.org/75584 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-10an is used before a vowel soundCaolán McNamara1-1/+1
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-27tdf#119238: keep replaced file's identity when renaming docfileMike Kaganski1-0/+33
Regression from 2157a3536f97ff5ae7c82611a801fef7e3708983 sfx2 store: try rename before copying Rename is cheaper then copying the content over manually, so try that first. On Windows, we need to keep the file's dentity, including metadata (e.g., creation time, which is kept in FS). WinAPI has ReplaceFileW specifically for this, and it keeps ACLs of the original file, and otherwise makes the changed file not a separate entry, but updated old file from system's PoV. Eventually, we could try to restructure creating backup copies (e.g., for documents when configured so) to take advantage of this function being able to do that. Change-Id: I6001a2a3af5e10bc010f5ef129f4bb6f83ee1581 Reviewed-on: https://gerrit.libreoffice.org/60163 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-09-11Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where availableStephan Bergmann1-1/+1
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed. Also, Clang unfortunately is rather picky about the relative order of SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl). Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3 Reviewed-on: https://gerrit.libreoffice.org/60274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-10tdf#42949 Fix IWYU warnings in include/osl/*hxxGabor Kelemen1-3/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa Reviewed-on: https://gerrit.libreoffice.org/56723 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-22Fix typosAndrea Gelmini1-1/+1
Change-Id: Idbe136fbfd222e8baad588dc36a2f9b7ce6996ec Reviewed-on: https://gerrit.libreoffice.org/54590 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-22tdf#115383: revert mixup of E_ROFS and E_SPIPE in file.hxxAron Budea1-2/+2
Regression from a9739f2dec197793fa9400dd95be49494dc85264 Change-Id: I1b55b0201888a63bd2439be8c0421f450d609018 Reviewed-on: https://gerrit.libreoffice.org/50103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-17Fix typosAndrea Gelmini1-3/+3
Change-Id: I5fff9ccb1bc74b85ee378439ffa2272583ffcb0f Reviewed-on: https://gerrit.libreoffice.org/48024 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15More loplugin:cstylecast: salStephan Bergmann1-1/+1
Change-Id: I1ca982dc8c35c7a2762572d7bb47066ead8e6c89
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-1/+1
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-23loplugin:includeform: UNO API include filesStephan Bergmann1-7/+7
Change these back to consistently use the "..." form to include other UNO API include files, for the benefit of external users of this API. Change-Id: I9c9188e895eb3495e20a71ad44abfa2f6061fa94
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-1/+1
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: variety of doxygen fixesChris Sherlock1-7/+0
Change-Id: I48e4bcce447a1efdb37d6dca9e5808ec8d73492b
2017-06-23osl: doxygen fixes for headersChris Sherlock1-52/+52
Change-Id: I3f30b5ab985c2ff709116568905b941c5d50fd1a
2017-06-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib2ba32d48d3df16b0b20deea84416fe15a2d7176 Reviewed-on: https://gerrit.libreoffice.org/38650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-28osl: doxygen comment fixChris Sherlock1-47/+47
Change-Id: I6c3b732bd9abe5cab44347adf0d8bc19588f31b5 Reviewed-on: https://gerrit.libreoffice.org/38101 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-16Try to fix loplugin:comparisonwithconstant's rewrite-with-macros issueStephan Bergmann1-6/+6
...that had plagued 2e293a731c1559c9869dfcb32491bc600fc18e4e "new loplugin/rewriter comparisonwithconstant" (in sal/osl/unx/pipe.cxx), and auto-rewrite the remaining occurrences in sal (that the mentioned commit had failed to address, for whatever reason) Change-Id: I3dc3bae8dd92ba8bf576f6e06e7c9ee21f883661
2017-05-14osl: document file.hxx, swap order of E_ROFS and E_SPIPE to match file.hChris Sherlock1-47/+47
Change-Id: I085852e7c9fed285117f426e775f7ca2c123e4c0 Reviewed-on: https://gerrit.libreoffice.org/37594 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-17osl: use doxygen @retval and remove HTML markupChris Sherlock1-369/+310
Change-Id: Ia0d0d6b0805612a26fcb3e1cf2f7d2555f7f98f1 Reviewed-on: https://gerrit.libreoffice.org/35331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-67/+67
...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>
2016-02-09Remove excess newlinesChris Sherlock1-5/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-12typosMichael Stahl1-1/+1
Change-Id: I970429c266cc1a8cf36cfba379b447899b5dbce9
2015-11-10Missing includes (for NULL)Stephan Bergmann1-0/+1
Change-Id: Id2359f6ff4bddb2afbc0b346e17cd858f00179e3
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-5/+5
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
2015-02-07loplugin:deletedspecialStephan Bergmann1-8/+8
Change-Id: I646d55ee80ceeefbb3647ec64278460cc5af579f
2014-11-19sal, cppuhelper headers a little more complete and self-containedMichael Stahl1-0/+1
All of them now build as-is (doing that is actually a pain because some are named the same as C library headers and clang looks first in the directory where the source file is in...). Change-Id: Ief6e245c8f49fcee678aebd46394c19e4cb47f51
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl1-0/+1
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-2/+2
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-08-17warning C4800: 'unsigned long' : forcing value to bool 'true' or 'false'Thomas Arnhold1-2/+2
Change-Id: I7546fb8fd0a5b83818c8496d44ec180ec48e72eb
2014-08-13warning C4365: 'argument' : conversion from 'sal_Int32' to 'sal_uInt32'Thomas Arnhold1-1/+1
Change-Id: I2836ce249e57b1129947616f85894afc16b45547
2014-05-20fdo#60338: Introduce osl_createDirectoryWithFlagsStephan Bergmann1-2/+9
...so that utl::TempFile can pass osl_File_OpenFlag_Private and doesn't have to resort to umask (the calls to umask around Directory::create had somewhat erroneously been removed recently with 1d72a0262c4570631d0aa8f98e34e21fb9d6ae42 "Related fdo#60338: Create missing temp file dir with user's original umask," mistaking this for creation of intermediate directories in the hierarchy). On Windows, the flags argument to osl_createDirectoryWithFlags is ignored completely for now. Change-Id: Iac56a5049d579be729a3f338aa62105123edb6cb
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante1-1/+1
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-01coverity#707976 Uninitialized pointer fieldCaolán McNamara1-5/+4
Change-Id: I6e62d97dc1c7020320aa9a0b58a692ca2dc6f617
2014-04-14typo: dependend -> dependentThomas Arnhold1-3/+3
2014-03-08remove confusing and potentially dangerous premature-optimizationNorbert Thiebaud1-2/+3
Change-Id: Ia23f591519eba257441b725a219a1eddda937c39
2014-03-01Remove visual noise from includeAlexander Wilms1-8/+8
Conflicts: include/framework/preventduplicateinteraction.hxx include/sfx2/sfxbasecontroller.hxx include/sfx2/sfxbasemodel.hxx include/toolkit/awt/vclxtabpagemodel.hxx include/vcl/field.hxx include/vcl/settings.hxx Change-Id: Ibccf9f88c68267a3d7e656012b51eaf644c418c2 Reviewed-on: https://gerrit.libreoffice.org/8272 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-27Let C++ inline functions return bool instead of sal_BoolStephan Bergmann1-26/+26
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Change-Id: Ibf43c5ded609b489952e1cc666cac1e72ffa2386
2013-11-09fdo#65108 inter-module includes <> include/oslNorbert Thiebaud1-1/+1
Change-Id: I0490192db3d6b46c6b181ae122028e11682a13cf
2013-10-23fixincludeguards.sh: include/o*Thomas Arnhold1-3/+3
Change-Id: Ibd5d8af00f6582d53231c76e2b04e737b5804497
2013-09-07typo fix: absoulte -> absoluteAndras Timar1-1/+1
Change-Id: Ib728cb9bac3f42e17649685b4413b9335f2dc2c4
2013-05-23Use C++ static_castStephan Bergmann1-33/+33
Change-Id: I36793cf0144de5e051d277e70457f36dbfc933ff
2013-04-24move URE headers to include/David Tardon1-0/+1979
Change-Id: Ib48a12e902f2311c295b2007f08f44dee28f431d Reviewed-on: https://gerrit.libreoffice.org/3499 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>