diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-07-19 08:19:06 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-07-23 06:04:17 +0200 |
commit | ecf352701411fe178b51841b5714e27bef500206 (patch) | |
tree | acb0e410e4fca6c50d96f358ac1f950fa5dc37eb /drawinglayer | |
parent | 2ce3398d3863114a8f5333a86b76f2520eb7c7d8 (diff) |
vcl: Use GetTextArray() when drawing mnemonics
Instead of using a different function to get the character width, use
the same function used for getting the character widths elsewhere.
Change-Id: I21428f34bb0f3a60fa17f5e8ecc3420545356337
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154609
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/textlayoutdevice.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index ea9fed02a20f..2b0356518285 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -294,7 +294,7 @@ void TextLayouterDevice::addTextRectActions(const ::tools::Rectangle& rRectangle } std::vector<double> TextLayouterDevice::getTextArray(const OUString& rText, sal_uInt32 nIndex, - sal_uInt32 nLength) const + sal_uInt32 nLength, bool bCaret) const { std::vector<double> aRetval; sal_uInt32 nTextLength(nLength); @@ -308,7 +308,7 @@ std::vector<double> TextLayouterDevice::getTextArray(const OUString& rText, sal_ if (nTextLength) { KernArray aArray; - mrDevice.GetTextArray(rText, &aArray, nIndex, nTextLength); + mrDevice.GetTextArray(rText, &aArray, nIndex, nTextLength, bCaret); aRetval.reserve(aArray.size()); for (size_t i = 0, nEnd = aArray.size(); i < nEnd; ++i) aRetval.push_back(aArray[i]); |