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>
This commit is contained in:
Chris Sherlock 2016-01-16 23:42:55 +11:00
parent 2b297116cb
commit f99550dae5
60 changed files with 109 additions and 112 deletions

View File

@ -248,7 +248,7 @@ DataSourceTabPage::DataSourceTabPage(
// set symbol font for arrows // set symbol font for arrows
// note: StarSymbol is substituted to OpenSymbol for OOo // note: StarSymbol is substituted to OpenSymbol for OOo
vcl::Font aSymbolFont( m_pBTN_UP->GetFont()); vcl::Font aSymbolFont( m_pBTN_UP->GetFont());
aSymbolFont.SetName( "StarSymbol" ); aSymbolFont.SetFamilyName( "StarSymbol" );
m_pBTN_UP->SetControlFont( aSymbolFont ); m_pBTN_UP->SetControlFont( aSymbolFont );
m_pBTN_DOWN->SetControlFont( aSymbolFont ); m_pBTN_DOWN->SetControlFont( aSymbolFont );

View File

@ -757,7 +757,7 @@ struct FontAttribSetter
if(rPropName == "CharFontName") if(rPropName == "CharFontName")
{ {
OUString aName = rProp.second.get<OUString>(); OUString aName = rProp.second.get<OUString>();
mrFont.SetName(aName); mrFont.SetFamilyName(aName);
} }
else if(rPropName == "CharColor") else if(rPropName == "CharColor")
{ {

View File

@ -96,7 +96,7 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
else if ( pFontNameItem ) else if ( pFontNameItem )
{ {
vcl::Font aTmpFont( GetCharFont() ); vcl::Font aTmpFont( GetCharFont() );
aTmpFont.SetName( pFontNameItem->GetValue() ); aTmpFont.SetFamilyName( pFontNameItem->GetValue() );
SetCharFont( aTmpFont ); SetCharFont( aTmpFont );
} }

View File

@ -498,7 +498,7 @@ namespace
if ( eState >= SfxItemState::DEFAULT ) if ( eState >= SfxItemState::DEFAULT )
{ {
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(&( _pPage->GetItemSet().Get( _nFontWhich ) )); const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(&( _pPage->GetItemSet().Get( _nFontWhich ) ));
aFontMetrics.SetName(pFontItem->GetFamilyName()); aFontMetrics.SetFamilyName(pFontItem->GetFamilyName());
aFontMetrics.SetStyleName(pFontItem->GetStyleName()); aFontMetrics.SetStyleName(pFontItem->GetStyleName());
aFontMetrics.SetFamily(pFontItem->GetFamily()); aFontMetrics.SetFamily(pFontItem->GetFamily());
aFontMetrics.SetPitch(pFontItem->GetPitch()); aFontMetrics.SetPitch(pFontItem->GetPitch());
@ -530,7 +530,7 @@ namespace
_rFont.SetLanguage(_pLanguageLB->GetSelectLanguage()); _rFont.SetLanguage(_pLanguageLB->GetSelectLanguage());
_rFont.SetFamily( aFontMetrics.GetFamily() ); _rFont.SetFamily( aFontMetrics.GetFamily() );
_rFont.SetName( aFontMetrics.GetFamilyName() ); _rFont.SetFamilyName( aFontMetrics.GetFamilyName() );
_rFont.SetStyleName( aFontMetrics.GetStyleName() ); _rFont.SetStyleName( aFontMetrics.GetStyleName() );
_rFont.SetPitch( aFontMetrics.GetPitch() ); _rFont.SetPitch( aFontMetrics.GetPitch() );
_rFont.SetCharSet( aFontMetrics.GetCharSet() ); _rFont.SetCharSet( aFontMetrics.GetCharSet() );

View File

@ -83,7 +83,7 @@ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
{ {
const SvxFontItem& rAttr = static_cast<const SvxFontItem&>(*GetItem()); const SvxFontItem& rAttr = static_cast<const SvxFontItem&>(*GetItem());
rFont.SetName( rAttr.GetFamilyName() ); rFont.SetFamilyName( rAttr.GetFamilyName() );
rFont.SetFamily( rAttr.GetFamily() ); rFont.SetFamily( rAttr.GetFamily() );
rFont.SetPitch( rAttr.GetPitch() ); rFont.SetPitch( rAttr.GetPitch() );
rFont.SetCharSet( rAttr.GetCharSet() ); rFont.SetCharSet( rAttr.GetCharSet() );

View File

@ -2035,7 +2035,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SfxItemState::SET ) ) if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SfxItemState::SET ) )
{ {
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rSet.Get( nWhich_FontInfo )); const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rSet.Get( nWhich_FontInfo ));
rFont.SetName( rFontItem.GetFamilyName() ); rFont.SetFamilyName( rFontItem.GetFamilyName() );
rFont.SetFamily( rFontItem.GetFamily() ); rFont.SetFamily( rFontItem.GetFamily() );
rFont.SetPitch( rFontItem.GetPitch() ); rFont.SetPitch( rFontItem.GetPitch() );
rFont.SetCharSet( rFontItem.GetCharSet() ); rFont.SetCharSet( rFontItem.GetCharSet() );

View File

@ -2600,7 +2600,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
if ( ( nScriptTypeI18N == i18n::ScriptType::ASIAN ) || ( nScriptTypeI18N == i18n::ScriptType::COMPLEX ) ) if ( ( nScriptTypeI18N == i18n::ScriptType::ASIAN ) || ( nScriptTypeI18N == i18n::ScriptType::COMPLEX ) )
{ {
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) )); const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) ));
rFont.SetName( rFontItem.GetFamilyName() ); rFont.SetFamilyName( rFontItem.GetFamilyName() );
rFont.SetFamily( rFontItem.GetFamily() ); rFont.SetFamily( rFontItem.GetFamily() );
rFont.SetPitch( rFontItem.GetPitch() ); rFont.SetPitch( rFontItem.GetPitch() );
rFont.SetCharSet( rFontItem.GetCharSet() ); rFont.SetCharSet( rFontItem.GetCharSet() );

View File

