diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-10-30 11:03:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-30 15:43:23 +0200 |
commit | bc413e15fae3672f580894a3cd7b077d533d8e6c (patch) | |
tree | 0e6306258a5f0086354f4972bd9eeb628672bfab /sw | |
parent | 70db0942c3f63bed8c2ff517e80c06cef9b52267 (diff) |
tools::Long->sal_Int32 in the DX arrays
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/scriptinfo.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/text/porlay.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 28 |
3 files changed, 27 insertions, 27 deletions
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 7e660309aa54..cd479034ed06 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -270,7 +270,7 @@ public: // HIDDEN TEXT STUFF END // modifies the kerning array according to a given compress value - tools::Long Compress( tools::Long* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, + tools::Long Compress( sal_Int32* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, const sal_uInt16 nCompress, const sal_uInt16 nFontHeight, const bool bCentered, Point* pPoint = nullptr ) const; @@ -291,7 +291,7 @@ public: The value which has to be added to a kashida opportunity. @return The number of kashida opportunities in the given range */ - sal_Int32 KashidaJustify( tools::Long* pKernArray, tools::Long* pScrArray, + sal_Int32 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray, TextFrameIndex nStt, TextFrameIndex nLen, tools::Long nSpaceAdd = 0) const; /** Clears array of kashidas marked as invalid @@ -364,8 +364,8 @@ public: The value which has to be added to the cells. @return The number of extra spaces in the given range */ - static TextFrameIndex ThaiJustify( const OUString& rText, tools::Long* pKernArray, - tools::Long* pScrArray, TextFrameIndex nIdx, + static TextFrameIndex ThaiJustify( const OUString& rText, sal_Int32* pKernArray, + sal_Int32* pScrArray, TextFrameIndex nIdx, TextFrameIndex nLen, TextFrameIndex nNumberOfBlanks = TextFrameIndex(0), tools::Long nSpaceAdd = 0 ); @@ -373,8 +373,8 @@ public: static TextFrameIndex CountCJKCharacters(const OUString &rText, TextFrameIndex nPos, TextFrameIndex nEnd, LanguageType aLang); - static void CJKJustify( const OUString& rText, tools::Long* pKernArray, - tools::Long* pScrArray, TextFrameIndex nStt, + static void CJKJustify( const OUString& rText, sal_Int32* pKernArray, + sal_Int32* pScrArray, TextFrameIndex nStt, TextFrameIndex nLen, LanguageType aLang, tools::Long nSpaceAdd, bool bIsSpaceStop ); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 5e80f7cb1b30..e1e5796294a3 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -2037,7 +2037,7 @@ size_t SwScriptInfo::HasKana(TextFrameIndex const nStart, TextFrameIndex const n return SAL_MAX_SIZE; } -tools::Long SwScriptInfo::Compress(tools::Long* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, +tools::Long SwScriptInfo::Compress(sal_Int32* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, const sal_uInt16 nCompress, const sal_uInt16 nFontHeight, bool bCenter, Point* pPoint ) const @@ -2154,8 +2154,8 @@ tools::Long SwScriptInfo::Compress(tools::Long* pKernArray, TextFrameIndex nIdx, // total number of kashida positions, or the number of kashida positions after some positions // have been dropped, depending on the state of the m_KashidaInvalid set. -sal_Int32 SwScriptInfo::KashidaJustify( tools::Long* pKernArray, - tools::Long* pScrArray, +sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray, + sal_Int32* pScrArray, TextFrameIndex const nStt, TextFrameIndex const nLen, tools::Long nSpaceAdd ) const @@ -2413,8 +2413,8 @@ void SwScriptInfo::MarkKashidasInvalid(sal_Int32 const nCnt, } } -TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, tools::Long* pKernArray, - tools::Long* pScrArray, TextFrameIndex const nStt, +TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, sal_Int32* pKernArray, + sal_Int32* pScrArray, TextFrameIndex const nStt, TextFrameIndex const nLen, TextFrameIndex nNumberOfBlanks, tools::Long nSpaceAdd ) @@ -2746,8 +2746,8 @@ TextFrameIndex SwScriptInfo::CountCJKCharacters(const OUString &rText, return nCount; } -void SwScriptInfo::CJKJustify( const OUString& rText, tools::Long* pKernArray, - tools::Long* pScrArray, TextFrameIndex const nStt, +void SwScriptInfo::CJKJustify( const OUString& rText, sal_Int32* pKernArray, + sal_Int32* pScrArray, TextFrameIndex const nStt, TextFrameIndex const nLen, LanguageType aLang, tools::Long nSpaceAdd, bool bIsSpaceStop ) { diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 9db05f74ff0b..bfa88bf306b1 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -288,12 +288,12 @@ struct CalcLinePosData const bool bSwitchH2VLRBT; const bool bSwitchL2R; tools::Long nHalfSpace; - tools::Long* pKernArray; + sal_Int32* pKernArray; const bool bBidiPor; CalcLinePosData( SwDrawTextInfo& _rInf, vcl::Font& _rFont, TextFrameIndex const _nCnt, const bool _bSwitchH2V, const bool _bSwitchH2VLRBT, const bool _bSwitchL2R, - tools::Long _nHalfSpace, tools::Long* _pKernArray, const bool _bBidiPor) : + tools::Long _nHalfSpace, sal_Int32* _pKernArray, const bool _bBidiPor) : rInf( _rInf ), rFont( _rFont ), nCnt( _nCnt ), @@ -1025,7 +1025,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); // kerning array - gives the absolute position of end of each character - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; if ( m_pPrinter ) m_pPrinter->GetTextArray( rInf.GetText(), &aKernArray, @@ -1132,7 +1132,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) { const tools::Long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf ); - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; if ( m_pPrinter ) m_pPrinter->GetTextArray( rInf.GetText(), &aKernArray, @@ -1274,7 +1274,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) // Simple kerning is handled by DrawStretchText if( rInf.GetSpace() || rInf.GetKanaComp() ) { - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); @@ -1482,12 +1482,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) bool bBullet = rInf.GetBullet(); if( m_bSymbol ) bBullet = false; - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; CreateScrFont( *rInf.GetShell(), rInf.GetOut() ); tools::Long nScrPos; // get screen array - std::vector<tools::Long> aScrArray; + std::vector<sal_Int32> aScrArray; SwTextGlyphsKey aGlyphsKey{ &rInf.GetOut(), rInf.GetText(), sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()) }; SalLayoutGlyphs* pGlyphs = GetCachedSalLayoutGlyphs(aGlyphsKey); rInf.GetOut().GetTextArray( rInf.GetText(), &aScrArray, @@ -1997,7 +1997,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) aTextSize.setWidth( m_pPrinter->GetTextWidth( rInf.GetText(), sal_Int32(rInf.GetIdx()), sal_Int32(nLn))); aTextSize.setHeight( m_pPrinter->GetTextHeight() ); - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; CreateScrFont( *rInf.GetShell(), rInf.GetOut() ); if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) ) rInf.GetOut().SetFont( *m_pScrFont ); @@ -2016,7 +2016,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) nScrPos = aKernArray[ sal_Int32(nLn) - 1 ]; else { - std::vector<tools::Long> aScrArray; + std::vector<sal_Int32> aScrArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aScrArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); nScrPos = aScrArray[ 0 ]; @@ -2063,7 +2063,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) rInf.GetOut().SetFont( *m_pPrtFont ); if( bCompress ) { - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(nLn)); rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( aKernArray.data(), @@ -2100,7 +2100,7 @@ TextFrameIndex SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf) if( 0 != nSperren ) nKern -= nSperren; - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; // be sure to have the correct layout mode at the printer if ( m_pPrinter ) @@ -2417,7 +2417,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, tools::Long nTe const SwDoc* pDoc = rInf.GetShell()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); @@ -2448,7 +2448,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, tools::Long nTe { const tools::Long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf ); - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); tools::Long nCurrPos = aKernArray[sal_Int32(nTextBreak)] + nGridWidthAdd; @@ -2563,7 +2563,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, tools::Long nTe nLn = TextFrameIndex(1); else if (nLn > nTextBreak2 + nTextBreak2) nLn = nTextBreak2 + nTextBreak2; - std::vector<tools::Long> aKernArray; + std::vector<sal_Int32> aKernArray; rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(nLn)); if( rInf.GetScriptInfo()->Compress( aKernArray.data(), rInf.GetIdx(), nLn, |