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

Caolán McNamara caolanm at redhat.com
Mon Mar 13 20:21:17 UTC 2017


 include/tools/stream.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 73858eed8e144c3cd9fcdae786e015ca325b9c11
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 13 16:34:35 2017 +0000

    fix remainingSize for writable modified MemoryStream
    
    Change-Id: If8abbca4701002b7c171c19fc6ec56d3211b0cb4
    Reviewed-on: https://gerrit.libreoffice.org/35145
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index bd7f77b..ef7091e 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -650,7 +650,7 @@ public:
 
     void            ObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; }
     void            SetResizeOffset( std::size_t nNewResize ) { nResize = nNewResize; }
-    virtual sal_uInt64 remainingSize() override { return GetEndOfData() - Tell(); }
+    virtual sal_uInt64 remainingSize() override { FlushBuffer(true); return GetEndOfData() - Tell(); }
 };
 
 class TOOLS_DLLPUBLIC SvScriptStream: public SvStream


More information about the Libreoffice-commits mailing list