diff options
105 files changed, 221 insertions, 227 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index fbf2cd7d0f29..947396a060f3 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1015,7 +1015,7 @@ Document::retrieveCharacterAttributes( //character font name aAttribs[i].Name = "CharFontName"; aAttribs[i].Handle = -1; - aAttribs[i].Value = css::uno::makeAny( aFont.GetName() ); + aAttribs[i].Value = css::uno::makeAny( aFont.GetFamilyName() ); aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE; i++; diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index cf8cf794c2d5..3c63bc6ae543 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -30,7 +30,7 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), makeAny( (sal_Int16) rFont.GetCharSet() ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), makeAny( (sal_Int16) rFont.GetFamily() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetName() ) ) ); + m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetFamilyName() ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), makeAny( (sal_Int16) rFont.GetPitch() ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( rFont.GetStyleName() ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetSize().Height() ) ) ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 0da4d58c3636..fc76d8538659 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1235,7 +1235,7 @@ void EditorWindow::ImplSetFont() vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this)); - sFontName = aTmpFont.GetName(); + sFontName = aTmpFont.GetFamilyName(); } Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get()); vcl::Font aFont(sFontName, aFontSize); diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 6c25dd8697de..584e2c46a647 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -499,7 +499,7 @@ namespace cairocanvas << (rSysFontData.bAntialias ? "AA " : "") << (rSysFontData.bFakeBold ? "FB " : "") << (rSysFontData.bFakeItalic ? "FI " : "") << " || Name:" - << aFont.GetName() << " - " + << aFont.GetFamilyName() << " - " << maText.Text.copy(maText.StartPosition, maText.Length)); cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 9301e47cf770..f190dfd537f9 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -167,7 +167,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter() aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont(); - aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); + aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP )); OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" ); diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index cdc4de6b1442..cecaeb7511a1 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -414,7 +414,7 @@ void CharacterProperties::AddDefaultsToMap( nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX); vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetFamilyName() ) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamily()) );//awt::FontFamily::SWISS ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_CHAR_SET, sal_Int16(aFont.GetCharSet()) );//use awt::CharSet::DONTKNOW instead of SYSTEM to avoid assertion issue 50249 @@ -444,7 +444,7 @@ void CharacterProperties::AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_WEIGHT, awt::FontWeight::NORMAL ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_POSTURE, awt::FontSlant_NONE ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_LOCALE, aDefaultLocale_CJK ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetName() ) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetFamilyName() ) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, OUString(aFontCJK.GetStyleName()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamily()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_SET, sal_Int16(aFontCJK.GetCharSet()) ); @@ -455,7 +455,7 @@ void CharacterProperties::AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_WEIGHT, awt::FontWeight::NORMAL ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_POSTURE, awt::FontSlant_NONE ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_LOCALE, aDefaultLocale_CTL ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetName() ) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetFamilyName() ) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, OUString(aFontCTL.GetStyleName()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamily()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_SET, sal_Int16(aFontCTL.GetCharSet()) ); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 183eace5d97a..20173a45ab61 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -759,7 +759,7 @@ namespace cppcanvas if( rParms.mrParms.maFontName.is_initialized() ) aFontRequest.FontDescription.FamilyName = *rParms.mrParms.maFontName; else - aFontRequest.FontDescription.FamilyName = rFont.GetName(); + aFontRequest.FontDescription.FamilyName = rFont.GetFamilyName(); aFontRequest.FontDescription.StyleName = rFont.GetStyleName(); diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 9449b13772a3..46ecefd0597e 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -159,9 +159,9 @@ short SvxCharacterMap::Execute() const SfxItemPool* pPool = pSet->GetPool(); const vcl::Font& rFont( GetCharFont() ); pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) ); - pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), + pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) ); - pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), rFont.GetName() ) ); + pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), rFont.GetFamilyName() ) ); pSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), GetChar() ) ); } } @@ -317,12 +317,12 @@ void SvxCharacterMap::init() m_pShowText->Hide(); } - OUString aDefStr( aFont.GetName() ); + OUString aDefStr( aFont.GetFamilyName() ); OUString aLastName; int nCount = GetDevFontCount(); for ( int i = 0; i < nCount; i++ ) { - OUString aFontName( GetDevFont( i ).GetName() ); + OUString aFontName( GetDevFont( i ).GetFamilyName() ); if ( aFontName != aLastName ) { aLastName = aFontName; @@ -379,10 +379,10 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont ) // like "Times New Roman;Times" resolved vcl::Font aTmp( GetFontMetric( rFont ) ); - if ( m_pFontLB->GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND ) + if ( m_pFontLB->GetEntryPos( aTmp.GetFamilyName() ) == LISTBOX_ENTRY_NOTFOUND ) return; - m_pFontLB->SelectEntry( aTmp.GetName() ); + m_pFontLB->SelectEntry( aTmp.GetFamilyName() ); aFont = aTmp; FontSelectHdl(*m_pFontLB); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 2130435bef02..e57fbfabe567 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -361,7 +361,7 @@ IMPL_LINK_TYPED(SvxFontSubstTabPage, NonPropFontsHdl, Button*, pBox, void) { const vcl::FontInfo& rInfo = aFntLst.GetFontName( nFont ); if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) - m_pFontNameLB->InsertEntry(rInfo.GetName()); + m_pFontNameLB->InsertEntry(rInfo.GetFamilyName()); } m_pFontNameLB->SelectEntry(sFontName); } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 5ac913d806a9..ea5fd82a10f3 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -524,7 +524,7 @@ namespace _rFont.SetLanguage(_pLanguageLB->GetSelectLanguage()); _rFont.SetFamily( aFontInfo.GetFamily() ); - _rFont.SetName( aFontInfo.GetName() ); + _rFont.SetName( aFontInfo.GetFamilyName() ); _rFont.SetStyleName( aFontInfo.GetStyleName() ); _rFont.SetPitch( aFontInfo.GetPitch() ); _rFont.SetCharSet( aFontInfo.GetCharSet() ); @@ -921,7 +921,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) aStyleBoxText.clear(); vcl::FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); - SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(), + SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetFamilyName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), nWhich ); pOld = GetOldItem( rSet, nSlot ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index dfaf9e3ef064..4ac3f87ca52d 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -723,7 +723,7 @@ IMPL_LINK_NOARG_TYPED(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) aFmt.SetSuffix(OUString()); if( !pLevelSettings->sBulletFont.isEmpty() && pLevelSettings->sBulletFont.compareTo( - rActBulletFont.GetName())) + rActBulletFont.GetFamilyName())) { //search for the font if(!pList) diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 19574fa309a3..db4db5197c0a 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -236,7 +236,7 @@ void OSqlEdit::ImplSetFont() if ( sFontName.isEmpty() ) { vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this ) ); - sFontName = aTmpFont.GetName(); + sFontName = aTmpFont.GetFamilyName(); } Size aFontSize( 0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() ); diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index ffbb1158b6a0..1c4b3c596f43 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -384,7 +384,7 @@ bool ORTFImportExport::Write() OString aFonts(OUStringToOString(m_aFont.Name, eDestEnc)); if (aFonts.isEmpty()) { - OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName(); + OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetFamilyName(); aFonts = OUStringToOString(aName, eDestEnc); } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2bd3277ac0b7..7e47e1e6db36 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1688,7 +1688,7 @@ static char* getFonts (const char* pCommand) aChildren.push_back(std::make_pair("", aChild)); nSizeCount++; } - aValues.add_child(rInfo.GetName().toUtf8().getStr(), aChildren); + aValues.add_child(rInfo.GetFamilyName().toUtf8().getStr(), aChildren); } } aTree.add_child("commandValues", aValues); @@ -2000,7 +2000,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, for (sal_uInt16 i = 0; i < nFontCount; ++i) { const vcl::FontInfo& rInfo = pList->GetFontName(i); - OUString aFontName = rInfo.GetName(); + OUString aFontName = rInfo.GetFamilyName(); if (!aSearchedFontName.equals(aFontName.toUtf8().getStr())) continue; diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 5356785fc4dd..0598b1294051 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -440,7 +440,7 @@ namespace drawinglayer bool bBiDiStrong) { const attribute::FontAttribute aRetval( - rFont.GetName(), + rFont.GetFamilyName(), rFont.GetStyleName(), static_cast<sal_uInt16>(rFont.GetWeight()), RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(), diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index fee7a9bf6fcd..0493605e83cd 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2565,7 +2565,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const vcl::Font& rFont void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont ) { rSet.Put( SvxLanguageItem( rFont.GetLanguage(), EE_CHAR_LANGUAGE ) ); - rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) ); + rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetFamilyName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) ); rSet.Put( SvxFontHeightItem( rFont.GetSize().Height(), 100, EE_CHAR_FONTHEIGHT ) ); rSet.Put( SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ) ); rSet.Put( SvxShadowedItem( rFont.IsShadow(), EE_CHAR_SHADOW ) ); diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 01461cbdb2fa..dec2be7479f1 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -650,13 +650,13 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel ) if ( nHLevel == STYLE_PRE ) { vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE ); - SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); + SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); aItems.Put( aFontItem ); - SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); + SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); aItems.Put( aFontItemCJK ); - SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); + SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); aItems.Put( aFontItemCTL ); } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 63a896620428..b2912e11e879 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -152,7 +152,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode); SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT ); vcl::Font aDefFont( GetDefFont() ); - SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(), + SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); sal_Int32 nStartPara = mpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index cf5ef20d61f1..94c9c6b09762 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1661,7 +1661,7 @@ void ImpEditEngine::SetLanguageAndFont( { // set new font attribute SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aNewSet.Get( nFontWhichId ) ); - aFontItem.SetFamilyName( pFont->GetName()); + aFontItem.SetFamilyName( pFont->GetFamilyName()); aFontItem.SetFamily( pFont->GetFamily()); aFontItem.SetStyleName( pFont->GetStyleName()); aFontItem.SetPitch( pFont->GetPitch()); diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index dd61f09a8235..23f5ac826a88 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -252,7 +252,7 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, { // set new font attribute SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aNewSet.Get( nFontWhichId ) ); - aFontItem.SetFamilyName( pFont->GetName()); + aFontItem.SetFamilyName( pFont->GetFamilyName()); aFontItem.SetFamily( pFont->GetFamily()); aFontItem.SetStyleName( pFont->GetStyleName()); aFontItem.SetPitch( pFont->GetPitch()); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index acbcf2701738..9af70bf93dd5 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -46,8 +46,8 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const vcl::Font& rFont ) nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetItalic(); rStream.WriteUInt16( nTemp ); - // UNICODE: rStream << rFont.GetName(); - rStream.WriteUniOrByteString(rFont.GetName(), rStream.GetStreamCharSet()); + // UNICODE: rStream << rFont.GetFamilyName(); + rStream.WriteUniOrByteString(rFont.GetFamilyName(), rStream.GetStreamCharSet()); rStream.WriteBool( rFont.IsOutline() ); rStream.WriteBool( rFont.IsShadow() ); @@ -217,7 +217,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom ) { vcl::Font _aFont = GetFont(); vcl::Font aNewFont = rCopyFrom.GetFont(); - _aFont.SetName( aNewFont.GetName() ); + _aFont.SetName( aNewFont.GetFamilyName() ); _aFont.SetFamily( aNewFont.GetFamily() ); _aFont.SetStyleName( aNewFont.GetStyleName() ); _aFont.SetColor( aNewFont.GetColor() ); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 016e9593ea0d..18291910f10d 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -677,7 +677,7 @@ void SvxNumRule::Store( SvStream &rStream ) { if(!pConverter) pConverter = - CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetName(), + CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetFamilyName(), FontToSubsFontFlags::EXPORT|FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS); } aFmts[i]->Store(rStream, pConverter); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 42967fa1cc79..5893f27f7372 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -149,7 +149,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst, aFontNameSeq.realloc( nCount ); for ( sal_Int32 i = 0; i < nCount; i++ ) - aFontNameSeq[i] = pFontList->GetFontName(i).GetName(); + aFontNameSeq[i] = pFontList->GetFontName(i).GetFamilyName(); } } @@ -3401,7 +3401,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo GetDefaultFontFlags::OnlyOne ) ); SvxFontItem* pItem = aItemArr[ n ]; pItem->SetFamily( aFont.GetFamily() ); - pItem->SetFamilyName( aFont.GetName() ); + pItem->SetFamilyName( aFont.GetFamilyName() ); pItem->SetStyleName( OUString() ); pItem->SetPitch( aFont.GetPitch()); pItem->SetCharSet(aFont.GetCharSet()); diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index f63a44f5ad45..f6ca4f8d39ab 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -582,7 +582,7 @@ void SvxSwAutoCorrCfg::ImplCommit() pValues[nProp] <<= (sal_Int32)rSwFlags.cBullet; break; // "Format/Option/ChangeToBullets/SpecialCharacter/Char", case 17: - pValues[nProp] <<= OUString(rSwFlags.aBulletFont.GetName()); + pValues[nProp] <<= OUString(rSwFlags.aBulletFont.GetFamilyName()); break; // "Format/Option/ChangeToBullets/SpecialCharacter/Font", case 18: pValues[nProp] <<= (sal_Int32)rSwFlags.aBulletFont.GetFamily(); @@ -626,7 +626,7 @@ void SvxSwAutoCorrCfg::ImplCommit() pValues[nProp] <<= (sal_Int32)rSwFlags.cByInputBullet; break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Char", case 43 : - pValues[nProp] <<= OUString(rSwFlags.aByInputBulletFont.GetName()); + pValues[nProp] <<= OUString(rSwFlags.aByInputBulletFont.GetFamilyName()); break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Font", case 44 : pValues[nProp] <<= (sal_Int32)rSwFlags.aByInputBulletFont.GetFamily(); diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 063707b10a5c..9464e043cea9 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -641,7 +641,7 @@ SET_FONTALIGNMENT: { const vcl::Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), - rSVFont.GetName(), rSVFont.GetStyleName(), + rSVFont.GetFamilyName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetCharSet(), SID_ATTR_CHAR_FONT ); SetScriptAttr( eCharType, *pSet, aTmpItem ); @@ -1822,7 +1822,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) nValue = 0; const vcl::Font& rSVFont = GetFont( sal_uInt16(nValue) ); SvxFontItem aTmpItem( - rSVFont.GetFamily(), rSVFont.GetName(), + rSVFont.GetFamily(), rSVFont.GetFamilyName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetCharSet(), SID_ATTR_CHAR_FONT ); SetScriptAttr( NOTDEF_CHARTYPE, aTmp, aTmpItem ); diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index fd76b7a9b948..f33ddf02f4ab 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -57,7 +57,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl: void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDescriptor& rDesc ) { - rDesc.Name = rFont.GetName(); + rDesc.Name = rFont.GetFamilyName(); rDesc.StyleName = rFont.GetStyleName(); rDesc.Width = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Width()); rDesc.Height = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Height()); diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 831a6799508b..c73384454322 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -491,7 +491,7 @@ namespace pcr vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults - *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT); + *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT); *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT); *pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_POSTURE); @@ -503,7 +503,7 @@ namespace pcr *pCounter++ = new SvxCharReliefItem(aDefaultVCLFont.GetRelief(), CFID_RELIEF); *pCounter++ = new SvxEmphasisMarkItem(aDefaultVCLFont.GetEmphasisMark(), CFID_EMPHASIS); - *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_CJK_FONT); + *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_CJK_FONT); *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_CJK_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_CJK_WEIGHT); *pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_CJK_POSTURE); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index bd38ef5a1af4..8249bf42e76d 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -355,7 +355,7 @@ void Writer::setClipping( const tools::PolyPolygon* pClipPolyPolygon ) // that we care about. bool compare_fonts_for_me(const vcl::Font& rFont1, const vcl::Font& rFont2) { - return rFont1.GetName() == rFont2.GetName() && + return rFont1.GetFamilyName() == rFont2.GetFamilyName() && rFont1.GetWeight() == rFont2.GetWeight() && rFont1.GetItalic() == rFont2.GetItalic() && rFont1.IsOutline() == rFont2.IsOutline() && diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 96e1137558de..36295b70902e 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -430,7 +430,7 @@ void METWriter::CreateChrSet(const vcl::Font & rFont) pCS = new METChrSet; pCS->pSucc = pChrSetList; pChrSetList=pCS; pCS->nSet = nNextChrSetId++; - pCS->aName = rFont.GetName(); + pCS->aName = rFont.GetFamilyName(); pCS->eWeight = rFont.GetWeight(); } } @@ -442,7 +442,7 @@ sal_uInt8 METWriter::FindChrSet(const vcl::Font & rFont) for (pCS=pChrSetList; pCS!=nullptr; pCS=pCS->pSucc) { - if (pCS->aName==rFont.GetName() && pCS->eWeight==rFont.GetWeight() ) + if (pCS->aName==rFont.GetFamilyName() && pCS->eWeight==rFont.GetWeight() ) return pCS->nSet; } diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 5000ae76c93b..edf5d060fb6e 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -687,20 +687,20 @@ void PictWriter::WriteOpcode_FontName(const vcl::Font & rFont) default: nFontId=1; } - if (!bDstFontNameValid || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName()) + if (!bDstFontNameValid || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetFamilyName()) { - OString aString(OUStringToOString(rFont.GetName(), osl_getThreadTextEncoding())); + OString aString(OUStringToOString(rFont.GetFamilyName(), osl_getThreadTextEncoding())); sal_uInt16 nFontNameLen = aString.getLength(); if ( nFontNameLen ) { nDataLen = 3 + nFontNameLen; pPict->WriteUInt16( 0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId ); - WriteString( rFont.GetName() ); + WriteString( rFont.GetFamilyName() ); if ( ( nFontNameLen & 1 ) == 0 ) pPict->WriteUChar( 0 ); } pPict->WriteUInt16( 0x0003 ).WriteUInt16( nFontId ); - aDstFontName=rFont.GetName(); + aDstFontName=rFont.GetFamilyName(); nDstFontNameId=nFontId; bDstFontNameValid=true; } diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 2d62da72117b..823f0e9bf6e5 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -53,7 +53,7 @@ SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont { FontWeight eWeight( WEIGHT_NORMAL ); FontItalic eItalic( ITALIC_NONE ); - OUString aFontName( rFont.GetName() ); + OUString aFontName( rFont.GetFamilyName() ); sal_Int32 nNextTokenPos( 0 ); switch( rFont.GetWeight() ) @@ -222,7 +222,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont ) else aFontStyle = "normal"; - mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFont.GetName() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFont.GetFamilyName() ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "units-per-em", aUnitsPerEM ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-weight", aFontWeight ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-style", aFontStyle ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 1f433540694b..3ca0618ebc16 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -440,12 +440,12 @@ void SVGAttributeWriter::setFontFamily() if( mrExport.IsUsePositionedCharacters() ) { - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, mrFontExport.GetMappedFontName( rCurFont.GetName() ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, mrFontExport.GetMappedFontName( rCurFont.GetFamilyName() ) ); } else { sal_Int32 nNextTokenPos( 0 ); - const OUString& rsFontName = rCurFont.GetName(); + const OUString& rsFontName = rCurFont.GetFamilyName(); OUString sFontFamily( rsFontName.getToken( 0, ';', nNextTokenPos ) ); FontPitch ePitch = rCurFont.GetPitch(); if( ePitch == PITCH_FIXED ) @@ -792,12 +792,12 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer ) if( maCurrentFont != maParentFont ) { - const OUString& rsCurFontName = maCurrentFont.GetName(); + const OUString& rsCurFontName = maCurrentFont.GetFamilyName(); long int nCurFontSize = maCurrentFont.GetHeight(); FontItalic eCurFontItalic = maCurrentFont.GetItalic(); FontWeight eCurFontWeight = maCurrentFont.GetWeight(); - const OUString& rsParFontName = maParentFont.GetName(); + const OUString& rsParFontName = maParentFont.GetFamilyName(); long int nParFontSize = maParentFont.GetHeight(); FontItalic eParFontItalic = maParentFont.GetItalic(); FontWeight eParFontWeight = maParentFont.GetWeight(); @@ -903,7 +903,7 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer ) void SVGTextWriter::implSetFontFamily() { sal_Int32 nNextTokenPos( 0 ); - const OUString& rsFontName = maCurrentFont.GetName(); + const OUString& rsFontName = maCurrentFont.GetFamilyName(); OUString sFontFamily( rsFontName.getToken( 0, ';', nNextTokenPos ) ); FontPitch ePitch = maCurrentFont.GetPitch(); if( ePitch == PITCH_FIXED ) diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index ede2b4dccb9e..8043d0079536 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -63,7 +63,7 @@ namespace frm // defaults vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont(); aFont.SetName( "Times New Roman" ); - pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), 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 MapMode aPointMapMode( MAP_POINT ); diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 9c91995b4f5c..41f9c920a369 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -67,7 +67,7 @@ public: FontAlign GetAlign() const; void SetName( const OUString& rFamilyName ); - const OUString& GetName() const; + const OUString& GetFamilyName() const; void SetStyleName( const OUString& rStyleName ); const OUString& GetStyleName() const; void SetSize( const Size& ); diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index ddf27eb85455..e63a8002070e 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -85,7 +85,7 @@ inline std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const FontMetric& rMetric ) { stream << "{" - << "name=" << "\"" << rMetric.GetName() << "\"" + << "name=" << "\"" << rMetric.GetFamilyName() << "\"" << ",size=(" << rMetric.GetSize().Width() << "," << rMetric.GetSize().Height() << ")" << ",ascent=" << rMetric.GetAscent() << ",descent=" << rMetric.GetDescent() diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index e1eb4955e627..05e7fa8c9543 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -197,7 +197,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool) vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem* pStdFont = new SvxFontItem( aStdFont.GetFamily(), - aStdFont.GetName(), aStdFont.GetStyleName(), + aStdFont.GetFamilyName(), aStdFont.GetStyleName(), aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 3f1f69cba2ec..a7f573df61ec 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -368,7 +368,7 @@ void ScPatternAttr::GetFont( // FontItem: - if (rFont.GetName() != pFontAttr->GetFamilyName()) + if (rFont.GetFamilyName() != pFontAttr->GetFamilyName()) rFont.SetName( pFontAttr->GetFamilyName() ); if (rFont.GetStyleName() != pFontAttr->GetStyleName()) rFont.SetStyleName( pFontAttr->GetStyleName() ); diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 450445486cf0..aec6dcbd3b91 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -202,7 +202,7 @@ static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM ) { vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne ); - SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(), + SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId ); if ( aNewItem != rSet.Get( nItemId ) ) { diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 2207f6b84adc..d14edaa886ed 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -824,19 +824,19 @@ ScAutoFormat::ScAutoFormat() : vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aFontItem( - aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(), + aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT ); aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aCJKFontItem( - aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(), + aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CJK_FONT ); aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aCTLFontItem( - aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(), + aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CTL_FONT ); SvxFontHeightItem aHeight( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt; diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index dba973ba0602..f3abadd0fc11 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -729,7 +729,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico ScPatternAttr::GetFont( aFont, aItemSet, SC_AUTOCOL_RAW ); // font name and style - aNewData.maName = XclTools::GetXclFontName( aFont.GetName() ); + aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() ); aNewData.mnWeight = (aFont.GetWeight() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL; aNewData.mbItalic = (aFont.GetItalic() != ITALIC_NONE); bool bNewFont = !(aFontData.maName == aNewData.maName); diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 9005282156d9..3b8b6de243b8 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -198,7 +198,7 @@ void XclFontData::Clear() void XclFontData::FillFromVclFont( const vcl::Font& rFont ) { - maName = XclTools::GetXclFontName( rFont.GetName() ); // substitute with MS fonts + maName = XclTools::GetXclFontName( rFont.GetFamilyName() ); // substitute with MS fonts maStyle.clear(); maColor = rFont.GetColor(); SetScUnderline( rFont.GetUnderline() ); diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index d5561f44c028..4c12721432ab 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -314,7 +314,7 @@ static inline void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropN /** Fills the sequence with all font attributes of rFont. */ static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont ) { - SvxFontItem aFontItem( rFont.GetFamily(), rFont.GetName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT ); + SvxFontItem aFontItem( rFont.GetFamily(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT ); SvxFontHeightItem aHeightItem( rFont.GetSize().Height(), 100, ATTR_FONT_HEIGHT ); SvxLanguageItem aLangItem( rFont.GetLanguage(), ATTR_FONT_LANGUAGE ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 35184b74ebff..5e9c76213778 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -231,7 +231,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) { OUString aFontName(pFontItem->GetValue()); vcl::Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR - aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(), + aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), ATTR_FONT ); } @@ -261,7 +261,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, true, &pItem ) == SfxItemState::SET ) { const SvxHyperlinkItem* pHyper = static_cast<const SvxHyperlinkItem*>(pItem); - const OUString& rName = pHyper->GetName(); + const OUString& rName = pHyper->GetName(); const OUString& rURL = pHyper->GetURL(); const OUString& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index e4c790b7bb93..e389787209a0 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2352,7 +2352,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxAllItemSet aSet( GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); - aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) ); + aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) ); std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet, pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP )); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index d0e1b4d369e8..c23a7beb4d8b 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -399,7 +399,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) { OUString aFontName(pFontItem->GetValue()); vcl::Font aFont(aFontName, Size(1,1)); // Size just because CTOR - aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(), + aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), ATTR_FONT ); } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 37af4f618fa6..3d30180d8838 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2998,7 +2998,7 @@ void ScViewFunc::InsertSpecialChar( const OUString& rStr, const vcl::Font& rFont const sal_Unicode* pChar = rStr.getStr(); ScTabViewShell* pViewShell = GetViewData().GetViewShell(); SvxFontItem aFontItem( rFont.GetFamily(), - rFont.GetName(), + rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 56ca9237181c..5a219fc8361a 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -184,13 +184,13 @@ void SdDrawDocument::CreateLayoutTemplates() getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); - SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); rISet.Put( aSvxFontItem ); @@ -563,13 +563,13 @@ void SdDrawDocument::CreateDefaultCellStyles() getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); - SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); rISet.Put( aSvxFontItem ); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index bc1f18b7ae35..0df8f1c5fa32 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -192,13 +192,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); // Font for title and outline - SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); vcl::Font aBulletFont( GetBulletFont() ); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 2d09b7a587be..b1192422599f 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -110,7 +110,7 @@ SfxItemPool* GetAnnotationPool() mpAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT)); vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() ); - mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamily(),aAppFont.GetName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); + mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamily(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); } return mpAnnotationPool; diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 445e4e8a3bc4..d98fe2f80a4d 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -261,7 +261,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) // set attributes (set font) SfxItemSet aSet(pOL->GetEmptyItemSet()); - SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(), + SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO); diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index fa55949b149d..380d760c8e37 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -171,7 +171,7 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const vc { // set new font attribute SvxFontItem aFontItem( static_cast<const SvxFontItem&>( rSet.Get( EE_CHAR_FONTINFO_CJK ) ) ); - aFontItem.SetFamilyName( pTargetFont->GetName()); + aFontItem.SetFamilyName( pTargetFont->GetFamilyName()); aFontItem.SetFamily( pTargetFont->GetFamily()); aFontItem.SetStyleName( pTargetFont->GetStyleName()); aFontItem.SetPitch( pTargetFont->GetPitch()); diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 0ccf0fbc500e..adbe6606661a 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -313,7 +313,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine() mpEditEngineItemPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), - aFont.GetName(), + aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index e987b664e0e8..d2d09997df2e 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -158,7 +158,7 @@ SmFontFormat::SmFontFormat() SmFontFormat::SmFontFormat( const vcl::Font &rFont ) { - aName = rFont.GetName(); + aName = rFont.GetFamilyName(); nCharSet = (sal_Int16) rFont.GetCharSet(); nFamily = (sal_Int16) rFont.GetFamily(); nPitch = (sal_Int16) rFont.GetPitch(); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 04656de72863..227d91891e84 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -270,7 +270,7 @@ void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRec rRenderContext.SetFont(aFont); rRenderContext.SetTextColor(aTextColor); - OUString sText(rRenderContext.GetFont().GetName()); + OUString sText(rRenderContext.GetFont().GetFamilyName()); Size aTextSize(rRenderContext.GetTextWidth(sText), rRenderContext.GetTextHeight()); rRenderContext.DrawText(Point((rRenderContext.GetOutputSize().Width() - aTextSize.Width()) / 2, @@ -335,7 +335,7 @@ void SmFontDialog::SetFont(const vcl::Font &rFont) { maFont = rFont; - m_pFontBox->SetText(maFont.GetName()); + m_pFontBox->SetText(maFont.GetFamilyName()); m_pBoldCheckBox->Check(IsBold(maFont)); m_pItalicCheckBox->Check(IsItalic(maFont)); m_pShowFont->SetFont(maFont); @@ -359,7 +359,7 @@ SmFontDialog::SmFontDialog(vcl::Window * pParent, OutputDevice *pFntListDevice, sal_uInt16 nCount = aFontList.GetFontNameCount(); for (sal_uInt16 i = 0; i < nCount; ++i) { - m_pFontBox->InsertEntry( aFontList.GetFontName(i).GetName() ); + m_pFontBox->InsertEntry( aFontList.GetFontName(i).GetFamilyName() ); } maFont.SetSize(Size(0, 24)); maFont.SetWeight(WEIGHT_NORMAL); @@ -1757,7 +1757,7 @@ void SmSymDefineDialog::FillFonts(bool bDelete) { sal_uInt16 nCount = pFontList->GetFontNameCount(); for (sal_uInt16 i = 0; i < nCount; i++) - pFonts->InsertEntry( pFontList->GetFontName(i).GetName() ); + pFonts->InsertEntry( pFontList->GetFontName(i).GetFamilyName() ); } } @@ -2017,7 +2017,7 @@ void SmSymDefineDialog::UpdateButtons() && aTmpSymbolSetName.equalsIgnoreAsciiCase(pOldSymbolSetName->GetText()) && aTmpSymbolName.equals(pOrigSymbol->GetName()) && pFonts->GetSelectEntry().equalsIgnoreAsciiCase( - pOrigSymbol->GetFace().GetName()) + pOrigSymbol->GetFace().GetFamilyName()) && pStyles->GetText().equalsIgnoreAsciiCase( GetFontStyles().GetStyleName(pOrigSymbol->GetFace())) && pCharsetDisplay->GetSelectCharacter() == pOrigSymbol->GetCharacter(); @@ -2280,7 +2280,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, { // choose font and style accordingly const vcl::Font &rFont = pSymbol->GetFace(); - SelectFont(rFont.GetName(), false); + SelectFont(rFont.GetFamilyName(), false); SelectStyle(GetFontStyles().GetStyleName(rFont), false); // Since setting the Font via the Style name of the SymbolFonts doesn't diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index a5c92ed42780..d55c0335bf5e 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -336,7 +336,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool) vcl::Font aFont = OutputDevice::GetDefaultFont( rFntDta.nFontType, nLang, GetDefaultFontFlags::OnlyOne ); rEditEngineItemPool.SetPoolDefaultItem( - SvxFontItem( aFont.GetFamily(), aFont.GetName(), + SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), rFntDta.nFontInfoId ) ); } diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index 44dcd38aed22..17294ce15bca 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -88,7 +88,7 @@ OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ) return OutputDevice::GetDefaultFont( pTable[ nIdent ], nLang, - GetDefaultFontFlags::OnlyOne ).GetName(); + GetDefaultFontFlags::OnlyOne ).GetFamilyName(); } } diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 1e69966e151a..267a3ec889d3 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -129,7 +129,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight()); const FontMetric aFM (rDev.GetFontMetric()); - bool bIsMath = aFM.GetName().equalsIgnoreAsciiCase( FONTNAME_MATH ); + bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH ); bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText); const long nFontHeight = rDev.GetFont().GetSize().Height(); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 41ffd321941a..47a09b9379db 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -452,7 +452,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if(sFontName.isEmpty()) throw IllegalArgumentException(); - if(OUString(aFormat.GetFont((*ppEntries)->mnMemberId).GetName()) != sFontName) + if(OUString(aFormat.GetFont((*ppEntries)->mnMemberId).GetFamilyName()) != sFontName) { const SmFace rOld = aFormat.GetFont((*ppEntries)->mnMemberId); @@ -725,7 +725,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu case HANDLE_CUSTOM_FONT_NAME_FIXED : { const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId); - *pValue <<= OUString(rFace.GetName()); + *pValue <<= OUString(rFace.GetFamilyName()); } break; case HANDLE_CUSTOM_FONT_FIXED_POSTURE: @@ -877,7 +877,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter()); vcl::Font rFont = (*aIter)->GetFace(); - pDescriptor->sFontName = rFont.GetName(); + pDescriptor->sFontName = rFont.GetFamilyName(); pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet()); pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamily()); pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 6ac33fc2ce26..269abce3b17d 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -73,7 +73,7 @@ vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont) { - return rFirstFont.GetName() == rSecondFont.GetName() && + return rFirstFont.GetFamilyName() == rSecondFont.GetFamilyName() && rFirstFont.GetFamily() == rSecondFont.GetFamily() && rFirstFont.GetCharSet() == rSecondFont.GetCharSet() && rFirstFont.GetWeight() == rSecondFont.GetWeight() && @@ -82,7 +82,7 @@ bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & OUString SmFontPickList::GetStringItem(const vcl::Font &rFont) { - OUStringBuffer aString(rFont.GetName()); + OUStringBuffer aString(rFont.GetFamilyName()); if (IsItalic( rFont )) { diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 1c2742bd229f..0a78478eed72 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1036,7 +1036,7 @@ void FontNameBox::Fill( const FontList* pList ) for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { const vcl::FontInfo& rFontInfo = pList->GetFontName( i ); - sal_uLong nIndex = InsertEntry( rFontInfo.GetName() ); + sal_uLong nIndex = InsertEntry( rFontInfo.GetFamilyName() ); if ( nIndex != LISTBOX_ERROR ) { if ( nIndex < mpFontList->size() ) { @@ -1140,7 +1140,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) Rectangle aTextRect; // Preview the font name - OUString sFontName = rInfo.GetName(); + OUString sFontName = rInfo.GetFamilyName(); //If it shouldn't or can't draw its own name because it doesn't have the glyphs if (!canRenderNameOfSelectedFont(*pRenderContext)) @@ -1171,7 +1171,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) if (!bSymbolFont) { - const bool bNameBeginsWithLatinText = rInfo.GetName()[0] <= 'z'; + const bool bNameBeginsWithLatinText = rInfo.GetFamilyName()[0] <= 'z'; if (bNameBeginsWithLatinText || !bUsingCorrectFont) sSampleText = makeShortRepresentativeTextForSelectedFont(*pRenderContext); diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 6ed7b4301a16..282462e96188 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -259,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll, if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) ) continue; - OUString aSearchName(aFontInfo.GetName()); + OUString aSearchName(aFontInfo.GetFamilyName()); ImplFontListNameInfo* pData; sal_uLong nIndex; aSearchName = ImplMakeSearchString(aSearchName); @@ -483,13 +483,13 @@ OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const { - if ( rInfo.GetName().isEmpty() ) + if ( rInfo.GetFamilyName().isEmpty() ) { return OUString(); } // Search Fontname - ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); + ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() ); if ( !pData ) { if (maMapNotAvailable.isEmpty()) @@ -734,12 +734,12 @@ const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const } // use standard sizes if no name - if ( rInfo.GetName().isEmpty() ) + if ( rInfo.GetFamilyName().isEmpty() ) return aStdSizeAry; // first search fontname in order to use device from the matching font OutputDevice* pDevice = mpDev; - ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); + ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() ); if ( pData ) pDevice = pData->mpFirst->GetDevice(); diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 4296dbb3b093..08882904c682 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -57,7 +57,7 @@ void FontNameMenu::Fill( const FontList* pList ) sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) ); for (sal_uInt16 i = 0; i < nFontCount; ++i) { - const OUString& rName = pList->GetFontName( i ).GetName(); + const OUString& rName = pList->GetFontName( i ).GetFamilyName(); // sort with the I18nHelper sal_uInt16 j = GetItemCount(); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 54e62dbd1fff..c17068b4b9ee 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -18,7 +18,7 @@ // that caused it to be added static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevice) { - const OUString &rName = rDevice.GetFont().GetName(); + const OUString &rName = rDevice.GetFont().GetFamilyName(); if (rName == "GB18030 Bitmap") { @@ -104,49 +104,49 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic bool isOpenSymbolFont(const vcl::Font &rFont) { - return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") || - rFont.GetName().equalsIgnoreAsciiCase("opensymbol"); + return rFont.GetFamilyName().equalsIgnoreAsciiCase("starsymbol") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("opensymbol"); } bool isSymbolFont(const vcl::Font &rFont) { return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) || - rFont.GetName().equalsIgnoreAsciiCase("Apple Color Emoji") || - rFont.GetName().equalsIgnoreAsciiCase("cmsy10") || - rFont.GetName().equalsIgnoreAsciiCase("cmex10") || - rFont.GetName().equalsIgnoreAsciiCase("esint10") || - rFont.GetName().equalsIgnoreAsciiCase("feta26") || - rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmsy10") || - rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmex10") || - rFont.GetName().equalsIgnoreAsciiCase("msam10") || - rFont.GetName().equalsIgnoreAsciiCase("msbm10") || - rFont.GetName().equalsIgnoreAsciiCase("wasy10") || - rFont.GetName().equalsIgnoreAsciiCase("Denemo") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic1") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic2") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic3") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic4") || - rFont.GetName().equalsIgnoreAsciiCase("Letters Laughing") || - rFont.GetName().equalsIgnoreAsciiCase("MusiQwik") || - rFont.GetName().equalsIgnoreAsciiCase("MusiSync") || - rFont.GetName().equalsIgnoreAsciiCase("stmary10") || - rFont.GetName().equalsIgnoreAsciiCase("Symbol") || - rFont.GetName().startsWith("STIXIntegrals") || - rFont.GetName().startsWith("STIXNonUnicode") || - rFont.GetName().startsWith("STIXSize") || - rFont.GetName().startsWith("STIXVariants") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Apple Color Emoji") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("cmsy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("cmex10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("esint10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("feta26") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmsy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmex10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("msam10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("msbm10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("wasy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Denemo") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic1") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic2") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic3") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic4") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Letters Laughing") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiQwik") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiSync") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("stmary10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Symbol") || + rFont.GetFamilyName().startsWith("STIXIntegrals") || + rFont.GetFamilyName().startsWith("STIXNonUnicode") || + rFont.GetFamilyName().startsWith("STIXSize") || + rFont.GetFamilyName().startsWith("STIXVariants") || isOpenSymbolFont(rFont); } bool canRenderNameOfSelectedFont(OutputDevice &rDevice) { const vcl::Font &rFont = rDevice.GetFont(); - return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetName()) ); + return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetFamilyName()) ); } OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice) { - if (rDevice.GetFont().GetName() == "Symbol") + if (rDevice.GetFont().GetFamilyName() == "Symbol") { static const sal_Unicode aImplAppleSymbolText[] = { 0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0}; diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index c781d07440c4..c93e368f9ab1 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -672,7 +672,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl if ((pImpl->m_bCJKEnabled) || (pImpl->m_bCTLEnabled)) pImpl->maText = makeRepresentativeTextForFont(LATIN, rFont); else - pImpl->maText = rFont.GetName(); + pImpl->maText = rFont.GetFamilyName(); if (pImpl->m_bCJKEnabled) { diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index b0774fbf66a9..997fc5abc5cc 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -81,7 +81,7 @@ using ::com::sun::star::awt::XVclWindowPeer; css::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont ) { css::awt::FontDescriptor aFD; - aFD.Name = rFont.GetName(); + aFD.Name = rFont.GetFamilyName(); aFD.StyleName = rFont.GetStyleName(); aFD.Height = (sal_Int16)rFont.GetSize().Height(); aFD.Width = (sal_Int16)rFont.GetSize().Width(); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index e3494528e9e7..064ab41c857a 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -1562,10 +1562,8 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m if( eNumType == SVX_NUM_CHAR_SPECIAL) { sal_Unicode cChar = aFmt.GetBulletChar(); - //const vcl::Font* pFont = aFmt.GetBulletFont(); sal_Unicode ccChar = _pSet->sBulletChar[0]; - // rtl::OUString sFont = _pSet->sBulletFont; - if ( !((cChar == ccChar) && //pFont && sFont.compareTo(pFont->GetName()) && + if ( !((cChar == ccChar) && _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() && _pSet->nTabValue == aFmt.GetListtabPos() && _pSet->eNumAlign == aFmt.GetNumAdjust() && @@ -1632,8 +1630,6 @@ bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++) { SvxNumberFormat aFmt(aNum.GetLevel(iLevel)); - //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0]; - //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0]; sal_Int16 eNumType = aFmt.GetNumberingType(); NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); @@ -1648,9 +1644,9 @@ bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI { sal_Unicode cChar = aFmt.GetBulletChar(); OUString sChar(cChar); - _pSet->sBulletChar = sChar;//OUString(cChar); + _pSet->sBulletChar = sChar; if ( aFmt.GetBulletFont() ) - _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetName()); + _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetFamilyName()); _pSet->nNumberType = eNumType; pItemArr->bIsCustomized = true; }else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) { @@ -1668,7 +1664,7 @@ bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI _pSet->sSuffix = aFmt.GetSuffix(); _pSet->nNumberType = eNumType; if ( aFmt.GetBulletFont() ) - _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetName()); + _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetFamilyName()); pItemArr->bIsCustomized = true; } } @@ -1703,7 +1699,6 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex]; if (isDefault) pItemArr=pDefaultOutlineSettingsArrs[nIndex]; - //Font& rActBulletFont = lcl_GetDefaultBulletFont(); NumSettingsArr_Impl *pNumSettingsArr=pItemArr->pNumSettingsArr; NumSettings_Impl* pLevelSettings = nullptr; @@ -1717,7 +1712,6 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 break; SvxNumberFormat aFmt(aNum.GetLevel(i)); - //aFmt.SetBulletFont(&pLevelSettings->aFont); vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); if (pLevelSettings->nNumberType !=aFmt.GetNumberingType()) isResetSize=true; aFmt.SetNumberingType( pLevelSettings->nNumberType ); @@ -1725,7 +1719,7 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL) { if( pLevelSettings->sBulletFont.getLength() && - pLevelSettings->sBulletFont.compareTo(rActBulletFont.GetName())) + pLevelSettings->sBulletFont.compareTo(rActBulletFont.GetFamilyName())) { //search for the font if(!pList) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index ce8e2d44a0a8..18c17c906261 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -411,9 +411,9 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr vcl::Font aFnt(mpVD->GetFont()); const sal_uInt32 nHeight(FRound(aFnt.GetSize().Height() * mfScaleY)); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) ); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) ); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) ); + mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) ); + mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) ); + mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) ); mpTextAttr->Put(SvxPostureItem(aFnt.GetItalic(), EE_CHAR_ITALIC)); mpTextAttr->Put(SvxWeightItem(aFnt.GetWeight(), EE_CHAR_WEIGHT)); mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) ); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index d56e4bd07c55..75a2ac0b23ac 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -732,7 +732,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne)); aSvxFontItem.SetFamily(aFont.GetFamily()); - aSvxFontItem.SetFamilyName(aFont.GetName()); + aSvxFontItem.SetFamilyName(aFont.GetFamilyName()); aSvxFontItem.SetStyleName(OUString()); aSvxFontItem.SetPitch( aFont.GetPitch()); aSvxFontItem.SetCharSet( aFont.GetCharSet() ); @@ -741,7 +741,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt // get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne)); aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily()); - aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName()); + aSvxFontItemCJK.SetFamilyName(aFontCJK.GetFamilyName()); aSvxFontItemCJK.SetStyleName(OUString()); aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch()); aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet()); @@ -750,7 +750,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt // get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne)); aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily()); - aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName()); + aSvxFontItemCTL.SetFamilyName(aFontCTL.GetFamilyName()); aSvxFontItemCTL.SetStyleName(OUString()); aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() ); aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet()); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 74ae6157d032..7b3b82f63290 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1005,7 +1005,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem ) aCurFont.SetPitch ( pFontItem->GetPitch() ); aCurFont.SetCharSet ( pFontItem->GetCharSet() ); } - OUString aCurName = aCurFont.GetName(); + OUString aCurName = aCurFont.GetFamilyName(); if ( GetText() != aCurName ) SetText( aCurName ); } @@ -1144,7 +1144,7 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) aCurFont.GetItalic() ) ); SvxFontItem aFontItem( aInfo.GetFamily(), - aInfo.GetName(), + aInfo.GetFamilyName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), @@ -1171,7 +1171,7 @@ void SvxFontNameBox_Impl::Select() aCurFont = aInfo; pFontItem.reset( new SvxFontItem( aInfo.GetFamily(), - aInfo.GetName(), + aInfo.GetFamilyName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index f9137bc4b791..57cc458cbdf3 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -127,7 +127,7 @@ namespace vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType, nLng, GetDefaultFontFlags::OnlyOne ) ); - rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), + rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), OUString(), aFnt.GetPitch(), aFnt.GetCharSet(), aArr[n].nResFntId )); } @@ -156,7 +156,7 @@ namespace vcl::Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType, nLng, GetDefaultFontFlags::OnlyOne ) ); - rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), + rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), OUString(), aFnt.GetPitch(), aFnt.GetCharSet(), aArr[n].nResFntId )); } @@ -469,7 +469,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i], nLng, GetDefaultFontFlags::OnlyOne ) ); - aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), + aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), OUString(), aFnt.GetPitch(), aFnt.GetCharSet(), aFontWhich[i] )); } @@ -1202,7 +1202,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) { const vcl::Font& rBulletFont = numfunc::GetDefBulletFont(); SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(), - rBulletFont.GetName(), rBulletFont.GetStyleName(), + rBulletFont.GetFamilyName(), rBulletFont.GetStyleName(), rBulletFont.GetPitch(), rBulletFont.GetCharSet(), RES_CHRATR_FONT )); } break; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 2c1c57d4dcc3..bd5e6a52a191 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1620,7 +1620,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) m_aDelPam.GetMark()->nContent = 1; SetAllScriptItem( aSet, SvxFontItem( m_aFlags.aBulletFont.GetFamily(), - m_aFlags.aBulletFont.GetName(), + m_aFlags.aBulletFont.GetFamilyName(), m_aFlags.aBulletFont.GetStyleName(), m_aFlags.aBulletFont.GetPitch(), m_aFlags.aBulletFont.GetCharSet(), diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 60c2eed78c76..3f52b090a5fe 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -287,7 +287,7 @@ public: sal_uInt16 GetOrientation( const bool bVertLayout = false ) const; inline const OUString& GetName( const sal_uInt8 nWhich ) const - { return m_aSub[nWhich].GetName(); } + { return m_aSub[nWhich].GetFamilyName(); } inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const { return m_aSub[nWhich].GetLanguage(); } inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index c470a067f710..dc01d799dd9a 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -537,7 +537,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con { const sal_uInt8 nAct = pNumFnt->GetActual(); pNumFnt->SetFamily( pFormatFnt->GetFamily(), nAct ); - pNumFnt->SetName( pFormatFnt->GetName(), nAct ); + pNumFnt->SetName( pFormatFnt->GetFamilyName(), nAct ); pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct ); pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct ); pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct ); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 45c31bd6849a..36d598a8b7ec 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -376,7 +376,7 @@ sal_uInt16 SwFntObj::GetFontLeading( const SwViewShell *pSh, const OutputDevice& Interestingly enough, bSymbol is false for 'StarSymbol; Arial Unicode MS', so also check explicitly. */ - if( bSymbol || IsStarSymbol( pPrtFont->GetName())) + if( bSymbol || IsStarSymbol( pPrtFont->GetFamilyName())) nExtLeading = 0; } @@ -516,7 +516,7 @@ void SwFntObj::GuessLeading( const SwViewShell& pWin->SetFont( *pPrtFont ); const FontMetric aWinMet( pWin->GetFontMetric() ); const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() ); - if( pPrtFont->GetName().indexOf( aWinMet.GetName() ) != -1 ) + if( pPrtFont->GetFamilyName().indexOf( aWinMet.GetFamilyName() ) != -1 ) { // If the Leading on the Window is also 0, then it has to stay // that way (see also StarMath). diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 01e55e4f6901..9807a5aee509 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1086,7 +1086,7 @@ void SwTextNode::SetLanguageAndFont( const SwPaM &rPaM, if (pFont) { SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aSet.Get( nFontWhichId ) ); - aFontItem.SetFamilyName( pFont->GetName()); + aFontItem.SetFamilyName( pFont->GetFamilyName()); aFontItem.SetFamily( pFont->GetFamily()); aFontItem.SetStyleName( pFont->GetStyleName()); aFontItem.SetPitch( pFont->GetPitch()); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 910317c57cb9..ddc95491d23e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -816,7 +816,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) if( !pBulletFontNames[i].isEmpty() && !SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) && - (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetName() != pBulletFontNames[i]) + (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetFamilyName() != pBulletFontNames[i]) ) { const SvxFontListItem* pFontListItem = diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 4f4ebe5c7b68..6fbde2c9ee26 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1884,7 +1884,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, // same for fonts: if (!pBulletFontNames[i].isEmpty() && !SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) && - (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetName() != pBulletFontNames[i]) ) + (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != pBulletFontNames[i]) ) { const SvxFontListItem* pFontListItem = static_cast<const SvxFontListItem*>(pDoc->GetDocShell() diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 5c6f63ecf85d..aec0ecd8aa3b 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -116,7 +116,7 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCursor, SvStream& rIn, vcl::Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); if( pDoc->getIDocumentDeviceAccess().getPrinter( false ) ) aTextFont = pDoc->getIDocumentDeviceAccess().getPrinter( false )->GetFontMetric( aTextFont ); - SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(), + SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetFamilyName(), OUString(), aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); pItemSet->Put( aFont ); pItemSet->Put( aFont, RES_CHRATR_CJK_FONT ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 9d48671098d7..04d0c4a56b3b 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -613,7 +613,7 @@ static void lcl_html_setFixedFontProperty( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ) ); Any aTmp; - aTmp <<= OUString( aFixedFont.GetName() ); + aTmp <<= OUString( aFixedFont.GetFamilyName() ); rPropSet->setPropertyValue("FontName", aTmp ); aTmp <<= OUString( aFixedFont.GetStyleName() ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index b56cc4b7db5b..26bf90dbe1ab 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1078,7 +1078,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ) ); OUString aFName( *static_cast<OUString const *>(aTmp.getValue()) ); - if( !bEdit || aFName != aFixedFont.GetName() ) + if( !bEdit || aFName != aFixedFont.GetFamilyName() ) { FontFamily eFamily = FAMILY_DONTKNOW; if( xPropSetInfo->hasPropertyByName( "FontFamily" ) ) diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 6eff01aecd90..b696e7f9bcc3 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -332,7 +332,7 @@ void Writer::PutNumFormatFontsInAttrPool() bCheck = true; _AddFontItem( rPool, SvxFontItem( pFont->GetFamily(), - pFont->GetName(), pFont->GetStyleName(), + pFont->GetFamilyName(), pFont->GetStyleName(), pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT )); } } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 084254fd3599..9b58dd38a469 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -424,7 +424,7 @@ void MSWordExportBase::AbstractNumberingDefinitions() } eChrSet = pBulletFont->GetCharSet(); - sFontName = pBulletFont->GetName(); + sFontName = pBulletFont->GetFamilyName(); eFamily = pBulletFont->GetFamily(); if ( IsStarSymbol(sFontName) ) @@ -498,7 +498,7 @@ void MSWordExportBase::AbstractNumberingDefinitions() aSet.ClearItem( RES_CHRATR_FONT ); if ( sFontName.isEmpty() ) - sFontName = pBulletFont->GetName(); + sFontName = pBulletFont->GetFamilyName(); pPseudoFont = new wwFont( sFontName, pBulletFont->GetPitch(), eFamily, eChrSet); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2096b5e763f0..1807899f138c 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -641,7 +641,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType); - pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } @@ -717,7 +717,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) vcl::Font aFont( sStandard, Size( 0, 10 ) ); if( pPrinter ) aFont = pPrinter->GetFontMetric( aFont ); - m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFormatAttr(nFontWhich); @@ -829,7 +829,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) for( int i = 0; i < nFontNames; i++ ) { vcl::FontInfo aInf( m_pPrt->GetDevFont( i ) ); - aFontNames.insert( aInf.GetName() ); + aFontNames.insert( aInf.GetFamilyName() ); } // insert to listboxes diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index e92a5c2333ae..76c9a9a68ba7 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -191,7 +191,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh, for( int i = 0; i < nFontNames; i++ ) { vcl::FontInfo aInf( pPrt->GetDevFont( i ) ); - aFontNames.insert( aInf.GetName() ); + aFontNames.insert( aInf.GetFamilyName() ); } // insert into listbox @@ -205,7 +205,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh, { LanguageType eLang = aOpt.GetLanguage(); vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, eLang, GetDefaultFontFlags::OnlyOne, pPrt)); - aOpt.SetFontName(aTmpFont.GetName()); + aOpt.SetFontName(aTmpFont.GetFamilyName()); } m_pFontLB->SelectEntry( aOpt.GetFontName() ); diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 2844b23cde5b..448986570fb5 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -196,7 +196,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) aFont = pPrt->GetFontMetric( aFont ); } - pFontItem.reset(new SvxFontItem(aFont.GetFamily(), aFont.GetName(), + pFontItem.reset(new SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } else @@ -213,7 +213,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) nFontTypes[i], eLanguage, GetDefaultFontFlags::OnlyOne ); - pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(), + pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetFamilyName(), aEmptyOUStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich)); } m_pDoc->SetDefault(*pFontItem); @@ -281,7 +281,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) SfxItemState::SET != pColl->GetAttrSet().GetItemState( nFontWhich, false ) ) { - pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 8aa42336a9d5..1f30c3920c51 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -257,7 +257,7 @@ OUString SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLan nFontId = DefaultFontType::LATIN_TEXT; } vcl::Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, GetDefaultFontFlags::OnlyOne); - return aFont.GetName(); + return aFont.GetFamilyName(); } sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 041acaf960cb..44d3cb656a5d 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -981,7 +981,7 @@ void SwSrcEditWindow::SetFont() else aFont = OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE, Application::GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this); - sFontName = aFont.GetName(); + sFontName = aFont.GetFamilyName(); } const SvxFontListItem* pFontListItem = static_cast<const SvxFontListItem* >(pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST )); diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index fde324abb0f0..7a9b020743e3 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -151,7 +151,7 @@ SwHHCWrapper::~SwHHCWrapper() const vcl::Font *pFont = GetTargetFont(); if (pFont) { - SvxFontItem aFontItem( pFont->GetFamily(), pFont->GetName(), + SvxFontItem aFontItem( pFont->GetFamily(), pFont->GetFamilyName(), pFont->GetStyleName(), pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_CJK_FONT ); pDoc->SetDefault( aFontItem ); @@ -492,7 +492,7 @@ void SwHHCWrapper::ReplaceUnit( if (pTargetFont && pNewUnitLanguage) { SvxFontItem aFontItem(static_cast<const SvxFontItem&>( aSet.Get( RES_CHRATR_CJK_FONT ) )); - aFontItem.SetFamilyName( pTargetFont->GetName()); + aFontItem.SetFamilyName( pTargetFont->GetFamilyName()); aFontItem.SetFamily( pTargetFont->GetFamily()); aFontItem.SetStyleName( pTargetFont->GetStyleName()); aFontItem.SetPitch( pTargetFont->GetPitch()); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 2d46ca8ceda0..3e8b08591ab1 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -1723,7 +1723,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) if ( pCItem ) { sSym = pCItem->GetValue(); - aOpt.SetSymbolFont(aFont.GetName()); + aOpt.SetSymbolFont(aFont.GetFamilyName()); SW_MOD()->ApplyUsrPref(aOpt, &rView); } } @@ -1749,7 +1749,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // Attributing (set font) SfxItemSet aSetFont( *aFontSet.GetPool(), aFontSet.GetRanges() ); - SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(), + SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); @@ -1776,8 +1776,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); - if(!aFont.GetName().isEmpty()) - rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); + if(!aFont.GetFamilyName().isEmpty()) + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetFamilyName() ) ); rReq.Done(); } } diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 391d0f175f6d..6072b7ef53dc 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -760,7 +760,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) if ( pCItem ) { sSym = pCItem->GetValue(); - aOpt.SetSymbolFont(aFont.GetName()); + aOpt.SetSymbolFont(aFont.GetFamilyName()); SW_MOD()->ApplyUsrPref(aOpt, &rView); } } @@ -786,7 +786,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // assign attributes (Set font) SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() ); - SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(), + SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); @@ -813,8 +813,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); - if(!aFont.GetName().isEmpty()) - rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); + if(!aFont.GetFamilyName().isEmpty()) + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetFamilyName() ) ); rReq.Done(); } } diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 4834685bc6f1..4351a71bb75e 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -1054,7 +1054,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) if ( pCItem ) { aChars = pCItem->GetValue(); - aOpt.SetSymbolFont(aNewFont.GetName()); + aOpt.SetSymbolFont(aNewFont.GetFamilyName()); SW_MOD()->ApplyUsrPref(aOpt, &GetView()); } } @@ -1090,10 +1090,10 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) rSh.Insert( aChars ); // #108876# a font attribute has to be set always due to a guessed script type - if( !aNewFont.GetName().isEmpty() ) + if( !aNewFont.GetFamilyName().isEmpty() ) { SvxFontItem aNewFontItem( aFont ); - aNewFontItem.SetFamilyName( aNewFont.GetName()); + aNewFontItem.SetFamilyName( aNewFont.GetFamilyName() ); aNewFontItem.SetFamily( aNewFont.GetFamily()); aNewFontItem.SetPitch( aNewFont.GetPitch()); aNewFontItem.SetCharSet( aNewFont.GetCharSet() ); @@ -1144,7 +1144,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) if ( !aChars.isEmpty() ) { rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), aChars ) ); - rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aNewFont.GetName() ) ); + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aNewFont.GetFamilyName() ) ); rReq.Done(); } } diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index aa42a08faf43..85b006f4736f 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -376,7 +376,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) rWriter.attribute("color", convertColorToString(aFont.GetColor())); rWriter.attribute("fillcolor", convertColorToString(aFont.GetFillColor())); - rWriter.attribute("name", aFont.GetName()); + rWriter.attribute("name", aFont.GetFamilyName()); rWriter.attribute("stylename", aFont.GetStyleName()); rWriter.attribute("width", aFont.GetSize().Width()); rWriter.attribute("height", aFont.GetSize().Height()); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index b604f7f080aa..71264785e64e 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -366,7 +366,7 @@ FontItalic VCLUnoHelper::ConvertFontSlant(css::awt::FontSlant eSlant) css::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const vcl::Font& rFont ) { css::awt::FontDescriptor aFD; - aFD.Name = rFont.GetName(); + aFD.Name = rFont.GetFamilyName(); aFD.StyleName = rFont.GetStyleName(); aFD.Height = (sal_Int16)rFont.GetSize().Height(); aFD.Width = (sal_Int16)rFont.GetSize().Width(); 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 86c21124e284..515d56ba6c9a 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1032,7 +1032,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 dbb9ad3a7a34..3b15cd94fae4 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -358,7 +358,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; @@ -490,7 +490,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 ); @@ -945,7 +945,7 @@ void WMFWriter::SetAllAttr() if ( aDstFont != aSrcFont ) { pVirDev->SetFont(aSrcFont); - if ( aDstFont.GetName() != aSrcFont.GetName() ) + if ( aDstFont.GetFamilyName() != aSrcFont.GetFamilyName() ) { FontCharMapPtr pFontCharMap; if ( pVirDev->GetFontCharMap( pFontCharMap ) ) diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 71e86bf6a759..10131548c0b6 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/font.cxx b/vcl/source/gdi/font.cxx index 827bfdb23b09..14ad619f29c5 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -559,9 +559,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() ); @@ -928,7 +928,7 @@ bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } -const OUString& Font::GetName() const { return mpImplFont->maFamilyName; } +const OUString& Font::GetFamilyName() const { return mpImplFont->maFamilyName; } const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; } 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 06e077ceb441..39cd9a301e4e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4714,7 +4714,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() ) @@ -4744,7 +4744,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 e7f866d4c475..a7c8b3a41bf2 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -121,7 +121,7 @@ int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const delete mpGetDevSizeList; ImplInitFontList(); - mpGetDevSizeList = mpFontCollection->GetDevSizeList( rFont.GetName() ); + mpGetDevSizeList = mpFontCollection->GetDevSizeList( rFont.GetFamilyName() ); return mpGetDevSizeList->Count(); } @@ -204,7 +204,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( pMetric->GetStyleName() ); aMetric.SetSize( PixelToLogic( Size( pMetric->mnWidth, pMetric->mnAscent+pMetric->mnDescent-pMetric->mnIntLeading ) ) ); aMetric.SetCharSet( pMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); @@ -898,7 +898,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 ) { @@ -1268,7 +1268,7 @@ ImplFontCache::~ImplFontCache() ImplFontEntry* ImplFontCache::GetFontEntry( 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/window/window.cxx b/vcl/source/window/window.cxx index 2c4164eae76a..293d735ed4c4 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1889,7 +1889,7 @@ void Window::ImplNewInputContext() SalInputContext aNewContext; const vcl::Font& rFont = rInputContext.GetFont(); - const OUString& rFontName = rFont.GetName(); + const OUString& rFontName = rFont.GetFamilyName(); ImplFontEntry* pFontEntry = nullptr; aNewContext.mpFont = nullptr; if (!rFontName.isEmpty()) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index d39810a8f44a..45368093be5f 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/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index b3b7cb35f017..215205dc5534 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/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" ) ) { |