LCOV - code coverage report
Current view: top level - vcl/headless - svptext.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 35 51 68.6 %
Date: 2015-06-13 12:38:46 Functions: 14 21 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <sal/types.h>
      21             : #include <basegfx/range/b2ibox.hxx>
      22             : #include "headless/svpgdi.hxx"
      23             : 
      24      694937 : sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel )
      25             : {
      26      694937 :     return m_xTextRenderImpl->SetFont(pIFSD, nFallbackLevel);
      27             : }
      28             : 
      29       13135 : void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel )
      30             : {
      31       13135 :     m_xTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel);
      32       13135 : }
      33             : 
      34       10011 : const FontCharMapPtr SvpSalGraphics::GetFontCharMap() const
      35             : {
      36       10011 :     return m_xTextRenderImpl->GetFontCharMap();
      37             : }
      38             : 
      39           0 : bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
      40             : {
      41           0 :     return m_xTextRenderImpl->GetFontCapabilities(rFontCapabilities);
      42             : }
      43             : 
      44         361 : void SvpSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
      45             : {
      46         361 :     m_xTextRenderImpl->GetDevFontList(pFontCollection);
      47         361 : }
      48             : 
      49          13 : void SvpSalGraphics::ClearDevFontCache()
      50             : {
      51          13 :     m_xTextRenderImpl->ClearDevFontCache();
      52          13 : }
      53             : 
      54          13 : bool SvpSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
      55             :     const OUString& rFileURL, const OUString& rFontName)
      56             : {
      57          13 :     return m_xTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName);
      58             : }
      59             : 
      60           0 : bool SvpSalGraphics::CreateFontSubset(
      61             :     const OUString& rToFile,
      62             :     const PhysicalFontFace* pFont,
      63             :     const sal_GlyphId* pGlyphIds,
      64             :     const sal_uInt8* pEncoding,
      65             :     sal_Int32* pWidths,
      66             :     int nGlyphCount,
      67             :     FontSubsetInfo& rInfo)
      68             : {
      69           0 :     return m_xTextRenderImpl->CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
      70             : }
      71             : 
      72           0 : const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
      73             : {
      74           0 :     return m_xTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority);
      75             : }
      76             : 
      77           0 : const void* SvpSalGraphics::GetEmbedFontData(
      78             :     const PhysicalFontFace* pFont,
      79             :     const sal_Ucs* pUnicodes,
      80             :     sal_Int32* pWidths,
      81             :     size_t nLen,
      82             :     FontSubsetInfo& rInfo,
      83             :     long* pDataLen)
      84             : {
      85           0 :     return m_xTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen);
      86             : }
      87             : 
      88           0 : void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
      89             : {
      90           0 :     m_xTextRenderImpl->FreeEmbedFontData(pData, nLen);
      91           0 : }
      92             : 
      93           0 : void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
      94             :                                    bool bVertical,
      95             :                                    Int32Vector& rWidths,
      96             :                                    Ucs2UIntMap& rUnicodeEnc )
      97             : {
      98           0 :     m_xTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
      99           0 : }
     100             : 
     101     1280065 : bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
     102             : {
     103     1280065 :     return m_xTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect);
     104             : }
     105             : 
     106        3493 : bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
     107             : {
     108        3493 :     return m_xTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly);
     109             : }
     110             : 
     111     1584071 : SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
     112             : {
     113     1584071 :     return m_xTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel);
     114             : }
     115             : 
     116      246019 : void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout )
     117             : {
     118      246019 :     m_xTextRenderImpl->DrawServerFontLayout(rSalLayout );
     119      246019 : }
     120             : 
     121       49113 : void SvpSalGraphics::SetTextColor( SalColor nSalColor )
     122             : {
     123       49113 :     m_xTextRenderImpl->SetTextColor(nSalColor);
     124       49113 : }
     125             : 
     126           0 : SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
     127             : {
     128           0 :     return m_xTextRenderImpl->GetSysFontData(nFallbacklevel);
     129             : }
     130             : 
     131     1462994 : void SvpSalGraphics::BlendTextColor(const basebmp::Color &rTextColor, const basebmp::BitmapDeviceSharedPtr &rAlphaMask,
     132             :                                     const basegfx::B2IPoint &rDstPoint)
     133             : {
     134             :     // blend text color into target using the glyph's mask
     135     1462994 :     const basegfx::B2IBox aSrcRect(basegfx::B2ITuple(0,0), rAlphaMask->getSize());
     136     1462994 :     const basegfx::B2IBox aClipRect(rDstPoint, rAlphaMask->getSize());
     137             : 
     138     1462994 :     SvpSalGraphics::ClipUndoHandle aUndo(this);
     139     1462994 :     if (isClippedSetup(aClipRect, aUndo))
     140     1462994 :         return;
     141             : 
     142     1462994 :     m_aDevice->drawMaskedColor(rTextColor, rAlphaMask, aSrcRect, rDstPoint, m_aClipMap);
     143         801 : }
     144             : 
     145             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11