hunspell: no need for autoreconf when not patching configure
[LibreOffice.git] / vcl / headless / svptext.cxx
blobaead84a1467bb2560b344c53d0f5d0141f58e306
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <sal/types.h>
21 #include <unotools/configmgr.hxx>
22 #include <vcl/fontcharmap.hxx>
23 #include <basegfx/range/b2ibox.hxx>
24 #include <headless/svpgdi.hxx>
25 #include <config_cairo_canvas.h>
26 #include <impfontmetricdata.hxx>
27 #include <sallayout.hxx>
29 void SvpSalGraphics::SetFont(LogicalFontInstance* pIFSD, int nFallbackLevel)
31 m_aTextRenderImpl.SetFont(pIFSD, nFallbackLevel);
34 void SvpSalGraphics::GetFontMetric( ImplFontMetricDataRef& xFontMetric, int nFallbackLevel )
36 m_aTextRenderImpl.GetFontMetric(xFontMetric, nFallbackLevel);
39 const FontCharMapRef SvpSalGraphics::GetFontCharMap() const
41 return m_aTextRenderImpl.GetFontCharMap();
44 bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
46 return m_aTextRenderImpl.GetFontCapabilities(rFontCapabilities);
49 void SvpSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
51 m_aTextRenderImpl.GetDevFontList(pFontCollection);
54 void SvpSalGraphics::ClearDevFontCache()
56 m_aTextRenderImpl.ClearDevFontCache();
59 bool SvpSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
60 const OUString& rFileURL, const OUString& rFontName)
62 return m_aTextRenderImpl.AddTempDevFont(pFontCollection, rFileURL, rFontName);
65 bool SvpSalGraphics::CreateFontSubset(
66 const OUString& rToFile,
67 const PhysicalFontFace* pFont,
68 const sal_GlyphId* pGlyphIds,
69 const sal_uInt8* pEncoding,
70 sal_Int32* pWidths,
71 int nGlyphCount,
72 FontSubsetInfo& rInfo)
74 return m_aTextRenderImpl.CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
77 const void* SvpSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
79 return m_aTextRenderImpl.GetEmbedFontData(pFont, pDataLen);
82 void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
84 m_aTextRenderImpl.FreeEmbedFontData(pData, nLen);
87 void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
88 bool bVertical,
89 std::vector< sal_Int32 >& rWidths,
90 Ucs2UIntMap& rUnicodeEnc )
92 m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
95 std::unique_ptr<SalLayout> SvpSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
97 if (utl::ConfigManager::IsFuzzing())
98 return nullptr;
99 return m_aTextRenderImpl.GetTextLayout(rArgs, nFallbackLevel);
102 void SvpSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
104 m_aTextRenderImpl.DrawTextLayout(rLayout, *this);
107 void SvpSalGraphics::SetTextColor( Color nColor )
109 m_aTextRenderImpl.SetTextColor(nColor);
112 #if ENABLE_CAIRO_CANVAS
114 SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
116 return m_aTextRenderImpl.GetSysFontData(nFallbacklevel);
119 #endif // ENABLE_CAIRO_CANVAS
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */