summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/textlayoutdevice.cxx
diff options
context:
space:
mode:
authorzhutyra <zhutyra>2022-03-04 11:34:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-03-04 13:46:02 +0100
commitab4bae2265f6f5ee52baf8db106c77eefd0bd159 (patch)
treebe9da494ea9a38dbee4bea7420aeaa168d56f985 /drawinglayer/source/primitive2d/textlayoutdevice.cxx
parentb279061b97e53b0730bdd463b3287c82075f1538 (diff)
the assumption is that aArray.size() matches the Length argument
LIBREOFFICE-OWMTGGWJ Change-Id: I68dfcb0dcbb401c62d4e29f9ab6e4ee1ebc7f072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130973 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer/source/primitive2d/textlayoutdevice.cxx')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 60370e722941..f70f9f63b81d 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -309,7 +309,7 @@ std::vector<double> TextLayouterDevice::getTextArray(const OUString& rText, sal_
{
aRetval.reserve(nTextLength);
std::vector<sal_Int32> aArray(nTextLength);
- mrDevice.GetTextArray(rText, &aArray, nIndex, nLength);
+ mrDevice.GetTextArray(rText, &aArray, nIndex, nTextLength);
aRetval.assign(aArray.begin(), aArray.end());
}
@@ -332,7 +332,7 @@ std::vector<double> TextLayouterDevice::getCaretPositions(const OUString& rText,
{
aRetval.reserve(2 * nTextLength);
std::vector<sal_Int32> aArray(2 * nTextLength);
- mrDevice.GetCaretPositions(rText, aArray.data(), nIndex, nLength);
+ mrDevice.GetCaretPositions(rText, aArray.data(), nIndex, nTextLength);
aRetval.assign(aArray.begin(), aArray.end());
}