diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/osl/detail/file.h | 3 | ||||
-rw-r--r-- | sal/osl/unx/file.cxx | 8 | ||||
-rw-r--r-- | sal/util/sal.map | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/sal/inc/osl/detail/file.h b/sal/inc/osl/detail/file.h index e6a6671dcb29..8e2c910f258c 100644 --- a/sal/inc/osl/detail/file.h +++ b/sal/inc/osl/detail/file.h @@ -54,6 +54,9 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileOSHandle( oslFileHandle Handle, sal_IntPtr *piFileHandle ); +/* for unit testing. */ +SAL_DLLPUBLIC oslFileError SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle ); + #if defined __cplusplus } #endif diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 84cb2f006811..7dd557a7cef5 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -699,8 +699,8 @@ oslFileError FileHandle_Impl::readLineAt ( } if (state != LINE_STATE_BEGIN) { - /* store (and eat) the newline char */ - m_buffer[curpos] = 0x0A, curpos++; + /* skip the newline char */ + curpos++; /* flush buffer to sequence */ result = writeSequence_Impl ( @@ -854,9 +854,9 @@ static int osl_file_queryLocking (sal_uInt32 uFlags) return 0; } -#ifdef ANDROID +#ifdef UNX -static oslFileError +oslFileError SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandle ) { oslFileError eRet; diff --git a/sal/util/sal.map b/sal/util/sal.map index 1e9753b4845d..472ea8f45614 100644 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -649,6 +649,7 @@ PRIVATE_textenc.1 { # LibreOffice 3.6 PRIVATE_file.1 { # LibreOffice 3.6 global: osl_getFileOSHandle; + osl_openMemoryAsFile; }; # Unique libstdc++ symbols: |