diff options
-rw-r--r-- | vcl/inc/impglyphitem.hxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/vcl/inc/impglyphitem.hxx b/vcl/inc/impglyphitem.hxx index 18764cede500..7c3aa88849df 100644 --- a/vcl/inc/impglyphitem.hxx +++ b/vcl/inc/impglyphitem.hxx @@ -52,18 +52,18 @@ template <> struct typed_flags<GlyphItemFlags> : is_typed_flags<GlyphItemFlags, class VCL_DLLPUBLIC GlyphItem { DevicePoint m_aLinearPos; // absolute position of non rotated string - sal_Int32 m_nOrigWidth; // original glyph width + DeviceCoordinate m_nOrigWidth; // original glyph width sal_Int32 m_nCharPos; // index in string sal_Int32 m_nXOffset; sal_Int32 m_nYOffset; - sal_Int32 m_nNewWidth; // width after adjustments + DeviceCoordinate m_nNewWidth; // width after adjustments sal_GlyphId m_aGlyphId; GlyphItemFlags m_nFlags; sal_Int8 m_nCharCount; // number of characters making up this glyph public: GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, const DevicePoint& rLinearPos, - GlyphItemFlags nFlags, int nOrigWidth, int nXOffset, int nYOffset) + GlyphItemFlags nFlags, DeviceCoordinate nOrigWidth, int nXOffset, int nYOffset) : m_aLinearPos(rLinearPos) , m_nOrigWidth(nOrigWidth) , m_nCharPos(nCharPos) @@ -92,15 +92,15 @@ public: sal_GlyphId glyphId() const { return m_aGlyphId; } int charCount() const { return m_nCharCount; } - int origWidth() const { return m_nOrigWidth; } + DeviceCoordinate origWidth() const { return m_nOrigWidth; } int charPos() const { return m_nCharPos; } int xOffset() const { return m_nXOffset; } int yOffset() const { return m_nYOffset; } - sal_Int32 newWidth() const { return m_nNewWidth; } + DeviceCoordinate newWidth() const { return m_nNewWidth; } const DevicePoint& linearPos() const { return m_aLinearPos; } - void setNewWidth(sal_Int32 width) { m_nNewWidth = width; } - void addNewWidth(sal_Int32 width) { m_nNewWidth += width; } + void setNewWidth(DeviceCoordinate width) { m_nNewWidth = width; } + void addNewWidth(DeviceCoordinate width) { m_nNewWidth += width; } void setLinearPos(const DevicePoint& point) { m_aLinearPos = point; } void setLinearPosX(double x) { m_aLinearPos.setX(x); } void adjustLinearPosX(double diff) { m_aLinearPos.adjustX(diff); } diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 81897ac68bbd..d76d72c490e9 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -411,7 +411,7 @@ static bool lcl_CanApplyAsianKerning(sal_Unicode cp) void GenericSalLayout::ApplyAsianKerning(const OUString& rStr) { const int nLength = rStr.getLength(); - tools::Long nOffset = 0; + double nOffset = 0; for (std::vector<GlyphItem>::iterator pGlyphIter = m_GlyphItems.begin(), pGlyphIterEnd = m_GlyphItems.end(); @@ -437,7 +437,7 @@ void GenericSalLayout::ApplyAsianKerning(const OUString& rStr) continue; // apply punctuation compression to logical glyph widths - int nDelta = (nKernCurrent < nKernNext) ? nKernCurrent : nKernNext; + DeviceCoordinate nDelta = (nKernCurrent < nKernNext) ? nKernCurrent : nKernNext; if (nDelta < 0) { nDelta = (nDelta * pGlyphIter->origWidth() + 2) / 4; |