@ -79,9 +79,9 @@ vcl::Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
rStream.ReadUInt16( nTemp ); aFont.SetStrikeout((FontStrikeout)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetStrikeout((FontStrikeout)nTemp);
rStream.ReadUInt16( nTemp ); aFont.SetItalic((FontItalic)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetItalic((FontItalic)nTemp);
// UNICODE: rStream >> aName; aFont.SetName( aName ); // UNICODE: rStream >> aName; aFont.SetFamilyName( aName );
OUString aName = rStream.ReadUniOrByteString(rStream.GetStreamCharSet()); OUString aName = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
aFont.SetName( aName ); aFont.SetFamilyName( aName );
if( nVer == 1 ) if( nVer == 1 )
{ {
@ -231,7 +231,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
{ {
vcl::Font _aFont = GetFont(); vcl::Font _aFont = GetFont();
vcl::Font aNewFont = rCopyFrom.GetFont(); vcl::Font aNewFont = rCopyFrom.GetFont();
_aFont.SetName( aNewFont.GetFamilyName() ); _aFont.SetFamilyName( aNewFont.GetFamilyName() );
_aFont.SetFamily( aNewFont.GetFamily() ); _aFont.SetFamily( aNewFont.GetFamily() );
_aFont.SetStyleName( aNewFont.GetStyleName() ); _aFont.SetStyleName( aNewFont.GetStyleName() );
_aFont.SetColor( aNewFont.GetColor() ); _aFont.SetColor( aNewFont.GetColor() );

View File

@ -249,7 +249,7 @@ void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverte
{ {
cBullet = ConvertFontToSubsFontChar(pConverter, cBullet); cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
OUString sFontName = GetFontToSubsFontName(pConverter); OUString sFontName = GetFontToSubsFontName(pConverter);
pBulletFont->SetName(sFontName); pBulletFont->SetFamilyName(sFontName);
} }
rStream.WriteUInt16( NUMITEM_VERSION_04 ); rStream.WriteUInt16( NUMITEM_VERSION_04 );

View File

@ -432,7 +432,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
case 17: case 17:
{ {
OUString sTemp; pValues[nProp] >>= sTemp; OUString sTemp; pValues[nProp] >>= sTemp;
rSwFlags.aBulletFont.SetName(sTemp); rSwFlags.aBulletFont.SetFamilyName(sTemp);
} }
break; // "Format/Option/ChangeToBullets/SpecialCharacter/Font", break; // "Format/Option/ChangeToBullets/SpecialCharacter/Font",
case 18: case 18:
@ -508,7 +508,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
case 43 : case 43 :
{ {
OUString sTemp; pValues[nProp] >>= sTemp; OUString sTemp; pValues[nProp] >>= sTemp;
rSwFlags.aByInputBulletFont.SetName(sTemp); rSwFlags.aByInputBulletFont.SetFamilyName(sTemp);
} }
break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Font", break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Font",
case 44 : case 44 :

View File

@ -563,7 +563,7 @@ void SvxRTFParser::ReadFontTable()
if (!sAltNm.isEmpty()) if (!sAltNm.isEmpty())
sFntNm = sFntNm + ";" + sAltNm; sFntNm = sFntNm + ";" + sAltNm;
pFont->SetName( sFntNm ); pFont->SetFamilyName( sFntNm );
m_FontTable.insert(std::make_pair(nInsFontNo, std::move(pFont))); m_FontTable.insert(std::make_pair(nInsFontNo, std::move(pFont)));
pFont.reset(new vcl::Font); pFont.reset(new vcl::Font);
pFont->SetCharSet( nSystemChar ); pFont->SetCharSet( nSystemChar );
@ -806,7 +806,7 @@ const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId )
} }
const SvxFontItem& rDfltFont = static_cast<const SvxFontItem&>( const SvxFontItem& rDfltFont = static_cast<const SvxFontItem&>(
pAttrPool->GetDefaultItem( aPlainMap.nFont )); pAttrPool->GetDefaultItem( aPlainMap.nFont ));
pDfltFont->SetName( rDfltFont.GetStyleName() ); pDfltFont->SetFamilyName( rDfltFont.GetStyleName() );
pDfltFont->SetFamily( rDfltFont.GetFamily() ); pDfltFont->SetFamily( rDfltFont.GetFamily() );
return *pDfltFont; return *pDfltFont;
} }

View File

@ -40,7 +40,7 @@ using namespace ::com::sun::star;
void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl::Font& rFont ) void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl::Font& rFont )
{ {
rFont.SetName( rDesc.Name ); rFont.SetFamilyName( rDesc.Name );
rFont.SetStyleName( rDesc.StyleName ); rFont.SetStyleName( rDesc.StyleName );
rFont.SetSize( Size( rDesc.Width, rDesc.Height ) ); rFont.SetSize( Size( rDesc.Width, rDesc.Height ) );
rFont.SetFamily( (FontFamily)rDesc.Family ); rFont.SetFamily( (FontFamily)rDesc.Family );

View File

@ -2292,7 +2292,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
OUString aStr( str, strlen(str), osl_getThreadTextEncoding() ); OUString aStr( str, strlen(str), osl_getThreadTextEncoding() );
if ( aStr.compareToIgnoreAsciiCase( "Helv" ) == 0 ) if ( aStr.compareToIgnoreAsciiCase( "Helv" ) == 0 )
aStr = "Helvetica"; aStr = "Helvetica";
pF->aFont.SetName( aStr ); pF->aFont.SetFamilyName( aStr );
break; break;
} }
} }

View File

@ -1571,7 +1571,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
pPict->Read( &sFName, nLen ); pPict->Read( &sFName, nLen );
sFName[ nLen ] = 0; sFName[ nLen ] = 0;
OUString aString( sFName, strlen(sFName), osl_getThreadTextEncoding() ); OUString aString( sFName, strlen(sFName), osl_getThreadTextEncoding() );
aActFont.SetName( aString ); aActFont.SetFamilyName( aString );
eActMethod=PDM_UNDEFINED; eActMethod=PDM_UNDEFINED;
break; break;
} }

View File

@ -2150,7 +2150,7 @@ bool SdrPowerPointImport::ReadFontCollection()
vcl::Font aFont; vcl::Font aFont;
aFont.SetCharSet( pFont->eCharSet ); aFont.SetCharSet( pFont->eCharSet );
aFont.SetName( pFont->aName ); aFont.SetFamilyName( pFont->aName );
aFont.SetFamily( pFont->eFamily ); aFont.SetFamily( pFont->eFamily );
aFont.SetPitch( pFont->ePitch ); aFont.SetPitch( pFont->ePitch );
aFont.SetHeight( 100 ); aFont.SetHeight( 100 );
@ -3631,7 +3631,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
{ {
vcl::Font aFont; vcl::Font aFont;
aFont.SetCharSet( pFontEnityAtom->eCharSet ); aFont.SetCharSet( pFontEnityAtom->eCharSet );
aFont.SetName( pFontEnityAtom->aName ); aFont.SetFamilyName( pFontEnityAtom->aName );
aFont.SetFamily( pFontEnityAtom->eFamily ); aFont.SetFamily( pFontEnityAtom->eFamily );
aFont.SetPitch( pFontEnityAtom->ePitch ); aFont.SetPitch( pFontEnityAtom->ePitch );
rNumberFormat.SetBulletFont( &aFont ); rNumberFormat.SetBulletFont( &aFont );
@ -3690,7 +3690,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
{ {
vcl::Font aFont; vcl::Font aFont;
aFont.SetCharSet( pFontEnityAtom->eCharSet ); aFont.SetCharSet( pFontEnityAtom->eCharSet );
aFont.SetName( pFontEnityAtom->aName ); aFont.SetFamilyName( pFontEnityAtom->aName );
aFont.SetFamily( pFontEnityAtom->eFamily ); aFont.SetFamily( pFontEnityAtom->eFamily );
aFont.SetPitch( pFontEnityAtom->ePitch ); aFont.SetPitch( pFontEnityAtom->ePitch );
rNumberFormat.SetBulletFont( &aFont ); rNumberFormat.SetBulletFont( &aFont );
@ -3710,7 +3710,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager,
if ( pAtom ) if ( pAtom )
{ {
rtl_TextEncoding eCharSet( pAtom->eCharSet ); rtl_TextEncoding eCharSet( pAtom->eCharSet );
aFont.SetName( pAtom->aName ); aFont.SetFamilyName( pAtom->aName );
aFont.SetCharSet( eCharSet ); aFont.SetCharSet( eCharSet );
aFont.SetFamily( pAtom->eFamily ); aFont.SetFamily( pAtom->eFamily );
aFont.SetPitch( pAtom->ePitch ); aFont.SetPitch( pAtom->ePitch );

View File

@ -314,7 +314,7 @@ void SVGFontExport::EmbedFonts()
{ {
vcl::Font aFont; vcl::Font aFont;
aFont.SetName( (*aGlyphTreeIter).first ); aFont.SetFamilyName( (*aGlyphTreeIter).first );
aFont.SetWeight( (*aFontWeightIter).first ); aFont.SetWeight( (*aFontWeightIter).first );
aFont.SetItalic( (*aFontItalicIter).first ); aFont.SetItalic( (*aFontItalicIter).first );

View File

@ -39,9 +39,6 @@
namespace frm namespace frm
{ {
//= RichTextEngine //= RichTextEngine
@ -62,7 +59,7 @@ namespace frm
// defaults // defaults
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont(); vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont();
aFont.SetName( "Times New Roman" ); aFont.SetFamilyName( "Times New Roman" );
pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) ); pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
// 12 pt font size // 12 pt font size

View File

@ -66,7 +66,7 @@ public:
void SetAlign( FontAlign ); void SetAlign( FontAlign );
FontAlign GetAlign() const; FontAlign GetAlign() const;
void SetName( const OUString& rFamilyName ); void SetFamilyName( const OUString& rFamilyName );
const OUString& GetFamilyName() const; const OUString& GetFamilyName() const;
void SetStyleName( const OUString& rStyleName ); void SetStyleName( const OUString& rStyleName );
const OUString& GetStyleName() const; const OUString& GetStyleName() const;

View File

@ -380,7 +380,7 @@ namespace
if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && dynamic_cast< const SvxFontItem *>( pItem ) != nullptr) if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && dynamic_cast< const SvxFontItem *>( pItem ) != nullptr)
{ {
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem); const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem);
aNewFont.SetName( pFontItem->GetFamilyName()); aNewFont.SetFamilyName(pFontItem->GetFamilyName());
aNewFont.SetStyleName(pFontItem->GetStyleName()); aNewFont.SetStyleName(pFontItem->GetStyleName());
aNewFont.SetFamily(pFontItem->GetFamily()); aNewFont.SetFamily(pFontItem->GetFamily());
aNewFont.SetPitch(pFontItem->GetPitch()); aNewFont.SetPitch(pFontItem->GetPitch());

View File

@ -369,7 +369,7 @@ void ScPatternAttr::GetFont(
// FontItem: // FontItem:
if (rFont.GetFamilyName() != pFontAttr->GetFamilyName()) if (rFont.GetFamilyName() != pFontAttr->GetFamilyName())
rFont.SetName( pFontAttr->GetFamilyName() ); rFont.SetFamilyName( pFontAttr->GetFamilyName() );
if (rFont.GetStyleName() != pFontAttr->GetStyleName()) if (rFont.GetStyleName() != pFontAttr->GetStyleName())
rFont.SetStyleName( pFontAttr->GetStyleName() ); rFont.SetStyleName( pFontAttr->GetStyleName() );

View File

@ -103,7 +103,7 @@ static void lcl_SetFontProperties(
const SvxPostureItem& rPostureItem ) const SvxPostureItem& rPostureItem )
{ {
rFont.SetFamily ( rFontItem.GetFamily() ); rFont.SetFamily ( rFontItem.GetFamily() );
rFont.SetName ( rFontItem.GetFamilyName() ); rFont.SetFamilyName ( rFontItem.GetFamilyName() );
rFont.SetStyleName ( rFontItem.GetStyleName() ); rFont.SetStyleName ( rFontItem.GetStyleName() );
rFont.SetCharSet ( rFontItem.GetCharSet() ); rFont.SetCharSet ( rFontItem.GetCharSet() );
rFont.SetPitch ( rFontItem.GetPitch() ); rFont.SetPitch ( rFontItem.GetPitch() );

View File

@ -1410,7 +1410,7 @@ sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry )
} }
vcl::Font aFont; vcl::Font aFont;
aFont.SetCharSet( rEntry.CharSet ); aFont.SetCharSet( rEntry.CharSet );
aFont.SetName( rEntry.Original ); aFont.SetFamilyName( rEntry.Original );
aFont.SetHeight( 100 ); aFont.SetHeight( 100 );
if ( !pVDev ) if ( !pVDev )

View File

@ -66,7 +66,7 @@ void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet&
const SvxFontItem& rFItem = const SvxFontItem& rFItem =
static_cast<const SvxFontItem&>(rSet.Get(GetWhich( (sal_uInt16)nFontID ))); static_cast<const SvxFontItem&>(rSet.Get(GetWhich( (sal_uInt16)nFontID )));
aMyFont.SetFamily(rFItem.GetFamily()); aMyFont.SetFamily(rFItem.GetFamily());
aMyFont.SetName(rFItem.GetFamilyName()); aMyFont.SetFamilyName(rFItem.GetFamilyName());
aMyFont.SetCharSet(rFItem.GetCharSet()); aMyFont.SetCharSet(rFItem.GetCharSet());
aMyFont.SetPitch(rFItem.GetPitch()); aMyFont.SetPitch(rFItem.GetPitch());

View File

@ -205,7 +205,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
const SvxFontItem* pFItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); const SvxFontItem* pFItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFItem ) if ( pFItem )
{ {
aFont.SetName( pFItem->GetFamilyName() ); aFont.SetFamilyName( pFItem->GetFamilyName() );
aFont.SetStyleName( pFItem->GetStyleName() ); aFont.SetStyleName( pFItem->GetStyleName() );
aFont.SetCharSet( pFItem->GetCharSet() ); aFont.SetCharSet( pFItem->GetCharSet() );
aFont.SetPitch( pFItem->GetPitch() ); aFont.SetPitch( pFItem->GetPitch() );

View File

@ -134,7 +134,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
maBulletFont.SetColor( COL_AUTO ); maBulletFont.SetColor( COL_AUTO );
maBulletFont.SetHeight( 1000 ); maBulletFont.SetHeight( 1000 );
maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard
maBulletFont.SetName( "StarSymbol" ); maBulletFont.SetFamilyName( "StarSymbol" );
maBulletFont.SetWeight(WEIGHT_NORMAL); maBulletFont.SetWeight(WEIGHT_NORMAL);
maBulletFont.SetUnderline(UNDERLINE_NONE); maBulletFont.SetUnderline(UNDERLINE_NONE);
maBulletFont.SetStrikeout(STRIKEOUT_NONE); maBulletFont.SetStrikeout(STRIKEOUT_NONE);

View File

@ -172,7 +172,7 @@ SmFontFormat::SmFontFormat( const vcl::Font &rFont )
const vcl::Font SmFontFormat::GetFont() const const vcl::Font SmFontFormat::GetFont() const
{ {
vcl::Font aRes; vcl::Font aRes;
aRes.SetName( aName ); aRes.SetFamilyName( aName );
aRes.SetCharSet( (rtl_TextEncoding) nCharSet ); aRes.SetCharSet( (rtl_TextEncoding) nCharSet );
aRes.SetFamily( (FontFamily) nFamily ); aRes.SetFamily( (FontFamily) nFamily );
aRes.SetPitch( (FontPitch) nPitch ); aRes.SetPitch( (FontPitch) nPitch );
@ -881,7 +881,7 @@ void SmMathConfig::LoadFormat()
if (bUseDefaultFont) if (bUseDefaultFont)
{ {
aFnt = pFormat->GetFont( i ); aFnt = pFormat->GetFont( i );
aFnt.SetName( GetDefaultFontName( nLang, i ) ); aFnt.SetFamilyName( GetDefaultFontName( nLang, i ) );
} }
else else
{ {

View File

@ -302,7 +302,7 @@ void SmShowFont::SetFont(const vcl::Font& rFont)
IMPL_LINK_TYPED( SmFontDialog, FontSelectHdl, ComboBox&, rComboBox, void ) IMPL_LINK_TYPED( SmFontDialog, FontSelectHdl, ComboBox&, rComboBox, void )
{ {
maFont.SetName(rComboBox.GetText()); maFont.SetFamilyName(rComboBox.GetText());
m_pShowFont->SetFont(maFont); m_pShowFont->SetFont(maFont);
} }

View File

@ -661,7 +661,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++) for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++)
{ {
vcl::Font aFont; vcl::Font aFont;
aFont.SetName ( pDescriptor->sFontName ); aFont.SetFamilyName ( pDescriptor->sFontName );
aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) ); aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) );
aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) ); aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) );
aFont.SetPitch ( static_cast < FontPitch > (pDescriptor->nPitch ) ); aFont.SetPitch ( static_cast < FontPitch > (pDescriptor->nPitch ) );

View File

@ -649,7 +649,7 @@ FontMetric FontList::Get(const OUString& rName, const OUString& rStyleName) cons
aInfo = *pFontMetric; aInfo = *pFontMetric;
// set Fontname to keep FontAlias // set Fontname to keep FontAlias
aInfo.SetName( rName ); aInfo.SetFamilyName( rName );
aInfo.SetStyleName( rStyleName ); aInfo.SetStyleName( rStyleName );
return aInfo; return aInfo;
@ -686,7 +686,7 @@ FontMetric FontList::Get(const OUString& rName,
aInfo = *pFontMetric; aInfo = *pFontMetric;
// set Fontname to keep FontAlias // set Fontname to keep FontAlias
aInfo.SetName( rName ); aInfo.SetFamilyName( rName );
return aInfo; return aInfo;
} }

