summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-04-18 13:56:56 +0530
committerStephan Bergmann <sbergman@redhat.com>2016-04-18 08:26:07 +0000
commit0ef6945b494ee86ed601fb9b09613cb4825040b1 (patch)
tree7a490ea41a8f0366e18533138b9939db74d2f125 /extensions
parent789055bc2acb4c71483fd60ea258d158bd5aec10 (diff)
Fix unconditional seek in sanedlg
I fixed my previous mistake of keeping that xTransporter->getStream().Seek( STREAM_SEEK_TO_END ); in live code by wrapping it under OSL_DEBUG_LEVEL > 0 . Change-Id: I3f3bd3308e90610ab3d14f112e4da8bf46ecd25c Reviewed-on: https://gerrit.libreoffice.org/24188 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/scanner/sanedlg.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 34ed6840b79a..bb21e1e595a4 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -905,8 +905,10 @@ void SaneDlg::AcquirePreview()
}
else
{
+#if OSL_DEBUG_LEVEL > 0
xTransporter->getStream().Seek( STREAM_SEEK_TO_END );
SAL_INFO("extensions.scanner", "Previewbitmapstream contains " << xTransporter->getStream().Tell() << "bytes");
+#endif
xTransporter->getStream().Seek( STREAM_SEEK_TO_BEGIN );
mpPreview->SetBitmap(xTransporter->getStream());
}