diff options
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/inc/implrenderer.hxx | 1 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 6 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.cxx | 29 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/textaction.hxx | 1 |
4 files changed, 36 insertions, 1 deletions
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index edf4fcf9efba..1cd4fd91d72e 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -195,6 +195,7 @@ namespace cppcanvas::internal int nIndex, int nLength, KernArraySpan pCharWidths, + o3tl::span<const sal_Bool> pKashidaArray, const ActionFactoryParameters& rParms, bool bSubsettable ); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 10ccaf1ccdbb..958faf8f8378 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -847,6 +847,7 @@ namespace cppcanvas::internal int nIndex, int nLength, KernArraySpan pCharWidths, + o3tl::span<const sal_Bool> pKashidaArray, const ActionFactoryParameters& rParms, bool bSubsettableActions ) { @@ -943,6 +944,7 @@ namespace cppcanvas::internal nIndex, nLength, pCharWidths, + pKashidaArray, rParms.mrVDev, rParms.mrCanvas, rState, @@ -1008,6 +1010,7 @@ namespace cppcanvas::internal 0/*nStartPos*/, nLen, aStrikeoutCharWidths, + pKashidaArray, rParms.mrVDev, rParms.mrCanvas, rState, @@ -2450,6 +2453,7 @@ namespace cppcanvas::internal pAct->GetIndex(), nLen, {}, + {}, rFactoryParms, bSubsettableActions ); } @@ -2471,6 +2475,7 @@ namespace cppcanvas::internal pAct->GetIndex(), nLen, pAct->GetDXArray(), + pAct->GetKashidaArray(), rFactoryParms, bSubsettableActions ); } @@ -2578,6 +2583,7 @@ namespace cppcanvas::internal pAct->GetIndex(), nLen, aDXArray, + {}, rFactoryParms, bSubsettableActions ); } diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index 4b945c2f2ce3..fb75f661fcad 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -229,6 +229,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const ::basegfx::B2DHomMatrix* pTextTransform ) @@ -255,6 +256,7 @@ namespace cppcanvas::internal "::cppcanvas::internal::initArrayAction(): Invalid font" ); o_rTextLayout->applyLogicalAdvancements( rOffsets ); + o_rTextLayout->applyKashidaPositions( rKashidas ); } @@ -457,6 +459,10 @@ namespace cppcanvas::internal io_rTextLayout, nLayoutWidth, rSubset ) ); + uno::Sequence< sal_Bool > aOrigKashidaPositions(io_rTextLayout->queryKashidaPositions()); + uno::Sequence< sal_Bool > aKashidaPositions(aOrigKashidaPositions.getArray() + rSubset.mnSubsetBegin, + rSubset.mnSubsetEnd - rSubset.mnSubsetBegin); + xTextLayout->applyKashidaPositions(aKashidaPositions); } io_rTextLayout = xTextLayout; @@ -1017,6 +1023,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, const CanvasSharedPtr& rCanvas, const OutDevState& rState ); @@ -1025,6 +1032,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const ::basegfx::B2DHomMatrix& rTextTransform ); @@ -1061,6 +1069,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, const CanvasSharedPtr& rCanvas, const OutDevState& rState ) : mpCanvas( rCanvas ) @@ -1074,6 +1083,7 @@ namespace cppcanvas::internal nStartPos, nLen, rOffsets, + rKashidas, rCanvas, rState, nullptr ); } @@ -1083,6 +1093,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const ::basegfx::B2DHomMatrix& rTextTransform ) : @@ -1097,6 +1108,7 @@ namespace cppcanvas::internal nStartPos, nLen, rOffsets, + rKashidas, rCanvas, rState, &rTextTransform ); @@ -1206,6 +1218,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, VirtualDevice const & rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState ); @@ -1219,6 +1232,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, VirtualDevice const & rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -1273,6 +1287,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, VirtualDevice const & rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState ) : @@ -1296,6 +1311,7 @@ namespace cppcanvas::internal nStartPos, nLen, rOffsets, + rKashidas, rCanvas, rState, nullptr ); } @@ -1310,6 +1326,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, const uno::Sequence< double >& rOffsets, + const uno::Sequence< sal_Bool >& rKashidas, VirtualDevice const & rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -1334,6 +1351,7 @@ namespace cppcanvas::internal nStartPos, nLen, rOffsets, + rKashidas, rCanvas, rState, &rTextTransform ); @@ -1967,6 +1985,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, + o3tl::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -1994,7 +2013,7 @@ namespace cppcanvas::internal static_cast<sal_uInt16>(nStartPos), static_cast<sal_uInt16>(nStartPos), static_cast<sal_uInt16>(nLen), - 0, pDXArray ) ); + 0, pDXArray, pKashidaArray ) ); rVDev.SetFont(aOrigFont); if( !bHaveOutlines ) @@ -2097,6 +2116,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, + o3tl::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -2129,6 +2149,7 @@ namespace cppcanvas::internal nStartPos, nLen, pDXArray, + pKashidaArray, rVDev, rCanvas, rState, @@ -2146,6 +2167,8 @@ namespace cppcanvas::internal rVDev, rState )); + const uno::Sequence< sal_Bool > aKashidas(pKashidaArray.data(), pKashidaArray.size()); + // determine type of text action to create // ======================================= @@ -2240,6 +2263,7 @@ namespace cppcanvas::internal nStartPos, nLen, aCharWidths, + aKashidas, rCanvas, rState, *rParms.maTextTransformation ); @@ -2250,6 +2274,7 @@ namespace cppcanvas::internal nStartPos, nLen, aCharWidths, + aKashidas, rCanvas, rState ); } @@ -2268,6 +2293,7 @@ namespace cppcanvas::internal nStartPos, nLen, aCharWidths, + aKashidas, rVDev, rCanvas, rState, @@ -2284,6 +2310,7 @@ namespace cppcanvas::internal nStartPos, nLen, aCharWidths, + aKashidas, rVDev, rCanvas, rState ); diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx index 66d08ca8cfa2..bc399f0f8502 100644 --- a/cppcanvas/source/mtfrenderer/textaction.hxx +++ b/cppcanvas/source/mtfrenderer/textaction.hxx @@ -69,6 +69,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, + o3tl::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, |