View File

@ -160,7 +160,7 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape,
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pCustomShape->GetMergedItem( EE_CHAR_FONTINFO )); const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pCustomShape->GetMergedItem( EE_CHAR_FONTINFO ));
aFont.SetHeight( pCustomShape->GetLogicRect().GetHeight() / rFWData.nMaxParagraphsPerTextArea ); aFont.SetHeight( pCustomShape->GetLogicRect().GetHeight() / rFWData.nMaxParagraphsPerTextArea );
aFont.SetAlign( ALIGN_TOP ); aFont.SetAlign( ALIGN_TOP );
aFont.SetName( rFontItem.GetFamilyName() ); aFont.SetFamilyName( rFontItem.GetFamilyName() );
aFont.SetFamily( rFontItem.GetFamily() ); aFont.SetFamily( rFontItem.GetFamily() );
aFont.SetStyleName( rFontItem.GetStyleName() ); aFont.SetStyleName( rFontItem.GetStyleName() );
aFont.SetOrientation( 0 ); aFont.SetOrientation( 0 );
@ -248,7 +248,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
aFont.SetHeight( rFWData.nSingleLineHeight ); aFont.SetHeight( rFWData.nSingleLineHeight );
aFont.SetAlign( ALIGN_TOP ); aFont.SetAlign( ALIGN_TOP );
aFont.SetName( rFontItem.GetFamilyName() ); aFont.SetFamilyName( rFontItem.GetFamilyName() );
aFont.SetFamily( rFontItem.GetFamily() ); aFont.SetFamily( rFontItem.GetFamily() );
aFont.SetStyleName( rFontItem.GetStyleName() ); aFont.SetStyleName( rFontItem.GetStyleName() );
aFont.SetOrientation( 0 ); aFont.SetOrientation( 0 );

View File

@ -878,7 +878,7 @@ static void SetPrevFont(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont
{ {
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rSet.Get(nWhich)); const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(rSet.Get(nWhich));
rFont.SetFamily(rFontItem.GetFamily()); rFont.SetFamily(rFontItem.GetFamily());
rFont.SetName(rFontItem.GetFamilyName()); rFont.SetFamilyName(rFontItem.GetFamilyName());
rFont.SetPitch(rFontItem.GetPitch()); rFont.SetPitch(rFontItem.GetPitch());
rFont.SetCharSet(rFontItem.GetCharSet()); rFont.SetCharSet(rFontItem.GetCharSet());
rFont.SetStyleName(rFontItem.GetStyleName()); rFont.SetStyleName(rFontItem.GetStyleName());
@ -1415,7 +1415,7 @@ void SvxFontPrevWindow::SetFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFo
{ {
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>( rSet.Get(nWhich) ); const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>( rSet.Get(nWhich) );
rFont.SetFamily( rFontItem.GetFamily() ); rFont.SetFamily( rFontItem.GetFamily() );
rFont.SetName( rFontItem.GetFamilyName() ); rFont.SetFamilyName( rFontItem.GetFamilyName() );
rFont.SetPitch( rFontItem.GetPitch() ); rFont.SetPitch( rFontItem.GetPitch() );
rFont.SetCharSet( rFontItem.GetCharSet() ); rFont.SetCharSet( rFontItem.GetCharSet() );
rFont.SetStyleName( rFontItem.GetStyleName() ); rFont.SetStyleName( rFontItem.GetStyleName() );

View File

@ -105,7 +105,7 @@ css::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont )
vcl::Font ImplCreateFont( const css::awt::FontDescriptor& rDescr ) vcl::Font ImplCreateFont( const css::awt::FontDescriptor& rDescr )
{ {
vcl::Font aFont; vcl::Font aFont;
aFont.SetName( rDescr.Name ); aFont.SetFamilyName( rDescr.Name );
aFont.SetStyleName( rDescr.StyleName ); aFont.SetStyleName( rDescr.StyleName );
aFont.SetSize( ::Size( rDescr.Width, rDescr.Height ) ); aFont.SetSize( ::Size( rDescr.Width, rDescr.Height ) );
aFont.SetFamily( (FontFamily)rDescr.Family ); aFont.SetFamily( (FontFamily)rDescr.Family );

View File

@ -133,7 +133,7 @@ bool CommonStylePreviewRenderer::recalculate()
if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_FONT)) != nullptr) if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_FONT)) != nullptr)
{ {
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem); const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem);
pFont->SetName(pFontItem->GetFamilyName()); pFont->SetFamilyName(pFontItem->GetFamilyName());
pFont->SetStyleName(pFontItem->GetStyleName()); pFont->SetStyleName(pFontItem->GetStyleName());
} }
else else

View File

@ -657,7 +657,7 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Windo
// setup the font properties // setup the font properties
SvxFont aFont; SvxFont aFont;
aFont.SetName(pFontItem->GetFamilyName()); aFont.SetFamilyName(pFontItem->GetFamilyName());
aFont.SetStyleName(pFontItem->GetStyleName()); aFont.SetStyleName(pFontItem->GetStyleName());
aFont.SetSize(aPixelSize); aFont.SetSize(aPixelSize);
@ -1000,7 +1000,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem )
{ {
if ( pFontItem ) if ( pFontItem )
{ {
aCurFont.SetName ( pFontItem->GetFamilyName() ); aCurFont.SetFamilyName ( pFontItem->GetFamilyName() );
aCurFont.SetFamily ( pFontItem->GetFamily() ); aCurFont.SetFamily ( pFontItem->GetFamily() );
aCurFont.SetStyleName ( pFontItem->GetStyleName() ); aCurFont.SetStyleName ( pFontItem->GetStyleName() );
aCurFont.SetPitch ( pFontItem->GetPitch() ); aCurFont.SetPitch ( pFontItem->GetPitch() );

View File

@ -196,7 +196,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const css::awt::FontDescriptor& rCurrentFo
if ( !rCurrentFont.Name.isEmpty() ) if ( !rCurrentFont.Name.isEmpty() )
{ {
FontMetric _aFontMetric; FontMetric _aFontMetric;
_aFontMetric.SetName( rCurrentFont.Name ); _aFontMetric.SetFamilyName( rCurrentFont.Name );
_aFontMetric.SetStyleName( rCurrentFont.StyleName ); _aFontMetric.SetStyleName( rCurrentFont.StyleName );
_aFontMetric.SetHeight( rCurrentFont.Height ); _aFontMetric.SetHeight( rCurrentFont.Height );
Fill( &_aFontMetric, _pFontList ); Fill( &_aFontMetric, _pFontList );

View File

@ -103,7 +103,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText,
pFont = new vcl::Font(); pFont = new vcl::Font();
pFont->SetWeight( WEIGHT_BOLD ); pFont->SetWeight( WEIGHT_BOLD );
pFont->SetStyleName( OUString() ); pFont->SetStyleName( OUString() );
pFont->SetName("Arial Unicode"); pFont->SetFamilyName("Arial Unicode");
pFont->SetFamily( FAMILY_SWISS ); pFont->SetFamily( FAMILY_SWISS );
pFont->SetTransparent( true ); pFont->SetTransparent( true );
} }

View File

@ -449,7 +449,7 @@ inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich
inline void SwSubFont::SetName( const OUString& rName ) inline void SwSubFont::SetName( const OUString& rName )
{ {
m_pMagic = nullptr; m_pMagic = nullptr;
Font::SetName( rName ); Font::SetFamilyName( rName );
} }
inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich ) inline void SwFont::SetName( const OUString& rName, const sal_uInt8 nWhich )

View File

@ -7370,7 +7370,7 @@ const vcl::Font& SwPageFrame::GetEmptyPageFont()
pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt
pEmptyPgFont->SetWeight( WEIGHT_BOLD ); pEmptyPgFont->SetWeight( WEIGHT_BOLD );
pEmptyPgFont->SetStyleName( aEmptyOUStr ); pEmptyPgFont->SetStyleName( aEmptyOUStr );
pEmptyPgFont->SetName("Helvetica"); pEmptyPgFont->SetFamilyName("Helvetica");
pEmptyPgFont->SetFamily( FAMILY_SWISS ); pEmptyPgFont->SetFamily( FAMILY_SWISS );
pEmptyPgFont->SetTransparent( true ); pEmptyPgFont->SetTransparent( true );
pEmptyPgFont->SetColor( COL_GRAY ); pEmptyPgFont->SetColor( COL_GRAY );

View File

@ -492,7 +492,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{ {
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem); const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
m_aSub[SW_LATIN].SetFamily( pFont->GetFamily() ); m_aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
m_aSub[SW_LATIN].Font::SetName( pFont->GetFamilyName() ); m_aSub[SW_LATIN].Font::SetFamilyName( pFont->GetFamilyName() );
m_aSub[SW_LATIN].Font::SetStyleName( pFont->GetStyleName() ); m_aSub[SW_LATIN].Font::SetStyleName( pFont->GetStyleName() );
m_aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() ); m_aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() );
m_aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() ); m_aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
@ -522,7 +522,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{ {
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem); const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
m_aSub[SW_CJK].SetFamily( pFont->GetFamily() ); m_aSub[SW_CJK].SetFamily( pFont->GetFamily() );
m_aSub[SW_CJK].Font::SetName( pFont->GetFamilyName() ); m_aSub[SW_CJK].Font::SetFamilyName( pFont->GetFamilyName() );
m_aSub[SW_CJK].Font::SetStyleName( pFont->GetStyleName() ); m_aSub[SW_CJK].Font::SetStyleName( pFont->GetStyleName() );
m_aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() ); m_aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() );
m_aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() ); m_aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
@ -558,7 +558,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{ {
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem); const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
m_aSub[SW_CTL].SetFamily( pFont->GetFamily() ); m_aSub[SW_CTL].SetFamily( pFont->GetFamily() );
m_aSub[SW_CTL].Font::SetName( pFont->GetFamilyName() ); m_aSub[SW_CTL].Font::SetFamilyName( pFont->GetFamilyName() );
m_aSub[SW_CTL].Font::SetStyleName( pFont->GetStyleName() ); m_aSub[SW_CTL].Font::SetStyleName( pFont->GetStyleName() );
m_aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() ); m_aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() );
m_aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() ); m_aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
@ -758,7 +758,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
{ {
const SvxFontItem& rFont = pAttrSet->GetFont(); const SvxFontItem& rFont = pAttrSet->GetFont();
m_aSub[SW_LATIN].SetFamily( rFont.GetFamily() ); m_aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
m_aSub[SW_LATIN].SetName( rFont.GetFamilyName() ); m_aSub[SW_LATIN].SetFamilyName( rFont.GetFamilyName() );
m_aSub[SW_LATIN].SetStyleName( rFont.GetStyleName() ); m_aSub[SW_LATIN].SetStyleName( rFont.GetStyleName() );
m_aSub[SW_LATIN].SetPitch( rFont.GetPitch() ); m_aSub[SW_LATIN].SetPitch( rFont.GetPitch() );
m_aSub[SW_LATIN].SetCharSet( rFont.GetCharSet() ); m_aSub[SW_LATIN].SetCharSet( rFont.GetCharSet() );
@ -774,7 +774,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
{ {
const SvxFontItem& rFont = pAttrSet->GetCJKFont(); const SvxFontItem& rFont = pAttrSet->GetCJKFont();
m_aSub[SW_CJK].SetFamily( rFont.GetFamily() ); m_aSub[SW_CJK].SetFamily( rFont.GetFamily() );
m_aSub[SW_CJK].SetName( rFont.GetFamilyName() ); m_aSub[SW_CJK].SetFamilyName( rFont.GetFamilyName() );
m_aSub[SW_CJK].SetStyleName( rFont.GetStyleName() ); m_aSub[SW_CJK].SetStyleName( rFont.GetStyleName() );
m_aSub[SW_CJK].SetPitch( rFont.GetPitch() ); m_aSub[SW_CJK].SetPitch( rFont.GetPitch() );
m_aSub[SW_CJK].SetCharSet( rFont.GetCharSet() ); m_aSub[SW_CJK].SetCharSet( rFont.GetCharSet() );
@ -794,7 +794,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
{ {
const SvxFontItem& rFont = pAttrSet->GetCTLFont(); const SvxFontItem& rFont = pAttrSet->GetCTLFont();
m_aSub[SW_CTL].SetFamily( rFont.GetFamily() ); m_aSub[SW_CTL].SetFamily( rFont.GetFamily() );
m_aSub[SW_CTL].SetName( rFont.GetFamilyName() ); m_aSub[SW_CTL].SetFamilyName( rFont.GetFamilyName() );
m_aSub[SW_CTL].SetStyleName( rFont.GetStyleName() ); m_aSub[SW_CTL].SetStyleName( rFont.GetStyleName() );
m_aSub[SW_CTL].SetPitch( rFont.GetPitch() ); m_aSub[SW_CTL].SetPitch( rFont.GetPitch() );
m_aSub[SW_CTL].SetCharSet( rFont.GetCharSet() ); m_aSub[SW_CTL].SetCharSet( rFont.GetCharSet() );

View File

@ -692,7 +692,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV,
ePitch, eCharSet ) ){ ePitch, eCharSet ) ){
vcl::Font aFont; vcl::Font aFont;
aFont.SetName( aName ); aFont.SetFamilyName( aName );
aFont.SetFamily( eFamily ); aFont.SetFamily( eFamily );
aFont.SetCharSet( eCharSet ); aFont.SetCharSet( eCharSet );

View File

@ -1097,7 +1097,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule,
{ {
const SvxFontItem& rFontItem = pFormat->GetFont(); const SvxFontItem& rFontItem = pFormat->GetFont();
aFont.SetFamily( rFontItem.GetFamily() ); aFont.SetFamily( rFontItem.GetFamily() );
aFont.SetName( rFontItem.GetFamilyName() ); aFont.SetFamilyName( rFontItem.GetFamilyName() );
aFont.SetStyleName( rFontItem.GetStyleName() ); aFont.SetStyleName( rFontItem.GetStyleName() );
aFont.SetPitch( rFontItem.GetPitch() ); aFont.SetPitch( rFontItem.GetPitch() );
aFont.SetCharSet( rFontItem.GetCharSet() ); aFont.SetCharSet( rFontItem.GetCharSet() );
@ -2350,7 +2350,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
} }
aTmp <<= OUString( pFontItem->GetFamilyName()); aTmp <<= OUString( pFontItem->GetFamilyName());
aFont.SetName( pFontItem->GetFamilyName() ); aFont.SetFamilyName( pFontItem->GetFamilyName() );
aFont.SetStyleName( pFontItem->GetStyleName() ); aFont.SetStyleName( pFontItem->GetStyleName() );
aFont.SetFamily( pFontItem->GetFamily() ); aFont.SetFamily( pFontItem->GetFamily() );
aFont.SetCharSet( pFontItem->GetCharSet() ); aFont.SetCharSet( pFontItem->GetCharSet() );

View File

@ -256,9 +256,9 @@ void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _
_rPage.rSh.GetCurAttr(aSet); _rPage.rSh.GetCurAttr(aSet);
SvxFontItem aFormatFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich))); SvxFontItem aFormatFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich)));
_rFont.SetFamily (aFormatFont.GetFamily()); _rFont.SetFamily(aFormatFont.GetFamily());
_rFont.SetName (aFormatFont.GetFamilyName()); _rFont.SetFamilyName(aFormatFont.GetFamilyName());
_rFont.SetPitch (aFormatFont.GetPitch()); _rFont.SetPitch(aFormatFont.GetPitch());
_rFont.SetCharSet(aFormatFont.GetCharSet()); _rFont.SetCharSet(aFormatFont.GetCharSet());
} }
@ -304,9 +304,9 @@ void SwDropCapsPict::UpdatePaintSettings()
OSL_ENSURE(pFormat, "character style doesn't exist!"); OSL_ENSURE(pFormat, "character style doesn't exist!");
const SvxFontItem &rFormatFont = pFormat->GetFont(); const SvxFontItem &rFormatFont = pFormat->GetFont();
aFont.SetFamily (rFormatFont.GetFamily()); aFont.SetFamily(rFormatFont.GetFamily());
aFont.SetName (rFormatFont.GetFamilyName()); aFont.SetFamilyName(rFormatFont.GetFamilyName());
aFont.SetPitch (rFormatFont.GetPitch()); aFont.SetPitch(rFormatFont.GetPitch());
aFont.SetCharSet(rFormatFont.GetCharSet()); aFont.SetCharSet(rFormatFont.GetCharSet());
} }
} }

