diff options
65 files changed, 242 insertions, 228 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index bfbacd95a90c..0cd974176672 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -239,7 +239,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.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); + aSet.Put( SvxFontItem( aCurFont.GetFamilyTypeMaybeAskConfig(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitchMaybeAskConfig(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr)); pDlg->StartExecuteAsync( diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index 1d042ae30f7c..ce7b214fa691 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -363,9 +363,9 @@ void CharacterProperties::AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, aFont.GetFamilyName() ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, aFont.GetStyleName() ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamilyType()) );//awt::FontFamily::SWISS + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamilyTypeMaybeAskConfig()) );//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 - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_PITCH, sal_Int16(aFont.GetPitch()) );//awt::FontPitch::VARIABLE + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_PITCH, sal_Int16(aFont.GetPitchMaybeAskConfig()) );//awt::FontPitch::VARIABLE ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COLOR, COL_AUTO ); //automatic color ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CHAR_HEIGHT, fDefaultFontHeight ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE ); @@ -393,9 +393,9 @@ void CharacterProperties::AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_LOCALE, aDefaultLocale_CJK ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, aFontCJK.GetFamilyName() ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, aFontCJK.GetStyleName() ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamilyType()) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamilyTypeMaybeAskConfig()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_SET, sal_Int16(aFontCJK.GetCharSet()) ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_PITCH, sal_Int16(aFontCJK.GetPitch()) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_PITCH, sal_Int16(aFontCJK.GetPitchMaybeAskConfig()) ); // Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex) ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultFontHeight ); @@ -404,9 +404,9 @@ void CharacterProperties::AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_LOCALE, aDefaultLocale_CTL ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, aFontCTL.GetFamilyName() ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, aFontCTL.GetStyleName() ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamilyType()) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamilyTypeMaybeAskConfig()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_SET, sal_Int16(aFontCTL.GetCharSet()) ); - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_PITCH, sal_Int16(aFontCTL.GetPitch()) ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_PITCH, sal_Int16(aFontCTL.GetPitchMaybeAskConfig()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_WRITING_MODE, sal_Int16( css::text::WritingMode2::PAGE ) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PARA_IS_CHARACTER_DISTANCE, true ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 1a8a6630aae1..cbc58dfedaed 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -425,13 +425,13 @@ namespace _rFont.SetLanguage(_pLanguageLB->get_active_id()); - _rFont.SetFamily( aFontMetrics.GetFamilyType() ); + _rFont.SetFamily( aFontMetrics.GetFamilyTypeMaybeAskConfig() ); _rFont.SetFamilyName( aFontMetrics.GetFamilyName() ); _rFont.SetStyleName( aFontMetrics.GetStyleName() ); - _rFont.SetPitch( aFontMetrics.GetPitch() ); + _rFont.SetPitch( aFontMetrics.GetPitchMaybeAskConfig() ); _rFont.SetCharSet( aFontMetrics.GetCharSet() ); - _rFont.SetWeight( aFontMetrics.GetWeight() ); - _rFont.SetItalic( aFontMetrics.GetItalic() ); + _rFont.SetWeight( aFontMetrics.GetWeightMaybeAskConfig() ); + _rFont.SetItalic( aFontMetrics.GetItalicMaybeAskConfig() ); _rFont.SetFontSize( aFontMetrics.GetFontSize() ); return aFontMetrics; @@ -874,8 +874,8 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if (nEntryPos >= m_pImpl->m_nExtraEntryPos) aStyleBoxText.clear(); FontMetric aInfo( pFontList->Get( aFontName, aStyleBoxText ) ); - SvxFontItem aFontItem( aInfo.GetFamilyType(), aInfo.GetFamilyName(), aInfo.GetStyleName(), - aInfo.GetPitch(), aInfo.GetCharSet(), nWhich ); + SvxFontItem aFontItem( aInfo.GetFamilyTypeMaybeAskConfig(), aInfo.GetFamilyName(), aInfo.GetStyleName(), + aInfo.GetPitchMaybeAskConfig(), aInfo.GetCharSet(), nWhich ); pOld = GetOldItem( rSet, nSlot ); if ( pOld ) @@ -911,7 +911,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp case Ctl : nSlot = SID_ATTR_CHAR_CTL_WEIGHT; break; } nWhich = GetWhich( nSlot ); - FontWeight eWeight = aInfo.GetWeight(); + FontWeight eWeight = aInfo.GetWeightMaybeAskConfig(); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) eWeight = WEIGHT_NORMAL; SvxWeightItem aWeightItem( eWeight, nWhich ); @@ -930,7 +930,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = pStyleBox->get_saved_value().isEmpty(); if ( m_pImpl->m_bInSearchMode && bChanged && - aInfo.GetWeight() == WEIGHT_NORMAL && aInfo.GetItalic() != ITALIC_NONE ) + aInfo.GetWeightMaybeAskConfig() == WEIGHT_NORMAL && aInfo.GetItalicMaybeAskConfig() != ITALIC_NONE ) bChanged = false; } @@ -960,7 +960,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp case Ctl : nSlot = SID_ATTR_CHAR_CTL_POSTURE; break; } nWhich = GetWhich( nSlot ); - FontItalic eItalic = aInfo.GetItalic(); + FontItalic eItalic = aInfo.GetItalicMaybeAskConfig(); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) eItalic = ITALIC_NONE; SvxPostureItem aPostureItem( eItalic, nWhich ); @@ -979,7 +979,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = pStyleBox->get_saved_value().isEmpty(); if ( m_pImpl->m_bInSearchMode && bChanged && - aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL ) + aInfo.GetItalicMaybeAskConfig() == ITALIC_NONE && aInfo.GetWeightMaybeAskConfig() != WEIGHT_NORMAL ) bChanged = false; } diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 70aa8b23aff2..184fde58b2b3 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -96,13 +96,13 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool) Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get()); vcl::Font aAppFont(sFontName, aFontSize); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO)); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK)); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL)); diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index d7f7bda645f6..6322c4b194dd 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -662,13 +662,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.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); + SvxFontItem aFontItem( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); aItems.Put( aFontItem ); - SvxFontItem aFontItemCJK( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); + SvxFontItem aFontItemCJK( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); aItems.Put( aFontItemCJK ); - SvxFontItem aFontItemCTL( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); + SvxFontItem aFontItemCTL( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); aItems.Put( aFontItemCTL ); } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 3170279eb7e9..3a244b061493 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -156,8 +156,8 @@ 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( GetFont( nDefFont ) ); - SvxFontItem aFontItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), - aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); + SvxFontItem aFontItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(), + aDefFont.GetStyleName(), aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); sal_Int32 nStartPara = mpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); sal_Int32 nEndPara = mpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() ); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 769179748b40..84ddc4a9de1f 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -64,7 +64,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom ) vcl::Font _aFont = GetFont(); vcl::Font aNewFont = rCopyFrom.GetFont(); _aFont.SetFamilyName( aNewFont.GetFamilyName() ); - _aFont.SetFamily( aNewFont.GetFamilyType() ); + _aFont.SetFamily( aNewFont.GetFamilyTypeMaybeAskConfig() ); _aFont.SetStyleName( aNewFont.GetStyleName() ); _aFont.SetColor( aNewFont.GetColor() ); SetSymbol( rCopyFrom.cSymbol ); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 22647b09669f..5adfabe97c72 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2931,10 +2931,10 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo aOutTypeArr[ n ].nLanguage, GetDefaultFontFlags::OnlyOne ) ); SvxFontItem* pItem = aItemArr[ n ]; - pItem->SetFamily( aFont.GetFamilyType() ); + pItem->SetFamily( aFont.GetFamilyTypeMaybeAskConfig() ); pItem->SetFamilyName( aFont.GetFamilyName() ); pItem->SetStyleName( OUString() ); - pItem->SetPitch( aFont.GetPitch()); + pItem->SetPitch( aFont.GetPitchMaybeAskConfig()); pItem->SetCharSet(aFont.GetCharSet()); } } diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index f1f1825c523a..6b634e473c1c 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -627,11 +627,11 @@ void SvxSwAutoCorrCfg::ImplCommit() // "Format/Option/ChangeToBullets/SpecialCharacter/Char" css::uno::Any(rSwFlags.aBulletFont.GetFamilyName()), // "Format/Option/ChangeToBullets/SpecialCharacter/Font" - css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetFamilyType())), + css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetFamilyTypeMaybeAskConfig())), // "Format/Option/ChangeToBullets/SpecialCharacter/FontFamily" css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetCharSet())), // "Format/Option/ChangeToBullets/SpecialCharacter/FontCharset" - css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetPitch())), + css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetPitchMaybeAskConfig())), // "Format/Option/ChangeToBullets/SpecialCharacter/FontPitch" css::uno::Any(rSwFlags.bRightMargin), // "Format/Option/CombineParagraphs" @@ -671,11 +671,11 @@ void SvxSwAutoCorrCfg::ImplCommit() // "Format/ByInput/ApplyNumbering/SpecialCharacter/Char" css::uno::Any(rSwFlags.aByInputBulletFont.GetFamilyName()), // "Format/ByInput/ApplyNumbering/SpecialCharacter/Font" - css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetFamilyType())), + css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetFamilyTypeMaybeAskConfig())), // "Format/ByInput/ApplyNumbering/SpecialCharacter/FontFamily" css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetCharSet())), // "Format/ByInput/ApplyNumbering/SpecialCharacter/FontCharset" - css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetPitch())), + css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetPitchMaybeAskConfig())), // "Format/ByInput/ApplyNumbering/SpecialCharacter/FontPitch" css::uno::Any(rSwFlags.bSetDOIAttr), css::uno::Any(rSwFlags.bSetNumRuleAfterSpace), // "Format/ByInput/ApplyNumberingAfterSpace" diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 2adab8f069ba..1628b465a449 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -516,10 +516,10 @@ namespace pcr typedef std::array<ItemInfoStatic, FontItemIds::CFID_LAST_ITEM_ID - FontItemIds::CFID_FIRST_ITEM_ID + 1> ItemInfoArrayCntChrDlg; ItemInfoArrayCntChrDlg maItemInfos {{ // m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags - { FontItemIds::CFID_FONT, new SvxFontItem(maDefaultVCLFont.GetFamilyType(), maDefaultVCLFont.GetFamilyName(), maDefaultVCLFont.GetStyleName(), maDefaultVCLFont.GetPitch(), maDefaultVCLFont.GetCharSet(), FontItemIds::CFID_FONT), SID_ATTR_CHAR_FONT, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_FONT, new SvxFontItem(maDefaultVCLFont.GetFamilyTypeMaybeAskConfig(), maDefaultVCLFont.GetFamilyName(), maDefaultVCLFont.GetStyleName(), maDefaultVCLFont.GetPitchMaybeAskConfig(), maDefaultVCLFont.GetCharSet(), FontItemIds::CFID_FONT), SID_ATTR_CHAR_FONT, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_HEIGHT, new SvxFontHeightItem(maDefaultVCLFont.GetFontHeight(), 100, FontItemIds::CFID_HEIGHT), SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEMINFOFLAG_NONE }, - { FontItemIds::CFID_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeight(), FontItemIds::CFID_WEIGHT), SID_ATTR_CHAR_WEIGHT, SFX_ITEMINFOFLAG_NONE }, - { FontItemIds::CFID_POSTURE, new SvxPostureItem(maDefaultVCLFont.GetItalic(), FontItemIds::CFID_POSTURE), SID_ATTR_CHAR_POSTURE, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeightMaybeAskConfig(), FontItemIds::CFID_WEIGHT), SID_ATTR_CHAR_WEIGHT, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_POSTURE, new SvxPostureItem(maDefaultVCLFont.GetItalicMaybeAskConfig(), FontItemIds::CFID_POSTURE), SID_ATTR_CHAR_POSTURE, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_LANGUAGE, new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), FontItemIds::CFID_LANGUAGE), SID_ATTR_CHAR_LANGUAGE, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_UNDERLINE, new SvxUnderlineItem(maDefaultVCLFont.GetUnderline(), FontItemIds::CFID_UNDERLINE), SID_ATTR_CHAR_UNDERLINE, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_STRIKEOUT, new SvxCrossedOutItem(maDefaultVCLFont.GetStrikeout(), FontItemIds::CFID_STRIKEOUT), SID_ATTR_CHAR_STRIKEOUT, SFX_ITEMINFOFLAG_NONE }, @@ -527,10 +527,10 @@ namespace pcr { FontItemIds::CFID_CHARCOLOR, new SvxColorItem(maDefaultVCLFont.GetColor(), FontItemIds::CFID_CHARCOLOR), SID_ATTR_CHAR_COLOR, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_RELIEF, new SvxCharReliefItem(maDefaultVCLFont.GetRelief(), FontItemIds::CFID_RELIEF), SID_ATTR_CHAR_RELIEF, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_EMPHASIS, new SvxEmphasisMarkItem(maDefaultVCLFont.GetEmphasisMark(), FontItemIds::CFID_EMPHASIS), SID_ATTR_CHAR_EMPHASISMARK, SFX_ITEMINFOFLAG_NONE }, - { FontItemIds::CFID_CJK_FONT, new SvxFontItem(maDefaultVCLFont.GetFamilyType(), maDefaultVCLFont.GetFamilyName(), maDefaultVCLFont.GetStyleName(), maDefaultVCLFont.GetPitch(), maDefaultVCLFont.GetCharSet(), FontItemIds::CFID_CJK_FONT), 0, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_CJK_FONT, new SvxFontItem(maDefaultVCLFont.GetFamilyTypeMaybeAskConfig(), maDefaultVCLFont.GetFamilyName(), maDefaultVCLFont.GetStyleName(), maDefaultVCLFont.GetPitchMaybeAskConfig(), maDefaultVCLFont.GetCharSet(), FontItemIds::CFID_CJK_FONT), 0, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_CJK_HEIGHT, new SvxFontHeightItem(maDefaultVCLFont.GetFontHeight(), 100, FontItemIds::CFID_CJK_HEIGHT), 0, SFX_ITEMINFOFLAG_NONE }, - { FontItemIds::CFID_CJK_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeight(), FontItemIds::CFID_CJK_WEIGHT), 0, SFX_ITEMINFOFLAG_NONE }, - { FontItemIds::CFID_CJK_POSTURE, new SvxPostureItem(maDefaultVCLFont.GetItalic(), FontItemIds::CFID_CJK_POSTURE), 0, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_CJK_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeightMaybeAskConfig(), FontItemIds::CFID_CJK_WEIGHT), 0, SFX_ITEMINFOFLAG_NONE }, + { FontItemIds::CFID_CJK_POSTURE, new SvxPostureItem(maDefaultVCLFont.GetItalicMaybeAskConfig(), FontItemIds::CFID_CJK_POSTURE), 0, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_CJK_LANGUAGE, new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), FontItemIds::CFID_CJK_LANGUAGE), 0, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_CASEMAP, new SvxCaseMapItem(SvxCaseMap::NotMapped, FontItemIds::CFID_CASEMAP), 0, SFX_ITEMINFOFLAG_NONE }, { FontItemIds::CFID_CONTOUR, new SvxContourItem(false, FontItemIds::CFID_CONTOUR), 0, SFX_ITEMINFOFLAG_NONE }, diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index c31a2f53b467..e6b514169ff8 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -206,13 +206,13 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont ) const Size aSize( nFontEM, nFontEM ); // Font Weight - if( aFont.GetWeight() != WEIGHT_NORMAL ) + if( aFont.GetWeightMaybeAskConfig() != WEIGHT_NORMAL ) aFontWeight = "bold"; else aFontWeight = "normal"; // Font Italic - if( aFont.GetItalic() != ITALIC_NONE ) + if( aFont.GetItalicMaybeAskConfig() != ITALIC_NONE ) aFontStyle = "italic"; else aFontStyle = "normal"; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 00c3f1eb0e40..9863c891aa87 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -444,14 +444,14 @@ void SVGAttributeWriter::setFontFamily() { const OUString& rsFontName = rCurFont.GetFamilyName(); OUString sFontFamily( rsFontName.getToken( 0, ';' ) ); - FontPitch ePitch = rCurFont.GetPitch(); + FontPitch ePitch = rCurFont.GetPitchMaybeAskConfig(); if( ePitch == PITCH_FIXED ) { sFontFamily += ", monospace"; } else { - FontFamily eFamily = rCurFont.GetFamilyType(); + FontFamily eFamily = rCurFont.GetFamilyTypeMaybeAskConfig(); if( eFamily == FAMILY_ROMAN ) sFontFamily += ", serif"; else if( eFamily == FAMILY_SWISS ) @@ -846,13 +846,13 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer ) const OUString& rsCurFontName = maCurrentFont.GetFamilyName(); tools::Long nCurFontSize = maCurrentFont.GetFontHeight(); - FontItalic eCurFontItalic = maCurrentFont.GetItalic(); - FontWeight eCurFontWeight = maCurrentFont.GetWeight(); + FontItalic eCurFontItalic = maCurrentFont.GetItalicMaybeAskConfig(); + FontWeight eCurFontWeight = maCurrentFont.GetWeightMaybeAskConfig(); const OUString& rsParFontName = maParentFont.GetFamilyName(); tools::Long nParFontSize = maParentFont.GetFontHeight(); - FontItalic eParFontItalic = maParentFont.GetItalic(); - FontWeight eParFontWeight = maParentFont.GetWeight(); + FontItalic eParFontItalic = maParentFont.GetItalicMaybeAskConfig(); + FontWeight eParFontWeight = maParentFont.GetWeightMaybeAskConfig(); // Font Family @@ -955,14 +955,14 @@ void SVGTextWriter::implSetFontFamily() { const OUString& rsFontName = maCurrentFont.GetFamilyName(); OUString sFontFamily( rsFontName.getToken( 0, ';' ) ); - FontPitch ePitch = maCurrentFont.GetPitch(); + FontPitch ePitch = maCurrentFont.GetPitchMaybeAskConfig(); if( ePitch == PITCH_FIXED ) { sFontFamily += ", monospace"; } else { - FontFamily eFamily = maCurrentFont.GetFamilyType(); + FontFamily eFamily = maCurrentFont.GetFamilyTypeMaybeAskConfig(); if( eFamily == FAMILY_ROMAN ) sFontFamily += ", serif"; else if( eFamily == FAMILY_SWISS ) diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 6be1d246e190..325d27c9bd29 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -56,7 +56,7 @@ namespace frm // defaults vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont(); aFont.SetFamilyName( u"Times New Roman"_ustr ); - pPool->SetUserDefaultItem( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) ); + pPool->SetUserDefaultItem( SvxFontItem( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) ); // 12 pt font size MapMode aPointMapMode( MapUnit::MapPoint ); diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index ae29172989e7..16f946fc61cd 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -56,17 +56,17 @@ public: virtual ~Font(); const OUString& GetFamilyName() const; - FontFamily GetFamilyType(); + FontFamily GetFamilyTypeMaybeAskConfig(); FontFamily GetFamilyType() const; const OUString& GetStyleName() const; - FontWeight GetWeight(); + FontWeight GetWeightMaybeAskConfig(); FontWeight GetWeight() const; - FontItalic GetItalic(); + FontItalic GetItalicMaybeAskConfig(); FontItalic GetItalic() const; - FontPitch GetPitch(); + FontPitch GetPitchMaybeAskConfig(); FontPitch GetPitch() const; - FontWidth GetWidthType(); + FontWidth GetWidthTypeMaybeAskConfig(); FontWidth GetWidthType() const; TextAlign GetAlignment() const; rtl_TextEncoding GetCharSet() const; diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 635a27585f97..4034ab23e188 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -198,10 +198,10 @@ void ScModelTestBase::testFormats(ScDocument* pDoc,std::u16string_view sFormat) CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), aFont.GetFontSize().getHeight()); pPattern = pDoc->GetPattern(0,2,1); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalicMaybeAskConfig()); pPattern = pDoc->GetPattern(0,4,1); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeightMaybeAskConfig()); pPattern = pDoc->GetPattern(1,0,1); pPattern->fillFontOnly(aFont); pPattern->fillColor(aComplexColor, ScAutoFontColorMode::Raw); diff --git a/sc/qa/unit/subsequent_export_test4.cxx b/sc/qa/unit/subsequent_export_test4.cxx index e0c129063fd6..87a225a2cf77 100644 --- a/sc/qa/unit/subsequent_export_test4.cxx +++ b/sc/qa/unit/subsequent_export_test4.cxx @@ -1580,13 +1580,15 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold) CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0)); vcl::Font aFont; pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); saveAndReload(u"Calc Office Open XML"_ustr); pDoc = getScDoc(); CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScExportTest4, testXlsxRowsOrder) diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d91355ef0d48..2e1c8fc40341 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1435,7 +1435,7 @@ CPPUNIT_TEST_FIXTURE(Test, testIteratorsUnallocatedColumnsAttributes) vcl::Font aFont; const ScPatternAttr* pattern = m_pDoc->GetPattern(m_pDoc->MaxCol(), 1, 0); pattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeightMaybeAskConfig()); // Test iterators. ScDocAttrIterator docit( *m_pDoc, 0, allocatedColsCount - 1, 1, allocatedColsCount, 2 ); diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 86e638a5dc03..375aa5fe8be3 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -1939,7 +1939,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed) const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0); vcl::Font aFont; pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A1:A3"_ustr); @@ -1965,7 +1966,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed) pPattern = pDoc->GetPattern(1, 0, 0); pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } // Test the call of .uno:PasteAsLink (tdf#90101) @@ -1994,7 +1996,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0); vcl::Font aFont; pPattern->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A1:A3"_ustr); @@ -2018,7 +2021,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) pPattern = pDoc->GetPattern(2, 1, 0); pPattern->fillFontOnly(aFont); CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be normal (cell attributes should not be copied)", - WEIGHT_NORMAL, aFont.GetWeight()); + WEIGHT_NORMAL, aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119659) diff --git a/sc/qa/unit/uicalc/uicalc2.cxx b/sc/qa/unit/uicalc/uicalc2.cxx index 83bf9fcd36f5..253fb35c4b9d 100644 --- a/sc/qa/unit/uicalc/uicalc2.cxx +++ b/sc/qa/unit/uicalc/uicalc2.cxx @@ -1319,16 +1319,19 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes) CPPUNIT_ASSERT_EQUAL(INITIALCOLCOUNT, pDoc->GetAllocatedColumnsCount(0)); vcl::Font aFont; pDoc->GetPattern(pDoc->MaxCol(), 0, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); goToCell(u"A2:CV2"_ustr); // first 100 cells in row 2 dispatchCommand(mxComponent, u".uno:Bold"_ustr, {}); // These need to be explicitly allocated. CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(99, 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); pDoc->GetPattern(100, 1, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, + aFont.GetWeightMaybeAskConfig()); goToCell("CW3:" + pDoc->MaxColAsString() + "3"); // All but first 100 cells in row 3. dispatchCommand(mxComponent, u".uno:Bold"_ustr, {}); @@ -1336,9 +1339,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes) // by the default attribute. CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0)); pDoc->GetPattern(99, 2, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should not be bold", WEIGHT_NORMAL, + aFont.GetWeightMaybeAskConfig()); pDoc->GetPattern(100, 2, 0)->fillFontOnly(aFont); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be bold", WEIGHT_BOLD, + aFont.GetWeightMaybeAskConfig()); } CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testAutoSum) diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 7a1000ca3cce..9247f16d25e2 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -77,8 +77,8 @@ namespace { SvxFontItem* getDefaultFontItem(LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId) { vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne ); - SvxFontItem* pNewItem = new SvxFontItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), - aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId ); + SvxFontItem* pNewItem = new SvxFontItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), + aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), nItemId ); return pNewItem; } diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 78a2a1339a63..2dde31f721ef 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -243,8 +243,8 @@ 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.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), - aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId ); + SvxFontItem aNewItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(), + aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), nItemId ); if ( aNewItem != rSet.Get( nItemId ) ) { // put item into style's ItemSet only if different from (static) default diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index d6a178bf1894..599e28af1035 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -671,20 +671,20 @@ ScAutoFormat::ScAutoFormat() : vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aFontItem( - aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), - aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT ); + aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), + aStdFont.GetPitchMaybeAskConfig(), aStdFont.GetCharSet(), ATTR_FONT ); aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aCJKFontItem( - aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), - aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CJK_FONT ); + aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), + aStdFont.GetPitchMaybeAskConfig(), aStdFont.GetCharSet(), ATTR_CJK_FONT ); aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne ); SvxFontItem aCTLFontItem( - aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), - aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CTL_FONT ); + aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(), + aStdFont.GetPitchMaybeAskConfig(), 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 18ea2dc3484a..ee3d7544e5e5 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -750,8 +750,8 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico // font name and style aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() ); - aNewData.mnWeight = (aFont.GetWeight() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL; - aNewData.mbItalic = (aFont.GetItalic() != ITALIC_NONE); + aNewData.mnWeight = (aFont.GetWeightMaybeAskConfig() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL; + aNewData.mbItalic = (aFont.GetItalicMaybeAskConfig() != ITALIC_NONE); bool bNewFont = (aFontData.maName != aNewData.maName); bool bNewStyle = (aFontData.mnWeight != aNewData.mnWeight) || (aFontData.mbItalic != aNewData.mbItalic); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 0c859e6be53f..314f6f0daaec 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -227,8 +227,8 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) if( const FontList* pFontList = pInfoItem->GetFontList() ) { FontMetric aFontMetric( pFontList->Get( maData.maName, maData.maStyle ) ); - maData.SetScWeight( aFontMetric.GetWeight() ); - maData.SetScPosture( aFontMetric.GetItalic() ); + maData.SetScWeight( aFontMetric.GetWeightMaybeAskConfig() ); + maData.SetScPosture( aFontMetric.GetItalicMaybeAskConfig() ); } } } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index d5d00a2f04bd..d31a1a392654 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -228,8 +228,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const OUString& aFontName(pFontItem->GetValue()); vcl::Font aFont(aFontName, Size(1,1)); // Size only because of CTOR aNewItem = std::make_shared<SvxFontItem>( - aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), + aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), ATTR_FONT); } else diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 72f9fba8c945..91a1143f2695 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2853,7 +2853,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxAllItemSet aSet( GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); - aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) ); + aSet.Put( SvxFontItem( aCurFont.GetFamilyTypeMaybeAskConfig(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitchMaybeAskConfig(), aCurFont.GetCharSet(), GetPool().GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) ); SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame(); auto xFrame = rViewFrame.GetFrame().GetFrameInterface(); VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame)); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 3e8a5abe7b1d..d080502eeffe 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -410,8 +410,8 @@ void ScEditShell::Execute( SfxRequest& rReq ) vcl::Font aFont(aFontName, Size(1,1)); // Size just because CTOR // tdf#125054 see comment in drtxob.cxx, same ID aNewItem = std::make_shared<SvxFontItem>( - aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), + aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), ATTR_FONT); } else diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index f696c09ae95f..de0005098693 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -194,13 +194,13 @@ void SdDrawDocument::CreateLayoutTemplates() getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); - SvxFontItem aSvxFontItem( aLatinFont.GetFamilyType(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamilyTypeMaybeAskConfig(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitchMaybeAskConfig(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyType(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyTypeMaybeAskConfig(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitchMaybeAskConfig(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyType(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyTypeMaybeAskConfig(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitchMaybeAskConfig(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); rISet.Put( aSvxFontItem ); @@ -652,13 +652,13 @@ void SdDrawDocument::CreateDefaultCellStyles() getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); - SvxFontItem aSvxFontItem( aLatinFont.GetFamilyType(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamilyTypeMaybeAskConfig(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitchMaybeAskConfig(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyType(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyTypeMaybeAskConfig(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitchMaybeAskConfig(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyType(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyTypeMaybeAskConfig(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitchMaybeAskConfig(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool()); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 23a41e8df5cf..69a5fe18de37 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -185,13 +185,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(std::u16string_view rLayoutName, mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); // Font for title and outline - SvxFontItem aSvxFontItem( aLatinFont.GetFamilyType(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(), + SvxFontItem aSvxFontItem( aLatinFont.GetFamilyTypeMaybeAskConfig(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitchMaybeAskConfig(), aLatinFont.GetCharSet(), EE_CHAR_FONTINFO ); - SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyType(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(), + SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamilyTypeMaybeAskConfig(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitchMaybeAskConfig(), aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); - SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyType(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), + SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamilyTypeMaybeAskConfig(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitchMaybeAskConfig(), 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 cfcfa52ef971..504bbe63adef 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -113,7 +113,7 @@ SfxItemPool* GetAnnotationPool() s_pAnnotationPool->SetUserDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT)); vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() ); - s_pAnnotationPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),u""_ustr,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); + s_pAnnotationPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(),aAppFont.GetFamilyName(),u""_ustr,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); } return s_pAnnotationPool.get(); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index ba2e1d71cc50..299abd1c3641 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -257,8 +257,8 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq ) // set attributes (set font) SfxItemSet aSet(pOL->GetEmptyItemSet()); - SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), + SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO); aSet.Put(aFontItem); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 3f66556e19fc..d9dd44e7c187 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -639,28 +639,28 @@ void LineParser::readFont() } // Font weight - if (aFontReadResult.GetWeight() == WEIGHT_THIN) + if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_THIN) aResult.fontWeight = u"100"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_ULTRALIGHT) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_ULTRALIGHT) aResult.fontWeight = u"200"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_LIGHT) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_LIGHT) aResult.fontWeight = u"300"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_SEMILIGHT) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_SEMILIGHT) aResult.fontWeight = u"350"_ustr; // no need to check "normal" here as this is default in nFontWeight above - else if (aFontReadResult.GetWeight() == WEIGHT_SEMIBOLD) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_SEMIBOLD) aResult.fontWeight = u"600"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_BOLD) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_BOLD) aResult.fontWeight = u"bold"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_ULTRABOLD) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_ULTRABOLD) aResult.fontWeight = u"800"_ustr; - else if (aFontReadResult.GetWeight() == WEIGHT_BLACK) + else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_BLACK) aResult.fontWeight = u"900"_ustr; SAL_INFO("sdext.pdfimport", aResult.fontWeight); // Italic - aResult.isItalic = (aFontReadResult.GetItalic() == ITALIC_OBLIQUE || - aFontReadResult.GetItalic() == ITALIC_NORMAL); + aResult.isItalic = (aFontReadResult.GetItalicMaybeAskConfig() == ITALIC_OBLIQUE || + aFontReadResult.GetItalicMaybeAskConfig() == ITALIC_NORMAL); } else // font detection failed { SAL_WARN("sdext.pdfimport", diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 7a32c0be86fe..af6f39e71019 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -3265,9 +3265,9 @@ void MathType::HandleText(SmNode *pNode) pS->WriteUChar( CHAR ); sal_uInt8 nFace = 0x1; - if (pNode->GetFont().GetItalic() == ITALIC_NORMAL) + if (pNode->GetFont().GetItalicMaybeAskConfig() == ITALIC_NORMAL) nFace = 0x3; - else if (pNode->GetFont().GetWeight() == WEIGHT_BOLD) + else if (pNode->GetFont().GetWeightMaybeAskConfig() == WEIGHT_BOLD) nFace = 0x7; pS->WriteUChar( nFace+128 ); //typeface sal_uInt16 nChar = pTemp->GetText()[i]; diff --git a/starmath/source/smediteng.cxx b/starmath/source/smediteng.cxx index 51681f1423a3..23df3b5b71af 100644 --- a/starmath/source/smediteng.cxx +++ b/starmath/source/smediteng.cxx @@ -139,9 +139,9 @@ void SmEditEngine::setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions& vcl::Font aFont = OutputDevice::GetDefaultFont(aFontData.nFontType, nLang, GetDefaultFontFlags::OnlyOne); aFont.SetColor(aTextColor); - mpItemPool->SetUserDefaultItem(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), - aFont.GetCharSet(), aFontData.nFontInfoId)); + mpItemPool->SetUserDefaultItem(SvxFontItem( + aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), aFont.GetStyleName(), + aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), aFontData.nFontInfoId)); } // Set font heights diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 5d5be5deb93a..53ed18e22461 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -268,7 +268,7 @@ void SmSymbolManager::Load() // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek const SmSym &rSym = *aGreekSymbols[i]; vcl::Font aFont( rSym.GetFace() ); - OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); + OSL_ENSURE( aFont.GetItalicMaybeAskConfig() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); aFont.SetItalic( ITALIC_NORMAL ); OUString aSymbolName = "i" + rSym.GetUiName(); SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(), diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 2533444cd371..14e39542f432 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -881,10 +881,10 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu vcl::Font rFont = pSymbol->GetFace(); pDescriptor->sFontName = rFont.GetFamilyName(); pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet()); - pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyType()); - pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); - pDescriptor->nWeight = sal::static_int_cast< sal_Int16 >(rFont.GetWeight()); - pDescriptor->nItalic = sal::static_int_cast< sal_Int16 >(rFont.GetItalic()); + pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyTypeMaybeAskConfig()); + pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitchMaybeAskConfig()); + pDescriptor->nWeight = sal::static_int_cast< sal_Int16 >(rFont.GetWeightMaybeAskConfig()); + pDescriptor->nItalic = sal::static_int_cast< sal_Int16 >(rFont.GetItalicMaybeAskConfig()); pDescriptor++; } *pValue <<= aSequence; diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 736de5be4850..f73050d6a7b6 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -947,9 +947,9 @@ void FontStyleBox::Fill( std::u16string_view rName, const FontList* pList ) { aFontMetric = FontList::GetFontMetric( hFontMetric ); - FontWeight eWeight = aFontMetric.GetWeight(); - FontItalic eItalic = aFontMetric.GetItalic(); - FontWidth eWidth = aFontMetric.GetWidthType(); + FontWeight eWeight = aFontMetric.GetWeightMaybeAskConfig(); + FontItalic eItalic = aFontMetric.GetItalicMaybeAskConfig(); + FontWidth eWidth = aFontMetric.GetWidthTypeMaybeAskConfig(); // Only if the attributes are different, we insert the // Font to avoid double Entries in different languages if ( (eWeight != eLastWeight) || (eItalic != eLastItalic) || diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index a117b75123b9..76f8c975747c 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -536,8 +536,8 @@ const OUString & FontList::GetFontMapText( const FontMetric& rInfo ) const ImplFontListFontMetric* pFontMetric = pData->mpFirst; while ( pFontMetric ) { - if ( (eWeight == pFontMetric->GetWeight()) && - (eItalic == pFontMetric->GetItalic()) ) + if ( (eWeight == pFontMetric->GetWeightMaybeAskConfig()) && + (eItalic == pFontMetric->GetItalicMaybeAskConfig()) ) { bNotSynthetic = true; break; @@ -687,8 +687,8 @@ FontMetric FontList::Get(const OUString& rName, pFontNameInfo = pSearchInfo; while ( pSearchInfo ) { - if ( (eWeight == pSearchInfo->GetWeight()) && - (eItalic == pSearchInfo->GetItalic()) ) + if ( (eWeight == pSearchInfo->GetWeightMaybeAskConfig()) && + (eItalic == pSearchInfo->GetItalicMaybeAskConfig()) ) { pFontMetric = pSearchInfo; break; diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 6f38a6072e67..aa2ed304262f 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -653,7 +653,7 @@ bool TabBar::ImplCalcWidth() // retrieve width of tabs with bold font vcl::Font aFont = GetFont(); - if (aFont.GetWeight() != WEIGHT_BOLD) + if (aFont.GetWeightMaybeAskConfig() != WEIGHT_BOLD) { aFont.SetWeight(WEIGHT_BOLD); SetFont(aFont); diff --git a/svx/source/dialog/cuicharmap.cxx b/svx/source/dialog/cuicharmap.cxx index 84195ccd5543..964e540180c5 100644 --- a/svx/source/dialog/cuicharmap.cxx +++ b/svx/source/dialog/cuicharmap.cxx @@ -353,8 +353,8 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph) sal_UCS4 cChar = sGlyph.iterateCodePoints(&o3tl::temporary(sal_Int32(0))); const SfxItemPool* pPool = m_xOutputSet->GetPool(); m_xOutputSet->Put( SfxStringItem( SID_CHARMAP, sGlyph ) ); - m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), pPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) ); + m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), pPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) ); m_xOutputSet->Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) ); m_xOutputSet->Put( SfxInt32Item( SID_ATTR_CHAR, cChar ) ); } diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 18539c449b5b..77e0971ab799 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -112,15 +112,15 @@ void WeldEditView::makeEditEngine() vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont()); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, - EE_CHAR_FONTINFO)); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, - EE_CHAR_FONTINFO_CJK)); - pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(), - u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, - EE_CHAR_FONTINFO_CTL)); + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), + aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, + RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO)); + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), + aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, + RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK)); + pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), + aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW, + RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL)); pItemPool->SetUserDefaultItem( SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT)); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index a79fb3a2f2a1..8cb0c248d59d 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -396,11 +396,11 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr vcl::Font aFnt(mpVD->GetFont()); const sal_uInt32 nHeight(basegfx::fround(implMap(aFnt.GetFontSize()).Height() * mfScaleY)); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) ); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) ); - mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyType(), 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( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) ); + mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) ); + mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) ); + mpTextAttr->Put(SvxPostureItem(aFnt.GetItalicMaybeAskConfig(), EE_CHAR_ITALIC)); + mpTextAttr->Put(SvxWeightItem(aFnt.GetWeightMaybeAskConfig(), EE_CHAR_WEIGHT)); mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) ); mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CJK ) ); mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) ); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 5d83be0ebe10..c510ec95b6e0 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -651,28 +651,28 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 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.GetFamilyType()); + aSvxFontItem.SetFamily(aFont.GetFamilyTypeMaybeAskConfig()); aSvxFontItem.SetFamilyName(aFont.GetFamilyName()); aSvxFontItem.SetStyleName(OUString()); - aSvxFontItem.SetPitch( aFont.GetPitch()); + aSvxFontItem.SetPitch( aFont.GetPitchMaybeAskConfig()); aSvxFontItem.SetCharSet( aFont.GetCharSet() ); pItemPool->SetUserDefaultItem(aSvxFontItem); // 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.GetFamilyType()); + aSvxFontItemCJK.SetFamily( aFontCJK.GetFamilyTypeMaybeAskConfig()); aSvxFontItemCJK.SetFamilyName(aFontCJK.GetFamilyName()); aSvxFontItemCJK.SetStyleName(OUString()); - aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch()); + aSvxFontItemCJK.SetPitch( aFontCJK.GetPitchMaybeAskConfig()); aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet()); pItemPool->SetUserDefaultItem(aSvxFontItemCJK); // 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.GetFamilyType()); + aSvxFontItemCTL.SetFamily(aFontCTL.GetFamilyTypeMaybeAskConfig()); aSvxFontItemCTL.SetFamilyName(aFontCTL.GetFamilyName()); aSvxFontItemCTL.SetStyleName(OUString()); - aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() ); + aSvxFontItemCTL.SetPitch( aFontCTL.GetPitchMaybeAskConfig() ); aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet()); pItemPool->SetUserDefaultItem(aSvxFontItemCTL); diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index b128a05fc13b..7c0251c8b0b1 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -344,14 +344,17 @@ void ImpSdrPdfImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr) const sal_uInt32 nHeight( basegfx::fround<sal_uInt32>(aFnt.GetFontSize().Height() * mfScaleY)); - mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), - aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO)); - mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), - aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK)); - mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), 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(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), + aFnt.GetCharSet(), EE_CHAR_FONTINFO)); + mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), + aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK)); + mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), + aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL)); + mpTextAttr->Put(SvxPostureItem(aFnt.GetItalicMaybeAskConfig(), EE_CHAR_ITALIC)); + mpTextAttr->Put(SvxWeightItem(aFnt.GetWeightMaybeAskConfig(), EE_CHAR_WEIGHT)); mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT)); mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CJK)); mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CTL)); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index f16e57ba609c..7ffaa8e4d77c 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1793,7 +1793,7 @@ void SvxFontNameBox_Base::CheckAndMarkUnknownFont() vcl::Font font = m_xWidget->get_entry_font(); if (fontname.isEmpty() || CheckFontIsAvailable(fontname)) { - if( font.GetItalic() != ITALIC_NONE ) + if( font.GetItalicMaybeAskConfig() != ITALIC_NONE ) { font.SetItalic( ITALIC_NONE ); m_xWidget->set_entry_font(font); @@ -1802,7 +1802,7 @@ void SvxFontNameBox_Base::CheckAndMarkUnknownFont() } else { - if( font.GetItalic() != ITALIC_NORMAL ) + if( font.GetItalicMaybeAskConfig() != ITALIC_NORMAL ) { font.SetItalic( ITALIC_NORMAL ); m_xWidget->set_entry_font(font); @@ -1986,14 +1986,14 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect) if ( pFontList ) { FontMetric aFontMetric( pFontList->Get(m_xWidget->get_active_text(), - aCurFont.GetWeight(), - aCurFont.GetItalic() ) ); + aCurFont.GetWeightMaybeAskConfig(), + aCurFont.GetItalicMaybeAskConfig() ) ); aCurFont = aFontMetric; - pFontItem.reset( new SvxFontItem( aFontMetric.GetFamilyType(), + pFontItem.reset( new SvxFontItem( aFontMetric.GetFamilyTypeMaybeAskConfig(), aFontMetric.GetFamilyName(), aFontMetric.GetStyleName(), - aFontMetric.GetPitch(), + aFontMetric.GetPitchMaybeAskConfig(), aFontMetric.GetCharSet(), SID_ATTR_CHAR_FONT ) ); diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index e6d73b90db65..60944d3e2619 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -139,8 +139,8 @@ namespace vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType, nLng, GetDefaultFontFlags::OnlyOne ) ); - rSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), - OUString(), aFnt.GetPitch(), + rSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + OUString(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), n.nResFntId )); } } @@ -168,8 +168,8 @@ namespace vcl::Font aFnt( OutputDevice::GetDefaultFont( n.nFntType, nLng, GetDefaultFontFlags::OnlyOne ) ); - rSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), - OUString(), aFnt.GetPitch(), + rSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + OUString(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), n.nResFntId )); } } @@ -808,8 +808,8 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i], nLng, GetDefaultFontFlags::OnlyOne ) ); - aSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), - OUString(), aFnt.GetPitch(), + aSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), + OUString(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), aFontWhich[i] )); } diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index df1346d7dadd..8b5dd3c05224 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1753,10 +1753,10 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) m_aDelPam.SetMark(); *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(1)); SetAllScriptItem( aSet, - SvxFontItem( m_aFlags.aBulletFont.GetFamilyType(), + SvxFontItem( m_aFlags.aBulletFont.GetFamilyTypeMaybeAskConfig(), m_aFlags.aBulletFont.GetFamilyName(), m_aFlags.aBulletFont.GetStyleName(), - m_aFlags.aBulletFont.GetPitch(), + m_aFlags.aBulletFont.GetPitchMaybeAskConfig(), m_aFlags.aBulletFont.GetCharSet(), RES_CHRATR_FONT ) ); m_pDoc->SetFormatItemByAutoFormat( m_aDelPam, aSet ); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index d444632becd3..fe7330276731 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -449,8 +449,8 @@ void SwFntObj::CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut ) FontMetric aMet = pPrt->GetFontMetric( ); // Don't lose "faked" properties of the logical font that don't truly // exist in the physical font metrics which vcl which fake up for us - aMet.SetWeight(m_pScrFont->GetWeight()); - aMet.SetItalic(m_pScrFont->GetItalic()); + aMet.SetWeight(m_pScrFont->GetWeightMaybeAskConfig()); + aMet.SetItalic(m_pScrFont->GetItalicMaybeAskConfig()); m_bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet(); diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index b3e2c16bd42e..f0686329d5e6 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -137,8 +137,8 @@ SwASCIIParser::SwASCIIParser(SwDoc& rD, const SwPaM& rCursor, SvStream& rIn, boo vcl::Font aTextFont(m_rOpt.GetFontName(), Size(0, 10)); if (m_rDoc.getIDocumentDeviceAccess().getPrinter(false)) aTextFont = m_rDoc.getIDocumentDeviceAccess().getPrinter(false)->GetFontMetric(aTextFont); - SvxFontItem aFont( aTextFont.GetFamilyType(), aTextFont.GetFamilyName(), - OUString(), aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); + SvxFontItem aFont( aTextFont.GetFamilyTypeMaybeAskConfig(), aTextFont.GetFamilyName(), + OUString(), aTextFont.GetPitchMaybeAskConfig(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); m_oItemSet->Put(aFont); aFont.SetWhich(RES_CHRATR_CJK_FONT); m_oItemSet->Put(aFont); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 8e3ba7fea86f..dc7f89e11074 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -596,14 +596,14 @@ static void lcl_html_setFixedFontProperty( rPropSet->setPropertyValue(u"FontStyleName"_ustr, aTmp ); - aTmp <<= static_cast<sal_Int16>(aFixedFont.GetFamilyType()); + aTmp <<= static_cast<sal_Int16>(aFixedFont.GetFamilyTypeMaybeAskConfig()); rPropSet->setPropertyValue(u"FontFamily"_ustr, aTmp ); aTmp <<= static_cast<sal_Int16>(aFixedFont.GetCharSet()); rPropSet->setPropertyValue(u"FontCharset"_ustr, aTmp ); - aTmp <<= static_cast<sal_Int16>(aFixedFont.GetPitch()); + aTmp <<= static_cast<sal_Int16>(aFixedFont.GetPitchMaybeAskConfig()); rPropSet->setPropertyValue(u"FontPitch"_ustr, aTmp ); aTmp <<= float(10.0); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 0576663965c9..3d8ead0cc4c9 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -340,9 +340,9 @@ void Writer::PutNumFormatFontsInAttrPool() else if( *pFont == *pDefFont ) bCheck = true; - AddFontItem( rPool, SvxFontItem( pFont->GetFamilyType(), + AddFontItem( rPool, SvxFontItem( pFont->GetFamilyTypeMaybeAskConfig(), pFont->GetFamilyName(), pFont->GetStyleName(), - pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT )); + pFont->GetPitchMaybeAskConfig(), pFont->GetCharSet(), RES_CHRATR_FONT )); } } } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index e8f7b197ed59..217c2ce4412b 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -521,7 +521,7 @@ void MSWordExportBase::NumberingLevel( eChrSet = pBulletFont->GetCharSet(); sFontName = pBulletFont->GetFamilyName(); - eFamily = pBulletFont->GetFamilyType(); + eFamily = pBulletFont->GetFamilyTypeMaybeAskConfig(); if (IsOpenSymbol(sFontName)) SubstituteBullet(sNumStr, eChrSet, sFontName); @@ -547,7 +547,7 @@ void MSWordExportBase::NumberingLevel( if (sFontName.isEmpty()) sFontName = pBulletFont->GetFamilyName(); - pPseudoFont.reset(new wwFont( sFontName, pBulletFont->GetPitch(), + pPseudoFont.reset(new wwFont( sFontName, pBulletFont->GetPitchMaybeAskConfig(), eFamily, eChrSet)); } else diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 3591ffb215ec..c2b2efe7127c 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -921,8 +921,8 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType); - pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(), - OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich)); } static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, @@ -1014,8 +1014,8 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) vcl::Font aFont( sStandard, Size( 0, 10 ) ); if( pPrinter ) aFont = pPrinter->GetFontMetric( aFont ); - m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(), - OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); + m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich)); SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFormatAttr(nFontWhich); bMod = true; diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 90d9629b1d2f..68dc5c5cfc7d 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -179,8 +179,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) aFont = pPrt->GetFontMetric( aFont ); } - pFontItem.reset(new SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(), - OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); + pFontItem.reset(new SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich)); } else { @@ -196,8 +196,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) nFontTypes[i], eLanguage, GetDefaultFontFlags::OnlyOne ); - pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamilyType(), aLangDefFont.GetFamilyName(), - OUString(), aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich)); + pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamilyTypeMaybeAskConfig(), aLangDefFont.GetFamilyName(), + OUString(), aLangDefFont.GetPitchMaybeAskConfig(), aLangDefFont.GetCharSet(), nFontWhich)); } m_xDoc->SetDefault(*pFontItem); if( !bHTMLTemplSet ) @@ -267,8 +267,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) SfxItemState::SET != pColl->GetAttrSet().GetItemState( nFontWhich, false ) ) { - pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(), - OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich)); } } sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage ); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index a0f889e69406..cb358e164406 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -1874,8 +1874,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // Attributing (set font) SfxItemSet aSetFont( *aFontSet.GetPool(), aFontSet.GetRanges() ); - SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), + SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); SvtScriptType nScriptBreak = g_pBreakIt->GetAllScriptsOfText( sSym ); diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 3679fefda26f..fa6d5f39ee7a 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -759,8 +759,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // assign attributes (Set font) SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() ); - SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(), - aFont.GetStyleName(), aFont.GetPitch(), + SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), + aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); nScript = g_pBreakIt->GetAllScriptsOfText( sSym ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index bc6e8b74254d..0b54efa2583e 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -1077,8 +1077,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) { std::unique_ptr<SvxFontItem> aNewFontItem(aFont->Clone()); aNewFontItem->SetFamilyName( aNewFont.GetFamilyName() ); - aNewFontItem->SetFamily( aNewFont.GetFamilyType()); - aNewFontItem->SetPitch( aNewFont.GetPitch()); + aNewFontItem->SetFamily( aNewFont.GetFamilyTypeMaybeAskConfig()); + aNewFontItem->SetPitch( aNewFont.GetPitchMaybeAskConfig()); aNewFontItem->SetCharSet( aNewFont.GetCharSet() ); SfxItemSet aRestoreSet(SfxItemSet::makeFixedSfxItemSet< diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx index ce49723169fd..f7b5d2c245e9 100644 --- a/vcl/qa/cppunit/font.cxx +++ b/vcl/qa/cppunit/font.cxx @@ -68,20 +68,20 @@ void VclFontTest::testWeight() { vcl::Font aFont; - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Weight should be WEIGHT_DONTKNOW", FontWeight::WEIGHT_DONTKNOW, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Weight should be WEIGHT_DONTKNOW", FontWeight::WEIGHT_DONTKNOW, aFont.GetWeightMaybeAskConfig()); aFont.SetWeight(FontWeight::WEIGHT_BLACK); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Weight should be WEIGHT_BLACK", FontWeight::WEIGHT_BLACK, aFont.GetWeight()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Weight should be WEIGHT_BLACK", FontWeight::WEIGHT_BLACK, aFont.GetWeightMaybeAskConfig()); } void VclFontTest::testWidthType() { vcl::Font aFont; - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font width should be WIDTH_DONTKNOW", FontWidth::WIDTH_DONTKNOW, aFont.GetWidthType()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font width should be WIDTH_DONTKNOW", FontWidth::WIDTH_DONTKNOW, aFont.GetWidthTypeMaybeAskConfig()); aFont.SetWidthType(FontWidth::WIDTH_EXPANDED); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font width should be EXPANDED", FontWidth::WIDTH_EXPANDED, aFont.GetWidthType()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font width should be EXPANDED", FontWidth::WIDTH_EXPANDED, aFont.GetWidthTypeMaybeAskConfig()); } void VclFontTest::testItalic() @@ -89,10 +89,10 @@ void VclFontTest::testItalic() vcl::Font aFont; // shouldn't this be set to ITALIC_DONTKNOW? currently it defaults to ITALIC_NONE - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Italic should be ITALIC_NONE", FontItalic::ITALIC_NONE, aFont.GetItalic()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Italic should be ITALIC_NONE", FontItalic::ITALIC_NONE, aFont.GetItalicMaybeAskConfig()); aFont.SetItalic(FontItalic::ITALIC_NORMAL); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Italic should be EXPANDED", FontItalic::ITALIC_NORMAL, aFont.GetItalic()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Italic should be EXPANDED", FontItalic::ITALIC_NORMAL, aFont.GetItalicMaybeAskConfig()); } @@ -111,10 +111,10 @@ void VclFontTest::testPitch() { vcl::Font aFont; - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Pitch should be PITCH_DONTKNOW", FontPitch::PITCH_DONTKNOW, aFont.GetPitch()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Pitch should be PITCH_DONTKNOW", FontPitch::PITCH_DONTKNOW, aFont.GetPitchMaybeAskConfig()); aFont.SetPitch(FontPitch::PITCH_FIXED); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Pitch should be PITCH_FIXED", FontPitch::PITCH_FIXED, aFont.GetPitch()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Pitch should be PITCH_FIXED", FontPitch::PITCH_FIXED, aFont.GetPitchMaybeAskConfig()); } void VclFontTest::testQuality() diff --git a/vcl/source/accessibility/textwindowaccessibility.cxx b/vcl/source/accessibility/textwindowaccessibility.cxx index 287f26ac7a1d..8bed55efb786 100644 --- a/vcl/source/accessibility/textwindowaccessibility.cxx +++ b/vcl/source/accessibility/textwindowaccessibility.cxx @@ -848,7 +848,7 @@ Document::retrieveCharacterAttributes( //character posture aAttrib.Name = "CharPosture"; - aAttrib.Value <<= vcl::unohelper::ConvertFontSlant(aFont.GetItalic()); + aAttrib.Value <<= vcl::unohelper::ConvertFontSlant(aFont.GetItalicMaybeAskConfig()); aAttribs.push_back(aAttrib); //character relief @@ -870,7 +870,7 @@ Document::retrieveCharacterAttributes( //character weight aAttrib.Name = "CharWeight"; - aAttrib.Value <<= static_cast<float>(aFont.GetWeight()); + aAttrib.Value <<= static_cast<float>(aFont.GetWeightMaybeAskConfig()); aAttribs.push_back(aAttrib); //character alignment diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index b19da7af24ff..8a602c888115 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -96,7 +96,7 @@ css::uno::Any SAL_CALL FontIdentificator::getMaterial() aFD.Kerning = false; aFD.WordLineMode = false; aFD.Type = 0; - switch( m_aFont.GetFamilyType() ) + switch( m_aFont.GetFamilyTypeMaybeAskConfig() ) { case FAMILY_DECORATIVE: aFD.Family = css::awt::FontFamily::DECORATIVE;break; case FAMILY_MODERN: aFD.Family = css::awt::FontFamily::MODERN;break; @@ -108,7 +108,7 @@ css::uno::Any SAL_CALL FontIdentificator::getMaterial() aFD.Family = css::awt::FontFamily::DONTKNOW; break; } - switch( m_aFont.GetPitch() ) + switch( m_aFont.GetPitchMaybeAskConfig() ) { case PITCH_VARIABLE: aFD.Pitch = css::awt::FontPitch::VARIABLE;break; case PITCH_FIXED: aFD.Pitch = css::awt::FontPitch::FIXED;break; @@ -116,7 +116,7 @@ css::uno::Any SAL_CALL FontIdentificator::getMaterial() aFD.Pitch = css::awt::FontPitch::DONTKNOW; break; } - switch( m_aFont.GetWeight() ) + switch( m_aFont.GetWeightMaybeAskConfig() ) { case WEIGHT_THIN: aFD.Weight = css::awt::FontWeight::THIN;break; case WEIGHT_ULTRALIGHT: aFD.Weight = css::awt::FontWeight::ULTRALIGHT;break; @@ -132,7 +132,7 @@ css::uno::Any SAL_CALL FontIdentificator::getMaterial() aFD.Weight = css::awt::FontWeight::DONTKNOW; break; } - switch( m_aFont.GetItalic() ) + switch( m_aFont.GetItalicMaybeAskConfig() ) { case ITALIC_OBLIQUE: aFD.Slant = css::awt::FontSlant_OBLIQUE;break; case ITALIC_NORMAL: aFD.Slant = css::awt::FontSlant_ITALIC;break; diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index ccd62939fd56..314b182acf1e 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -2057,11 +2057,11 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint ) if ( maLastFont != maFont ) { - if ( maFont.GetPitch() == PITCH_FIXED ) // a little bit font selection + if ( maFont.GetPitchMaybeAskConfig() == PITCH_FIXED ) // a little bit font selection ImplDefineFont( "Courier", "Oblique" ); else if ( maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) ImplWriteLine( "/Symbol findfont" ); - else if ( maFont.GetFamilyType() == FAMILY_SWISS ) + else if ( maFont.GetFamilyTypeMaybeAskConfig() == FAMILY_SWISS ) ImplDefineFont( "Helvetica", "Oblique" ); else ImplDefineFont( "Times", "Italic" ); @@ -2091,18 +2091,18 @@ void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) { mpPS->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding mpPS->WriteOString( pOriginalName ); - switch ( maFont.GetWeight() ) + switch ( maFont.GetWeightMaybeAskConfig() ) { case WEIGHT_SEMIBOLD : case WEIGHT_BOLD : case WEIGHT_ULTRABOLD : case WEIGHT_BLACK : mpPS->WriteOString( "-Bold" ); - if ( maFont.GetItalic() != ITALIC_NONE ) + if ( maFont.GetItalicMaybeAskConfig() != ITALIC_NONE ) mpPS->WriteOString( pItalic ); break; default: - if ( maFont.GetItalic() != ITALIC_NONE ) + if ( maFont.GetItalicMaybeAskConfig() != ITALIC_NONE ) mpPS->WriteOString( pItalic ); break; } diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index c47fb0bbac4d..d84d2d28e6a2 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -368,7 +368,6 @@ void Font::Merge( const vcl::Font& rFont ) SetCharSet( rFont.GetCharSet() ); SetLanguageTag( rFont.GetLanguageTag() ); SetCJKContextLanguageTag( rFont.GetCJKContextLanguageTag() ); - // don't use access methods here, might lead to AskConfig(), if DONTKNOW SetFamily( rFont.GetFamilyType() ); SetPitch( rFont.GetPitch() ); } @@ -926,11 +925,11 @@ Degree10 Font::GetOrientation() const { return mpImplFont->mnOrientation; } bool Font::IsVertical() const { return mpImplFont->mbVertical; } FontKerning Font::GetKerning() const { return mpImplFont->meKerning; } -FontPitch Font::GetPitch() { return mpImplFont->GetPitch(); } -FontWeight Font::GetWeight() { return mpImplFont->GetWeight(); } -FontWidth Font::GetWidthType() { return mpImplFont->GetWidthType(); } -FontItalic Font::GetItalic() { return mpImplFont->GetItalic(); } -FontFamily Font::GetFamilyType() { return mpImplFont->GetFamilyType(); } +FontPitch Font::GetPitchMaybeAskConfig() { return mpImplFont->GetPitch(); } +FontWeight Font::GetWeightMaybeAskConfig() { return mpImplFont->GetWeight(); } +FontWidth Font::GetWidthTypeMaybeAskConfig() { return mpImplFont->GetWidthType(); } +FontItalic Font::GetItalicMaybeAskConfig() { return mpImplFont->GetItalic(); } +FontFamily Font::GetFamilyTypeMaybeAskConfig() { return mpImplFont->GetFamilyType(); } FontPitch Font::GetPitch() const { return mpImplFont->GetPitchNoAsk(); } FontWeight Font::GetWeight() const { return mpImplFont->GetWeightNoAsk(); } diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index 84fb0019e9d1..8f490608d1e6 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -1331,7 +1331,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r rWriter.attribute("width", aFont.GetFontSize().Width()); rWriter.attribute("height", aFont.GetFontSize().Height()); rWriter.attribute("orientation", aFont.GetOrientation().get()); - rWriter.attribute("weight", convertFontWeightToString(aFont.GetWeight())); + rWriter.attribute("weight", convertFontWeightToString(aFont.GetWeightMaybeAskConfig())); rWriter.attribute("vertical", aFont.IsVertical() ? "true" : "false"); rWriter.attribute("emphasis", aFont.GetEmphasisMark() != FontEmphasisMark::NONE ? "true" : "false"); rWriter.attribute("shadow", aFont.IsShadow() ? "true" : "false"); diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 364bc44b7139..7c130ea6d3da 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2882,7 +2882,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetHelpFont( aHelpFont ); aStyleSettings.SetIconFont( aIconFont ); - if ( aAppFont.GetWeight() > WEIGHT_NORMAL ) + if ( aAppFont.GetWeightMaybeAskConfig() > WEIGHT_NORMAL ) aAppFont.SetWeight( WEIGHT_NORMAL ); aStyleSettings.SetToolFont( aAppFont ); aStyleSettings.SetTabFont( aAppFont ); diff --git a/vcl/workben/listfonts.cxx b/vcl/workben/listfonts.cxx index 30718bb010b2..f15abddee5d1 100644 --- a/vcl/workben/listfonts.cxx +++ b/vcl/workben/listfonts.cxx @@ -374,11 +374,13 @@ int ListFonts::Main() FontMetric aFont = pOutDev->GetFontMetric(); - std::cout << aFont.GetFamilyName() << "\n\tFamily type: " << aFont.GetFamilyType() + std::cout << aFont.GetFamilyName() + << "\n\tFamily type: " << aFont.GetFamilyTypeMaybeAskConfig() << "\n\tStyle name: " << aFont.GetStyleName() - << "\n\tWeight: " << aFont.GetWeight() << "\n\tItalic: " << aFont.GetItalic() - << "\n\tPitch: " << aFont.GetPitch() - << "\n\tWidth type: " << aFont.GetWidthType() + << "\n\tWeight: " << aFont.GetWeightMaybeAskConfig() + << "\n\tItalic: " << aFont.GetItalicMaybeAskConfig() + << "\n\tPitch: " << aFont.GetPitchMaybeAskConfig() + << "\n\tWidth type: " << aFont.GetWidthTypeMaybeAskConfig() << "\n\tAlignment: " << aFont.GetAlignment() << "\n\tCharset: " << GetOctetTextEncodingName(aFont.GetCharSet()) << "\n\tAscent: " << aFont.GetAscent() |