diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-26 12:53:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-26 21:40:13 +0200 |
commit | 23c4166355274fdebb7b744c99390f39416593c1 (patch) | |
tree | 26b8649c56af496656f4b8a16c9168dc53f70892 /sw | |
parent | 9dea10a6f7ef94c5ff77bc7dfe15e862dd0f7be6 (diff) |
pass vector as arg, rather than raw pointer
Change-Id: Id97df4cce7a2ce28f1a5e7cc30e27cf4ce9261d1
Reviewed-on: https://gerrit.libreoffice.org/56467
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/scriptinfo.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/itradj.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/porlay.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 47f1e8c9037b..aab651e1511d 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -305,11 +305,11 @@ public: /** retrieves kashida opportunities for a given text range. - pKashidaPositions: buffer to receive the char indices of the + rKashidaPositions: buffer to receive the char indices of the kashida opportunities relative to the paragraph */ void GetKashidaPositions(TextFrameIndex nStt, TextFrameIndex nLen, - TextFrameIndex* pKashidaPosition); + std::vector<TextFrameIndex>& rKashidaPosition); /** Use regular blank justification instead of kashdida justification for the given line of text. nStt Start char index of the line referring to the paragraph. diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 02348195c5b5..3e39f9fffd67 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -134,7 +134,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf, // if two characters are replaced by a ligature glyph, there will be no place for a kashida std::vector<TextFrameIndex> aKashidaPos(rKashidas); std::vector<TextFrameIndex> aKashidaPosDropped(rKashidas); - rSI.GetKashidaPositions(nIdx, rItr.GetLength(), aKashidaPos.data()); + rSI.GetKashidaPositions(nIdx, rItr.GetLength(), aKashidaPos); sal_Int32 nKashidaIdx = 0; while ( rKashidas && nIdx < nEnd ) { diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index abd0a164aba6..689de7b4d907 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1977,7 +1977,7 @@ void SwScriptInfo::MarkKashidaInvalid(size_t const nKashPos) // retrieve the kashida positions in the given text range void SwScriptInfo::GetKashidaPositions( TextFrameIndex const nStt, TextFrameIndex const nLen, - TextFrameIndex *const pKashidaPosition) + std::vector<TextFrameIndex>& rKashidaPosition) { size_t nCntKash = 0; while( nCntKash < CountKashida() ) @@ -1994,7 +1994,7 @@ void SwScriptInfo::GetKashidaPositions( { if ( nEnd <= GetKashida( nCntKashEnd ) ) break; - pKashidaPosition [ nCntKashEnd - nCntKash ] = GetKashida ( nCntKashEnd ); + rKashidaPosition[nCntKashEnd - nCntKash] = GetKashida(nCntKashEnd); nCntKashEnd++; } } |