File legacy-fragment-import-libs-gui.diff of Package libreoffice

commit 02a6406a39e9b683ea6677f19e8423d6a6dc31e6
Author: Muthu Subramanian K <sumuthu@suse.com>
Date:   Fri Oct 7 19:39:14 2011 +0530

    n#699334: Legacy Diagram Text Import.

diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 4cbfff4..026da80 100644
--- svl/source/misc/strmadpt.cxx
+++ svl/source/misc/strmadpt.cxx
@@ -629,6 +629,16 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
             m_nSeekedFrom = STREAM_SEEK_TO_END;
             return nPos;
         }
+        else if ( nPos > Tell() )
+        {
+            // Read out the bytes
+            sal_Int32 nRead = nPos - Tell();
+            uno::Sequence< sal_Int8 > aBuffer;
+            m_xStream->readBytes( aBuffer, nRead );
+            return nPos;
+        }
+        else if ( nPos == Tell() )
+            return nPos;
     }
     SetError(ERRCODE_IO_CANTSEEK);
     return Tell();
openSUSE Build Service is sponsored by