[Libreoffice-commits] core.git: include/osl

Chris Sherlock chris.sherlock79 at gmail.com
Sat May 27 06:50:57 UTC 2017


 include/osl/file.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f347ec8f6fa7143ad98eac96051b6f4b56e71847
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun May 21 20:32:53 2017 +1000

    osl: osl_setFilePos uHow and uPos parameter desc. are amazingly inaccurate!
    
    Change-Id: Ie96f31b24b4f23ef72f12adee14dfe4092fc8e2b
    Reviewed-on: https://gerrit.libreoffice.org/37873
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/osl/file.h b/include/osl/file.h
index fd52e30e0399..44ce6a13dc5b 100644
--- a/include/osl/file.h
+++ b/include/osl/file.h
@@ -699,13 +699,15 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
     Handle to a file received by a previous call to osl_openFile().
 
     @param uHow [in]
-    Distance to move the internal position pointer (from uPos).
+    How to calculate the offset - osl_Pos_Absolut means start at the beginning of the file, osl_Pos_Current means
+    offset from the current seek position and osl_Pos_End means the offset will be negative and the position will be
+    calculated backwards from the end of the file by the offset provided.
 
     @param uPos [in]
-    Absolute position from the beginning of the file.
+    Seek offset, depending on uHow. If uHow is osl_Pos_End then the value must be negative.
 
     @retval osl_File_E_None on success
-    @retval osl_File_E_INVAL the format of the parameters was not valid
+    @retval osl_File_E_INVAL the format of the parameters was not valid (e.g. if uHow is osl_Pos_End then must be negative)
     @retval osl_File_E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files
 
     @see    osl_openFile()


More information about the Libreoffice-commits mailing list