From 8227b9955e4a06758f3e0a871e49731a0a607608 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Mon, 4 Jan 2016 01:16:47 +1100 Subject: vcl: Excise vcl::FontInfo class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock Tested-by: Chris Sherlock --- svx/source/tbxctrls/tbcontrl.cxx | 4 ++-- svx/source/tbxctrls/tbunocontroller.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svx/source/tbxctrls') diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index ae696ae170d9..340bd842d097 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1140,7 +1140,7 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) fontName = GetEntry(rUDEvt.GetItemId()); } Sequence< PropertyValue > aArgs( 1 ); - vcl::FontInfo aInfo( pFontList->Get( fontName, + FontMetric aInfo( pFontList->Get( fontName, aCurFont.GetWeight(), aCurFont.GetItalic() ) ); @@ -1166,7 +1166,7 @@ void SvxFontNameBox_Impl::Select() std::unique_ptr pFontItem; if ( pFontList ) { - vcl::FontInfo aInfo( pFontList->Get( GetText(), + FontMetric aInfo( pFontList->Get( GetText(), aCurFont.GetWeight(), aCurFont.GetItalic() ) ); aCurFont = aInfo; diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 306b89f97674..f749f317c5f3 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -195,7 +195,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const css::awt::FontDescriptor& rCurrentFo if ( !rCurrentFont.Name.isEmpty() ) { - vcl::FontInfo _aFontInfo; + FontMetric _aFontInfo; _aFontInfo.SetName( rCurrentFont.Name ); _aFontInfo.SetStyleName( rCurrentFont.StyleName ); _aFontInfo.SetHeight( rCurrentFont.Height ); -- cgit