diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-01-16 12:20:45 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2016-01-16 12:20:45 -0600 |
commit | 45654a1d4d96732912e6e4dc254c9612d3f241c0 (patch) | |
tree | 19f4ba915a56e53447980ce89fd46710167d7d23 /vcl/source/gdi | |
parent | 5d4f1f6f630d4382679087a4fb0da364c9c9692b (diff) |
revert vcl patch series that brok Mac and Windows
revert:
9bc2f3de8672e812f3a67541c6d7069b434a7e42
vcl: add comment about ImplFontMetric::{Get|Set}LineHeight()
26371f105bc44e04469ec03fc5bb12505e651c6b
vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()
2dd0b4317372b8022efe3911b38b4fa02956d8b9
vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual
5ab13bf3ead3539e4ad847656da81e7eb6029652
vcl: tabify font.hxx
f99550dae55e40e49bf9c9875053fe2abb4c71ca
vcl: change Font::SetName() to Font::SetFamilyName()
2b297116cb6bb1061c43e5714e2609c8ee9f57d2
vcl: rename Font::GetName to Font::GetFamilyName
Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/embeddedfontshelper.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 26 |
4 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index c561a3954bfa..07ceea37ac5b 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -206,7 +206,7 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont, char aName[33]; short nWeight; - OString aByteName(OUStringToOString(rFont.GetFamilyName(), + OString aByteName(OUStringToOString(rFont.GetName(), rOStm.GetStreamCharSet())); strncpy( aName, aByteName.getStr(), 32 ); aName[32] = 0; @@ -817,7 +817,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); rIStm.Read( aName, 32 ); - aFont.SetFamilyName( OUString( aName, strlen(aName), rIStm.GetStreamCharSet() ) ); + aFont.SetName( OUString( aName, strlen(aName), rIStm.GetStreamCharSet() ) ); rIStm.ReadInt32( nWidth ).ReadInt32( nHeight ); rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient ); rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout ); diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index d5c3087cf651..7b08e92bcd75 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -245,7 +245,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil // It is possible that it still may be needed to do at least some checks here // for some encodings (can one font have more font files for more encodings?). if(( family == FAMILY_DONTKNOW || f->GetFamilyType() == family ) - && ( italic == ITALIC_DONTKNOW || f->GetItalic() == italic ) + && ( italic == ITALIC_DONTKNOW || f->GetSlantType() == italic ) && ( weight == WEIGHT_DONTKNOW || f->GetWeight() == weight ) && ( pitch == PITCH_DONTKNOW || f->GetPitch() == pitch )) { // Exact match, return it immediately. @@ -253,7 +253,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil break; } if(( f->GetFamilyType() == FAMILY_DONTKNOW || family == FAMILY_DONTKNOW || f->GetFamilyType() == family ) - && ( f->GetItalic() == ITALIC_DONTKNOW || italic == ITALIC_DONTKNOW || f->GetItalic() == italic ) + && ( f->GetSlantType() == ITALIC_DONTKNOW || italic == ITALIC_DONTKNOW || f->GetSlantType() == italic ) && ( f->GetWeight() == WEIGHT_DONTKNOW || weight == WEIGHT_DONTKNOW || f->GetWeight() == weight ) && ( f->GetPitch() == PITCH_DONTKNOW || pitch == PITCH_DONTKNOW || f->GetPitch() == pitch )) { // Some fonts specify 'DONTKNOW' for some things, still a good match, if we don't find a better one. diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2643b9bc14e5..ed742770a51d 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -2775,7 +2775,7 @@ MetaFontAction::MetaFontAction( const vcl::Font& rFont ) : // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems // to be the right way; changing the textencoding at other sources // is too dangerous at the moment - if ( IsStarSymbol( maFont.GetFamilyName() ) + if ( IsStarSymbol( maFont.GetName() ) && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) ) { maFont.SetCharSet( RTL_TEXTENCODING_UNICODE ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8f9f37151431..69d8b50720f3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1783,7 +1783,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal m_aStructure[0].m_nParentElement = 0; Font aFont; - aFont.SetFamilyName( "Times" ); + aFont.SetName( "Times" ); aFont.SetSize( Size( 0, 12 ) ); GraphicsState aState; @@ -2316,7 +2316,7 @@ void PDFWriterImpl::endPage() // reset the default font Font aFont; - aFont.SetFamilyName( "Times" ); + aFont.SetName( "Times" ); aFont.SetSize( Size( 0, 12 ) ); m_aCurrentPDFState = m_aGraphicsStack.front(); @@ -3532,9 +3532,9 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical aErrorComment.append( "GetEmbedFontData failed for font \"" ); aErrorComment.append( OUStringToOString( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ) ); aErrorComment.append( '\"' ); - if( pFont->GetItalic() == ITALIC_NORMAL ) + if( pFont->GetSlantType() == ITALIC_NORMAL ) aErrorComment.append( " italic" ); - else if( pFont->GetItalic() == ITALIC_OBLIQUE ) + else if( pFont->GetSlantType() == ITALIC_OBLIQUE ) aErrorComment.append( " oblique" ); aErrorComment.append( " weight=" ); aErrorComment.append( sal_Int32(pFont->GetWeight()) ); @@ -3602,7 +3602,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical pRef->SetMapMode( MapMode( MAP_PIXEL ) ); Font aFont( pFont->GetFamilyName(), pFont->GetStyleName(), Size( 0, 1000 ) ); aFont.SetWeight( pFont->GetWeight() ); - aFont.SetItalic( pFont->GetItalic() ); + aFont.SetItalic( pFont->GetSlantType() ); aFont.SetPitch( pFont->GetPitch() ); pRef->SetFont( aFont ); pRef->ImplNewFont(); @@ -3817,7 +3817,7 @@ sal_Int32 PDFWriterImpl::emitFontDescriptor( const PhysicalFontFace* pFont, Font // possibly characters outside Adobe standard encoding // so set Symbolic flag sal_Int32 nFontFlags = (1<<2); - if( pFont->GetItalic() == ITALIC_NORMAL || pFont->GetItalic() == ITALIC_OBLIQUE ) + if( pFont->GetSlantType() == ITALIC_NORMAL || pFont->GetSlantType() == ITALIC_OBLIQUE ) nFontFlags |= (1 << 6); if( pFont->GetPitch() == PITCH_FIXED ) nFontFlags |= 1; @@ -3847,7 +3847,7 @@ sal_Int32 PDFWriterImpl::emitFontDescriptor( const PhysicalFontFace* pFont, Font aLine.append( ' ' ); aLine.append( (sal_Int32)(rInfo.m_aFontBBox.BottomRight().Y()+1) ); aLine.append( "]/ItalicAngle " ); - if( pFont->GetItalic() == ITALIC_OBLIQUE || pFont->GetItalic() == ITALIC_NORMAL ) + if( pFont->GetSlantType() == ITALIC_OBLIQUE || pFont->GetSlantType() == ITALIC_NORMAL ) aLine.append( "-30" ); else aLine.append( "0" ); @@ -4122,9 +4122,9 @@ bool PDFWriterImpl::emitFonts() aErrorComment.append( "CreateFontSubset failed for font \"" ); aErrorComment.append( OUStringToOString( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ) ); aErrorComment.append( '\"' ); - if( pFont->GetItalic() == ITALIC_NORMAL ) + if( pFont->GetSlantType() == ITALIC_NORMAL ) aErrorComment.append( " italic" ); - else if( pFont->GetItalic() == ITALIC_OBLIQUE ) + else if( pFont->GetSlantType() == ITALIC_OBLIQUE ) aErrorComment.append( " oblique" ); aErrorComment.append( " weight=" ); aErrorComment.append( sal_Int32(pFont->GetWeight()) ); @@ -4691,7 +4691,7 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& bool bAdjustSize = false; Font aFont( rControlFont ); - if( aFont.GetFamilyName().isEmpty() ) + if( aFont.GetName().isEmpty() ) { aFont = rAppSetFont; if( rControlFont.GetHeight() ) @@ -4721,7 +4721,7 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont ) { sal_Int32 nBest = 4; // default to Helvetica - OUString aFontName( rFont.GetFamilyName() ); + OUString aFontName( rFont.GetName() ); aFontName = aFontName.toAsciiLowerCase(); if( aFontName.indexOf( "times" ) != -1 ) @@ -8870,8 +8870,8 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool // perform artificial italics if necessary if( ( m_aCurrentPDFState.m_aFont.GetItalic() == ITALIC_NORMAL || m_aCurrentPDFState.m_aFont.GetItalic() == ITALIC_OBLIQUE ) && - !( m_pReferenceDevice->mpFontInstance->maFontSelData.mpFontData->GetItalic() == ITALIC_NORMAL || - m_pReferenceDevice->mpFontInstance->maFontSelData.mpFontData->GetItalic() == ITALIC_OBLIQUE ) + !( m_pReferenceDevice->mpFontInstance->maFontSelData.mpFontData->GetSlantType() == ITALIC_NORMAL || + m_pReferenceDevice->mpFontInstance->maFontSelData.mpFontData->GetSlantType() == ITALIC_OBLIQUE ) ) { fSkew = M_PI/12.0; |