summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-16 18:20:14 +0300
committerخالد حسني <khaled@libreoffice.org>2023-07-23 06:00:49 +0200
commit8e9b65c874d99e3302a9e7dfd0c7a30963526bc2 (patch)
tree51edbc4ab2f7c5b7527897f20f977bf5478fe976 /vcl
parent2a19b5fb9af4b0d6c8903ce64ce67ccb536276e1 (diff)
vcl: rename NaturalDXArray to DXArray
The unnatural DXArray is gone for a while now. Change-Id: I6cda530f332839e49aa91da2d5e347401c4d159d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154502 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/ImplLayoutArgs.hxx6
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx4
-rw-r--r--vcl/source/gdi/sallayout.cxx4
-rw-r--r--vcl/source/outdev/text.cxx12
-rw-r--r--vcl/source/text/ImplLayoutArgs.cxx10
5 files changed, 18 insertions, 18 deletions
diff --git a/vcl/inc/ImplLayoutArgs.hxx b/vcl/inc/ImplLayoutArgs.hxx
index 381d09185563..d7100d71fd8b 100644
--- a/vcl/inc/ImplLayoutArgs.hxx
+++ b/vcl/inc/ImplLayoutArgs.hxx
@@ -35,7 +35,7 @@ public:
vcl::text::TextLayoutCache const* m_pTextLayoutCache;
// positioning related inputs
- const double* mpNaturalDXArray; // in floating point pixel units
+ const double* mpDXArray; // in floating point pixel units
const sal_Bool* mpKashidaArray;
DeviceCoordinate mnLayoutWidth; // in pixel units
Degree10 mnOrientation; // in 0-3600 system
@@ -48,7 +48,7 @@ public:
LanguageTag aLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache);
void SetLayoutWidth(DeviceCoordinate nWidth);
- void SetNaturalDXArray(const double* pDXArray);
+ void SetDXArray(const double* pDXArray);
void SetKashidaArray(const sal_Bool* pKashidaArray);
void SetOrientation(Degree10 nOrientation);
@@ -56,7 +56,7 @@ public:
bool GetNextPos(int* nCharPos, bool* bRTL);
bool GetNextRun(int* nMinRunPos, int* nEndRunPos, bool* bRTL);
void AddFallbackRun(int nMinRunPos, int nEndRunPos, bool bRTL);
- bool HasDXArray() const { return mpNaturalDXArray; }
+ bool HasDXArray() const { return mpDXArray; }
// methods used by BiDi and glyph fallback
bool HasFallbackRun() const;
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index c3b8fab84595..f46f4d875210 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -139,8 +139,8 @@ void GenericSalLayout::AdjustLayout(vcl::text::ImplLayoutArgs& rArgs)
{
SalLayout::AdjustLayout(rArgs);
- if (rArgs.mpNaturalDXArray)
- ApplyDXArray(rArgs.mpNaturalDXArray, rArgs.mpKashidaArray);
+ if (rArgs.mpDXArray)
+ ApplyDXArray(rArgs.mpDXArray, rArgs.mpKashidaArray);
else if (rArgs.mnLayoutWidth)
Justify(rArgs.mnLayoutWidth);
// apply asian kerning if the glyphs are not already formatted
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 3cdd71642b5b..be3506bf4e3c 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -688,11 +688,11 @@ void MultiSalLayout::AdjustLayout( vcl::text::ImplLayoutArgs& rArgs )
for (DeviceCoordinate a : aJustificationArray)
aNaturalJustificationArray.push_back(a);
// change the DXArray temporarily (just for the justification)
- aMultiArgs.mpNaturalDXArray = aNaturalJustificationArray.data();
+ aMultiArgs.mpDXArray = aNaturalJustificationArray.data();
}
}
- ImplAdjustMultiLayout(rArgs, aMultiArgs, aMultiArgs.mpNaturalDXArray);
+ ImplAdjustMultiLayout(rArgs, aMultiArgs, aMultiArgs.mpDXArray);
}
void MultiSalLayout::ImplAdjustMultiLayout(vcl::text::ImplLayoutArgs& rArgs,
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2c5f9aae06aa..61d965a28b68 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1363,10 +1363,10 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
nPixelWidth, flags, pLayoutCache);
DeviceCoordinate nEndGlyphCoord(0);
- std::unique_ptr<double[]> xNaturalDXPixelArray;
+ std::unique_ptr<double[]> xDXPixelArray;
if( !pDXArray.empty() )
{
- xNaturalDXPixelArray.reset(new double[nLen]);
+ xDXPixelArray.reset(new double[nLen]);
if (mbMap)
{
@@ -1374,16 +1374,16 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
// keeping accuracy for lower levels
int nSubPixels = pDXArray.get_factor();
for (int i = 0; i < nLen; ++i)
- xNaturalDXPixelArray[i] = ImplLogicWidthToDeviceSubPixel(pDXArray.get_subunit(i)) / nSubPixels;
+ xDXPixelArray[i] = ImplLogicWidthToDeviceSubPixel(pDXArray.get_subunit(i)) / nSubPixels;
}
else
{
for(int i = 0; i < nLen; ++i)
- xNaturalDXPixelArray[i] = pDXArray.get(i);
+ xDXPixelArray[i] = pDXArray.get(i);
}
- aLayoutArgs.SetNaturalDXArray(xNaturalDXPixelArray.get());
- nEndGlyphCoord = std::lround(xNaturalDXPixelArray[nLen - 1]);
+ aLayoutArgs.SetDXArray(xDXPixelArray.get());
+ nEndGlyphCoord = std::lround(xDXPixelArray[nLen - 1]);
}
if (!pKashidaArray.empty())
diff --git a/vcl/source/text/ImplLayoutArgs.cxx b/vcl/source/text/ImplLayoutArgs.cxx
index e837ca411014..80aec6b5f42c 100644
--- a/vcl/source/text/ImplLayoutArgs.cxx
+++ b/vcl/source/text/ImplLayoutArgs.cxx
@@ -37,7 +37,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr, int nMinCharPos, int nEndCh
, mnMinCharPos(nMinCharPos)
, mnEndCharPos(nEndCharPos)
, m_pTextLayoutCache(pLayoutCache)
- , mpNaturalDXArray(nullptr)
+ , mpDXArray(nullptr)
, mpKashidaArray(nullptr)
, mnLayoutWidth(0)
, mnOrientation(0)
@@ -90,7 +90,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr, int nMinCharPos, int nEndCh
void ImplLayoutArgs::SetLayoutWidth(DeviceCoordinate nWidth) { mnLayoutWidth = nWidth; }
-void ImplLayoutArgs::SetNaturalDXArray(double const* pDXArray) { mpNaturalDXArray = pDXArray; }
+void ImplLayoutArgs::SetDXArray(double const* pDXArray) { mpDXArray = pDXArray; }
void ImplLayoutArgs::SetKashidaArray(sal_Bool const* pKashidaArray)
{
@@ -303,7 +303,7 @@ std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs
s << "\"";
s << ",DXArray=";
- if (rArgs.mpNaturalDXArray)
+ if (rArgs.mpDXArray)
{
s << "[";
int count = rArgs.mnEndCharPos - rArgs.mnMinCharPos;
@@ -312,7 +312,7 @@ std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs
lim = 7;
for (int i = 0; i < lim; i++)
{
- s << rArgs.mpNaturalDXArray[i];
+ s << rArgs.mpDXArray[i];
if (i < lim - 1)
s << ",";
}
@@ -320,7 +320,7 @@ std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs
{
if (count > lim + 1)
s << "...";
- s << rArgs.mpNaturalDXArray[count - 1];
+ s << rArgs.mpDXArray[count - 1];
}
s << "]";
}