summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-07 17:59:40 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-07 09:02:00 +0000
commit8b8bbb43ab66b4b4398e59316958a3dc44bcf775 (patch)
tree5315c001c76c243b5d103492952a390bdada017e /vcl/source/outdev
parente9cd5087366f930efd89a95c0a5610fe8f375581 (diff)
vcl: move FontSelectPattern[Attributes] to fontselect.cxx
Change-Id: I41361d8dd4619a27bba5cc9ad2c627b37f1b2013 Reviewed-on: https://gerrit.libreoffice.org/21190 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/font.cxx107
1 files changed, 0 insertions, 107 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 40e12c908e40..915cc89fcb32 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1071,118 +1071,11 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont
mnWidth = -mnWidth;
}
-FontSelectPattern::FontSelectPattern( const vcl::Font& rFont,
- const OUString& rSearchName, const Size& rSize, float fExactHeight)
- : FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight)
- , mpFontData( nullptr )
- , mpFontEntry( nullptr )
-{
-}
-
-// NOTE: this ctor is still used on Windows. Do not remove.
-#ifdef WNT
-FontSelectPatternAttributes::FontSelectPatternAttributes( const PhysicalFontFace& rFontData,
- const Size& rSize, float fExactHeight, int nOrientation, bool bVertical )
- : ImplFontAttributes( rFontData )
- , mnWidth( rSize.Width() )
- , mnHeight( rSize.Height() )
- , mfExactHeight( fExactHeight )
- , mnOrientation( nOrientation )
- , meLanguage( 0 )
- , mbVertical( bVertical )
- , mbNonAntialiased( false )
- , mbEmbolden( false )
-{
- maTargetName = maSearchName = GetFamilyName();
- // NOTE: no normalization for width/height/orientation
-}
-
-FontSelectPattern::FontSelectPattern( const PhysicalFontFace& rFontData,
- const Size& rSize, float fExactHeight, int nOrientation, bool bVertical )
- : FontSelectPatternAttributes(rFontData, rSize, fExactHeight, nOrientation, bVertical)
- , mpFontData( &rFontData )
- , mpFontEntry( NULL )
-{
-}
-#endif
-
-void FontSelectPattern::copyAttributes(const FontSelectPatternAttributes &rAttributes)
-{
- static_cast<FontSelectPatternAttributes&>(*this) = rAttributes;
-}
-
size_t ImplFontCache::IFSD_Hash::operator()( const FontSelectPattern& rFSD ) const
{
return rFSD.hashCode();
}
-size_t FontSelectPatternAttributes::hashCode() const
-{
- // TODO: does it pay off to improve this hash function?
- size_t nHash;
-#if ENABLE_GRAPHITE
- // check for features and generate a unique hash if necessary
- if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
- != -1)
- {
- nHash = maTargetName.hashCode();
- }
- else
-#endif
- {
- nHash = maSearchName.hashCode();
- }
- nHash += 11 * mnHeight;
- nHash += 19 * GetWeight();
- nHash += 29 * GetSlantType();
- nHash += 37 * mnOrientation;
- nHash += 41 * meLanguage;
- if( mbVertical )
- nHash += 53;
- return nHash;
-}
-
-bool FontSelectPatternAttributes::operator==(const FontSelectPatternAttributes& rOther) const
-{
- if (!CompareDeviceIndependentFontAttributes(rOther))
- return false;
-
- if (maTargetName != rOther.maTargetName)
- return false;
-
- if (maSearchName != rOther.maSearchName)
- return false;
-
- if (mnWidth != rOther.mnWidth)
- return false;
-
- if (mnHeight != rOther.mnHeight)
- return false;
-
- if (mfExactHeight != rOther.mfExactHeight)
- return false;
-
- if (mnOrientation != rOther.mnOrientation)
- return false;
-
- if (meLanguage != rOther.meLanguage)
- return false;
-
- if (mbVertical != rOther.mbVertical)
- return false;
-
- if (mbNonAntialiased != rOther.mbNonAntialiased)
- return false;
-
- if (mbEmbolden != rOther.mbEmbolden)
- return false;
-
- if (maItalicMatrix != rOther.maItalicMatrix)
- return false;
-
- return true;
-}
-
bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const FontSelectPattern& rB) const
{
// check normalized font family name