diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-12 08:51:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-12 08:51:45 +0100 |
commit | fad50e6a8c95412aeb4a2490ceab0c8d4f402919 (patch) | |
tree | 5487ec3b67f643883ac2a06ee1a70cce39b9abfa /filter | |
parent | avoid optimization turning into pessimisation for stupid strings (diff) | |
download | core-fad50e6a8c95412aeb4a2490ceab0c8d4f402919.tar.gz core-fad50e6a8c95412aeb4a2490ceab0c8d4f402919.zip |
check if seek succeeded
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index c0b10b85e9b2..02861f911c0a 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6671,10 +6671,10 @@ sal_Bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape, sal_uLong nOldPosCtrl = rStCtrl.Tell(); sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl; // das Shape im Steuer Stream anspringen - rStCtrl.Seek( rInfo.nFilePos ); + bool bSeeked = (rInfo.nFilePos == rStCtrl.Seek(rInfo.nFilePos)); // Falls missglueckt, den Fehlerstatus zuruecksetzen und Pech gehabt! - if( rStCtrl.GetError() ) + if (!bSeeked || rStCtrl.GetError()) rStCtrl.ResetError(); else rpShape = ImportObj( rStCtrl, &rData, rData.aParentRect, rData.aParentRect ); |