View File

@ -239,7 +239,7 @@ void SwInsFootNoteDlg::Init()
aFont = m_pNumberCharEdit->GetFont(); aFont = m_pNumberCharEdit->GetFont();
m_aFontName = rFont.GetFamilyName(); m_aFontName = rFont.GetFamilyName();
eCharSet = rFont.GetCharSet(); eCharSet = rFont.GetCharSet();
aFont.SetName(m_aFontName); aFont.SetFamilyName(m_aFontName);
aFont.SetCharSet(eCharSet); aFont.SetCharSet(eCharSet);
bExtCharAvailable = true; bExtCharAvailable = true;
rSh.Left( CRSR_SKIP_CHARS, false, 1, false ); rSh.Left( CRSR_SKIP_CHARS, false, 1, false );

View File

@ -566,7 +566,7 @@ static void lcl_SetFontProperties(
const SvxPostureItem& rPostureItem ) const SvxPostureItem& rPostureItem )
{ {
rFont.SetFamily ( rFontItem.GetFamily() ); rFont.SetFamily ( rFontItem.GetFamily() );
rFont.SetName ( rFontItem.GetFamilyName() ); rFont.SetFamilyName ( rFontItem.GetFamilyName() );
rFont.SetStyleName ( rFontItem.GetStyleName() ); rFont.SetStyleName ( rFontItem.GetStyleName() );
rFont.SetCharSet ( rFontItem.GetCharSet() ); rFont.SetCharSet ( rFontItem.GetCharSet() );
rFont.SetPitch ( rFontItem.GetPitch() ); rFont.SetPitch ( rFontItem.GetPitch() );

View File

@ -1714,7 +1714,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem ) if ( pFontItem )
{ {
aFont.SetName( pFontItem->GetFamilyName() ); aFont.SetFamilyName( pFontItem->GetFamilyName() );
aFont.SetStyleName( pFontItem->GetStyleName() ); aFont.SetStyleName( pFontItem->GetStyleName() );
aFont.SetCharSet( pFontItem->GetCharSet() ); aFont.SetCharSet( pFontItem->GetCharSet() );
aFont.SetPitch( pFontItem->GetPitch() ); aFont.SetPitch( pFontItem->GetPitch() );

View File

@ -2111,7 +2111,7 @@ void SwBaseShell::GetTextFontCtrlState( SfxItemSet& rSet )
vcl::Font aFont; vcl::Font aFont;
if(pI && dynamic_cast< const SvxFontItem *>( pI ) != nullptr) if(pI && dynamic_cast< const SvxFontItem *>( pI ) != nullptr)
{ {
aFont.SetName( static_cast<const SvxFontItem*>(pI)->GetFamilyName()); aFont.SetFamilyName( static_cast<const SvxFontItem*>(pI)->GetFamilyName());
aFont.SetStyleName(static_cast<const SvxFontItem*>(pI)->GetStyleName()); aFont.SetStyleName(static_cast<const SvxFontItem*>(pI)->GetStyleName());
aFont.SetFamily(static_cast<const SvxFontItem*>(pI)->GetFamily()); aFont.SetFamily(static_cast<const SvxFontItem*>(pI)->GetFamily());
aFont.SetPitch(static_cast<const SvxFontItem*>(pI)->GetPitch()); aFont.SetPitch(static_cast<const SvxFontItem*>(pI)->GetPitch());

View File

@ -751,7 +751,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem ) if ( pFontItem )
{ {
aFont.SetName( pFontItem->GetFamilyName() ); aFont.SetFamilyName( pFontItem->GetFamilyName() );
aFont.SetStyleName( pFontItem->GetStyleName() ); aFont.SetStyleName( pFontItem->GetStyleName() );
aFont.SetCharSet( pFontItem->GetCharSet() ); aFont.SetCharSet( pFontItem->GetCharSet() );
aFont.SetPitch( pFontItem->GetPitch() ); aFont.SetPitch( pFontItem->GetPitch() );

View File

@ -946,7 +946,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false); const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem ) if ( pFontItem )
{ {
aNewFont.SetName( pFontItem->GetFamilyName() ); aNewFont.SetFamilyName( pFontItem->GetFamilyName() );
aNewFont.SetStyleName( pFontItem->GetStyleName() ); aNewFont.SetStyleName( pFontItem->GetStyleName() );
aNewFont.SetCharSet( pFontItem->GetCharSet() ); aNewFont.SetCharSet( pFontItem->GetCharSet() );
aNewFont.SetPitch( pFontItem->GetPitch() ); aNewFont.SetPitch( pFontItem->GetPitch() );

View File

@ -389,7 +389,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons
{ {
vcl::Font aFont( rInitFont ); vcl::Font aFont( rInitFont );
if ( !rDescr.Name.isEmpty() ) if ( !rDescr.Name.isEmpty() )
aFont.SetName( rDescr.Name ); aFont.SetFamilyName( rDescr.Name );
if ( !rDescr.StyleName.isEmpty() ) if ( !rDescr.StyleName.isEmpty() )
aFont.SetStyleName( rDescr.StyleName ); aFont.SetStyleName( rDescr.StyleName );
if ( rDescr.Height ) if ( rDescr.Height )

View File

@ -44,7 +44,7 @@ void VclFontTest::testName()
CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetFamilyName().isEmpty()); CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetFamilyName().isEmpty());
CPPUNIT_ASSERT_MESSAGE( "Style name should be empty", aFont.GetStyleName().isEmpty()); CPPUNIT_ASSERT_MESSAGE( "Style name should be empty", aFont.GetStyleName().isEmpty());
aFont.SetName("Test family name"); aFont.SetFamilyName("Test family name");
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetFamilyName()); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetFamilyName());
aFont.SetStyleName("Test style name"); aFont.SetStyleName("Test style name");
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", OUString("Test style name"), aFont.GetStyleName()); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", OUString("Test style name"), aFont.GetStyleName());

View File

@ -686,9 +686,9 @@ void ImplStyleData::SetStandardStyles()
aStdFont.SetCharSet( osl_getThreadTextEncoding() ); aStdFont.SetCharSet( osl_getThreadTextEncoding() );
aStdFont.SetWeight( WEIGHT_NORMAL ); aStdFont.SetWeight( WEIGHT_NORMAL );
if (!utl::ConfigManager::IsAvoidConfig()) if (!utl::ConfigManager::IsAvoidConfig())
aStdFont.SetName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en"))); aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
else else
aStdFont.SetName("Liberation Serif"); aStdFont.SetFamilyName("Liberation Serif");
maAppFont = aStdFont; maAppFont = aStdFont;
maHelpFont = aStdFont; maHelpFont = aStdFont;
maMenuFont = aStdFont; maMenuFont = aStdFont;

View File

@ -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); if (pSgfFont->Fixd) aFont.SetPitch(PITCH_FIXED); else aFont.SetPitch(PITCH_VARIABLE);
aFont.SetFamily(pSgfFont->SVFamil); aFont.SetFamily(pSgfFont->SVFamil);
aFont.SetCharSet(pSgfFont->SVChSet); aFont.SetCharSet(pSgfFont->SVChSet);
aFont.SetName(FNam); aFont.SetFamilyName(FNam);
} }
else else
{ // if not in Inifile, some fonts are hard coded here { // 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; } break;
default: FNam = "Helvetica"; default: FNam = "Helvetica";
} }
aFont.SetName(FNam); aFont.SetFamilyName(FNam);
//aFont.SetCharSet(CHARSET_SYSTEM); //aFont.SetCharSet(CHARSET_SYSTEM);
} }

