summaryrefslogtreecommitdiff
path: root/canvas/source/opengl/ogl_canvashelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/opengl/ogl_canvashelper.cxx')
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index d64e1ba1d7f0..df85d1ab428f 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -20,8 +20,9 @@
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <rtl/crc.h>
#include <rtl/math.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <vcl/font.hxx>
+#include <vcl/kernarray.hxx>
#include <vcl/metric.hxx>
#include <vcl/virdev.hxx>
@@ -342,8 +343,7 @@ namespace oglcanvas
CanvasHelper::CanvasHelper() :
mpDevice( nullptr ),
- mpDeviceHelper( nullptr ),
- mpRecordedActions()
+ mpDeviceHelper( nullptr )
{}
CanvasHelper::~CanvasHelper()
@@ -679,7 +679,8 @@ namespace oglcanvas
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->EnableOutput(false);
- CanvasFont* pFont=dynamic_cast<CanvasFont*>(xLayoutetText->getFont().get());
+ auto pLayoutFont = xLayoutetText->getFont();
+ CanvasFont* pFont=dynamic_cast<CanvasFont*>(pLayoutFont.get());
const rendering::StringContext& rTxt=xLayoutetText->getText();
if( pFont && rTxt.Length )
{
@@ -689,7 +690,7 @@ namespace oglcanvas
vcl::Font aFont(
rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName,
- Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
+ Size( 0, ::basegfx::fround<tools::Long>(rFontRequest.CellSize)));
aFont.SetAlignment( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
@@ -729,9 +730,13 @@ namespace oglcanvas
{
// create the DXArray
const sal_Int32 nLen( aLogicalAdvancements.getLength() );
- std::unique_ptr<tools::Long[]> pDXArray( new tools::Long[nLen] );
+ KernArray aDXArray;
+ aDXArray.resize(nLen);
for( sal_Int32 i=0; i<nLen; ++i )
- pDXArray[i] = basegfx::fround( aLogicalAdvancements[i] );
+ aDXArray.set(i, basegfx::fround(aLogicalAdvancements[i]));
+
+ uno::Sequence<sal_Bool> aKashidaPositions=xLayoutetText->queryKashidaPositions();
+ std::span<const sal_Bool> aKashidaArray(aKashidaPositions.getConstArray(), aKashidaPositions.getLength());
// get the glyphs
pVDev->GetTextOutlines(rAct.maPolyPolys,
@@ -740,7 +745,8 @@ namespace oglcanvas
rTxt.StartPosition,
rTxt.Length,
0,
- pDXArray.get() );
+ aDXArray,
+ aKashidaArray);
}
else
{