summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-30 14:00:54 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-25 17:35:05 +0200
commit134447e78f00d7378406d0a3fa5a4c5d3a02032e (patch)
treece9651e90cf291b8be43fd7459f80348a7d9ae1a
parent094e7b6a1028620c2b1503de8b51dc6a2482e290 (diff)
Move GlyphItem into its own header
Actually GlyphItem should be VCL internal, but this requires a transparent SalLayoutGlyphs (i.e. via pImpl), which I'm too lazy to implement currently. This seperation makes the affected source files more obvious and later migration of vcl/glyphitem.hxx easier. While at it apply the coding style and add '_' to member prefix. Change-Id: I61497af5c628c40f51597ce0ef286c47321acbc2 Reviewed-on: https://gerrit.libreoffice.org/62358 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--include/svtools/ruler.hxx1
-rw-r--r--include/vcl/glyphitem.hxx84
-rw-r--r--include/vcl/vcllayout.hxx61
-rw-r--r--sw/source/core/txtnode/fntcache.cxx1
-rw-r--r--vcl/inc/fontinstance.hxx1
-rw-r--r--vcl/inc/listbox.hxx1
-rw-r--r--vcl/inc/sallayout.hxx1
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx6
-rw-r--r--vcl/quartz/ctfonts.cxx8
-rw-r--r--vcl/quartz/salgdi.cxx6
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx36
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx24
-rw-r--r--vcl/source/gdi/sallayout.cxx100
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/window/menu.cxx1
-rw-r--r--vcl/source/window/menuitemlist.hxx1
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx6
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx8
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx4
-rw-r--r--vcl/unx/generic/print/text_gfx.cxx4
-rw-r--r--vcl/win/gdi/DWriteTextRenderer.cxx4
-rw-r--r--vcl/win/gdi/salfont.cxx14
-rw-r--r--vcl/win/gdi/winlayout.cxx8
24 files changed, 212 insertions, 174 deletions
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index d3a532db9650..5e1efddc6cf5 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -28,6 +28,7 @@
#include <vcl/window.hxx>
#include <vcl/virdev.hxx>
#include <vcl/field.hxx>
+#include <vcl/glyphitem.hxx>
#include <vcl/vcllayout.hxx>
#include <svtools/accessibleruler.hxx>
diff --git a/include/vcl/glyphitem.hxx b/include/vcl/glyphitem.hxx
new file mode 100644
index 000000000000..39d99bf69744
--- /dev/null
+++ b/include/vcl/glyphitem.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_GLYPHITEM_HXX
+#define INCLUDED_VCL_GLYPHITEM_HXX
+
+#include <rtl/ref.hxx>
+#include <tools/gen.hxx>
+#include <vcl/dllapi.h>
+
+class LogicalFontInstance;
+
+typedef sal_uInt16 sal_GlyphId;
+
+struct VCL_DLLPUBLIC GlyphItem
+{
+ int m_nFlags;
+ int m_nCharPos; // index in string
+ int m_nCharCount; // number of characters m_aking up this glyph
+
+ int m_nOrigWidth; // original glyph width
+ int m_nNewWidth; // width after adjustments
+ int m_nXOffset;
+
+ sal_GlyphId m_aGlyphId;
+ Point m_aLinearPos; // absolute position of non rotated string
+
+ int m_nFallbackLevel;
+
+ GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, const Point& rLinearPos,
+ long nFlags, int nOrigWidth, int nXOffset)
+ : m_nFlags(nFlags)
+ , m_nCharPos(nCharPos)
+ , m_nCharCount(nCharCount)
+ , m_nOrigWidth(nOrigWidth)
+ , m_nNewWidth(nOrigWidth)
+ , m_nXOffset(nXOffset)
+ , m_aGlyphId(aGlyphId)
+ , m_aLinearPos(rLinearPos)
+ , m_nFallbackLevel(0)
+ {
+ }
+
+ enum
+ {
+ IS_IN_CLUSTER = 0x001,
+ IS_RTL_GLYPH = 0x002,
+ IS_DIACRITIC = 0x004,
+ IS_VERTICAL = 0x008,
+ IS_SPACING = 0x010,
+ ALLOW_KASHIDA = 0x020,
+ IS_DROPPED = 0x040,
+ IS_CLUSTER_START = 0x080
+ };
+
+ bool IsInCluster() const { return ((m_nFlags & IS_IN_CLUSTER) != 0); }
+ bool IsRTLGlyph() const { return ((m_nFlags & IS_RTL_GLYPH) != 0); }
+ bool IsDiacritic() const { return ((m_nFlags & IS_DIACRITIC) != 0); }
+ bool IsVertical() const { return ((m_nFlags & IS_VERTICAL) != 0); }
+ bool IsSpacing() const { return ((m_nFlags & IS_SPACING) != 0); }
+ bool AllowKashida() const { return ((m_nFlags & ALLOW_KASHIDA) != 0); }
+ bool IsDropped() const { return ((m_nFlags & IS_DROPPED) != 0); }
+ bool IsClusterStart() const { return ((m_nFlags & IS_CLUSTER_START) != 0); }
+};
+
+#endif // INCLUDED_VCL_GLYPHITEM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index ebd8c24ea401..81cb7be614fb 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -33,61 +33,10 @@ class PhysicalFontFace;
class SalGraphics;
namespace vcl
{
-class TextLayoutCache;
+ class TextLayoutCache;
}
-typedef sal_uInt16 sal_GlyphId;
-
-struct VCL_DLLPUBLIC GlyphItem
-{
- int mnFlags;
- int mnCharPos; // index in string
- int mnCharCount; // number of characters making up this glyph
-
- int mnOrigWidth; // original glyph width
- int mnNewWidth; // width after adjustments
- int mnXOffset;
-
- sal_GlyphId maGlyphId;
- Point maLinearPos; // absolute position of non rotated string
-
- int mnFallbackLevel;
-
-public:
- GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, const Point& rLinearPos,
- long nFlags, int nOrigWidth, int nXOffset )
- : mnFlags(nFlags)
- , mnCharPos(nCharPos)
- , mnCharCount(nCharCount)
- , mnOrigWidth(nOrigWidth)
- , mnNewWidth(nOrigWidth)
- , mnXOffset(nXOffset)
- , maGlyphId(aGlyphId)
- , maLinearPos(rLinearPos)
- , mnFallbackLevel(0)
- { }
-
- enum {
- IS_IN_CLUSTER = 0x001,
- IS_RTL_GLYPH = 0x002,
- IS_DIACRITIC = 0x004,
- IS_VERTICAL = 0x008,
- IS_SPACING = 0x010,
- ALLOW_KASHIDA = 0x020,
- IS_DROPPED = 0x040,
- IS_CLUSTER_START = 0x080
- };
-
- bool IsInCluster() const { return ((mnFlags & IS_IN_CLUSTER) != 0); }
- bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); }
- bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); }
- bool IsVertical() const { return ((mnFlags & IS_VERTICAL) != 0); }
- bool IsSpacing() const { return ((mnFlags & IS_SPACING) != 0); }
- bool AllowKashida() const { return ((mnFlags & ALLOW_KASHIDA) != 0); }
- bool IsDropped() const { return ((mnFlags & IS_DROPPED) != 0); }
- bool IsClusterStart() const { return ((mnFlags & IS_CLUSTER_START) != 0); }
-};
-
+struct GlyphItem;
typedef std::vector<GlyphItem> SalLayoutGlyphs;
// all positions/widths are in font units
@@ -158,11 +107,11 @@ public:
protected:
// used by layout engines
- SalLayout();
+ SalLayout();
private:
- SalLayout( const SalLayout& ) = delete;
- SalLayout& operator=( const SalLayout& ) = delete;
+ SalLayout(const SalLayout&) = delete;
+ SalLayout& operator=(const SalLayout&) = delete;
protected:
int mnMinCharPos;
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 855af057bcec..7a653917e9e4 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -54,6 +54,7 @@
#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
#include <doc.hxx>
#include <editeng/fhgtitem.hxx>
+#include <vcl/glyphitem.hxx>
#include <vcl/vcllayout.hxx>
#include <docsh.hxx>
#include <strings.hrc>
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 5aacfca4c37a..eaad4d3d1f42 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -26,6 +26,7 @@
#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <tools/gen.hxx>
+#include <vcl/glyphitem.hxx>
#include <vcl/vcllayout.hxx>
#include <unordered_map>
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index d6f654d4a388..8cc0592147b7 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -23,6 +23,7 @@
#include <vcl/button.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/quickselectionengine.hxx>
+#include <vcl/glyphitem.hxx>
#include <vcl/vcllayout.hxx>
#include <set>
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 0cbe025ea290..ccaa4bd34d63 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -45,7 +45,6 @@
class SalGraphics;
class PhysicalFontFace;
class GenericSalLayout;
-struct GlyphItem;
enum class SalLayoutFlags;
namespace vcl {
class TextLayoutCache;
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 103aa3655372..9f6392435083 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -154,7 +154,7 @@ void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* /*pPFF*/, bool /*bVerti
bool Qt5Graphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- const int nLevel = rGlyph.mnFallbackLevel;
+ const int nLevel = rGlyph.m_nFallbackLevel;
if (nLevel >= MAX_FALLBACK)
return false;
@@ -163,7 +163,7 @@ bool Qt5Graphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& r
return false;
QRawFont aRawFont(QRawFont::fromFont(*pFont));
- rRect = toRectangle(aRawFont.boundingRect(rGlyph.maGlyphId).toAlignedRect());
+ rRect = toRectangle(aRawFont.boundingRect(rGlyph.m_aGlyphId).toAlignedRect());
return true;
}
@@ -209,7 +209,7 @@ void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout)
int nStart = 0;
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
- glyphIndexes.push_back(pGlyph->maGlyphId);
+ glyphIndexes.push_back(pGlyph->m_aGlyphId);
positions.push_back(QPointF(aPos.X(), aPos.Y()));
}
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 132ba34c9f6e..5d3ca2c8e083 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -139,10 +139,10 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricDataRef const & rxFontMetric )
bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect )
{
- if (GetCachedGlyphBoundRect(rGlyph.maGlyphId, rRect))
+ if (GetCachedGlyphBoundRect(rGlyph.m_aGlyphId, rRect))
return true;
- CGGlyph nCGGlyph = rGlyph.maGlyphId;
+ CGGlyph nCGGlyph = rGlyph.m_aGlyphId;
CTFontRef aCTFontRef = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ));
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.11 kCTFontDefaultOrientation
@@ -159,7 +159,7 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle&
long xMax = ceil(aCGRect.origin.x + aCGRect.size.width);
long yMax = ceil(aCGRect.origin.y + aCGRect.size.height);
rRect = tools::Rectangle(xMin, -yMax, xMax, -yMin);
- CacheGlyphBoundRect(rGlyph.maGlyphId, rRect);
+ CacheGlyphBoundRect(rGlyph.m_aGlyphId, rRect);
return true;
}
@@ -219,7 +219,7 @@ bool CoreTextStyle::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPol
{
rResult.clear();
- CGGlyph nCGGlyph = rGlyph.maGlyphId;
+ CGGlyph nCGGlyph = rGlyph.m_aGlyphId;
CTFontRef pCTFont = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ));
SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index fc600660c935..bd7800d02f28 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -372,7 +372,7 @@ bool AquaSalGraphics::AddTempDevFont( PhysicalFontCollection*,
bool AquaSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon& rPolyPoly)
{
- const int nFallbackLevel = rGlyph.mnFallbackLevel;
+ const int nFallbackLevel = rGlyph.m_nFallbackLevel;
if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel])
{
const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphOutline(rGlyph, rPolyPoly);
@@ -383,7 +383,7 @@ bool AquaSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyP
bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect )
{
- const int nFallbackLevel = rGlyph.mnFallbackLevel;
+ const int nFallbackLevel = rGlyph.m_nFallbackLevel;
if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel])
{
const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphBoundRect(rGlyph, rRect);
@@ -441,7 +441,7 @@ void AquaSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
}
}
- aGlyphIds.push_back(pGlyph->maGlyphId);
+ aGlyphIds.push_back(pGlyph->m_aGlyphId);
aGlyphPos.push_back(aGCPos);
aGlyphOrientation.push_back(bUprightGlyph);
}
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index cb9493f45037..5ea2f21de617 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -592,10 +592,10 @@ void GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const
for (auto const& aGlyphItem : m_GlyphItems)
{
- const int nIndex = aGlyphItem.mnCharPos - mnMinCharPos;
+ const int nIndex = aGlyphItem.m_nCharPos - mnMinCharPos;
if (nIndex >= nCharCount)
continue;
- pCharWidths[nIndex] += aGlyphItem.mnNewWidth;
+ pCharWidths[nIndex] += aGlyphItem.m_nNewWidth;
}
}
@@ -663,24 +663,24 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
{
// Accumulate the width difference for all characters corresponding to
// this glyph.
- int nCharPos = m_GlyphItems[i].mnCharPos - mnMinCharPos;
+ int nCharPos = m_GlyphItems[i].m_nCharPos - mnMinCharPos;
DeviceCoordinate nDiff = 0;
- for (int j = 0; j < m_GlyphItems[i].mnCharCount; j++)
+ for (int j = 0; j < m_GlyphItems[i].m_nCharCount; j++)
nDiff += pNewCharWidths[nCharPos + j] - pOldCharWidths[nCharPos + j];
if (!m_GlyphItems[i].IsRTLGlyph())
{
// Adjust the width and position of the first (leftmost) glyph in
// the cluster.
- m_GlyphItems[i].mnNewWidth += nDiff;
- m_GlyphItems[i].maLinearPos.AdjustX(nDelta);
+ m_GlyphItems[i].m_nNewWidth += nDiff;
+ m_GlyphItems[i].m_aLinearPos.AdjustX(nDelta);
// Adjust the position of the rest of the glyphs in the cluster.
while (++i < m_GlyphItems.size())
{
if (!m_GlyphItems[i].IsInCluster())
break;
- m_GlyphItems[i].maLinearPos.AdjustX(nDelta);
+ m_GlyphItems[i].m_aLinearPos.AdjustX(nDelta);
}
}
else if (m_GlyphItems[i].IsInCluster())
@@ -694,8 +694,8 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
// Adjust the width and position of the first (rightmost) glyph in
// the cluster.
// For RTL, we put all the adjustment to the left of the glyph.
- m_GlyphItems[i].mnNewWidth += nDiff;
- m_GlyphItems[i].maLinearPos.AdjustX(nDelta + nDiff);
+ m_GlyphItems[i].m_nNewWidth += nDiff;
+ m_GlyphItems[i].m_aLinearPos.AdjustX(nDelta + nDiff);
// Adjust the X position of all glyphs in the cluster.
size_t j = i;
@@ -704,7 +704,7 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
--j;
if (!m_GlyphItems[j].IsInCluster())
break;
- m_GlyphItems[j].maLinearPos.AdjustX(nDelta + nDiff);
+ m_GlyphItems[j].m_aLinearPos.AdjustX(nDelta + nDiff);
}
// If this glyph is Kashida-justifiable, then mark this as a
@@ -712,7 +712,7 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
// last glyph in the cluster not the first as this would be the
// base glyph.
if (bKashidaJustify && m_GlyphItems[i].AllowKashida() &&
- nDiff > m_GlyphItems[i].mnCharCount) // Rounding errors, 1 pixel per character!
+ nDiff > m_GlyphItems[i].m_nCharCount) // Rounding errors, 1 pixel per character!
{
pKashidas[i] = nDiff;
// Move any non-spacing marks attached to this cluster as well.
@@ -721,7 +721,7 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
{
if (!m_GlyphItems[j].IsDiacritic())
break;
- m_GlyphItems[j--].maLinearPos.AdjustX(nDiff);
+ m_GlyphItems[j--].m_aLinearPos.AdjustX(nDiff);
}
}
i++;
@@ -762,8 +762,8 @@ void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
nOverlap = nExcess / (nCopies - 1);
}
- Point aPos(pGlyphIter->maLinearPos.X() - nTotalWidth, 0);
- int nCharPos = pGlyphIter->mnCharPos;
+ Point aPos(pGlyphIter->m_aLinearPos.X() - nTotalWidth, 0);
+ int nCharPos = pGlyphIter->m_nCharPos;
int const nFlags = GlyphItem::IS_IN_CLUSTER | GlyphItem::IS_RTL_GLYPH;
while (nCopies--)
{
@@ -782,7 +782,7 @@ bool GenericSalLayout::IsKashidaPosValid(int nCharPos) const
{
for (auto pIter = m_GlyphItems.begin(); pIter != m_GlyphItems.end(); ++pIter)
{
- if (pIter->mnCharPos == nCharPos)
+ if (pIter->m_nCharPos == nCharPos)
{
// The position is the first glyph, this would happen if we
// changed the text styling in the middle of a word. Since we don’t
@@ -793,7 +793,7 @@ bool GenericSalLayout::IsKashidaPosValid(int nCharPos) const
// If the character is not supported by this layout, return false
// so that fallback layouts would be checked for it.
- if (pIter->maGlyphId == 0)
+ if (pIter->m_aGlyphId == 0)
break;
// Search backwards for previous glyph belonging to a different
@@ -801,12 +801,12 @@ bool GenericSalLayout::IsKashidaPosValid(int nCharPos) const
// RTL glyphs, which will be in visual order.
for (auto pPrev = pIter - 1; pPrev != m_GlyphItems.begin(); --pPrev)
{
- if (pPrev->mnCharPos != nCharPos)
+ if (pPrev->m_nCharPos != nCharPos)
{
// Check if the found glyph belongs to the next character,
// otherwise the current glyph will be a ligature which is
// invalid kashida position.
- if (pPrev->mnCharPos == (nCharPos + 1))
+ if (pPrev->m_nCharPos == (nCharPos + 1))
return true;
break;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 8d92f1aa5400..e736934d739c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6198,7 +6198,7 @@ void PDFWriterImpl::registerGlyph(const GlyphItem* pGlyph,
sal_uInt8& nMappedGlyph,
sal_Int32& nMappedFontObject)
{
- const int nFontGlyphId = pGlyph->maGlyphId;
+ const int nFontGlyphId = pGlyph->m_aGlyphId;
FontSubset& rSubset = m_aSubsets[ pFont ];
// search for font specific glyphID
FontMapping::iterator it = rSubset.m_aMapping.find( nFontGlyphId );
@@ -6356,7 +6356,7 @@ void PDFWriterImpl::drawVerticalGlyphs(
long nOffsetY = rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
nXOffset += static_cast<int>(sqrt(double(nOffsetX*nOffsetX + nOffsetY*nOffsetY)));
}
- if( ! rGlyphs[i].m_pGlyph->maGlyphId )
+ if( ! rGlyphs[i].m_pGlyph->m_aGlyphId )
continue;
aDeltaPos = rRotScale.transform( aDeltaPos );
@@ -6652,9 +6652,9 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
// * Keep generating (now) redundant ToUnicode entries for
// compatibility with old tools not supporting ActualText.
- assert(pGlyph->mnCharCount >= 0);
- for (int n = 0; n < pGlyph->mnCharCount; n++)
- aCodeUnits.push_back(rText[pGlyph->mnCharPos + n]);
+ assert(pGlyph->m_nCharCount >= 0);
+ for (int n = 0; n < pGlyph->m_nCharCount; n++)
+ aCodeUnits.push_back(rText[pGlyph->m_nCharPos + n]);
bool bUseActualText = false;
@@ -6673,7 +6673,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
{
for (const auto& rSubset : m_aSubsets[pFont].m_aSubsets)
{
- const auto& it = rSubset.m_aMapping.find(pGlyph->maGlyphId);
+ const auto& it = rSubset.m_aMapping.find(pGlyph->m_aGlyphId);
if (it != rSubset.m_aMapping.cend() && it->second.codes() != aCodeUnits)
{
bUseActualText = true;
@@ -6692,13 +6692,13 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
SalGraphics *pGraphics = GetGraphics();
if (pGraphics)
nGlyphWidth = m_aFontCache.getGlyphWidth(pFont,
- pGlyph->maGlyphId,
+ pGlyph->m_aGlyphId,
pGlyph->IsVertical(),
pGraphics);
int nCharPos = -1;
if (bUseActualText || pGlyph->IsInCluster())
- nCharPos = pGlyph->mnCharPos;
+ nCharPos = pGlyph->m_nCharPos;
aGlyphs.emplace_back(aPos,
pGlyph,
@@ -6770,12 +6770,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if (!aRun.front().m_pGlyph->IsRTLGlyph())
{
nCharPos = aRun.front().m_nCharPos;
- nCharCount = aRun.front().m_pGlyph->mnCharCount;
+ nCharCount = aRun.front().m_pGlyph->m_nCharCount;
}
else
{
nCharPos = aRun.back().m_nCharPos;
- nCharCount = aRun.back().m_pGlyph->mnCharCount;
+ nCharCount = aRun.back().m_pGlyph->m_nCharCount;
}
if (nCharPos >= 0 && nCharCount)
@@ -6834,7 +6834,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( !nWidth )
aStartPt = aPos;
- nWidth += pGlyph->mnNewWidth;
+ nWidth += pGlyph->m_nNewWidth;
}
else if( nWidth > 0 )
{
@@ -6927,7 +6927,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if (pGlyph->IsSpacing())
{
Point aAdjOffset = aOffset;
- aAdjOffset.AdjustX((pGlyph->mnNewWidth - nEmphWidth) / 2 );
+ aAdjOffset.AdjustX((pGlyph->m_nNewWidth - nEmphWidth) / 2 );
aAdjOffset = aRotScale.transform( aAdjOffset );
aAdjOffset -= Point( nEmphWidth2, nEmphHeight2 );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 309b3b0c9b21..d33c488b6894 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -713,10 +713,10 @@ DeviceCoordinate GenericSalLayout::GetTextWidth() const
for (auto const& aGlyphItem : m_GlyphItems)
{
// update the text extent with the glyph extent
- DeviceCoordinate nXPos = aGlyphItem.maLinearPos.X();
+ DeviceCoordinate nXPos = aGlyphItem.m_aLinearPos.X();
if( nMinPos > nXPos )
nMinPos = nXPos;
- nXPos += aGlyphItem.mnNewWidth - aGlyphItem.mnXOffset;
+ nXPos += aGlyphItem.m_nNewWidth - aGlyphItem.m_nXOffset;
if( nMaxPos < nXPos )
nMaxPos = nXPos;
}
@@ -747,18 +747,18 @@ void GenericSalLayout::Justify( DeviceCoordinate nNewWidth )
{
if( !pGlyphIter->IsDiacritic() )
++nStretchable;
- if( nMaxGlyphWidth < pGlyphIter->mnOrigWidth )
- nMaxGlyphWidth = pGlyphIter->mnOrigWidth;
+ if( nMaxGlyphWidth < pGlyphIter->m_nOrigWidth )
+ nMaxGlyphWidth = pGlyphIter->m_nOrigWidth;
}
// move rightmost glyph to requested position
- nOldWidth -= pGlyphIterRight->mnOrigWidth;
+ nOldWidth -= pGlyphIterRight->m_nOrigWidth;
if( nOldWidth <= 0 )
return;
if( nNewWidth < nMaxGlyphWidth)
nNewWidth = nMaxGlyphWidth;
- nNewWidth -= pGlyphIterRight->mnOrigWidth;
- pGlyphIterRight->maLinearPos.setX( nNewWidth );
+ nNewWidth -= pGlyphIterRight->m_nOrigWidth;
+ pGlyphIterRight->m_aLinearPos.setX( nNewWidth );
// justify glyph widths and positions
int nDiffWidth = nNewWidth - nOldWidth;
@@ -769,7 +769,7 @@ void GenericSalLayout::Justify( DeviceCoordinate nNewWidth )
for( pGlyphIter = m_GlyphItems.begin(); pGlyphIter != pGlyphIterRight; ++pGlyphIter )
{
// move glyph to justified position
- pGlyphIter->maLinearPos.AdjustX(nDeltaSum );
+ pGlyphIter->m_aLinearPos.AdjustX(nDeltaSum );
// do not stretch non-stretchable glyphs
if( pGlyphIter->IsDiacritic() || (nStretchable <= 0) )
@@ -778,7 +778,7 @@ void GenericSalLayout::Justify( DeviceCoordinate nNewWidth )
// distribute extra space equally to stretchable glyphs
int nDeltaWidth = nDiffWidth / nStretchable--;
nDiffWidth -= nDeltaWidth;
- pGlyphIter->mnNewWidth += nDeltaWidth;
+ pGlyphIter->m_nNewWidth += nDeltaWidth;
nDeltaSum += nDeltaWidth;
}
}
@@ -790,14 +790,14 @@ void GenericSalLayout::Justify( DeviceCoordinate nNewWidth )
{
for( pGlyphIter = m_GlyphItems.begin(); ++pGlyphIter != pGlyphIterRight;)
{
- int nX = pGlyphIter->maLinearPos.X();
+ int nX = pGlyphIter->m_aLinearPos.X();
nX = static_cast<int>(nX * fSqueeze);
- pGlyphIter->maLinearPos.setX( nX );
+ pGlyphIter->m_aLinearPos.setX( nX );
}
}
// adjust glyph widths to new positions
for( pGlyphIter = m_GlyphItems.begin(); pGlyphIter != pGlyphIterRight; ++pGlyphIter )
- pGlyphIter->mnNewWidth = pGlyphIter[1].maLinearPos.X() - pGlyphIter[0].maLinearPos.X();
+ pGlyphIter->m_nNewWidth = pGlyphIter[1].m_aLinearPos.X() - pGlyphIter[0].m_aLinearPos.X();
}
}
@@ -808,7 +808,7 @@ void GenericSalLayout::ApplyAsianKerning(const OUString& rStr)
for( std::vector<GlyphItem>::iterator pGlyphIter = m_GlyphItems.begin(), pGlyphIterEnd = m_GlyphItems.end(); pGlyphIter != pGlyphIterEnd; ++pGlyphIter )
{
- const int n = pGlyphIter->mnCharPos;
+ const int n = pGlyphIter->m_nCharPos;
if( n < nLength - 1)
{
// ignore code ranges that are not affected by asian punctuation compression
@@ -828,17 +828,17 @@ void GenericSalLayout::ApplyAsianKerning(const OUString& rStr)
long nDelta = (nKernFirst < nKernNext) ? nKernFirst : nKernNext;
if( nDelta<0 && nKernFirst!=0 && nKernNext!=0 )
{
- int nGlyphWidth = pGlyphIter->mnOrigWidth;
+ int nGlyphWidth = pGlyphIter->m_nOrigWidth;
nDelta = (nDelta * nGlyphWidth + 2) / 4;
if( pGlyphIter+1 == pGlyphIterEnd )
- pGlyphIter->mnNewWidth += nDelta;
+ pGlyphIter->m_nNewWidth += nDelta;
nOffset += nDelta;
}
}
// adjust the glyph positions to the new glyph widths
if( pGlyphIter+1 != pGlyphIterEnd )
- pGlyphIter->maLinearPos.AdjustX(nOffset );
+ pGlyphIter->m_aLinearPos.AdjustX(nOffset );
}
}
@@ -851,9 +851,9 @@ void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) co
// calculate caret positions using glyph array
for (auto const& aGlyphItem : m_GlyphItems)
{
- long nXPos = aGlyphItem.maLinearPos.X();
- long nXRight = nXPos + aGlyphItem.mnOrigWidth;
- int n = aGlyphItem.mnCharPos;
+ long nXPos = aGlyphItem.m_aLinearPos.X();
+ long nXRight = nXPos + aGlyphItem.m_nOrigWidth;
+ int n = aGlyphItem.m_nCharPos;
int nCurrIdx = 2 * (n - mnMinCharPos);
// tdf#86399 if this is not the start of a cluster, don't overwrite the caret bounds of the cluster start
if (aGlyphItem.IsInCluster() && pCaretXArray[nCurrIdx] != -1)
@@ -902,7 +902,7 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph,
// find next glyph in substring
for(; pGlyphIter != pGlyphIterEnd; ++nStart, ++pGlyphIter )
{
- int n = pGlyphIter->mnCharPos;
+ int n = pGlyphIter->m_nCharPos;
if( (mnMinCharPos <= n) && (n < mnEndCharPos) )
break;
}
@@ -919,7 +919,7 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph,
++nStart;
// calculate absolute position in pixel units
- Point aRelativePos = pGlyphIter->maLinearPos;
+ Point aRelativePos = pGlyphIter->m_aLinearPos;
aRelativePos.setX( aRelativePos.X() / ( mnUnitsPerPixel) );
aRelativePos.setY( aRelativePos.Y() / ( mnUnitsPerPixel) );
@@ -940,15 +940,15 @@ void GenericSalLayout::MoveGlyph( int nStart, long nNewXPos )
// as RTL-glyphs are right justified in their cell
// the cell position needs to be adjusted to the glyph position
if( pGlyphIter->IsRTLGlyph() )
- nNewXPos += pGlyphIter->mnNewWidth - pGlyphIter->mnOrigWidth;
+ nNewXPos += pGlyphIter->m_nNewWidth - pGlyphIter->m_nOrigWidth;
// calculate the x-offset to the old position
- long nXDelta = nNewXPos - pGlyphIter->maLinearPos.X();
+ long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.X();
// adjust all following glyph positions if needed
if( nXDelta != 0 )
{
for( std::vector<GlyphItem>::iterator pGlyphIterEnd = m_GlyphItems.end(); pGlyphIter != pGlyphIterEnd; ++pGlyphIter )
{
- pGlyphIter->maLinearPos.AdjustX(nXDelta );
+ pGlyphIter->m_aLinearPos.AdjustX(nXDelta );
}
}
}
@@ -960,8 +960,8 @@ void GenericSalLayout::DropGlyph( int nStart )
std::vector<GlyphItem>::iterator pGlyphIter = m_GlyphItems.begin();
pGlyphIter += nStart;
- pGlyphIter->mnCharPos = -1;
- pGlyphIter->mnFlags |= GlyphItem::IS_DROPPED;
+ pGlyphIter->m_nCharPos = -1;
+ pGlyphIter->m_nFlags |= GlyphItem::IS_DROPPED;
}
void GenericSalLayout::Simplify( bool bIsBase )
@@ -972,7 +972,7 @@ void GenericSalLayout::Simplify( bool bIsBase )
{
if (bIsBase && m_GlyphItems[i].IsDropped())
continue;
- if (!bIsBase && m_GlyphItems[i].maGlyphId == 0)
+ if (!bIsBase && m_GlyphItems[i].m_aGlyphId == 0)
continue;
if( i != j )
@@ -1178,12 +1178,12 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
assert(nFirstValid >= 0);
// get the next codepoint index that needs fallback
- int nActiveCharPos = pGlyphs[nFirstValid]->mnCharPos;
+ int nActiveCharPos = pGlyphs[nFirstValid]->m_nCharPos;
int nActiveCharIndex = nActiveCharPos - mnMinCharPos;
// get the end index of the active run
int nLastRunEndChar = (nActiveCharIndex >= 0 && vRtl[nActiveCharIndex]) ?
rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1;
- int nRunVisibleEndChar = pGlyphs[nFirstValid]->mnCharPos;
+ int nRunVisibleEndChar = pGlyphs[nFirstValid]->m_nCharPos;
// merge the fallback levels
while( bValid[nFirstValid] && (nLevel > 0))
{
@@ -1212,8 +1212,8 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
// drop the NotDef glyphs in the base layout run if a fallback run exists
while (
- (maFallbackRuns[n-1].PosIsInRun(pGlyphs[nFirstValid]->mnCharPos)) &&
- (!maFallbackRuns[n].PosIsInAnyRun(pGlyphs[nFirstValid]->mnCharPos))
+ (maFallbackRuns[n-1].PosIsInRun(pGlyphs[nFirstValid]->m_nCharPos)) &&
+ (!maFallbackRuns[n].PosIsInAnyRun(pGlyphs[nFirstValid]->m_nCharPos))
)
{
mpLayouts[0]->DropGlyph( nStartOld[0] );
@@ -1230,11 +1230,11 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
bool bKeepNotDef = (nFBLevel >= nLevel);
for(;;)
{
- nRunAdvance += pGlyphs[n]->mnNewWidth;
+ nRunAdvance += pGlyphs[n]->m_nNewWidth;
// proceed to next glyph
nStartOld[n] = nStartNew[n];
- int nOrigCharPos = pGlyphs[n]->mnCharPos;
+ int nOrigCharPos = pGlyphs[n]->m_nCharPos;
bValid[n] = mpLayouts[n]->GetNextGlyph(&pGlyphs[n], aPos, nStartNew[n]);
// break after last glyph of active layout
if( !bValid[n] )
@@ -1248,16 +1248,16 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
//If the next character is one which belongs to the next level, then we
//are finished here for now, and we'll pick up after the next level has
//been processed
- if ((n+1 < nLevel) && (pGlyphs[n]->mnCharPos != nOrigCharPos))
+ if ((n+1 < nLevel) && (pGlyphs[n]->m_nCharPos != nOrigCharPos))
{
- if (nOrigCharPos < pGlyphs[n]->mnCharPos)
+ if (nOrigCharPos < pGlyphs[n]->m_nCharPos)
{
- if (pGlyphs[n+1]->mnCharPos > nOrigCharPos && (pGlyphs[n+1]->mnCharPos < pGlyphs[n]->mnCharPos))
+ if (pGlyphs[n+1]->m_nCharPos > nOrigCharPos && (pGlyphs[n+1]->m_nCharPos < pGlyphs[n]->m_nCharPos))
break;
}
- else if (nOrigCharPos > pGlyphs[n]->mnCharPos)
+ else if (nOrigCharPos > pGlyphs[n]->m_nCharPos)
{
- if (pGlyphs[n+1]->mnCharPos > pGlyphs[n]->mnCharPos && (pGlyphs[n+1]->mnCharPos < nOrigCharPos))
+ if (pGlyphs[n+1]->m_nCharPos > pGlyphs[n]->m_nCharPos && (pGlyphs[n+1]->m_nCharPos < nOrigCharPos))
break;
}
}
@@ -1266,15 +1266,15 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if( n > 0 )
{
// skip until end of fallback run
- if (!maFallbackRuns[n-1].PosIsInRun(pGlyphs[n]->mnCharPos))
+ if (!maFallbackRuns[n-1].PosIsInRun(pGlyphs[n]->m_nCharPos))
break;
}
else
{
// break when a fallback is needed and available
- bool bNeedFallback = maFallbackRuns[0].PosIsInRun(pGlyphs[nFirstValid]->mnCharPos);
+ bool bNeedFallback = maFallbackRuns[0].PosIsInRun(pGlyphs[nFirstValid]->m_nCharPos);
if( bNeedFallback )
- if (!maFallbackRuns[nLevel-1].PosIsInRun(pGlyphs[nFirstValid]->mnCharPos))
+ if (!maFallbackRuns[nLevel-1].PosIsInRun(pGlyphs[nFirstValid]->m_nCharPos))
break;
// break when change from resolved to unresolved base layout run
if( bKeepNotDef && !bNeedFallback )
@@ -1285,21 +1285,21 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if (aMultiArgs.mpDXArray &&
nRunVisibleEndChar < mnEndCharPos &&
nRunVisibleEndChar >= mnMinCharPos &&
- pGlyphs[n]->mnCharPos < mnEndCharPos &&
- pGlyphs[n]->mnCharPos >= mnMinCharPos)
+ pGlyphs[n]->m_nCharPos < mnEndCharPos &&
+ pGlyphs[n]->m_nCharPos >= mnMinCharPos)
{
if (vRtl[nActiveCharPos - mnMinCharPos])
{
if (aMultiArgs.mpDXArray[nRunVisibleEndChar-mnMinCharPos]
- >= aMultiArgs.mpDXArray[pGlyphs[n]->mnCharPos - mnMinCharPos])
+ >= aMultiArgs.mpDXArray[pGlyphs[n]->m_nCharPos - mnMinCharPos])
{
- nRunVisibleEndChar = pGlyphs[n]->mnCharPos;
+ nRunVisibleEndChar = pGlyphs[n]->m_nCharPos;
}
}
else if (aMultiArgs.mpDXArray[nRunVisibleEndChar-mnMinCharPos]
- <= aMultiArgs.mpDXArray[pGlyphs[n]->mnCharPos - mnMinCharPos])
+ <= aMultiArgs.mpDXArray[pGlyphs[n]->m_nCharPos - mnMinCharPos])
{
- nRunVisibleEndChar = pGlyphs[n]->mnCharPos;
+ nRunVisibleEndChar = pGlyphs[n]->m_nCharPos;
}
}
}
@@ -1327,7 +1327,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
nRunAdvance -= aMultiArgs.mpDXArray[nLastRunEndChar - mnMinCharPos];
}
nLastRunEndChar = nRunVisibleEndChar;
- nRunVisibleEndChar = pGlyphs[nFirstValid]->mnCharPos;
+ nRunVisibleEndChar = pGlyphs[nFirstValid]->m_nCharPos;
// the requested width is still in pixel units
// => convert it to base level font units
nRunAdvance *= mnUnitsPerPixel;
@@ -1344,7 +1344,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
nXPos += nRunAdvance;
// prepare for next fallback run
- nActiveCharPos = pGlyphs[nFirstValid]->mnCharPos;
+ nActiveCharPos = pGlyphs[nFirstValid]->m_nCharPos;
// it essential that the runs don't get ahead of themselves and in the
// if( bKeepNotDef && !bNeedFallback ) statement above, the next run may
// have already been reached on the base level
@@ -1518,7 +1518,7 @@ bool MultiSalLayout::GetNextGlyph(const GlyphItem** pGlyph,
int nFontTag = nLevel << GF_FONTSHIFT;
nStart |= nFontTag;
// FIXME: This cast is ugly!
- const_cast<GlyphItem*>(*pGlyph)->mnFallbackLevel = nLevel;
+ const_cast<GlyphItem*>(*pGlyph)->m_nFallbackLevel = nLevel;
if (pFallbackFont)
*pFallbackFont = pFontFace;
rPos += maDrawBase;
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index d23c2137be35..8dfe957392b9 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2328,10 +2328,10 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
while (pLayout->GetNextGlyph(&pGlyph, aPos, nStart))
{
SystemGlyphData aSystemGlyph;
- aSystemGlyph.index = pGlyph->maGlyphId;
+ aSystemGlyph.index = pGlyph->m_aGlyphId;
aSystemGlyph.x = aPos.X();
aSystemGlyph.y = aPos.Y();
- int nLevel = pGlyph->mnFallbackLevel;
+ int nLevel = pGlyph->m_nFallbackLevel;
aSystemGlyph.fallbacklevel = nLevel < MAX_FALLBACK ? nLevel : 0;
aSysLayoutData.rGlyphData.push_back(aSystemGlyph);
}
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index e35f4bb259af..550fc781f6d0 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -755,7 +755,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
}
// update the length of the textline
- nWidth += pGlyph->mnNewWidth;
+ nWidth += pGlyph->m_nNewWidth;
}
else if( nWidth > 0 )
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index bcbca81b7c01..0374a1754e1e 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -43,6 +43,7 @@
#include <vcl/settings.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/IDialogRenderable.hxx>
+#include <vcl/glyphitem.hxx>
#include <salinst.hxx>
#include <svdata.hxx>
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index 276c078e6431..3d91ef498489 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -22,6 +22,7 @@
#include <vcl/keycod.hxx>
#include <vcl/menu.hxx>
#include <vcl/vcllayout.hxx>
+#include <fontinstance.hxx>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index adcb0deec8ac..b7b8da84dc65 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -185,7 +185,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
cairo_glyph_t aGlyph;
- aGlyph.index = pGlyph->maGlyphId;
+ aGlyph.index = pGlyph->m_aGlyphId;
aGlyph.x = aPos.X();
aGlyph.y = aPos.Y();
cairo_glyphs.push_back(aGlyph);
@@ -444,7 +444,7 @@ void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nF
bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- const int nLevel = rGlyph.mnFallbackLevel;
+ const int nLevel = rGlyph.m_nFallbackLevel;
if( nLevel >= MAX_FALLBACK )
return false;
@@ -475,7 +475,7 @@ bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangl
bool CairoTextRender::GetGlyphOutline(const GlyphItem& rGlyph,
basegfx::B2DPolyPolygon& rPolyPoly )
{
- const int nLevel = rGlyph.mnFallbackLevel;
+ const int nLevel = rGlyph.m_nFallbackLevel;
if( nLevel >= MAX_FALLBACK )
return false;
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 90a04e904379..74bbd7093411 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -591,12 +591,12 @@ void FreetypeFont::ApplyGlyphTransform(bool bVertical, FT_Glyph pGlyphFT ) const
bool FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
assert(mpFontInstance.is());
- if (mpFontInstance.is() && mpFontInstance->GetCachedGlyphBoundRect(rGlyph.maGlyphId, rRect))
+ if (mpFontInstance.is() && mpFontInstance->GetCachedGlyphBoundRect(rGlyph.m_aGlyphId, rRect))
return true;
FT_Activate_Size( maSizeFT );
- FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.maGlyphId, mnLoadFlags);
+ FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.m_aGlyphId, mnLoadFlags);
if (rc != FT_Err_Ok)
return false;
@@ -616,7 +616,7 @@ bool FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle&
rRect = tools::Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin);
if (mpFontInstance.is())
- mpFontInstance->CacheGlyphBoundRect(rGlyph.maGlyphId, rRect);
+ mpFontInstance->CacheGlyphBoundRect(rGlyph.m_aGlyphId, rRect);
FT_Done_Glyph( pGlyphFT );
@@ -894,7 +894,7 @@ bool FreetypeFont::GetGlyphOutline(const GlyphItem& rGlyph,
nLoadFlags |= FT_LOAD_TARGET_LIGHT;
#endif
- FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.maGlyphId, nLoadFlags);
+ FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.m_aGlyphId, nLoadFlags);
if( rc != FT_Err_Ok )
return false;
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index b11a87083c68..5350bfcf26a4 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -735,7 +735,7 @@ void GenPspGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFal
bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- const int nLevel = rGlyph.mnFallbackLevel;
+ const int nLevel = rGlyph.m_nFallbackLevel;
if( nLevel >= MAX_FALLBACK )
return false;
@@ -749,7 +749,7 @@ bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle
bool GenPspGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
- const int nLevel = rGlyph.mnFallbackLevel;
+ const int nLevel = rGlyph.m_nFallbackLevel;
if( nLevel >= MAX_FALLBACK )
return false;
diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx
index c6528c8a34c3..7099d0a5f57d 100644
--- a/vcl/unx/generic/print/text_gfx.cxx
+++ b/vcl/unx/generic/print/text_gfx.cxx
@@ -123,14 +123,14 @@ void PrinterGfx::DrawGlyph(const Point& rPoint,
PSTranslate( aPoint );
PSRotate (900);
// draw the rotated glyph
- drawGlyph(aRotPoint, rGlyph.maGlyphId);
+ drawGlyph(aRotPoint, rGlyph.m_aGlyphId);
// restore previous state
maVirtualStatus = aSaveStatus;
PSGRestore();
}
else
- drawGlyph(aPoint, rGlyph.maGlyphId);
+ drawGlyph(aPoint, rGlyph.m_aGlyphId);
// restore the user coordinate system
if (nCurrentTextAngle != 0)
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx
index 7662bcc0aff4..f8aa907180eb 100644
--- a/vcl/win/gdi/DWriteTextRenderer.cxx
+++ b/vcl/win/gdi/DWriteTextRenderer.cxx
@@ -296,8 +296,8 @@ bool D2DWriteTextOutRenderer::performRender(GenericSalLayout const & rLayout, Sa
const GlyphItem* pGlyph;
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
- UINT16 glyphIndices[] = { pGlyph->maGlyphId };
- FLOAT glyphAdvances[] = { static_cast<FLOAT>(pGlyph->mnNewWidth) };
+ UINT16 glyphIndices[] = { pGlyph->m_aGlyphId };
+ FLOAT glyphAdvances[] = { static_cast<FLOAT>(pGlyph->m_nNewWidth) };
DWRITE_GLYPH_OFFSET glyphOffsets[] = { { 0.0f, 0.0f }, };
D2D1_POINT_2F baseline = { static_cast<FLOAT>(aPos.X() - bounds.Left()), static_cast<FLOAT>(aPos.Y() - bounds.Top()) };
DWRITE_GLYPH_RUN glyphs = {
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index a93141ff83e5..8ee9c60e2537 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1328,10 +1328,10 @@ void WinSalGraphics::ClearDevFontCache()
bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
- rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.m_nFallbackLevel];
assert(pFont.is());
- if (pFont.is() && pFont->GetCachedGlyphBoundRect(rGlyph.maGlyphId, rRect))
+ if (pFont.is() && pFont->GetCachedGlyphBoundRect(rGlyph.m_aGlyphId, rRect))
return true;
HDC hDC = getHDC();
@@ -1355,7 +1355,7 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle
GLYPHMETRICS aGM;
aGM.gmptGlyphOrigin.x = aGM.gmptGlyphOrigin.y = 0;
aGM.gmBlackBoxX = aGM.gmBlackBoxY = 0;
- DWORD nSize = ::GetGlyphOutlineW(hDC, rGlyph.maGlyphId, nGGOFlags, &aGM, 0, nullptr, &aMat);
+ DWORD nSize = ::GetGlyphOutlineW(hDC, rGlyph.m_aGlyphId, nGGOFlags, &aGM, 0, nullptr, &aMat);
if (pFont.is() && hFont != pFont->GetHFONT())
SelectObject(hDC, hFont);
if( nSize == GDI_ERROR )
@@ -1368,7 +1368,7 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle
rRect.SetTop(static_cast<int>( fFontScale * rRect.Top() ));
rRect.SetBottom(static_cast<int>( fFontScale * rRect.Bottom() ) + 1);
- pFont->CacheGlyphBoundRect(rGlyph.maGlyphId, rRect);
+ pFont->CacheGlyphBoundRect(rGlyph.m_aGlyphId, rRect);
return true;
}
@@ -1389,14 +1389,14 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
nGGOFlags |= GGO_GLYPH_INDEX;
GLYPHMETRICS aGlyphMetrics;
- const DWORD nSize1 = ::GetGlyphOutlineW(hDC, rGlyph.maGlyphId, nGGOFlags, &aGlyphMetrics, 0, nullptr, &aMat);
+ const DWORD nSize1 = ::GetGlyphOutlineW(hDC, rGlyph.m_aGlyphId, nGGOFlags, &aGlyphMetrics, 0, nullptr, &aMat);
if( !nSize1 ) // blank glyphs are ok
return true;
else if( nSize1 == GDI_ERROR )
return false;
BYTE* pData = new BYTE[ nSize1 ];
- const DWORD nSize2 = ::GetGlyphOutlineW(hDC, rGlyph.maGlyphId, nGGOFlags,
+ const DWORD nSize2 = ::GetGlyphOutlineW(hDC, rGlyph.m_aGlyphId, nGGOFlags,
&aGlyphMetrics, nSize1, pData, &aMat );
if( nSize1 != nSize2 )
@@ -1546,7 +1546,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph,
// rescaling needed for the tools::PolyPolygon conversion
if( rB2DPolyPoly.count() )
{
- rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+ rtl::Reference<WinFontInstance> pFont = mpWinFontEntry[rGlyph.m_nFallbackLevel];
assert(pFont.is());
float fFontScale = pFont.is() ? pFont->GetScale() : 1.0;
const double fFactor(fFontScale/256);
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index d7c9258473a3..e2b53261c9ef 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -274,7 +274,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
const GlyphItem* pGlyph;
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
- WORD glyphWStr[] = { pGlyph->maGlyphId };
+ WORD glyphWStr[] = { pGlyph->m_aGlyphId };
if (hAltFont && pGlyph->IsVertical() == bUseAltFont)
{
bUseAltFont = !bUseAltFont;
@@ -415,9 +415,9 @@ bool WinSalGraphics::CacheGlyphs(const GenericSalLayout& rLayout)
const GlyphItem* pGlyph;
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
- if (!rFont.GetOpenGLGlyphCache().IsGlyphCached(pGlyph->maGlyphId))
+ if (!rFont.GetOpenGLGlyphCache().IsGlyphCached(pGlyph->m_aGlyphId))
{
- if (!rFont.CacheGlyphToAtlas(hDC, hFONT, pGlyph->maGlyphId, *this))
+ if (!rFont.CacheGlyphToAtlas(hDC, hFONT, pGlyph->m_aGlyphId, *this))
return false;
}
}
@@ -446,7 +446,7 @@ bool WinSalGraphics::DrawCachedGlyphs(const GenericSalLayout& rLayout)
const GlyphItem* pGlyph;
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
- OpenGLGlyphDrawElement& rElement(rFont.GetOpenGLGlyphCache().GetDrawElement(pGlyph->maGlyphId));
+ OpenGLGlyphDrawElement& rElement(rFont.GetOpenGLGlyphCache().GetDrawElement(pGlyph->m_aGlyphId));
OpenGLTexture& rTexture = rElement.maTexture;
if (!rTexture)