View File

@ -151,7 +151,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
if ( eCharSet == RTL_TEXTENCODING_DONTKNOW ) if ( eCharSet == RTL_TEXTENCODING_DONTKNOW )
eCharSet = RTL_TEXTENCODING_MS_1252; eCharSet = RTL_TEXTENCODING_MS_1252;
aFont.SetCharSet( eCharSet ); aFont.SetCharSet( eCharSet );
aFont.SetName( rFont.alfFaceName ); aFont.SetFamilyName( rFont.alfFaceName );
FontFamily eFamily; FontFamily eFamily;
switch ( rFont.lfPitchAndFamily & 0xf0 ) switch ( rFont.lfPitchAndFamily & 0xf0 )
{ {
@ -857,7 +857,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
// this is necessary to be able to support // this is necessary to be able to support
// SetClipRgn( NULL ) and similar ClipRgn actions (SJ) // SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
maFont.SetName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using 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.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 maFont.SetHeight( 423 ); // will prevent this defining a font

View File

@ -137,7 +137,7 @@ void Font::SetAlign( FontAlign eAlign )
} }
} }
void Font::SetName( const OUString& rFamilyName ) void Font::SetFamilyName( const OUString& rFamilyName )
{ {
MakeUnique(); MakeUnique();
mpImplFont->SetFamilyName( rFamilyName ); mpImplFont->SetFamilyName( rFamilyName );
@ -411,7 +411,7 @@ void Font::Merge( const vcl::Font& rFont )
{ {
if ( !rFont.GetFamilyName().isEmpty() ) if ( !rFont.GetFamilyName().isEmpty() )
{ {
SetName( rFont.GetFamilyName() ); SetFamilyName( rFont.GetFamilyName() );
SetStyleName( rFont.GetStyleName() ); SetStyleName( rFont.GetStyleName() );
SetCharSet( GetCharSet() ); SetCharSet( GetCharSet() );
SetLanguageTag( rFont.GetLanguageTag() ); SetLanguageTag( rFont.GetLanguageTag() );
@ -573,9 +573,9 @@ namespace
GetTTGlobalFontInfo( pTTF, &aInfo ); GetTTGlobalFontInfo( pTTF, &aInfo );
// most importantly: the family name // most importantly: the family name
if( aInfo.ufamily ) if( aInfo.ufamily )
o_rResult.SetName( aInfo.ufamily ); o_rResult.SetFamilyName( aInfo.ufamily );
else if( aInfo.family ) 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 // set weight
if( aInfo.weight ) if( aInfo.weight )
{ {
@ -690,7 +690,7 @@ namespace
pClose++; pClose++;
if( pClose - pOpen > 1 ) 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 ) );
} }
} }

View File

@ -817,7 +817,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
rIStm.Read( aName, 32 ); 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.ReadInt32( nWidth ).ReadInt32( nHeight );
rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient ); rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient );
rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout ); rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout );

