Rename con-const vcl::Font property getters for clarity

There are two sets of getters there; and the non-const ones may copy
the COW mpImplFont, and may call its AskConfig.

The name overload is unfortunate. It is not obvious at the call site,
which of the two will be called; and what is different. IMO, the way
to fix it would be to keep only one set of getters (the const one),
and make the call to AskConfig explicit (in the places that set font
name, and know that resolution of other properties will be needed).

But in this change, I only rename the non-const getters, making sure
to keep the behavior unchanged (at least the intention is to have a
non-functional change, meaning that the places that called non-const
overload, now use the renamed functions), to make it clear where we
actually may copy and initialize it.

Change-Id: I9a5cd91d5c1c0de7ff8577b9b982d165e4cdd2c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183116
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Mike Kaganski 2025-03-19 13:23:22 +05:00
parent 7af8b3d330
commit 599ab8dc3a
65 changed files with 242 additions and 228 deletions

View File

@ -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(

View File

@ -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 );

View File

@ -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;
}

View File

@ -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));

View File

@ -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 );
}

View File

@ -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() );

View File

@ -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 );

View File

@ -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());
}
}

View File

@ -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"

View File

@ -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 },

View File

@ -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";

View File

@ -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 )

View File

@ -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 );

View File

@ -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;

View File

@ -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);

View File

@ -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)

View File

@ -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 );

View File

@ -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)

View File

@ -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)

View File

@ -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;
}

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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() );
}
}
}

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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());

View File

@ -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() );

View File

@ -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();

View File

@ -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);

View File

@ -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",

View File

@ -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];

View File

@ -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

View File

@ -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(),

View File

@ -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;

View File

@ -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) ||

View File

@ -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;

View File

@ -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);

View File

@ -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 ) );
}

View File

@ -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));

View File

@ -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 ) );

View File

@ -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);

View File

@ -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));

View File

@ -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 ) );

View File

@ -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] ));
}

View File

@ -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 );

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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 ));
}
}
}

View File

@ -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

View File

@ -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;

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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<

View File

@ -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()

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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(); }

View File

@ -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");

View File

@ -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 );

View File

@ -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()