drawinglayer/source/primitive2d/textlayoutdevice.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ab4bae2265f6f5ee52baf8db106c77eefd0bd159
Author:     zhutyra <zhutyra>
AuthorDate: Fri Mar 4 11:34:01 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 4 13:46:02 2022 +0100

    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 <caol...@redhat.com>

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());
     }
 

Reply via email to