summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-26 00:11:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-26 09:36:59 +0200
commite8cdc1358ecebc285ccb2baa33496235661d9454 (patch)
treef15d264e2a240b08de5efbea06fb12bd650ec12b /vcl
parentf83019d9098196e0d7dd1dd4a05cf5137cc1bceb (diff)
keep nXOffset as double
Change-Id: I5a67af97c04e74fed8aa457261c4a7dd9ae79c17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 8c41b5d88987..8c2d0e0b10fb 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5944,7 +5944,7 @@ void PDFWriterImpl::drawVerticalGlyphs(
double fSkew,
sal_Int32 nFontHeight )
{
- tools::Long nXOffset = 0;
+ double nXOffset = 0;
Point aCurPos(SubPixelToLogic(rGlyphs[0].m_aPos, fAngle == 0.0));
aCurPos += rAlignOffset;
for( size_t i = 0; i < rGlyphs.size(); i++ )
@@ -5965,13 +5965,13 @@ void PDFWriterImpl::drawVerticalGlyphs(
fSkewA = -fSkewB;
fSkewB = 0.0;
}
- aDeltaPos += PixelToLogic( Point( static_cast<int>(static_cast<double>(nXOffset)/fXScale), 0 ) ) - PixelToLogic( Point() );
+ aDeltaPos += PixelToLogic( Point( static_cast<int>(nXOffset / fXScale), 0 ) ) - PixelToLogic( Point() );
if( i < rGlyphs.size()-1 )
// #i120627# the text on the Y axis is reversed when export ppt file to PDF format
{
double nOffsetX = rGlyphs[i+1].m_aPos.getX() - rGlyphs[i].m_aPos.getX();
double nOffsetY = rGlyphs[i+1].m_aPos.getY() - rGlyphs[i].m_aPos.getY();
- nXOffset += static_cast<int>(sqrt(nOffsetX*nOffsetX + nOffsetY*nOffsetY));
+ nXOffset += sqrt(nOffsetX*nOffsetX + nOffsetY*nOffsetY);
}
if (!rGlyphs[i].m_pGlyph->glyphId())
continue;