diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-16 23:42:55 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-16 16:12:14 +0000 |
commit | f99550dae55e40e49bf9c9875053fe2abb4c71ca (patch) | |
tree | a84bceecc809a336a81305a85edad78a4a8449c5 /vcl/source | |
parent | 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 (diff) |
vcl: change Font::SetName() to Font::SetFamilyName()
Change-Id: I54a4036544c680c4a49607677af776aa7a433fbc
Reviewed-on: https://gerrit.libreoffice.org/21510
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/settings.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 18 | ||||
-rw-r--r-- | vcl/source/font/font.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 16 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 |
8 files changed, 30 insertions, 30 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 70a56a340515..296684b3dfd9 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -686,9 +686,9 @@ void ImplStyleData::SetStandardStyles() aStdFont.SetCharSet( osl_getThreadTextEncoding() ); aStdFont.SetWeight( WEIGHT_NORMAL ); if (!utl::ConfigManager::IsAvoidConfig()) - aStdFont.SetName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en"))); + aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en"))); else - aStdFont.SetName("Liberation Serif"); + aStdFont.SetFamilyName("Liberation Serif"); maAppFont = aStdFont; maHelpFont = aStdFont; maMenuFont = aStdFont; diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 3686e6ec9b9c..90070a4bd361 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -473,7 +473,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u if (pSgfFont->Fixd) aFont.SetPitch(PITCH_FIXED); else aFont.SetPitch(PITCH_VARIABLE); aFont.SetFamily(pSgfFont->SVFamil); aFont.SetCharSet(pSgfFont->SVChSet); - aFont.SetName(FNam); + aFont.SetFamilyName(FNam); } else { // if not in Inifile, some fonts are hard coded here @@ -509,7 +509,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u } break; default: FNam = "Helvetica"; } - aFont.SetName(FNam); + aFont.SetFamilyName(FNam); //aFont.SetCharSet(CHARSET_SYSTEM); } diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index c19642ad9fb5..17db14d14a3e 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -151,7 +151,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) eCharSet = RTL_TEXTENCODING_MS_1252; aFont.SetCharSet( eCharSet ); - aFont.SetName( rFont.alfFaceName ); + aFont.SetFamilyName( rFont.alfFaceName ); FontFamily eFamily; switch ( rFont.lfPitchAndFamily & 0xf0 ) { @@ -852,14 +852,14 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : { mbIsMapWinSet = false; mbIsMapDevSet = false; - mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) ); // The original clipregion has to be on top - // of the stack so it can always be restored - // this is necessary to be able to support - // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) - - maFont.SetName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using - maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we - maFont.SetHeight( 423 ); // will prevent this defining a font + mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) ); // The original clipregion has to be on top + // of the stack so it can always be restored + // this is necessary to be able to support + // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) + + maFont.SetFamilyName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using + maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we + maFont.SetHeight( 423 ); // will prevent this defining a font maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 ); maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 ); diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 8c69ea63ee60..8cca361e5faf 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -137,7 +137,7 @@ void Font::SetAlign( FontAlign eAlign ) } } -void Font::SetName( const OUString& rFamilyName ) +void Font::SetFamilyName( const OUString& rFamilyName ) { MakeUnique(); mpImplFont->SetFamilyName( rFamilyName ); @@ -411,7 +411,7 @@ void Font::Merge( const vcl::Font& rFont ) { if ( !rFont.GetFamilyName().isEmpty() ) { - SetName( rFont.GetFamilyName() ); + SetFamilyName( rFont.GetFamilyName() ); SetStyleName( rFont.GetStyleName() ); SetCharSet( GetCharSet() ); SetLanguageTag( rFont.GetLanguageTag() ); @@ -573,9 +573,9 @@ namespace GetTTGlobalFontInfo( pTTF, &aInfo ); // most importantly: the family name if( aInfo.ufamily ) - o_rResult.SetName( aInfo.ufamily ); + o_rResult.SetFamilyName( aInfo.ufamily ); else if( aInfo.family ) - o_rResult.SetName( OStringToOUString( aInfo.family, RTL_TEXTENCODING_ASCII_US ) ); + o_rResult.SetFamilyName( OStringToOUString( aInfo.family, RTL_TEXTENCODING_ASCII_US ) ); // set weight if( aInfo.weight ) { @@ -690,7 +690,7 @@ namespace pClose++; if( pClose - pOpen > 1 ) { - o_rResult.SetName( OStringToOUString( OString( pOpen+1, pClose-pOpen-1 ), RTL_TEXTENCODING_ASCII_US ) ); + o_rResult.SetFamilyName( OStringToOUString( OString( pOpen+1, pClose-pOpen-1 ), RTL_TEXTENCODING_ASCII_US ) ); } } diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 0fd6d3a2ad69..c561a3954bfa 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -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.SetName( OUString( aName, strlen(aName), rIStm.GetStreamCharSet() ) ); + aFont.SetFamilyName( 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/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 891a6d2d007e..3197ed3ded0c 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.SetName( "Times" ); + aFont.SetFamilyName( "Times" ); aFont.SetSize( Size( 0, 12 ) ); GraphicsState aState; @@ -2316,7 +2316,7 @@ void PDFWriterImpl::endPage() // reset the default font Font aFont; - aFont.SetName( "Times" ); + aFont.SetFamilyName( "Times" ); aFont.SetSize( Size( 0, 12 ) ); m_aCurrentPDFState = m_aGraphicsStack.front(); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 99d2109a2b4f..8fa55cae7852 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -74,7 +74,7 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const if( nDevFontIndex < nCount ) { const PhysicalFontFace& rData = *mpDeviceFontList->Get( nDevFontIndex ); - aFontMetric.SetName( rData.GetFamilyName() ); + aFontMetric.SetFamilyName( rData.GetFamilyName() ); aFontMetric.SetStyleName( rData.GetStyleName() ); aFontMetric.SetCharSet( rData.GetCharSet() ); aFontMetric.SetFamily( rData.GetFamilyType() ); @@ -195,7 +195,7 @@ FontMetric OutputDevice::GetFontMetric() const aMetric.Font::operator=( maFont ); // set aMetric with info from font - aMetric.SetName( maFont.GetFamilyName() ); + aMetric.SetFamilyName( maFont.GetFamilyName() ); aMetric.SetStyleName( xFontMetric->GetStyleName() ); aMetric.SetSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) ); aMetric.SetCharSet( xFontMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); @@ -879,7 +879,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan } } while ( nIndex != -1 ); - aFont.SetName( aName ); + aFont.SetFamilyName( aName ); } // No Name, than set all names @@ -891,13 +891,13 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan { SAL_WARN ("vcl.gdi", "No default window has been set for the application - we really shouldn't be able to get here"); sal_Int32 nIndex = 0; - aFont.SetName( aSearch.getToken( 0, ';', nIndex ) ); + aFont.SetFamilyName( aSearch.getToken( 0, ';', nIndex ) ); } else { pOutDev->ImplInitFontList(); - aFont.SetName( aSearch ); + aFont.SetFamilyName( aSearch ); // convert to pixel height Size aSize = pOutDev->ImplLogicToDevicePixel( aFont.GetSize() ); @@ -920,15 +920,15 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan if (pFontInstance) { if( pFontInstance->maFontSelData.mpFontData ) - aFont.SetName( pFontInstance->maFontSelData.mpFontData->GetFamilyName() ); + aFont.SetFamilyName( pFontInstance->maFontSelData.mpFontData->GetFamilyName() ); else - aFont.SetName( pFontInstance->maFontSelData.maTargetName ); + aFont.SetFamilyName( pFontInstance->maFontSelData.maTargetName ); pOutDev->mpFontCache->Release(pFontInstance); } } } else - aFont.SetName( aSearch ); + aFont.SetFamilyName( aSearch ); } } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index be85aa3c3528..d1f0d9948ab0 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -483,7 +483,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F else nType = DefaultFontType::UI_SANS; vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE); - aFont.SetName(aTempFont.GetFamilyName()); + aFont.SetFamilyName(aTempFont.GetFamilyName()); SetPointFont(rRenderContext, aFont); } } |