summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xeescher.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-07 09:49:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-07 10:08:30 +0100
commite5012e53b919ae4921d6d35660bde323a6f28417 (patch)
treed0ed24f56e29f5d027e21404696fca441cdd0fc5 /sc/source/filter/excel/xeescher.cxx
parentc99527385acf367c748b3dcf3e6a3bb8103f5eee (diff)
use scanline when reading pixel data
extracts code from the innermost part of fairly hot loops And add a GetIndexFromData method to make the call sites a little easier to read. Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107 Reviewed-on: https://gerrit.libreoffice.org/49337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/excel/xeescher.cxx')
-rw-r--r--sc/source/filter/excel/xeescher.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 93f9bb047cf9..1e51b864bb70 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -428,9 +428,10 @@ void XclExpImgData::Save( XclExpStream& rStrm )
for( sal_Int32 nY = nHeight - 1; nY >= 0; --nY )
{
+ Scanline pScanline = pAccess->GetScanline( nY );
for( sal_Int32 nX = 0; nX < nWidth; ++nX )
{
- const BitmapColor& rBmpColor = pAccess->GetPixel( nY, nX );
+ const BitmapColor& rBmpColor = pAccess->GetPixelFromData( pScanline, nX );
rStrm << rBmpColor.GetBlue() << rBmpColor.GetGreen() << rBmpColor.GetRed();
}
rStrm.WriteZeroBytes( nPadding );