diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/font/FontSelectPattern.cxx (renamed from vcl/source/font/fontselect.cxx) | 3 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontCollection.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFace.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/fontcache.cxx | 5 | ||||
-rw-r--r-- | vcl/source/font/fontinstance.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/fontmetric.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/embeddedfontshelper.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfbuildin_fonts.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdffontcache.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 18 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 6 |
12 files changed, 39 insertions, 33 deletions
diff --git a/vcl/source/font/fontselect.cxx b/vcl/source/font/FontSelectPattern.cxx index 3ea89bde90e1..23e7673c8da2 100644 --- a/vcl/source/font/fontselect.cxx +++ b/vcl/source/font/FontSelectPattern.cxx @@ -20,10 +20,11 @@ #include <sal/config.h> #include <o3tl/safeint.hxx> #include <tools/gen.hxx> + #include <vcl/font.hxx> -#include <PhysicalFontFace.hxx> #include <font/FontSelectPattern.hxx> +#include <font/PhysicalFontFace.hxx> namespace vcl::font { diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index c97beb478c79..42dc11d303e2 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -276,7 +276,7 @@ vcl::font::PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( vcl return pFallbackData; } -void PhysicalFontCollection::Add( PhysicalFontFace* pNewData ) +void PhysicalFontCollection::Add( vcl::font::PhysicalFontFace* pNewData ) { OUString aSearchName = GetEnglishSearchFontName( pNewData->GetFamilyName() ); diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx index 7d278df9871d..6acfe3da1575 100644 --- a/vcl/source/font/PhysicalFontFace.cxx +++ b/vcl/source/font/PhysicalFontFace.cxx @@ -24,9 +24,12 @@ #include <unotools/fontdefs.hxx> #include <fontattributes.hxx> + #include <font/FontSelectPattern.hxx> +#include <font/PhysicalFontFace.hxx> -#include <PhysicalFontFace.hxx> +namespace vcl::font +{ PhysicalFontFace::PhysicalFontFace( const FontAttributes& rDFA ) : FontAttributes( rDFA ) @@ -176,5 +179,6 @@ bool PhysicalFontFace::IsBetterMatch( const vcl::font::FontSelectPattern& rFSD, rStatus.mnWidthMatch = nWidthMatch; return true; } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 5e94441466b0..c125d49f0d1b 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -18,10 +18,11 @@ */ #include <sal/config.h> + #include <sal/log.hxx> #include <PhysicalFontCollection.hxx> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <font/PhysicalFontFamily.hxx> #include <fontinstance.hxx> #include <impfontcache.hxx> @@ -143,7 +144,7 @@ rtl::Reference<LogicalFontInstance> ImplFontCache::GetFontInstance( PhysicalFont if( !pFontInstance && pFontFamily) // still no cache hit => create a new font instance { - PhysicalFontFace* pFontData = pFontFamily->FindBestFontFace(aFontSelData); + vcl::font::PhysicalFontFace* pFontData = pFontFamily->FindBestFontFace(aFontSelData); // create a new logical font instance from this physical font face pFontInstance = pFontData->CreateFontInstance( aFontSelData ); diff --git a/vcl/source/font/fontinstance.cxx b/vcl/source/font/fontinstance.cxx index 672ac82e1bdb..49b0593ce592 100644 --- a/vcl/source/font/fontinstance.cxx +++ b/vcl/source/font/fontinstance.cxx @@ -22,9 +22,9 @@ #include <hb-ot.h> #include <hb-graphite2.h> +#include <font/PhysicalFontFace.hxx> #include <fontinstance.hxx> #include <impfontcache.hxx> -#include <PhysicalFontFace.hxx> #include <o3tl/hash_combine.hxx> @@ -45,7 +45,7 @@ namespace std } -LogicalFontInstance::LogicalFontInstance(const PhysicalFontFace& rFontFace, const vcl::font::FontSelectPattern& rFontSelData ) +LogicalFontInstance::LogicalFontInstance(const vcl::font::PhysicalFontFace& rFontFace, const vcl::font::FontSelectPattern& rFontSelData ) : mxFontMetric( new ImplFontMetricData( rFontSelData )) , mpConversion( nullptr ) , mnLineHeight( 0 ) @@ -56,7 +56,7 @@ LogicalFontInstance::LogicalFontInstance(const PhysicalFontFace& rFontFace, cons , m_aFontSelData(rFontSelData) , m_pHbFont(nullptr) , m_nAveWidthFactor(1.0f) - , m_pFontFace(&const_cast<PhysicalFontFace&>(rFontFace)) + , m_pFontFace(&const_cast<vcl::font::PhysicalFontFace&>(rFontFace)) { } diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index 2e3859b1f941..000523941813 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -26,9 +26,9 @@ #include <vcl/outdev.hxx> #include <sal/log.hxx> -#include <PhysicalFontFace.hxx> -#include <fontinstance.hxx> #include <font/FontSelectPattern.hxx> +#include <font/PhysicalFontFace.hxx> +#include <fontinstance.hxx> #include <impfontmetricdata.hxx> #include <sft.hxx> @@ -53,7 +53,7 @@ FontMetric::FontMetric() FontMetric::FontMetric( const FontMetric& rFontMetric ) = default; -FontMetric::FontMetric(PhysicalFontFace const& rFace) +FontMetric::FontMetric(vcl::font::PhysicalFontFace const& rFace) : FontMetric() { SetFamilyName(rFace.GetFamilyName()); diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index ebcedb45b6a4..03c80ccb885b 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -260,12 +260,12 @@ OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontF PhysicalFontCollection fonts; graphics->GetDevFontList( &fonts ); std::unique_ptr< vcl::font::PhysicalFontFaceCollection > fontInfo( fonts.GetFontFaceCollection()); - PhysicalFontFace* selected = nullptr; + vcl::font::PhysicalFontFace* selected = nullptr; for( int i = 0; i < fontInfo->Count(); ++i ) { - PhysicalFontFace* f = fontInfo->Get( i ); + vcl::font::PhysicalFontFace* f = fontInfo->Get( i ); if( f->GetFamilyName() == familyName ) { // Ignore comparing text encodings, at least for now. They cannot be trivially compared diff --git a/vcl/source/gdi/pdfbuildin_fonts.cxx b/vcl/source/gdi/pdfbuildin_fonts.cxx index 688b608de2e1..d6504c5c0fb7 100644 --- a/vcl/source/gdi/pdfbuildin_fonts.cxx +++ b/vcl/source/gdi/pdfbuildin_fonts.cxx @@ -731,7 +731,7 @@ const BuildinFont BuildinFontFace::m_aBuildinFonts[14] }; -BuildinFontInstance::BuildinFontInstance(const PhysicalFontFace& rFontFace, +BuildinFontInstance::BuildinFontInstance(const vcl::font::PhysicalFontFace& rFontFace, const vcl::font::FontSelectPattern& rFSP) : LogicalFontInstance(rFontFace, rFSP) { @@ -748,7 +748,7 @@ bool BuildinFontInstance::GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, } BuildinFontFace::BuildinFontFace(int nId) - : PhysicalFontFace(m_aBuildinFonts[nId].GetFontAttributes()) + : vcl::font::PhysicalFontFace(m_aBuildinFonts[nId].GetFontAttributes()) , mrBuildin(m_aBuildinFonts[nId]) { } diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx index dadcb03048e2..e4646f8777bd 100644 --- a/vcl/source/gdi/pdffontcache.cxx +++ b/vcl/source/gdi/pdffontcache.cxx @@ -21,7 +21,7 @@ #include <sal/types.h> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <pdf/pdffontcache.hxx> #include <salgdi.hxx> @@ -29,14 +29,14 @@ using namespace vcl; -PDFFontCache::FontIdentifier::FontIdentifier( const PhysicalFontFace* pFont, bool bVertical ) : +PDFFontCache::FontIdentifier::FontIdentifier( const vcl::font::PhysicalFontFace* pFont, bool bVertical ) : m_nFontId( pFont->GetFontId() ), m_bVertical( bVertical ), m_typeFontFace( const_cast<std::type_info*>(&typeid(pFont)) ) { } -PDFFontCache::FontData& PDFFontCache::getFont( const PhysicalFontFace* pFont, bool bVertical ) +PDFFontCache::FontData& PDFFontCache::getFont( const vcl::font::PhysicalFontFace* pFont, bool bVertical ) { FontIdentifier aId( pFont, bVertical ); FontToIndexMap::iterator it = m_aFontToIndex.find( aId ); @@ -47,7 +47,7 @@ PDFFontCache::FontData& PDFFontCache::getFont( const PhysicalFontFace* pFont, bo return m_aFonts.back(); } -sal_Int32 PDFFontCache::getGlyphWidth( const PhysicalFontFace* pFont, sal_GlyphId nGlyph, bool bVertical, SalGraphics* pGraphics ) +sal_Int32 PDFFontCache::getGlyphWidth( const vcl::font::PhysicalFontFace* pFont, sal_GlyphId nGlyph, bool bVertical, SalGraphics* pGraphics ) { sal_Int32 nWidth = 0; FontData& rFontData( getFont( pFont, bVertical ) ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6b02a6d384fc..7718cbd39f9c 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -72,7 +72,7 @@ #include <svdata.hxx> #include <bitmap/BitmapWriteAccess.hxx> #include <fontsubset.hxx> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <salgdi.hxx> #include <textlayout.hxx> #include <textlineinfo.hxx> @@ -2310,7 +2310,7 @@ sal_Int32 PDFWriterImpl::emitBuildinFont(const pdf::BuildinFontFace* pFD, sal_In return nFontObject; } -std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFontFace* pFont, EmbedFont const & rEmbed ) +std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const vcl::font::PhysicalFontFace* pFont, EmbedFont const & rEmbed ) { std::map< sal_Int32, sal_Int32 > aRet; @@ -2549,7 +2549,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8 const * pEncoding, return nStream; } -sal_Int32 PDFWriterImpl::emitFontDescriptor( const PhysicalFontFace* pFont, FontSubsetInfo const & rInfo, sal_Int32 nSubsetID, sal_Int32 nFontStream ) +sal_Int32 PDFWriterImpl::emitFontDescriptor( const vcl::font::PhysicalFontFace* pFont, FontSubsetInfo const & rInfo, sal_Int32 nSubsetID, sal_Int32 nFontStream ) { OStringBuffer aLine( 1024 ); // get font flags, see PDF reference 1.4 p. 358 @@ -2854,7 +2854,7 @@ bool PDFWriterImpl::emitFonts() } else { - const PhysicalFontFace* pFont = subset.first; + const vcl::font::PhysicalFontFace* pFont = subset.first; OStringBuffer aErrorComment( 256 ); aErrorComment.append( "CreateFontSubset failed for font \"" ); aErrorComment.append( OUStringToOString( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ) ); @@ -3889,7 +3889,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW FontCharMapRef pMap; GetFontCharMap(pMap); const LogicalFontInstance* pFontInstance = GetFontInstance(); - const PhysicalFontFace* pDevFont = pFontInstance->GetFontFace(); + const vcl::font::PhysicalFontFace* pDevFont = pFontInstance->GetFontFace(); Pop(); // make sure OpenSymbol is embedded, and includes our checkmark @@ -5676,7 +5676,7 @@ sal_Int32 PDFWriterImpl::getSystemFont( const vcl::Font& i_rFont ) SetFont( i_rFont ); - const PhysicalFontFace* pDevFont = GetFontInstance()->GetFontFace(); + const vcl::font::PhysicalFontFace* pDevFont = GetFontInstance()->GetFontFace(); sal_Int32 nFontID = 0; auto it = m_aSystemFonts.find( pDevFont ); if( it != m_aSystemFonts.end() ) @@ -5693,7 +5693,7 @@ sal_Int32 PDFWriterImpl::getSystemFont( const vcl::Font& i_rFont ) } void PDFWriterImpl::registerGlyph(const GlyphItem* pGlyph, - const PhysicalFontFace* pFont, + const vcl::font::PhysicalFontFace* pFont, const std::vector<sal_Ucs>& rCodeUnits, sal_uInt8& nMappedGlyph, sal_Int32& nMappedFontObject) @@ -6123,9 +6123,9 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } FontMetric aRefDevFontMetric = GetFontMetric(); - const PhysicalFontFace* pDevFont = GetFontInstance()->GetFontFace(); + const vcl::font::PhysicalFontFace* pDevFont = GetFontInstance()->GetFontFace(); const GlyphItem* pGlyph = nullptr; - const PhysicalFontFace* pFallbackFont = nullptr; + const vcl::font::PhysicalFontFace* pFallbackFont = nullptr; // collect the glyphs into a single array std::vector< PDFGlyph > aGlyphs; diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 9a327dd5312f..aafa8f157e70 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -22,7 +22,7 @@ #include <memory> #include <config_features.h> #include <sal/log.hxx> -#include <PhysicalFontFace.hxx> +#include <font/PhysicalFontFace.hxx> #include <fontsubset.hxx> #include <salgdi.hxx> #include <salframe.hxx> @@ -885,7 +885,7 @@ OUString SalGraphics::getRenderBackendName() const } void SalGraphics::GetGlyphWidths(const vcl::AbstractTrueTypeFont& rTTF, - const PhysicalFontFace& rFontFace, const bool bVertical, + const vcl::font::PhysicalFontFace& rFontFace, const bool bVertical, std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc) { rWidths.clear(); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 445e2cddba07..bdd6deaaa49e 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -493,7 +493,7 @@ sal_Int32 GenericSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoor bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, const LogicalFontInstance** ppGlyphFont, - const PhysicalFontFace**) const + const vcl::font::PhysicalFontFace**) const { std::vector<GlyphItem>::const_iterator pGlyphIter = m_GlyphItems.begin(); std::vector<GlyphItem>::const_iterator pGlyphIterEnd = m_GlyphItems.end(); @@ -1107,7 +1107,7 @@ void MultiSalLayout::GetCaretPositions( int nMaxIndex, tools::Long* pCaretXArray bool MultiSalLayout::GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, const LogicalFontInstance** ppGlyphFont, - const PhysicalFontFace** pFallbackFont) const + const vcl::font::PhysicalFontFace** pFallbackFont) const { // NOTE: nStart is tagged with current font index int nLevel = static_cast<unsigned>(nStart) >> GF_FONTSHIFT; @@ -1116,7 +1116,7 @@ bool MultiSalLayout::GetNextGlyph(const GlyphItem** pGlyph, { GenericSalLayout& rLayout = *mpLayouts[ nLevel ]; rLayout.InitFont(); - const PhysicalFontFace* pFontFace = rLayout.GetFont().GetFontFace(); + const vcl::font::PhysicalFontFace* pFontFace = rLayout.GetFont().GetFontFace(); if (rLayout.GetNextGlyph(pGlyph, rPos, nStart, ppGlyphFont)) { int nFontTag = nLevel << GF_FONTSHIFT; |