View File

@ -1783,7 +1783,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_aStructure[0].m_nParentElement = 0; m_aStructure[0].m_nParentElement = 0;
Font aFont; Font aFont;
aFont.SetName( "Times" ); aFont.SetFamilyName( "Times" );
aFont.SetSize( Size( 0, 12 ) ); aFont.SetSize( Size( 0, 12 ) );
GraphicsState aState; GraphicsState aState;
@ -2316,7 +2316,7 @@ void PDFWriterImpl::endPage()
// reset the default font // reset the default font
Font aFont; Font aFont;
aFont.SetName( "Times" ); aFont.SetFamilyName( "Times" );
aFont.SetSize( Size( 0, 12 ) ); aFont.SetSize( Size( 0, 12 ) );
m_aCurrentPDFState = m_aGraphicsStack.front(); m_aCurrentPDFState = m_aGraphicsStack.front();

View File

@ -74,7 +74,7 @@ FontMetric OutputDevice::GetDevFont( int nDevFontIndex ) const
if( nDevFontIndex < nCount ) if( nDevFontIndex < nCount )
{ {
const PhysicalFontFace& rData = *mpDeviceFontList->Get( nDevFontIndex ); const PhysicalFontFace& rData = *mpDeviceFontList->Get( nDevFontIndex );
aFontMetric.SetName( rData.GetFamilyName() ); aFontMetric.SetFamilyName( rData.GetFamilyName() );
aFontMetric.SetStyleName( rData.GetStyleName() ); aFontMetric.SetStyleName( rData.GetStyleName() );
aFontMetric.SetCharSet( rData.GetCharSet() ); aFontMetric.SetCharSet( rData.GetCharSet() );
aFontMetric.SetFamily( rData.GetFamilyType() ); aFontMetric.SetFamily( rData.GetFamilyType() );
@ -195,7 +195,7 @@ FontMetric OutputDevice::GetFontMetric() const
aMetric.Font::operator=( maFont ); aMetric.Font::operator=( maFont );
// set aMetric with info from font // set aMetric with info from font
aMetric.SetName( maFont.GetFamilyName() ); aMetric.SetFamilyName( maFont.GetFamilyName() );
aMetric.SetStyleName( xFontMetric->GetStyleName() ); aMetric.SetStyleName( xFontMetric->GetStyleName() );
aMetric.SetSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) ); aMetric.SetSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) );
aMetric.SetCharSet( xFontMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); 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 ); while ( nIndex != -1 );
aFont.SetName( aName ); aFont.SetFamilyName( aName );
} }
// No Name, than set all names // 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_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; sal_Int32 nIndex = 0;
aFont.SetName( aSearch.getToken( 0, ';', nIndex ) ); aFont.SetFamilyName( aSearch.getToken( 0, ';', nIndex ) );
} }
else else
{ {
pOutDev->ImplInitFontList(); pOutDev->ImplInitFontList();
aFont.SetName( aSearch ); aFont.SetFamilyName( aSearch );
// convert to pixel height // convert to pixel height
Size aSize = pOutDev->ImplLogicToDevicePixel( aFont.GetSize() ); Size aSize = pOutDev->ImplLogicToDevicePixel( aFont.GetSize() );
@ -920,15 +920,15 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
if (pFontInstance) if (pFontInstance)
{ {
if( pFontInstance->maFontSelData.mpFontData ) if( pFontInstance->maFontSelData.mpFontData )
aFont.SetName( pFontInstance->maFontSelData.mpFontData->GetFamilyName() ); aFont.SetFamilyName( pFontInstance->maFontSelData.mpFontData->GetFamilyName() );
else else
aFont.SetName( pFontInstance->maFontSelData.maTargetName ); aFont.SetFamilyName( pFontInstance->maFontSelData.maTargetName );
pOutDev->mpFontCache->Release(pFontInstance); pOutDev->mpFontCache->Release(pFontInstance);
} }
} }
} }
else else
aFont.SetName( aSearch ); aFont.SetFamilyName( aSearch );
} }
} }

View File

@ -483,7 +483,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
else else
nType = DefaultFontType::UI_SANS; nType = DefaultFontType::UI_SANS;
vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE); vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE);
aFont.SetName(aTempFont.GetFamilyName()); aFont.SetFamilyName(aTempFont.GetFamilyName());
SetPointFont(rRenderContext, aFont); SetPointFont(rRenderContext, aFont);
} }
} }

View File

@ -2792,7 +2792,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
if ( aFirstName.equalsIgnoreAsciiCase( "MS Sans Serif" ) ) if ( aFirstName.equalsIgnoreAsciiCase( "MS Sans Serif" ) )
{ {
aFontName = "Arial;" + aFontName; aFontName = "Arial;" + aFontName;
aAppFont.SetName( aFontName ); aAppFont.SetFamilyName( aFontName );
} }
} }
aStyleSettings.SetAppFont( aAppFont ); aStyleSettings.SetAppFont( aAppFont );

View File

@ -41,7 +41,7 @@ awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault
vcl::Font aFont(pOut->GetFont()); vcl::Font aFont(pOut->GetFont());
boost::optional<PropertyMap::Property> aFontName = pDefaultCharProps->getProperty(PROP_CHAR_FONT_NAME); boost::optional<PropertyMap::Property> aFontName = pDefaultCharProps->getProperty(PROP_CHAR_FONT_NAME);
if (aFontName) if (aFontName)
aFont.SetName(aFontName->second.get<OUString>()); aFont.SetFamilyName(aFontName->second.get<OUString>());
boost::optional<PropertyMap::Property> aHeight = pDefaultCharProps->getProperty(PROP_CHAR_HEIGHT); boost::optional<PropertyMap::Property> aHeight = pDefaultCharProps->getProperty(PROP_CHAR_HEIGHT);
if (aHeight) if (aHeight)
{ {