[Libreoffice-commits] .: 2 commits - sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Oct 17 06:24:48 PDT 2011


 sc/source/filter/excel/xistream.cxx |    7 +++++--
 sc/source/filter/excel/xlroot.cxx   |    5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 722d993a4384d8c4f294994757894af09348ac4f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 17 14:00:57 2011 +0100

    check that seeks and reads succeeded

diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 1487a0e..e5ec510 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -1034,10 +1034,13 @@ void XclImpStream::RestorePosition( const XclImpStreamPos& rPos )
 
 bool XclImpStream::ReadNextRawRecHeader()
 {
-    mrStrm.Seek( mnNextRecPos );
-    bool bRet = mnNextRecPos + 4 <= mnStreamSize;
+    sal_Size nSeekedPos = mrStrm.Seek( mnNextRecPos );
+    bool bRet = (nSeekedPos == mnNextRecPos) && (mnNextRecPos + 4 <= mnStreamSize);
     if( bRet )
+    {
         mrStrm >> mnRawRecId >> mnRawRecSize;
+        bRet = mrStrm.good();
+    }
     return bRet;
 }
 
commit 644ded05e6ca6ec428f2e3015238c9448c3300d2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 17 13:35:44 2011 +0100

    is it a secret what the error message is ?

diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 7b6f24a..7241852 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -29,6 +29,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sc.hxx"
 #include "xlroot.hxx"
+#include <rtl/strbuf.hxx>
 #include <com/sun/star/awt/XDevice.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XFramesSupplier.hpp>
@@ -159,9 +160,9 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
         mfScreenPixelX = (aDeviceInfo.PixelPerMeterX > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterX) : 50.0;
         mfScreenPixelY = (aDeviceInfo.PixelPerMeterY > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterY) : 50.0;
     }
-    catch( Exception& )
+    catch( const Exception& e)
     {
-        OSL_FAIL( "XclRootData::XclRootData - cannot get output device info" );
+        OSL_FAIL( rtl::OStringBuffer("XclRootData::XclRootData - cannot get output device info: ").append(rtl::OUStringToOString(e.Message,osl_getThreadTextEncoding())).getStr() );
     }
 }
 


More information about the Libreoffice-commits mailing list