tdf#94739 use GetScanlineSize instead of calculating it
We calculate the scanline size wrongly when writing a PDF so the
image is not exported correctly. BitmapAccess already has a method
to determine the scanline size so use that instead.
Change-Id: Icccba8f26c5e0fd4bd4c37bba7c5a7fe8d0094bd
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d6d5bd9..2d92b59 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11419,7 +11419,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
beginCompression();
if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB )
{
const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U );
const int nScanLineBytes = pAccess->GetScanlineSize();
for( long i = 0; i < pAccess->Height(); i++ )
{