diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-16 21:01:00 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-16 16:11:28 +0000 |
commit | 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 (patch) | |
tree | 9622cff5a49a891f64899e34c48b53e8d462e96e /vcl | |
parent | 7d93bb8fcb406773d2dc68b25ab7cee6e114d482 (diff) |
vcl: rename Font::GetName to Font::GetFamilyName
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5
Reviewed-on: https://gerrit.libreoffice.org/21509
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/font.cxx | 4 | ||||
-rw-r--r-- | vcl/source/components/fontident.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/font.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/fontcache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 2 |
14 files changed, 22 insertions, 22 deletions
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx index b5ae8d71325d..a6e008b4552c 100644 --- a/vcl/qa/cppunit/font.cxx +++ b/vcl/qa/cppunit/font.cxx @@ -42,10 +42,10 @@ void VclFontTest::testName() { vcl::Font aFont; - CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetName().isEmpty()); + CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetFamilyName().isEmpty()); CPPUNIT_ASSERT_MESSAGE( "Style name should be empty", aFont.GetStyleName().isEmpty()); aFont.SetName("Test family name"); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetName()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetFamilyName()); aFont.SetStyleName("Test style name"); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", OUString("Test style name"), aFont.GetStyleName()); } diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index 20aa9d1a705f..bbf3b5f63624 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -93,7 +93,7 @@ Any SAL_CALL FontIdentificator::getMaterial() throw(RuntimeException, std::excep return Any(); // VCL not initialized FontDescriptor aFD; - aFD.Name = m_aFont.GetName(); + aFD.Name = m_aFont.GetFamilyName(); aFD.Height = 0; aFD.Width = 0; aFD.StyleName = m_aFont.GetStyleName(); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 15375dd10394..f583729c0b11 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -504,7 +504,7 @@ void EMFWriter::ImplCheckTextAttr() if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) ) { const vcl::Font& rFont = maVDev->GetFont(); - OUString aFontName( rFont.GetName() ); + OUString aFontName( rFont.GetFamilyName() ); sal_Int32 nWeight; sal_uInt16 i; sal_uInt8 nPitchAndFamily; diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index a142f765020a..025d367ca5c1 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1041,7 +1041,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) case PRIVATE_ESCAPE_UNICODE : { // we will use text instead of polygons only if we have the correct font - if ( Application::GetDefaultDevice()->IsFontAvailable( pOut->GetFont().GetName() ) ) + if ( Application::GetDefaultDevice()->IsFontAvailable( pOut->GetFont().GetFamilyName() ) ) { Point aPt; OUString aString; diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 90ef1d756ff7..816e536cab37 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -359,7 +359,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont) } pWMF->WriteUChar( nPitchFamily ); - OString aFontName(OUStringToOString(rFont.GetName(), eFontNameEncoding)); + OString aFontName(OUStringToOString(rFont.GetFamilyName(), eFontNameEncoding)); for ( i = 0; i < W_LF_FACESIZE; i++ ) { sal_Char nChar = ( i < aFontName.getLength() ) ? aFontName[i] : 0; @@ -491,7 +491,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r } } - if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we + if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetFamilyName() ) ) // after conversion the characters are not original, so we { // will store the unicode string and a polypoly replacement Color aOldFillColor( aSrcFillColor ); Color aOldLineColor( aSrcLineColor ); @@ -946,7 +946,7 @@ void WMFWriter::SetAllAttr() if ( aDstFont != aSrcFont ) { pVirDev->SetFont(aSrcFont); - if ( aDstFont.GetName() != aSrcFont.GetName() ) + if ( aDstFont.GetFamilyName() != aSrcFont.GetFamilyName() ) { FontCharMapPtr xFontCharMap; if ( pVirDev->GetFontCharMap( xFontCharMap ) ) diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index dfb219a2c893..8c69ea63ee60 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -409,9 +409,9 @@ bool Font::operator==( const vcl::Font& rFont ) const void Font::Merge( const vcl::Font& rFont ) { - if ( !rFont.GetName().isEmpty() ) + if ( !rFont.GetFamilyName().isEmpty() ) { - SetName( rFont.GetName() ); + SetName( rFont.GetFamilyName() ); SetStyleName( rFont.GetStyleName() ); SetCharSet( GetCharSet() ); SetLanguageTag( rFont.GetLanguageTag() ); @@ -778,7 +778,7 @@ bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } -const OUString& Font::GetName() const { return mpImplFont->GetFamilyName(); } +const OUString& Font::GetFamilyName() const { return mpImplFont->GetFamilyName(); } const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; } diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 25fe88910deb..7f2e82b7420d 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -143,7 +143,7 @@ ImplFontCache::~ImplFontCache() LogicalFontInstance* ImplFontCache::GetFontInstance( PhysicalFontCollection* pFontList, const vcl::Font& rFont, const Size& rSize, float fExactHeight ) { - OUString aSearchName = rFont.GetName(); + OUString aSearchName = rFont.GetFamilyName(); // initialize internal font request object FontSelectPattern aFontSelData( rFont, aSearchName, rSize, fExactHeight ); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 07ceea37ac5b..0fd6d3a2ad69 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.GetName(), + OString aByteName(OUStringToOString(rFont.GetFamilyName(), rOStm.GetStreamCharSet())); strncpy( aName, aByteName.getStr(), 32 ); aName[32] = 0; diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index ed742770a51d..2643b9bc14e5 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.GetName() ) + if ( IsStarSymbol( maFont.GetFamilyName() ) && ( 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 69d8b50720f3..891a6d2d007e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4691,7 +4691,7 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& bool bAdjustSize = false; Font aFont( rControlFont ); - if( aFont.GetName().isEmpty() ) + if( aFont.GetFamilyName().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.GetName() ); + OUString aFontName( rFont.GetFamilyName() ); aFontName = aFontName.toAsciiLowerCase(); if( aFontName.indexOf( "times" ) != -1 ) diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 7af457e8344a..99d2109a2b4f 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -112,7 +112,7 @@ int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const delete mpDeviceFontSizeList; ImplInitFontList(); - mpDeviceFontSizeList = mpFontCollection->GetDeviceFontSizeList( rFont.GetName() ); + mpDeviceFontSizeList = mpFontCollection->GetDeviceFontSizeList( rFont.GetFamilyName() ); return mpDeviceFontSizeList->Count(); } @@ -195,7 +195,7 @@ FontMetric OutputDevice::GetFontMetric() const aMetric.Font::operator=( maFont ); // set aMetric with info from font - aMetric.SetName( maFont.GetName() ); + aMetric.SetName( 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 ); @@ -883,7 +883,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan } // No Name, than set all names - if ( aFont.GetName().isEmpty() ) + if ( aFont.GetFamilyName().isEmpty() ) { if ( nFlags & GetDefaultFontFlags::OnlyOne ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index d50871932fd1..be6a3e4097df 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1883,7 +1883,7 @@ void Window::ImplNewInputContext() SalInputContext aNewContext; const vcl::Font& rFont = rInputContext.GetFont(); - const OUString& rFontName = rFont.GetName(); + const OUString& rFontName = rFont.GetFamilyName(); LogicalFontInstance* pFontInstance = nullptr; aNewContext.mpFont = nullptr; if (!rFontName.isEmpty()) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index ff5d496a1da7..be85aa3c3528 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.GetName()); + aFont.SetName(aTempFont.GetFamilyName()); SetPointFont(rRenderContext, aFont); } } diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 62883261dfe3..c24fce107aa1 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2787,7 +2787,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) // is to wide for the dialogs if ( rSettings.GetLanguageTag().getLanguageType() == LANGUAGE_RUSSIAN ) { - OUString aFontName = aAppFont.GetName(); + OUString aFontName = aAppFont.GetFamilyName(); OUString aFirstName = aFontName.getToken( 0, ';' ); if ( aFirstName.equalsIgnoreAsciiCase( "MS Sans Serif" ) ) { |