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:
parent
7af8b3d330
commit
599ab8dc3a
@ -239,7 +239,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
|
|||||||
aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future
|
aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future
|
||||||
|
|
||||||
vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
|
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));
|
VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr));
|
||||||
pDlg->StartExecuteAsync(
|
pDlg->StartExecuteAsync(
|
||||||
|
@ -363,9 +363,9 @@ void CharacterProperties::AddDefaultsToMap(
|
|||||||
|
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, aFont.GetFamilyName() );
|
::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_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_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_COLOR, COL_AUTO ); //automatic color
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CHAR_HEIGHT, fDefaultFontHeight );
|
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CHAR_HEIGHT, fDefaultFontHeight );
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
|
::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_LOCALE, aDefaultLocale_CJK );
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, aFontCJK.GetFamilyName() );
|
::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_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_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)
|
// Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex)
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultFontHeight );
|
::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_LOCALE, aDefaultLocale_CTL );
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, aFontCTL.GetFamilyName() );
|
::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_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_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_WRITING_MODE, sal_Int16( css::text::WritingMode2::PAGE ) );
|
||||||
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PARA_IS_CHARACTER_DISTANCE, true );
|
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PARA_IS_CHARACTER_DISTANCE, true );
|
||||||
|
@ -425,13 +425,13 @@ namespace
|
|||||||
|
|
||||||
_rFont.SetLanguage(_pLanguageLB->get_active_id());
|
_rFont.SetLanguage(_pLanguageLB->get_active_id());
|
||||||
|
|
||||||
_rFont.SetFamily( aFontMetrics.GetFamilyType() );
|
_rFont.SetFamily( aFontMetrics.GetFamilyTypeMaybeAskConfig() );
|
||||||
_rFont.SetFamilyName( aFontMetrics.GetFamilyName() );
|
_rFont.SetFamilyName( aFontMetrics.GetFamilyName() );
|
||||||
_rFont.SetStyleName( aFontMetrics.GetStyleName() );
|
_rFont.SetStyleName( aFontMetrics.GetStyleName() );
|
||||||
_rFont.SetPitch( aFontMetrics.GetPitch() );
|
_rFont.SetPitch( aFontMetrics.GetPitchMaybeAskConfig() );
|
||||||
_rFont.SetCharSet( aFontMetrics.GetCharSet() );
|
_rFont.SetCharSet( aFontMetrics.GetCharSet() );
|
||||||
_rFont.SetWeight( aFontMetrics.GetWeight() );
|
_rFont.SetWeight( aFontMetrics.GetWeightMaybeAskConfig() );
|
||||||
_rFont.SetItalic( aFontMetrics.GetItalic() );
|
_rFont.SetItalic( aFontMetrics.GetItalicMaybeAskConfig() );
|
||||||
_rFont.SetFontSize( aFontMetrics.GetFontSize() );
|
_rFont.SetFontSize( aFontMetrics.GetFontSize() );
|
||||||
|
|
||||||
return aFontMetrics;
|
return aFontMetrics;
|
||||||
@ -874,8 +874,8 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
|
|||||||
if (nEntryPos >= m_pImpl->m_nExtraEntryPos)
|
if (nEntryPos >= m_pImpl->m_nExtraEntryPos)
|
||||||
aStyleBoxText.clear();
|
aStyleBoxText.clear();
|
||||||
FontMetric aInfo( pFontList->Get( aFontName, aStyleBoxText ) );
|
FontMetric aInfo( pFontList->Get( aFontName, aStyleBoxText ) );
|
||||||
SvxFontItem aFontItem( aInfo.GetFamilyType(), aInfo.GetFamilyName(), aInfo.GetStyleName(),
|
SvxFontItem aFontItem( aInfo.GetFamilyTypeMaybeAskConfig(), aInfo.GetFamilyName(), aInfo.GetStyleName(),
|
||||||
aInfo.GetPitch(), aInfo.GetCharSet(), nWhich );
|
aInfo.GetPitchMaybeAskConfig(), aInfo.GetCharSet(), nWhich );
|
||||||
pOld = GetOldItem( rSet, nSlot );
|
pOld = GetOldItem( rSet, nSlot );
|
||||||
|
|
||||||
if ( pOld )
|
if ( pOld )
|
||||||
@ -911,7 +911,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
|
|||||||
case Ctl : nSlot = SID_ATTR_CHAR_CTL_WEIGHT; break;
|
case Ctl : nSlot = SID_ATTR_CHAR_CTL_WEIGHT; break;
|
||||||
}
|
}
|
||||||
nWhich = GetWhich( nSlot );
|
nWhich = GetWhich( nSlot );
|
||||||
FontWeight eWeight = aInfo.GetWeight();
|
FontWeight eWeight = aInfo.GetWeightMaybeAskConfig();
|
||||||
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
|
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
|
||||||
eWeight = WEIGHT_NORMAL;
|
eWeight = WEIGHT_NORMAL;
|
||||||
SvxWeightItem aWeightItem( eWeight, nWhich );
|
SvxWeightItem aWeightItem( eWeight, nWhich );
|
||||||
@ -930,7 +930,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
|
|||||||
bChanged = pStyleBox->get_saved_value().isEmpty();
|
bChanged = pStyleBox->get_saved_value().isEmpty();
|
||||||
|
|
||||||
if ( m_pImpl->m_bInSearchMode && bChanged &&
|
if ( m_pImpl->m_bInSearchMode && bChanged &&
|
||||||
aInfo.GetWeight() == WEIGHT_NORMAL && aInfo.GetItalic() != ITALIC_NONE )
|
aInfo.GetWeightMaybeAskConfig() == WEIGHT_NORMAL && aInfo.GetItalicMaybeAskConfig() != ITALIC_NONE )
|
||||||
bChanged = false;
|
bChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -960,7 +960,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
|
|||||||
case Ctl : nSlot = SID_ATTR_CHAR_CTL_POSTURE; break;
|
case Ctl : nSlot = SID_ATTR_CHAR_CTL_POSTURE; break;
|
||||||
}
|
}
|
||||||
nWhich = GetWhich( nSlot );
|
nWhich = GetWhich( nSlot );
|
||||||
FontItalic eItalic = aInfo.GetItalic();
|
FontItalic eItalic = aInfo.GetItalicMaybeAskConfig();
|
||||||
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
|
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
|
||||||
eItalic = ITALIC_NONE;
|
eItalic = ITALIC_NONE;
|
||||||
SvxPostureItem aPostureItem( eItalic, nWhich );
|
SvxPostureItem aPostureItem( eItalic, nWhich );
|
||||||
@ -979,7 +979,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
|
|||||||
bChanged = pStyleBox->get_saved_value().isEmpty();
|
bChanged = pStyleBox->get_saved_value().isEmpty();
|
||||||
|
|
||||||
if ( m_pImpl->m_bInSearchMode && bChanged &&
|
if ( m_pImpl->m_bInSearchMode && bChanged &&
|
||||||
aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL )
|
aInfo.GetItalicMaybeAskConfig() == ITALIC_NONE && aInfo.GetWeightMaybeAskConfig() != WEIGHT_NORMAL )
|
||||||
bChanged = false;
|
bChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,13 +96,13 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
|
|||||||
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
|
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
|
||||||
vcl::Font aAppFont(sFontName, aFontSize);
|
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,
|
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO));
|
EE_CHAR_FONTINFO));
|
||||||
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
|
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(), aAppFont.GetFamilyName(),
|
||||||
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO_CJK));
|
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,
|
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO_CTL));
|
EE_CHAR_FONTINFO_CTL));
|
||||||
|
|
||||||
|
@ -662,13 +662,13 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
|
|||||||
if ( nHLevel == STYLE_PRE )
|
if ( nHLevel == STYLE_PRE )
|
||||||
{
|
{
|
||||||
vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
|
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 );
|
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 );
|
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 );
|
aItems.Put( aFontItemCTL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,8 +156,8 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r
|
|||||||
aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode);
|
aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode);
|
||||||
SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
|
SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
|
||||||
vcl::Font aDefFont( GetFont( nDefFont ) );
|
vcl::Font aDefFont( GetFont( nDefFont ) );
|
||||||
SvxFontItem aFontItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(),
|
SvxFontItem aFontItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(),
|
||||||
aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );
|
aDefFont.GetStyleName(), aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );
|
||||||
|
|
||||||
sal_Int32 nStartPara = mpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
|
sal_Int32 nStartPara = mpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
|
||||||
sal_Int32 nEndPara = mpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() );
|
sal_Int32 nEndPara = mpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() );
|
||||||
|
@ -64,7 +64,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
|
|||||||
vcl::Font _aFont = GetFont();
|
vcl::Font _aFont = GetFont();
|
||||||
vcl::Font aNewFont = rCopyFrom.GetFont();
|
vcl::Font aNewFont = rCopyFrom.GetFont();
|
||||||
_aFont.SetFamilyName( aNewFont.GetFamilyName() );
|
_aFont.SetFamilyName( aNewFont.GetFamilyName() );
|
||||||
_aFont.SetFamily( aNewFont.GetFamilyType() );
|
_aFont.SetFamily( aNewFont.GetFamilyTypeMaybeAskConfig() );
|
||||||
_aFont.SetStyleName( aNewFont.GetStyleName() );
|
_aFont.SetStyleName( aNewFont.GetStyleName() );
|
||||||
_aFont.SetColor( aNewFont.GetColor() );
|
_aFont.SetColor( aNewFont.GetColor() );
|
||||||
SetSymbol( rCopyFrom.cSymbol );
|
SetSymbol( rCopyFrom.cSymbol );
|
||||||
|
@ -2931,10 +2931,10 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
|
|||||||
aOutTypeArr[ n ].nLanguage,
|
aOutTypeArr[ n ].nLanguage,
|
||||||
GetDefaultFontFlags::OnlyOne ) );
|
GetDefaultFontFlags::OnlyOne ) );
|
||||||
SvxFontItem* pItem = aItemArr[ n ];
|
SvxFontItem* pItem = aItemArr[ n ];
|
||||||
pItem->SetFamily( aFont.GetFamilyType() );
|
pItem->SetFamily( aFont.GetFamilyTypeMaybeAskConfig() );
|
||||||
pItem->SetFamilyName( aFont.GetFamilyName() );
|
pItem->SetFamilyName( aFont.GetFamilyName() );
|
||||||
pItem->SetStyleName( OUString() );
|
pItem->SetStyleName( OUString() );
|
||||||
pItem->SetPitch( aFont.GetPitch());
|
pItem->SetPitch( aFont.GetPitchMaybeAskConfig());
|
||||||
pItem->SetCharSet(aFont.GetCharSet());
|
pItem->SetCharSet(aFont.GetCharSet());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -627,11 +627,11 @@ void SvxSwAutoCorrCfg::ImplCommit()
|
|||||||
// "Format/Option/ChangeToBullets/SpecialCharacter/Char"
|
// "Format/Option/ChangeToBullets/SpecialCharacter/Char"
|
||||||
css::uno::Any(rSwFlags.aBulletFont.GetFamilyName()),
|
css::uno::Any(rSwFlags.aBulletFont.GetFamilyName()),
|
||||||
// "Format/Option/ChangeToBullets/SpecialCharacter/Font"
|
// "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"
|
// "Format/Option/ChangeToBullets/SpecialCharacter/FontFamily"
|
||||||
css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetCharSet())),
|
css::uno::Any(sal_Int32(rSwFlags.aBulletFont.GetCharSet())),
|
||||||
// "Format/Option/ChangeToBullets/SpecialCharacter/FontCharset"
|
// "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"
|
// "Format/Option/ChangeToBullets/SpecialCharacter/FontPitch"
|
||||||
css::uno::Any(rSwFlags.bRightMargin),
|
css::uno::Any(rSwFlags.bRightMargin),
|
||||||
// "Format/Option/CombineParagraphs"
|
// "Format/Option/CombineParagraphs"
|
||||||
@ -671,11 +671,11 @@ void SvxSwAutoCorrCfg::ImplCommit()
|
|||||||
// "Format/ByInput/ApplyNumbering/SpecialCharacter/Char"
|
// "Format/ByInput/ApplyNumbering/SpecialCharacter/Char"
|
||||||
css::uno::Any(rSwFlags.aByInputBulletFont.GetFamilyName()),
|
css::uno::Any(rSwFlags.aByInputBulletFont.GetFamilyName()),
|
||||||
// "Format/ByInput/ApplyNumbering/SpecialCharacter/Font"
|
// "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"
|
// "Format/ByInput/ApplyNumbering/SpecialCharacter/FontFamily"
|
||||||
css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetCharSet())),
|
css::uno::Any(sal_Int32(rSwFlags.aByInputBulletFont.GetCharSet())),
|
||||||
// "Format/ByInput/ApplyNumbering/SpecialCharacter/FontCharset"
|
// "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"
|
// "Format/ByInput/ApplyNumbering/SpecialCharacter/FontPitch"
|
||||||
css::uno::Any(rSwFlags.bSetDOIAttr),
|
css::uno::Any(rSwFlags.bSetDOIAttr),
|
||||||
css::uno::Any(rSwFlags.bSetNumRuleAfterSpace), // "Format/ByInput/ApplyNumberingAfterSpace"
|
css::uno::Any(rSwFlags.bSetNumRuleAfterSpace), // "Format/ByInput/ApplyNumberingAfterSpace"
|
||||||
|
@ -516,10 +516,10 @@ namespace pcr
|
|||||||
typedef std::array<ItemInfoStatic, FontItemIds::CFID_LAST_ITEM_ID - FontItemIds::CFID_FIRST_ITEM_ID + 1> ItemInfoArrayCntChrDlg;
|
typedef std::array<ItemInfoStatic, FontItemIds::CFID_LAST_ITEM_ID - FontItemIds::CFID_FIRST_ITEM_ID + 1> ItemInfoArrayCntChrDlg;
|
||||||
ItemInfoArrayCntChrDlg maItemInfos {{
|
ItemInfoArrayCntChrDlg maItemInfos {{
|
||||||
// m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags
|
// 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_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_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeightMaybeAskConfig(), 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_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_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_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 },
|
{ 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_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_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_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_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_WEIGHT, new SvxWeightItem(maDefaultVCLFont.GetWeightMaybeAskConfig(), 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_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_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_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 },
|
{ FontItemIds::CFID_CONTOUR, new SvxContourItem(false, FontItemIds::CFID_CONTOUR), 0, SFX_ITEMINFOFLAG_NONE },
|
||||||
|
@ -206,13 +206,13 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
|
|||||||
const Size aSize( nFontEM, nFontEM );
|
const Size aSize( nFontEM, nFontEM );
|
||||||
|
|
||||||
// Font Weight
|
// Font Weight
|
||||||
if( aFont.GetWeight() != WEIGHT_NORMAL )
|
if( aFont.GetWeightMaybeAskConfig() != WEIGHT_NORMAL )
|
||||||
aFontWeight = "bold";
|
aFontWeight = "bold";
|
||||||
else
|
else
|
||||||
aFontWeight = "normal";
|
aFontWeight = "normal";
|
||||||
|
|
||||||
// Font Italic
|
// Font Italic
|
||||||
if( aFont.GetItalic() != ITALIC_NONE )
|
if( aFont.GetItalicMaybeAskConfig() != ITALIC_NONE )
|
||||||
aFontStyle = "italic";
|
aFontStyle = "italic";
|
||||||
else
|
else
|
||||||
aFontStyle = "normal";
|
aFontStyle = "normal";
|
||||||
|
@ -444,14 +444,14 @@ void SVGAttributeWriter::setFontFamily()
|
|||||||
{
|
{
|
||||||
const OUString& rsFontName = rCurFont.GetFamilyName();
|
const OUString& rsFontName = rCurFont.GetFamilyName();
|
||||||
OUString sFontFamily( rsFontName.getToken( 0, ';' ) );
|
OUString sFontFamily( rsFontName.getToken( 0, ';' ) );
|
||||||
FontPitch ePitch = rCurFont.GetPitch();
|
FontPitch ePitch = rCurFont.GetPitchMaybeAskConfig();
|
||||||
if( ePitch == PITCH_FIXED )
|
if( ePitch == PITCH_FIXED )
|
||||||
{
|
{
|
||||||
sFontFamily += ", monospace";
|
sFontFamily += ", monospace";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FontFamily eFamily = rCurFont.GetFamilyType();
|
FontFamily eFamily = rCurFont.GetFamilyTypeMaybeAskConfig();
|
||||||
if( eFamily == FAMILY_ROMAN )
|
if( eFamily == FAMILY_ROMAN )
|
||||||
sFontFamily += ", serif";
|
sFontFamily += ", serif";
|
||||||
else if( eFamily == FAMILY_SWISS )
|
else if( eFamily == FAMILY_SWISS )
|
||||||
@ -846,13 +846,13 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer )
|
|||||||
|
|
||||||
const OUString& rsCurFontName = maCurrentFont.GetFamilyName();
|
const OUString& rsCurFontName = maCurrentFont.GetFamilyName();
|
||||||
tools::Long nCurFontSize = maCurrentFont.GetFontHeight();
|
tools::Long nCurFontSize = maCurrentFont.GetFontHeight();
|
||||||
FontItalic eCurFontItalic = maCurrentFont.GetItalic();
|
FontItalic eCurFontItalic = maCurrentFont.GetItalicMaybeAskConfig();
|
||||||
FontWeight eCurFontWeight = maCurrentFont.GetWeight();
|
FontWeight eCurFontWeight = maCurrentFont.GetWeightMaybeAskConfig();
|
||||||
|
|
||||||
const OUString& rsParFontName = maParentFont.GetFamilyName();
|
const OUString& rsParFontName = maParentFont.GetFamilyName();
|
||||||
tools::Long nParFontSize = maParentFont.GetFontHeight();
|
tools::Long nParFontSize = maParentFont.GetFontHeight();
|
||||||
FontItalic eParFontItalic = maParentFont.GetItalic();
|
FontItalic eParFontItalic = maParentFont.GetItalicMaybeAskConfig();
|
||||||
FontWeight eParFontWeight = maParentFont.GetWeight();
|
FontWeight eParFontWeight = maParentFont.GetWeightMaybeAskConfig();
|
||||||
|
|
||||||
|
|
||||||
// Font Family
|
// Font Family
|
||||||
@ -955,14 +955,14 @@ void SVGTextWriter::implSetFontFamily()
|
|||||||
{
|
{
|
||||||
const OUString& rsFontName = maCurrentFont.GetFamilyName();
|
const OUString& rsFontName = maCurrentFont.GetFamilyName();
|
||||||
OUString sFontFamily( rsFontName.getToken( 0, ';' ) );
|
OUString sFontFamily( rsFontName.getToken( 0, ';' ) );
|
||||||
FontPitch ePitch = maCurrentFont.GetPitch();
|
FontPitch ePitch = maCurrentFont.GetPitchMaybeAskConfig();
|
||||||
if( ePitch == PITCH_FIXED )
|
if( ePitch == PITCH_FIXED )
|
||||||
{
|
{
|
||||||
sFontFamily += ", monospace";
|
sFontFamily += ", monospace";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FontFamily eFamily = maCurrentFont.GetFamilyType();
|
FontFamily eFamily = maCurrentFont.GetFamilyTypeMaybeAskConfig();
|
||||||
if( eFamily == FAMILY_ROMAN )
|
if( eFamily == FAMILY_ROMAN )
|
||||||
sFontFamily += ", serif";
|
sFontFamily += ", serif";
|
||||||
else if( eFamily == FAMILY_SWISS )
|
else if( eFamily == FAMILY_SWISS )
|
||||||
|
@ -56,7 +56,7 @@ namespace frm
|
|||||||
// defaults
|
// defaults
|
||||||
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont();
|
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont();
|
||||||
aFont.SetFamilyName( u"Times New Roman"_ustr );
|
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
|
// 12 pt font size
|
||||||
MapMode aPointMapMode( MapUnit::MapPoint );
|
MapMode aPointMapMode( MapUnit::MapPoint );
|
||||||
|
@ -56,17 +56,17 @@ public:
|
|||||||
virtual ~Font();
|
virtual ~Font();
|
||||||
|
|
||||||
const OUString& GetFamilyName() const;
|
const OUString& GetFamilyName() const;
|
||||||
FontFamily GetFamilyType();
|
FontFamily GetFamilyTypeMaybeAskConfig();
|
||||||
FontFamily GetFamilyType() const;
|
FontFamily GetFamilyType() const;
|
||||||
const OUString& GetStyleName() const;
|
const OUString& GetStyleName() const;
|
||||||
|
|
||||||
FontWeight GetWeight();
|
FontWeight GetWeightMaybeAskConfig();
|
||||||
FontWeight GetWeight() const;
|
FontWeight GetWeight() const;
|
||||||
FontItalic GetItalic();
|
FontItalic GetItalicMaybeAskConfig();
|
||||||
FontItalic GetItalic() const;
|
FontItalic GetItalic() const;
|
||||||
FontPitch GetPitch();
|
FontPitch GetPitchMaybeAskConfig();
|
||||||
FontPitch GetPitch() const;
|
FontPitch GetPitch() const;
|
||||||
FontWidth GetWidthType();
|
FontWidth GetWidthTypeMaybeAskConfig();
|
||||||
FontWidth GetWidthType() const;
|
FontWidth GetWidthType() const;
|
||||||
TextAlign GetAlignment() const;
|
TextAlign GetAlignment() const;
|
||||||
rtl_TextEncoding GetCharSet() const;
|
rtl_TextEncoding GetCharSet() const;
|
||||||
|
@ -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());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), aFont.GetFontSize().getHeight());
|
||||||
pPattern = pDoc->GetPattern(0,2,1);
|
pPattern = pDoc->GetPattern(0,2,1);
|
||||||
pPattern->fillFontOnly(aFont);
|
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 = pDoc->GetPattern(0,4,1);
|
||||||
pPattern->fillFontOnly(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());
|
||||||
pPattern = pDoc->GetPattern(1,0,1);
|
pPattern = pDoc->GetPattern(1,0,1);
|
||||||
pPattern->fillFontOnly(aFont);
|
pPattern->fillFontOnly(aFont);
|
||||||
pPattern->fillColor(aComplexColor, ScAutoFontColorMode::Raw);
|
pPattern->fillColor(aComplexColor, ScAutoFontColorMode::Raw);
|
||||||
|
@ -1580,13 +1580,15 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold)
|
|||||||
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(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);
|
saveAndReload(u"Calc Office Open XML"_ustr);
|
||||||
pDoc = getScDoc();
|
pDoc = getScDoc();
|
||||||
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
CPPUNIT_ASSERT_EQUAL(SCCOL(INITIALCOLCOUNT), pDoc->GetAllocatedColumnsCount(0));
|
||||||
pDoc->GetPattern(pDoc->MaxCol(), 1, 0)->fillFontOnly(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());
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_FIXTURE(ScExportTest4, testXlsxRowsOrder)
|
CPPUNIT_TEST_FIXTURE(ScExportTest4, testXlsxRowsOrder)
|
||||||
|
@ -1435,7 +1435,7 @@ CPPUNIT_TEST_FIXTURE(Test, testIteratorsUnallocatedColumnsAttributes)
|
|||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
const ScPatternAttr* pattern = m_pDoc->GetPattern(m_pDoc->MaxCol(), 1, 0);
|
const ScPatternAttr* pattern = m_pDoc->GetPattern(m_pDoc->MaxCol(), 1, 0);
|
||||||
pattern->fillFontOnly(aFont);
|
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.
|
// Test iterators.
|
||||||
ScDocAttrIterator docit( *m_pDoc, 0, allocatedColsCount - 1, 1, allocatedColsCount, 2 );
|
ScDocAttrIterator docit( *m_pDoc, 0, allocatedColsCount - 1, 1, allocatedColsCount, 2 );
|
||||||
|
@ -1939,7 +1939,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed)
|
|||||||
const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0);
|
const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0);
|
||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
pPattern->fillFontOnly(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);
|
goToCell(u"A1:A3"_ustr);
|
||||||
|
|
||||||
@ -1965,7 +1966,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed)
|
|||||||
|
|
||||||
pPattern = pDoc->GetPattern(1, 0, 0);
|
pPattern = pDoc->GetPattern(1, 0, 0);
|
||||||
pPattern->fillFontOnly(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());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test the call of .uno:PasteAsLink (tdf#90101)
|
// 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);
|
const ScPatternAttr* pPattern = pDoc->GetPattern(0, 1, 0);
|
||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
pPattern->fillFontOnly(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);
|
goToCell(u"A1:A3"_ustr);
|
||||||
|
|
||||||
@ -2018,7 +2021,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink)
|
|||||||
pPattern = pDoc->GetPattern(2, 1, 0);
|
pPattern = pDoc->GetPattern(2, 1, 0);
|
||||||
pPattern->fillFontOnly(aFont);
|
pPattern->fillFontOnly(aFont);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be normal (cell attributes should not be copied)",
|
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)
|
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119659)
|
||||||
|
@ -1319,16 +1319,19 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes)
|
|||||||
CPPUNIT_ASSERT_EQUAL(INITIALCOLCOUNT, pDoc->GetAllocatedColumnsCount(0));
|
CPPUNIT_ASSERT_EQUAL(INITIALCOLCOUNT, pDoc->GetAllocatedColumnsCount(0));
|
||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
pDoc->GetPattern(pDoc->MaxCol(), 0, 0)->fillFontOnly(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
|
goToCell(u"A2:CV2"_ustr); // first 100 cells in row 2
|
||||||
dispatchCommand(mxComponent, u".uno:Bold"_ustr, {});
|
dispatchCommand(mxComponent, u".uno:Bold"_ustr, {});
|
||||||
// These need to be explicitly allocated.
|
// These need to be explicitly allocated.
|
||||||
CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
|
CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
|
||||||
pDoc->GetPattern(99, 1, 0)->fillFontOnly(aFont);
|
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);
|
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.
|
goToCell("CW3:" + pDoc->MaxColAsString() + "3"); // All but first 100 cells in row 3.
|
||||||
dispatchCommand(mxComponent, u".uno:Bold"_ustr, {});
|
dispatchCommand(mxComponent, u".uno:Bold"_ustr, {});
|
||||||
@ -1336,9 +1339,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testUnallocatedColumnsAttributes)
|
|||||||
// by the default attribute.
|
// by the default attribute.
|
||||||
CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
|
CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
|
||||||
pDoc->GetPattern(99, 2, 0)->fillFontOnly(aFont);
|
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);
|
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)
|
CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testAutoSum)
|
||||||
|
@ -77,8 +77,8 @@ namespace {
|
|||||||
SvxFontItem* getDefaultFontItem(LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId)
|
SvxFontItem* getDefaultFontItem(LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId)
|
||||||
{
|
{
|
||||||
vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
|
vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
|
||||||
SvxFontItem* pNewItem = new SvxFontItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
|
SvxFontItem* pNewItem = new SvxFontItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
|
||||||
aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
|
aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), nItemId );
|
||||||
|
|
||||||
return pNewItem;
|
return pNewItem;
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,8 @@ static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType
|
|||||||
if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
|
if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
|
||||||
{
|
{
|
||||||
vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
|
vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
|
||||||
SvxFontItem aNewItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
|
SvxFontItem aNewItem( aDefFont.GetFamilyTypeMaybeAskConfig(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
|
||||||
aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
|
aDefFont.GetPitchMaybeAskConfig(), aDefFont.GetCharSet(), nItemId );
|
||||||
if ( aNewItem != rSet.Get( nItemId ) )
|
if ( aNewItem != rSet.Get( nItemId ) )
|
||||||
{
|
{
|
||||||
// put item into style's ItemSet only if different from (static) default
|
// put item into style's ItemSet only if different from (static) default
|
||||||
|
@ -671,20 +671,20 @@ ScAutoFormat::ScAutoFormat() :
|
|||||||
vcl::Font aStdFont = OutputDevice::GetDefaultFont(
|
vcl::Font aStdFont = OutputDevice::GetDefaultFont(
|
||||||
DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
||||||
SvxFontItem aFontItem(
|
SvxFontItem aFontItem(
|
||||||
aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
||||||
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT );
|
aStdFont.GetPitchMaybeAskConfig(), aStdFont.GetCharSet(), ATTR_FONT );
|
||||||
|
|
||||||
aStdFont = OutputDevice::GetDefaultFont(
|
aStdFont = OutputDevice::GetDefaultFont(
|
||||||
DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
||||||
SvxFontItem aCJKFontItem(
|
SvxFontItem aCJKFontItem(
|
||||||
aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
||||||
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CJK_FONT );
|
aStdFont.GetPitchMaybeAskConfig(), aStdFont.GetCharSet(), ATTR_CJK_FONT );
|
||||||
|
|
||||||
aStdFont = OutputDevice::GetDefaultFont(
|
aStdFont = OutputDevice::GetDefaultFont(
|
||||||
DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
|
||||||
SvxFontItem aCTLFontItem(
|
SvxFontItem aCTLFontItem(
|
||||||
aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
aStdFont.GetFamilyTypeMaybeAskConfig(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
|
||||||
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CTL_FONT );
|
aStdFont.GetPitchMaybeAskConfig(), aStdFont.GetCharSet(), ATTR_CTL_FONT );
|
||||||
|
|
||||||
SvxFontHeightItem aHeight( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt;
|
SvxFontHeightItem aHeight( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt;
|
||||||
|
|
||||||
|
@ -750,8 +750,8 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
|
|||||||
|
|
||||||
// font name and style
|
// font name and style
|
||||||
aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() );
|
aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() );
|
||||||
aNewData.mnWeight = (aFont.GetWeight() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL;
|
aNewData.mnWeight = (aFont.GetWeightMaybeAskConfig() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL;
|
||||||
aNewData.mbItalic = (aFont.GetItalic() != ITALIC_NONE);
|
aNewData.mbItalic = (aFont.GetItalicMaybeAskConfig() != ITALIC_NONE);
|
||||||
bool bNewFont = (aFontData.maName != aNewData.maName);
|
bool bNewFont = (aFontData.maName != aNewData.maName);
|
||||||
bool bNewStyle = (aFontData.mnWeight != aNewData.mnWeight) ||
|
bool bNewStyle = (aFontData.mnWeight != aNewData.mnWeight) ||
|
||||||
(aFontData.mbItalic != aNewData.mbItalic);
|
(aFontData.mbItalic != aNewData.mbItalic);
|
||||||
|
@ -227,8 +227,8 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet )
|
|||||||
if( const FontList* pFontList = pInfoItem->GetFontList() )
|
if( const FontList* pFontList = pInfoItem->GetFontList() )
|
||||||
{
|
{
|
||||||
FontMetric aFontMetric( pFontList->Get( maData.maName, maData.maStyle ) );
|
FontMetric aFontMetric( pFontList->Get( maData.maName, maData.maStyle ) );
|
||||||
maData.SetScWeight( aFontMetric.GetWeight() );
|
maData.SetScWeight( aFontMetric.GetWeightMaybeAskConfig() );
|
||||||
maData.SetScPosture( aFontMetric.GetItalic() );
|
maData.SetScPosture( aFontMetric.GetItalicMaybeAskConfig() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,8 +228,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
|
|||||||
const OUString& aFontName(pFontItem->GetValue());
|
const OUString& aFontName(pFontItem->GetValue());
|
||||||
vcl::Font aFont(aFontName, Size(1,1)); // Size only because of CTOR
|
vcl::Font aFont(aFontName, Size(1,1)); // Size only because of CTOR
|
||||||
aNewItem = std::make_shared<SvxFontItem>(
|
aNewItem = std::make_shared<SvxFontItem>(
|
||||||
aFont.GetFamilyType(), aFont.GetFamilyName(),
|
aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(),
|
||||||
aFont.GetCharSet(), ATTR_FONT);
|
aFont.GetCharSet(), ATTR_FONT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2853,7 +2853,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
|
|||||||
|
|
||||||
SfxAllItemSet aSet( GetPool() );
|
SfxAllItemSet aSet( GetPool() );
|
||||||
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
|
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();
|
SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame();
|
||||||
auto xFrame = rViewFrame.GetFrame().GetFrameInterface();
|
auto xFrame = rViewFrame.GetFrame().GetFrameInterface();
|
||||||
VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame));
|
VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame));
|
||||||
|
@ -410,8 +410,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
|
|||||||
vcl::Font aFont(aFontName, Size(1,1)); // Size just because CTOR
|
vcl::Font aFont(aFontName, Size(1,1)); // Size just because CTOR
|
||||||
// tdf#125054 see comment in drtxob.cxx, same ID
|
// tdf#125054 see comment in drtxob.cxx, same ID
|
||||||
aNewItem = std::make_shared<SvxFontItem>(
|
aNewItem = std::make_shared<SvxFontItem>(
|
||||||
aFont.GetFamilyType(), aFont.GetFamilyName(),
|
aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(),
|
||||||
aFont.GetCharSet(), ATTR_FONT);
|
aFont.GetCharSet(), ATTR_FONT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -194,13 +194,13 @@ void SdDrawDocument::CreateLayoutTemplates()
|
|||||||
|
|
||||||
getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
|
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 );
|
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 );
|
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 );
|
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
|
||||||
|
|
||||||
rISet.Put( aSvxFontItem );
|
rISet.Put( aSvxFontItem );
|
||||||
@ -652,13 +652,13 @@ void SdDrawDocument::CreateDefaultCellStyles()
|
|||||||
|
|
||||||
getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
|
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 );
|
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 );
|
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 );
|
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
|
||||||
|
|
||||||
SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool());
|
SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool());
|
||||||
|
@ -185,13 +185,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(std::u16string_view rLayoutName,
|
|||||||
mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
|
mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
|
||||||
|
|
||||||
// Font for title and outline
|
// 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 );
|
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 );
|
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 );
|
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
|
||||||
|
|
||||||
vcl::Font aBulletFont( GetBulletFont() );
|
vcl::Font aBulletFont( GetBulletFont() );
|
||||||
|
@ -113,7 +113,7 @@ SfxItemPool* GetAnnotationPool()
|
|||||||
s_pAnnotationPool->SetUserDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
|
s_pAnnotationPool->SetUserDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
|
||||||
|
|
||||||
vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() );
|
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();
|
return s_pAnnotationPool.get();
|
||||||
|
@ -257,8 +257,8 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
|
|||||||
|
|
||||||
// set attributes (set font)
|
// set attributes (set font)
|
||||||
SfxItemSet aSet(pOL->GetEmptyItemSet());
|
SfxItemSet aSet(pOL->GetEmptyItemSet());
|
||||||
SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(),
|
SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(),
|
||||||
aFont.GetCharSet(),
|
aFont.GetCharSet(),
|
||||||
EE_CHAR_FONTINFO);
|
EE_CHAR_FONTINFO);
|
||||||
aSet.Put(aFontItem);
|
aSet.Put(aFontItem);
|
||||||
|
@ -639,28 +639,28 @@ void LineParser::readFont()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Font weight
|
// Font weight
|
||||||
if (aFontReadResult.GetWeight() == WEIGHT_THIN)
|
if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_THIN)
|
||||||
aResult.fontWeight = u"100"_ustr;
|
aResult.fontWeight = u"100"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_ULTRALIGHT)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_ULTRALIGHT)
|
||||||
aResult.fontWeight = u"200"_ustr;
|
aResult.fontWeight = u"200"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_LIGHT)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_LIGHT)
|
||||||
aResult.fontWeight = u"300"_ustr;
|
aResult.fontWeight = u"300"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_SEMILIGHT)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_SEMILIGHT)
|
||||||
aResult.fontWeight = u"350"_ustr;
|
aResult.fontWeight = u"350"_ustr;
|
||||||
// no need to check "normal" here as this is default in nFontWeight above
|
// 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;
|
aResult.fontWeight = u"600"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_BOLD)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_BOLD)
|
||||||
aResult.fontWeight = u"bold"_ustr;
|
aResult.fontWeight = u"bold"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_ULTRABOLD)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_ULTRABOLD)
|
||||||
aResult.fontWeight = u"800"_ustr;
|
aResult.fontWeight = u"800"_ustr;
|
||||||
else if (aFontReadResult.GetWeight() == WEIGHT_BLACK)
|
else if (aFontReadResult.GetWeightMaybeAskConfig() == WEIGHT_BLACK)
|
||||||
aResult.fontWeight = u"900"_ustr;
|
aResult.fontWeight = u"900"_ustr;
|
||||||
SAL_INFO("sdext.pdfimport", aResult.fontWeight);
|
SAL_INFO("sdext.pdfimport", aResult.fontWeight);
|
||||||
|
|
||||||
// Italic
|
// Italic
|
||||||
aResult.isItalic = (aFontReadResult.GetItalic() == ITALIC_OBLIQUE ||
|
aResult.isItalic = (aFontReadResult.GetItalicMaybeAskConfig() == ITALIC_OBLIQUE ||
|
||||||
aFontReadResult.GetItalic() == ITALIC_NORMAL);
|
aFontReadResult.GetItalicMaybeAskConfig() == ITALIC_NORMAL);
|
||||||
} else // font detection failed
|
} else // font detection failed
|
||||||
{
|
{
|
||||||
SAL_WARN("sdext.pdfimport",
|
SAL_WARN("sdext.pdfimport",
|
||||||
|
@ -3265,9 +3265,9 @@ void MathType::HandleText(SmNode *pNode)
|
|||||||
pS->WriteUChar( CHAR );
|
pS->WriteUChar( CHAR );
|
||||||
|
|
||||||
sal_uInt8 nFace = 0x1;
|
sal_uInt8 nFace = 0x1;
|
||||||
if (pNode->GetFont().GetItalic() == ITALIC_NORMAL)
|
if (pNode->GetFont().GetItalicMaybeAskConfig() == ITALIC_NORMAL)
|
||||||
nFace = 0x3;
|
nFace = 0x3;
|
||||||
else if (pNode->GetFont().GetWeight() == WEIGHT_BOLD)
|
else if (pNode->GetFont().GetWeightMaybeAskConfig() == WEIGHT_BOLD)
|
||||||
nFace = 0x7;
|
nFace = 0x7;
|
||||||
pS->WriteUChar( nFace+128 ); //typeface
|
pS->WriteUChar( nFace+128 ); //typeface
|
||||||
sal_uInt16 nChar = pTemp->GetText()[i];
|
sal_uInt16 nChar = pTemp->GetText()[i];
|
||||||
|
@ -139,9 +139,9 @@ void SmEditEngine::setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions&
|
|||||||
vcl::Font aFont = OutputDevice::GetDefaultFont(aFontData.nFontType, nLang,
|
vcl::Font aFont = OutputDevice::GetDefaultFont(aFontData.nFontType, nLang,
|
||||||
GetDefaultFontFlags::OnlyOne);
|
GetDefaultFontFlags::OnlyOne);
|
||||||
aFont.SetColor(aTextColor);
|
aFont.SetColor(aTextColor);
|
||||||
mpItemPool->SetUserDefaultItem(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
|
mpItemPool->SetUserDefaultItem(SvxFontItem(
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(), aFont.GetStyleName(),
|
||||||
aFont.GetCharSet(), aFontData.nFontInfoId));
|
aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), aFontData.nFontInfoId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set font heights
|
// Set font heights
|
||||||
|
@ -268,7 +268,7 @@ void SmSymbolManager::Load()
|
|||||||
// make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek
|
// make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek
|
||||||
const SmSym &rSym = *aGreekSymbols[i];
|
const SmSym &rSym = *aGreekSymbols[i];
|
||||||
vcl::Font aFont( rSym.GetFace() );
|
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 );
|
aFont.SetItalic( ITALIC_NORMAL );
|
||||||
OUString aSymbolName = "i" + rSym.GetUiName();
|
OUString aSymbolName = "i" + rSym.GetUiName();
|
||||||
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
|
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
|
||||||
|
@ -881,10 +881,10 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
|
|||||||
vcl::Font rFont = pSymbol->GetFace();
|
vcl::Font rFont = pSymbol->GetFace();
|
||||||
pDescriptor->sFontName = rFont.GetFamilyName();
|
pDescriptor->sFontName = rFont.GetFamilyName();
|
||||||
pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet());
|
pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet());
|
||||||
pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyType());
|
pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyTypeMaybeAskConfig());
|
||||||
pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch());
|
pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitchMaybeAskConfig());
|
||||||
pDescriptor->nWeight = sal::static_int_cast< sal_Int16 >(rFont.GetWeight());
|
pDescriptor->nWeight = sal::static_int_cast< sal_Int16 >(rFont.GetWeightMaybeAskConfig());
|
||||||
pDescriptor->nItalic = sal::static_int_cast< sal_Int16 >(rFont.GetItalic());
|
pDescriptor->nItalic = sal::static_int_cast< sal_Int16 >(rFont.GetItalicMaybeAskConfig());
|
||||||
pDescriptor++;
|
pDescriptor++;
|
||||||
}
|
}
|
||||||
*pValue <<= aSequence;
|
*pValue <<= aSequence;
|
||||||
|
@ -947,9 +947,9 @@ void FontStyleBox::Fill( std::u16string_view rName, const FontList* pList )
|
|||||||
{
|
{
|
||||||
aFontMetric = FontList::GetFontMetric( hFontMetric );
|
aFontMetric = FontList::GetFontMetric( hFontMetric );
|
||||||
|
|
||||||
FontWeight eWeight = aFontMetric.GetWeight();
|
FontWeight eWeight = aFontMetric.GetWeightMaybeAskConfig();
|
||||||
FontItalic eItalic = aFontMetric.GetItalic();
|
FontItalic eItalic = aFontMetric.GetItalicMaybeAskConfig();
|
||||||
FontWidth eWidth = aFontMetric.GetWidthType();
|
FontWidth eWidth = aFontMetric.GetWidthTypeMaybeAskConfig();
|
||||||
// Only if the attributes are different, we insert the
|
// Only if the attributes are different, we insert the
|
||||||
// Font to avoid double Entries in different languages
|
// Font to avoid double Entries in different languages
|
||||||
if ( (eWeight != eLastWeight) || (eItalic != eLastItalic) ||
|
if ( (eWeight != eLastWeight) || (eItalic != eLastItalic) ||
|
||||||
|
@ -536,8 +536,8 @@ const OUString & FontList::GetFontMapText( const FontMetric& rInfo ) const
|
|||||||
ImplFontListFontMetric* pFontMetric = pData->mpFirst;
|
ImplFontListFontMetric* pFontMetric = pData->mpFirst;
|
||||||
while ( pFontMetric )
|
while ( pFontMetric )
|
||||||
{
|
{
|
||||||
if ( (eWeight == pFontMetric->GetWeight()) &&
|
if ( (eWeight == pFontMetric->GetWeightMaybeAskConfig()) &&
|
||||||
(eItalic == pFontMetric->GetItalic()) )
|
(eItalic == pFontMetric->GetItalicMaybeAskConfig()) )
|
||||||
{
|
{
|
||||||
bNotSynthetic = true;
|
bNotSynthetic = true;
|
||||||
break;
|
break;
|
||||||
@ -687,8 +687,8 @@ FontMetric FontList::Get(const OUString& rName,
|
|||||||
pFontNameInfo = pSearchInfo;
|
pFontNameInfo = pSearchInfo;
|
||||||
while ( pSearchInfo )
|
while ( pSearchInfo )
|
||||||
{
|
{
|
||||||
if ( (eWeight == pSearchInfo->GetWeight()) &&
|
if ( (eWeight == pSearchInfo->GetWeightMaybeAskConfig()) &&
|
||||||
(eItalic == pSearchInfo->GetItalic()) )
|
(eItalic == pSearchInfo->GetItalicMaybeAskConfig()) )
|
||||||
{
|
{
|
||||||
pFontMetric = pSearchInfo;
|
pFontMetric = pSearchInfo;
|
||||||
break;
|
break;
|
||||||
|
@ -653,7 +653,7 @@ bool TabBar::ImplCalcWidth()
|
|||||||
|
|
||||||
// retrieve width of tabs with bold font
|
// retrieve width of tabs with bold font
|
||||||
vcl::Font aFont = GetFont();
|
vcl::Font aFont = GetFont();
|
||||||
if (aFont.GetWeight() != WEIGHT_BOLD)
|
if (aFont.GetWeightMaybeAskConfig() != WEIGHT_BOLD)
|
||||||
{
|
{
|
||||||
aFont.SetWeight(WEIGHT_BOLD);
|
aFont.SetWeight(WEIGHT_BOLD);
|
||||||
SetFont(aFont);
|
SetFont(aFont);
|
||||||
|
@ -353,8 +353,8 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
|
|||||||
sal_UCS4 cChar = sGlyph.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
|
sal_UCS4 cChar = sGlyph.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
|
||||||
const SfxItemPool* pPool = m_xOutputSet->GetPool();
|
const SfxItemPool* pPool = m_xOutputSet->GetPool();
|
||||||
m_xOutputSet->Put( SfxStringItem( SID_CHARMAP, sGlyph ) );
|
m_xOutputSet->Put( SfxStringItem( SID_CHARMAP, sGlyph ) );
|
||||||
m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(),
|
m_xOutputSet->Put( SvxFontItem( aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), pPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) );
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), pPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) );
|
||||||
m_xOutputSet->Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) );
|
m_xOutputSet->Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) );
|
||||||
m_xOutputSet->Put( SfxInt32Item( SID_ATTR_CHAR, cChar ) );
|
m_xOutputSet->Put( SfxInt32Item( SID_ATTR_CHAR, cChar ) );
|
||||||
}
|
}
|
||||||
|
@ -112,15 +112,15 @@ void WeldEditView::makeEditEngine()
|
|||||||
|
|
||||||
vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont());
|
vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont());
|
||||||
|
|
||||||
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
|
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(),
|
||||||
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO));
|
RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO));
|
||||||
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
|
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(),
|
||||||
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO_CJK));
|
RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK));
|
||||||
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
|
pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyTypeMaybeAskConfig(),
|
||||||
u""_ustr, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
|
aAppFont.GetFamilyName(), u""_ustr, PITCH_DONTKNOW,
|
||||||
EE_CHAR_FONTINFO_CTL));
|
RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL));
|
||||||
|
|
||||||
pItemPool->SetUserDefaultItem(
|
pItemPool->SetUserDefaultItem(
|
||||||
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT));
|
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT));
|
||||||
|
@ -396,11 +396,11 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr
|
|||||||
vcl::Font aFnt(mpVD->GetFont());
|
vcl::Font aFnt(mpVD->GetFont());
|
||||||
const sal_uInt32 nHeight(basegfx::fround(implMap(aFnt.GetFontSize()).Height() * mfScaleY));
|
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.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), 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.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), 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( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) );
|
||||||
mpTextAttr->Put(SvxPostureItem(aFnt.GetItalic(), EE_CHAR_ITALIC));
|
mpTextAttr->Put(SvxPostureItem(aFnt.GetItalicMaybeAskConfig(), EE_CHAR_ITALIC));
|
||||||
mpTextAttr->Put(SvxWeightItem(aFnt.GetWeight(), EE_CHAR_WEIGHT));
|
mpTextAttr->Put(SvxWeightItem(aFnt.GetWeightMaybeAskConfig(), EE_CHAR_WEIGHT));
|
||||||
mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) );
|
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_CJK ) );
|
||||||
mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) );
|
mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) );
|
||||||
|
@ -651,28 +651,28 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
|
|||||||
|
|
||||||
// get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
|
// get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
|
||||||
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
||||||
aSvxFontItem.SetFamily(aFont.GetFamilyType());
|
aSvxFontItem.SetFamily(aFont.GetFamilyTypeMaybeAskConfig());
|
||||||
aSvxFontItem.SetFamilyName(aFont.GetFamilyName());
|
aSvxFontItem.SetFamilyName(aFont.GetFamilyName());
|
||||||
aSvxFontItem.SetStyleName(OUString());
|
aSvxFontItem.SetStyleName(OUString());
|
||||||
aSvxFontItem.SetPitch( aFont.GetPitch());
|
aSvxFontItem.SetPitch( aFont.GetPitchMaybeAskConfig());
|
||||||
aSvxFontItem.SetCharSet( aFont.GetCharSet() );
|
aSvxFontItem.SetCharSet( aFont.GetCharSet() );
|
||||||
pItemPool->SetUserDefaultItem(aSvxFontItem);
|
pItemPool->SetUserDefaultItem(aSvxFontItem);
|
||||||
|
|
||||||
// get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
|
// get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
|
||||||
vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
||||||
aSvxFontItemCJK.SetFamily( aFontCJK.GetFamilyType());
|
aSvxFontItemCJK.SetFamily( aFontCJK.GetFamilyTypeMaybeAskConfig());
|
||||||
aSvxFontItemCJK.SetFamilyName(aFontCJK.GetFamilyName());
|
aSvxFontItemCJK.SetFamilyName(aFontCJK.GetFamilyName());
|
||||||
aSvxFontItemCJK.SetStyleName(OUString());
|
aSvxFontItemCJK.SetStyleName(OUString());
|
||||||
aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch());
|
aSvxFontItemCJK.SetPitch( aFontCJK.GetPitchMaybeAskConfig());
|
||||||
aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet());
|
aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet());
|
||||||
pItemPool->SetUserDefaultItem(aSvxFontItemCJK);
|
pItemPool->SetUserDefaultItem(aSvxFontItemCJK);
|
||||||
|
|
||||||
// get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
|
// get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
|
||||||
vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
|
||||||
aSvxFontItemCTL.SetFamily(aFontCTL.GetFamilyType());
|
aSvxFontItemCTL.SetFamily(aFontCTL.GetFamilyTypeMaybeAskConfig());
|
||||||
aSvxFontItemCTL.SetFamilyName(aFontCTL.GetFamilyName());
|
aSvxFontItemCTL.SetFamilyName(aFontCTL.GetFamilyName());
|
||||||
aSvxFontItemCTL.SetStyleName(OUString());
|
aSvxFontItemCTL.SetStyleName(OUString());
|
||||||
aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() );
|
aSvxFontItemCTL.SetPitch( aFontCTL.GetPitchMaybeAskConfig() );
|
||||||
aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet());
|
aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet());
|
||||||
pItemPool->SetUserDefaultItem(aSvxFontItemCTL);
|
pItemPool->SetUserDefaultItem(aSvxFontItemCTL);
|
||||||
|
|
||||||
|
@ -344,14 +344,17 @@ void ImpSdrPdfImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr)
|
|||||||
const sal_uInt32 nHeight(
|
const sal_uInt32 nHeight(
|
||||||
basegfx::fround<sal_uInt32>(aFnt.GetFontSize().Height() * mfScaleY));
|
basegfx::fround<sal_uInt32>(aFnt.GetFontSize().Height() * mfScaleY));
|
||||||
|
|
||||||
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(),
|
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO));
|
aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(),
|
||||||
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(),
|
aFnt.GetCharSet(), EE_CHAR_FONTINFO));
|
||||||
aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK));
|
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(),
|
aFnt.GetStyleName(), aFnt.GetPitchMaybeAskConfig(),
|
||||||
aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL));
|
aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK));
|
||||||
mpTextAttr->Put(SvxPostureItem(aFnt.GetItalic(), EE_CHAR_ITALIC));
|
mpTextAttr->Put(SvxFontItem(aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
mpTextAttr->Put(SvxWeightItem(aFnt.GetWeight(), EE_CHAR_WEIGHT));
|
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));
|
||||||
mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
|
mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
|
||||||
mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
|
mpTextAttr->Put(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
|
||||||
|
@ -1793,7 +1793,7 @@ void SvxFontNameBox_Base::CheckAndMarkUnknownFont()
|
|||||||
vcl::Font font = m_xWidget->get_entry_font();
|
vcl::Font font = m_xWidget->get_entry_font();
|
||||||
if (fontname.isEmpty() || CheckFontIsAvailable(fontname))
|
if (fontname.isEmpty() || CheckFontIsAvailable(fontname))
|
||||||
{
|
{
|
||||||
if( font.GetItalic() != ITALIC_NONE )
|
if( font.GetItalicMaybeAskConfig() != ITALIC_NONE )
|
||||||
{
|
{
|
||||||
font.SetItalic( ITALIC_NONE );
|
font.SetItalic( ITALIC_NONE );
|
||||||
m_xWidget->set_entry_font(font);
|
m_xWidget->set_entry_font(font);
|
||||||
@ -1802,7 +1802,7 @@ void SvxFontNameBox_Base::CheckAndMarkUnknownFont()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( font.GetItalic() != ITALIC_NORMAL )
|
if( font.GetItalicMaybeAskConfig() != ITALIC_NORMAL )
|
||||||
{
|
{
|
||||||
font.SetItalic( ITALIC_NORMAL );
|
font.SetItalic( ITALIC_NORMAL );
|
||||||
m_xWidget->set_entry_font(font);
|
m_xWidget->set_entry_font(font);
|
||||||
@ -1986,14 +1986,14 @@ void SvxFontNameBox_Base::Select(bool bNonTravelSelect)
|
|||||||
if ( pFontList )
|
if ( pFontList )
|
||||||
{
|
{
|
||||||
FontMetric aFontMetric( pFontList->Get(m_xWidget->get_active_text(),
|
FontMetric aFontMetric( pFontList->Get(m_xWidget->get_active_text(),
|
||||||
aCurFont.GetWeight(),
|
aCurFont.GetWeightMaybeAskConfig(),
|
||||||
aCurFont.GetItalic() ) );
|
aCurFont.GetItalicMaybeAskConfig() ) );
|
||||||
aCurFont = aFontMetric;
|
aCurFont = aFontMetric;
|
||||||
|
|
||||||
pFontItem.reset( new SvxFontItem( aFontMetric.GetFamilyType(),
|
pFontItem.reset( new SvxFontItem( aFontMetric.GetFamilyTypeMaybeAskConfig(),
|
||||||
aFontMetric.GetFamilyName(),
|
aFontMetric.GetFamilyName(),
|
||||||
aFontMetric.GetStyleName(),
|
aFontMetric.GetStyleName(),
|
||||||
aFontMetric.GetPitch(),
|
aFontMetric.GetPitchMaybeAskConfig(),
|
||||||
aFontMetric.GetCharSet(),
|
aFontMetric.GetCharSet(),
|
||||||
SID_ATTR_CHAR_FONT ) );
|
SID_ATTR_CHAR_FONT ) );
|
||||||
|
|
||||||
|
@ -139,8 +139,8 @@ namespace
|
|||||||
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType,
|
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType,
|
||||||
nLng, GetDefaultFontFlags::OnlyOne ) );
|
nLng, GetDefaultFontFlags::OnlyOne ) );
|
||||||
|
|
||||||
rSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(),
|
rSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
OUString(), aFnt.GetPitch(),
|
OUString(), aFnt.GetPitchMaybeAskConfig(),
|
||||||
aFnt.GetCharSet(), n.nResFntId ));
|
aFnt.GetCharSet(), n.nResFntId ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,8 +168,8 @@ namespace
|
|||||||
vcl::Font aFnt( OutputDevice::GetDefaultFont( n.nFntType,
|
vcl::Font aFnt( OutputDevice::GetDefaultFont( n.nFntType,
|
||||||
nLng, GetDefaultFontFlags::OnlyOne ) );
|
nLng, GetDefaultFontFlags::OnlyOne ) );
|
||||||
|
|
||||||
rSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(),
|
rSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
OUString(), aFnt.GetPitch(),
|
OUString(), aFnt.GetPitchMaybeAskConfig(),
|
||||||
aFnt.GetCharSet(), n.nResFntId ));
|
aFnt.GetCharSet(), n.nResFntId ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -808,8 +808,8 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
|
|||||||
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i],
|
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i],
|
||||||
nLng, GetDefaultFontFlags::OnlyOne ) );
|
nLng, GetDefaultFontFlags::OnlyOne ) );
|
||||||
|
|
||||||
aSet.Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(),
|
aSet.Put( SvxFontItem( aFnt.GetFamilyTypeMaybeAskConfig(), aFnt.GetFamilyName(),
|
||||||
OUString(), aFnt.GetPitch(),
|
OUString(), aFnt.GetPitchMaybeAskConfig(),
|
||||||
aFnt.GetCharSet(), aFontWhich[i] ));
|
aFnt.GetCharSet(), aFontWhich[i] ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1753,10 +1753,10 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
|
|||||||
m_aDelPam.SetMark();
|
m_aDelPam.SetMark();
|
||||||
*m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(1));
|
*m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(1));
|
||||||
SetAllScriptItem( aSet,
|
SetAllScriptItem( aSet,
|
||||||
SvxFontItem( m_aFlags.aBulletFont.GetFamilyType(),
|
SvxFontItem( m_aFlags.aBulletFont.GetFamilyTypeMaybeAskConfig(),
|
||||||
m_aFlags.aBulletFont.GetFamilyName(),
|
m_aFlags.aBulletFont.GetFamilyName(),
|
||||||
m_aFlags.aBulletFont.GetStyleName(),
|
m_aFlags.aBulletFont.GetStyleName(),
|
||||||
m_aFlags.aBulletFont.GetPitch(),
|
m_aFlags.aBulletFont.GetPitchMaybeAskConfig(),
|
||||||
m_aFlags.aBulletFont.GetCharSet(),
|
m_aFlags.aBulletFont.GetCharSet(),
|
||||||
RES_CHRATR_FONT ) );
|
RES_CHRATR_FONT ) );
|
||||||
m_pDoc->SetFormatItemByAutoFormat( m_aDelPam, aSet );
|
m_pDoc->SetFormatItemByAutoFormat( m_aDelPam, aSet );
|
||||||
|
@ -449,8 +449,8 @@ void SwFntObj::CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut )
|
|||||||
FontMetric aMet = pPrt->GetFontMetric( );
|
FontMetric aMet = pPrt->GetFontMetric( );
|
||||||
// Don't lose "faked" properties of the logical font that don't truly
|
// 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
|
// exist in the physical font metrics which vcl which fake up for us
|
||||||
aMet.SetWeight(m_pScrFont->GetWeight());
|
aMet.SetWeight(m_pScrFont->GetWeightMaybeAskConfig());
|
||||||
aMet.SetItalic(m_pScrFont->GetItalic());
|
aMet.SetItalic(m_pScrFont->GetItalicMaybeAskConfig());
|
||||||
|
|
||||||
m_bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
|
m_bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
|
||||||
|
|
||||||
|
@ -137,8 +137,8 @@ SwASCIIParser::SwASCIIParser(SwDoc& rD, const SwPaM& rCursor, SvStream& rIn, boo
|
|||||||
vcl::Font aTextFont(m_rOpt.GetFontName(), Size(0, 10));
|
vcl::Font aTextFont(m_rOpt.GetFontName(), Size(0, 10));
|
||||||
if (m_rDoc.getIDocumentDeviceAccess().getPrinter(false))
|
if (m_rDoc.getIDocumentDeviceAccess().getPrinter(false))
|
||||||
aTextFont = m_rDoc.getIDocumentDeviceAccess().getPrinter(false)->GetFontMetric(aTextFont);
|
aTextFont = m_rDoc.getIDocumentDeviceAccess().getPrinter(false)->GetFontMetric(aTextFont);
|
||||||
SvxFontItem aFont( aTextFont.GetFamilyType(), aTextFont.GetFamilyName(),
|
SvxFontItem aFont( aTextFont.GetFamilyTypeMaybeAskConfig(), aTextFont.GetFamilyName(),
|
||||||
OUString(), aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT );
|
OUString(), aTextFont.GetPitchMaybeAskConfig(), aTextFont.GetCharSet(), RES_CHRATR_FONT );
|
||||||
m_oItemSet->Put(aFont);
|
m_oItemSet->Put(aFont);
|
||||||
aFont.SetWhich(RES_CHRATR_CJK_FONT);
|
aFont.SetWhich(RES_CHRATR_CJK_FONT);
|
||||||
m_oItemSet->Put(aFont);
|
m_oItemSet->Put(aFont);
|
||||||
|
@ -596,14 +596,14 @@ static void lcl_html_setFixedFontProperty(
|
|||||||
rPropSet->setPropertyValue(u"FontStyleName"_ustr,
|
rPropSet->setPropertyValue(u"FontStyleName"_ustr,
|
||||||
aTmp );
|
aTmp );
|
||||||
|
|
||||||
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetFamilyType());
|
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetFamilyTypeMaybeAskConfig());
|
||||||
rPropSet->setPropertyValue(u"FontFamily"_ustr, aTmp );
|
rPropSet->setPropertyValue(u"FontFamily"_ustr, aTmp );
|
||||||
|
|
||||||
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetCharSet());
|
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetCharSet());
|
||||||
rPropSet->setPropertyValue(u"FontCharset"_ustr,
|
rPropSet->setPropertyValue(u"FontCharset"_ustr,
|
||||||
aTmp );
|
aTmp );
|
||||||
|
|
||||||
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetPitch());
|
aTmp <<= static_cast<sal_Int16>(aFixedFont.GetPitchMaybeAskConfig());
|
||||||
rPropSet->setPropertyValue(u"FontPitch"_ustr, aTmp );
|
rPropSet->setPropertyValue(u"FontPitch"_ustr, aTmp );
|
||||||
|
|
||||||
aTmp <<= float(10.0);
|
aTmp <<= float(10.0);
|
||||||
|
@ -340,9 +340,9 @@ void Writer::PutNumFormatFontsInAttrPool()
|
|||||||
else if( *pFont == *pDefFont )
|
else if( *pFont == *pDefFont )
|
||||||
bCheck = true;
|
bCheck = true;
|
||||||
|
|
||||||
AddFontItem( rPool, SvxFontItem( pFont->GetFamilyType(),
|
AddFontItem( rPool, SvxFontItem( pFont->GetFamilyTypeMaybeAskConfig(),
|
||||||
pFont->GetFamilyName(), pFont->GetStyleName(),
|
pFont->GetFamilyName(), pFont->GetStyleName(),
|
||||||
pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT ));
|
pFont->GetPitchMaybeAskConfig(), pFont->GetCharSet(), RES_CHRATR_FONT ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -521,7 +521,7 @@ void MSWordExportBase::NumberingLevel(
|
|||||||
|
|
||||||
eChrSet = pBulletFont->GetCharSet();
|
eChrSet = pBulletFont->GetCharSet();
|
||||||
sFontName = pBulletFont->GetFamilyName();
|
sFontName = pBulletFont->GetFamilyName();
|
||||||
eFamily = pBulletFont->GetFamilyType();
|
eFamily = pBulletFont->GetFamilyTypeMaybeAskConfig();
|
||||||
|
|
||||||
if (IsOpenSymbol(sFontName))
|
if (IsOpenSymbol(sFontName))
|
||||||
SubstituteBullet(sNumStr, eChrSet, sFontName);
|
SubstituteBullet(sNumStr, eChrSet, sFontName);
|
||||||
@ -547,7 +547,7 @@ void MSWordExportBase::NumberingLevel(
|
|||||||
if (sFontName.isEmpty())
|
if (sFontName.isEmpty())
|
||||||
sFontName = pBulletFont->GetFamilyName();
|
sFontName = pBulletFont->GetFamilyName();
|
||||||
|
|
||||||
pPseudoFont.reset(new wwFont( sFontName, pBulletFont->GetPitch(),
|
pPseudoFont.reset(new wwFont( sFontName, pBulletFont->GetPitchMaybeAskConfig(),
|
||||||
eFamily, eChrSet));
|
eFamily, eChrSet));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -921,8 +921,8 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
|
|||||||
if( pPrt )
|
if( pPrt )
|
||||||
aFont = pPrt->GetFontMetric( aFont );
|
aFont = pPrt->GetFontMetric( aFont );
|
||||||
SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
|
SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
|
||||||
pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
|
pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
|
OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
|
static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
|
||||||
@ -1014,8 +1014,8 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
|
|||||||
vcl::Font aFont( sStandard, Size( 0, 10 ) );
|
vcl::Font aFont( sStandard, Size( 0, 10 ) );
|
||||||
if( pPrinter )
|
if( pPrinter )
|
||||||
aFont = pPrinter->GetFontMetric( aFont );
|
aFont = pPrinter->GetFontMetric( aFont );
|
||||||
m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
|
m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
|
OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich));
|
||||||
SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD);
|
SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD);
|
||||||
pColl->ResetFormatAttr(nFontWhich);
|
pColl->ResetFormatAttr(nFontWhich);
|
||||||
bMod = true;
|
bMod = true;
|
||||||
|
@ -179,8 +179,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
|
|||||||
aFont = pPrt->GetFontMetric( aFont );
|
aFont = pPrt->GetFontMetric( aFont );
|
||||||
}
|
}
|
||||||
|
|
||||||
pFontItem.reset(new SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
|
pFontItem.reset(new SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
|
OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -196,8 +196,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
|
|||||||
nFontTypes[i],
|
nFontTypes[i],
|
||||||
eLanguage,
|
eLanguage,
|
||||||
GetDefaultFontFlags::OnlyOne );
|
GetDefaultFontFlags::OnlyOne );
|
||||||
pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamilyType(), aLangDefFont.GetFamilyName(),
|
pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamilyTypeMaybeAskConfig(), aLangDefFont.GetFamilyName(),
|
||||||
OUString(), aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich));
|
OUString(), aLangDefFont.GetPitchMaybeAskConfig(), aLangDefFont.GetCharSet(), nFontWhich));
|
||||||
}
|
}
|
||||||
m_xDoc->SetDefault(*pFontItem);
|
m_xDoc->SetDefault(*pFontItem);
|
||||||
if( !bHTMLTemplSet )
|
if( !bHTMLTemplSet )
|
||||||
@ -267,8 +267,8 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
|
|||||||
SfxItemState::SET != pColl->GetAttrSet().GetItemState(
|
SfxItemState::SET != pColl->GetAttrSet().GetItemState(
|
||||||
nFontWhich, false ) )
|
nFontWhich, false ) )
|
||||||
{
|
{
|
||||||
pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
|
pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
|
OUString(), aFont.GetPitchMaybeAskConfig(), aFont.GetCharSet(), nFontWhich));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage );
|
sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage );
|
||||||
|
@ -1874,8 +1874,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
|
|||||||
|
|
||||||
// Attributing (set font)
|
// Attributing (set font)
|
||||||
SfxItemSet aSetFont( *aFontSet.GetPool(), aFontSet.GetRanges() );
|
SfxItemSet aSetFont( *aFontSet.GetPool(), aFontSet.GetRanges() );
|
||||||
SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(),
|
SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(),
|
||||||
aFont.GetCharSet(),
|
aFont.GetCharSet(),
|
||||||
EE_CHAR_FONTINFO );
|
EE_CHAR_FONTINFO );
|
||||||
SvtScriptType nScriptBreak = g_pBreakIt->GetAllScriptsOfText( sSym );
|
SvtScriptType nScriptBreak = g_pBreakIt->GetAllScriptsOfText( sSym );
|
||||||
|
@ -759,8 +759,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
|
|||||||
|
|
||||||
// assign attributes (Set font)
|
// assign attributes (Set font)
|
||||||
SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() );
|
SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() );
|
||||||
SvxFontItem aFontItem (aFont.GetFamilyType(), aFont.GetFamilyName(),
|
SvxFontItem aFontItem (aFont.GetFamilyTypeMaybeAskConfig(), aFont.GetFamilyName(),
|
||||||
aFont.GetStyleName(), aFont.GetPitch(),
|
aFont.GetStyleName(), aFont.GetPitchMaybeAskConfig(),
|
||||||
aFont.GetCharSet(),
|
aFont.GetCharSet(),
|
||||||
EE_CHAR_FONTINFO );
|
EE_CHAR_FONTINFO );
|
||||||
nScript = g_pBreakIt->GetAllScriptsOfText( sSym );
|
nScript = g_pBreakIt->GetAllScriptsOfText( sSym );
|
||||||
|
@ -1077,8 +1077,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
|
|||||||
{
|
{
|
||||||
std::unique_ptr<SvxFontItem> aNewFontItem(aFont->Clone());
|
std::unique_ptr<SvxFontItem> aNewFontItem(aFont->Clone());
|
||||||
aNewFontItem->SetFamilyName( aNewFont.GetFamilyName() );
|
aNewFontItem->SetFamilyName( aNewFont.GetFamilyName() );
|
||||||
aNewFontItem->SetFamily( aNewFont.GetFamilyType());
|
aNewFontItem->SetFamily( aNewFont.GetFamilyTypeMaybeAskConfig());
|
||||||
aNewFontItem->SetPitch( aNewFont.GetPitch());
|
aNewFontItem->SetPitch( aNewFont.GetPitchMaybeAskConfig());
|
||||||
aNewFontItem->SetCharSet( aNewFont.GetCharSet() );
|
aNewFontItem->SetCharSet( aNewFont.GetCharSet() );
|
||||||
|
|
||||||
SfxItemSet aRestoreSet(SfxItemSet::makeFixedSfxItemSet<
|
SfxItemSet aRestoreSet(SfxItemSet::makeFixedSfxItemSet<
|
||||||
|
@ -68,20 +68,20 @@ void VclFontTest::testWeight()
|
|||||||
{
|
{
|
||||||
vcl::Font aFont;
|
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);
|
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()
|
void VclFontTest::testWidthType()
|
||||||
{
|
{
|
||||||
vcl::Font aFont;
|
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);
|
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()
|
void VclFontTest::testItalic()
|
||||||
@ -89,10 +89,10 @@ void VclFontTest::testItalic()
|
|||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
|
|
||||||
// shouldn't this be set to ITALIC_DONTKNOW? currently it defaults to ITALIC_NONE
|
// 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);
|
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;
|
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);
|
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()
|
void VclFontTest::testQuality()
|
||||||
|
@ -848,7 +848,7 @@ Document::retrieveCharacterAttributes(
|
|||||||
|
|
||||||
//character posture
|
//character posture
|
||||||
aAttrib.Name = "CharPosture";
|
aAttrib.Name = "CharPosture";
|
||||||
aAttrib.Value <<= vcl::unohelper::ConvertFontSlant(aFont.GetItalic());
|
aAttrib.Value <<= vcl::unohelper::ConvertFontSlant(aFont.GetItalicMaybeAskConfig());
|
||||||
aAttribs.push_back(aAttrib);
|
aAttribs.push_back(aAttrib);
|
||||||
|
|
||||||
//character relief
|
//character relief
|
||||||
@ -870,7 +870,7 @@ Document::retrieveCharacterAttributes(
|
|||||||
|
|
||||||
//character weight
|
//character weight
|
||||||
aAttrib.Name = "CharWeight";
|
aAttrib.Name = "CharWeight";
|
||||||
aAttrib.Value <<= static_cast<float>(aFont.GetWeight());
|
aAttrib.Value <<= static_cast<float>(aFont.GetWeightMaybeAskConfig());
|
||||||
aAttribs.push_back(aAttrib);
|
aAttribs.push_back(aAttrib);
|
||||||
|
|
||||||
//character alignment
|
//character alignment
|
||||||
|
@ -96,7 +96,7 @@ css::uno::Any SAL_CALL FontIdentificator::getMaterial()
|
|||||||
aFD.Kerning = false;
|
aFD.Kerning = false;
|
||||||
aFD.WordLineMode = false;
|
aFD.WordLineMode = false;
|
||||||
aFD.Type = 0;
|
aFD.Type = 0;
|
||||||
switch( m_aFont.GetFamilyType() )
|
switch( m_aFont.GetFamilyTypeMaybeAskConfig() )
|
||||||
{
|
{
|
||||||
case FAMILY_DECORATIVE: aFD.Family = css::awt::FontFamily::DECORATIVE;break;
|
case FAMILY_DECORATIVE: aFD.Family = css::awt::FontFamily::DECORATIVE;break;
|
||||||
case FAMILY_MODERN: aFD.Family = css::awt::FontFamily::MODERN;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;
|
aFD.Family = css::awt::FontFamily::DONTKNOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch( m_aFont.GetPitch() )
|
switch( m_aFont.GetPitchMaybeAskConfig() )
|
||||||
{
|
{
|
||||||
case PITCH_VARIABLE: aFD.Pitch = css::awt::FontPitch::VARIABLE;break;
|
case PITCH_VARIABLE: aFD.Pitch = css::awt::FontPitch::VARIABLE;break;
|
||||||
case PITCH_FIXED: aFD.Pitch = css::awt::FontPitch::FIXED;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;
|
aFD.Pitch = css::awt::FontPitch::DONTKNOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch( m_aFont.GetWeight() )
|
switch( m_aFont.GetWeightMaybeAskConfig() )
|
||||||
{
|
{
|
||||||
case WEIGHT_THIN: aFD.Weight = css::awt::FontWeight::THIN;break;
|
case WEIGHT_THIN: aFD.Weight = css::awt::FontWeight::THIN;break;
|
||||||
case WEIGHT_ULTRALIGHT: aFD.Weight = css::awt::FontWeight::ULTRALIGHT;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;
|
aFD.Weight = css::awt::FontWeight::DONTKNOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch( m_aFont.GetItalic() )
|
switch( m_aFont.GetItalicMaybeAskConfig() )
|
||||||
{
|
{
|
||||||
case ITALIC_OBLIQUE: aFD.Slant = css::awt::FontSlant_OBLIQUE;break;
|
case ITALIC_OBLIQUE: aFD.Slant = css::awt::FontSlant_OBLIQUE;break;
|
||||||
case ITALIC_NORMAL: aFD.Slant = css::awt::FontSlant_ITALIC;break;
|
case ITALIC_NORMAL: aFD.Slant = css::awt::FontSlant_ITALIC;break;
|
||||||
|
@ -2057,11 +2057,11 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
|
|||||||
|
|
||||||
if ( maLastFont != maFont )
|
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" );
|
ImplDefineFont( "Courier", "Oblique" );
|
||||||
else if ( maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
|
else if ( maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
|
||||||
ImplWriteLine( "/Symbol findfont" );
|
ImplWriteLine( "/Symbol findfont" );
|
||||||
else if ( maFont.GetFamilyType() == FAMILY_SWISS )
|
else if ( maFont.GetFamilyTypeMaybeAskConfig() == FAMILY_SWISS )
|
||||||
ImplDefineFont( "Helvetica", "Oblique" );
|
ImplDefineFont( "Helvetica", "Oblique" );
|
||||||
else
|
else
|
||||||
ImplDefineFont( "Times", "Italic" );
|
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->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding
|
||||||
mpPS->WriteOString( pOriginalName );
|
mpPS->WriteOString( pOriginalName );
|
||||||
switch ( maFont.GetWeight() )
|
switch ( maFont.GetWeightMaybeAskConfig() )
|
||||||
{
|
{
|
||||||
case WEIGHT_SEMIBOLD :
|
case WEIGHT_SEMIBOLD :
|
||||||
case WEIGHT_BOLD :
|
case WEIGHT_BOLD :
|
||||||
case WEIGHT_ULTRABOLD :
|
case WEIGHT_ULTRABOLD :
|
||||||
case WEIGHT_BLACK :
|
case WEIGHT_BLACK :
|
||||||
mpPS->WriteOString( "-Bold" );
|
mpPS->WriteOString( "-Bold" );
|
||||||
if ( maFont.GetItalic() != ITALIC_NONE )
|
if ( maFont.GetItalicMaybeAskConfig() != ITALIC_NONE )
|
||||||
mpPS->WriteOString( pItalic );
|
mpPS->WriteOString( pItalic );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ( maFont.GetItalic() != ITALIC_NONE )
|
if ( maFont.GetItalicMaybeAskConfig() != ITALIC_NONE )
|
||||||
mpPS->WriteOString( pItalic );
|
mpPS->WriteOString( pItalic );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,6 @@ void Font::Merge( const vcl::Font& rFont )
|
|||||||
SetCharSet( rFont.GetCharSet() );
|
SetCharSet( rFont.GetCharSet() );
|
||||||
SetLanguageTag( rFont.GetLanguageTag() );
|
SetLanguageTag( rFont.GetLanguageTag() );
|
||||||
SetCJKContextLanguageTag( rFont.GetCJKContextLanguageTag() );
|
SetCJKContextLanguageTag( rFont.GetCJKContextLanguageTag() );
|
||||||
// don't use access methods here, might lead to AskConfig(), if DONTKNOW
|
|
||||||
SetFamily( rFont.GetFamilyType() );
|
SetFamily( rFont.GetFamilyType() );
|
||||||
SetPitch( rFont.GetPitch() );
|
SetPitch( rFont.GetPitch() );
|
||||||
}
|
}
|
||||||
@ -926,11 +925,11 @@ Degree10 Font::GetOrientation() const { return mpImplFont->mnOrientation; }
|
|||||||
bool Font::IsVertical() const { return mpImplFont->mbVertical; }
|
bool Font::IsVertical() const { return mpImplFont->mbVertical; }
|
||||||
FontKerning Font::GetKerning() const { return mpImplFont->meKerning; }
|
FontKerning Font::GetKerning() const { return mpImplFont->meKerning; }
|
||||||
|
|
||||||
FontPitch Font::GetPitch() { return mpImplFont->GetPitch(); }
|
FontPitch Font::GetPitchMaybeAskConfig() { return mpImplFont->GetPitch(); }
|
||||||
FontWeight Font::GetWeight() { return mpImplFont->GetWeight(); }
|
FontWeight Font::GetWeightMaybeAskConfig() { return mpImplFont->GetWeight(); }
|
||||||
FontWidth Font::GetWidthType() { return mpImplFont->GetWidthType(); }
|
FontWidth Font::GetWidthTypeMaybeAskConfig() { return mpImplFont->GetWidthType(); }
|
||||||
FontItalic Font::GetItalic() { return mpImplFont->GetItalic(); }
|
FontItalic Font::GetItalicMaybeAskConfig() { return mpImplFont->GetItalic(); }
|
||||||
FontFamily Font::GetFamilyType() { return mpImplFont->GetFamilyType(); }
|
FontFamily Font::GetFamilyTypeMaybeAskConfig() { return mpImplFont->GetFamilyType(); }
|
||||||
|
|
||||||
FontPitch Font::GetPitch() const { return mpImplFont->GetPitchNoAsk(); }
|
FontPitch Font::GetPitch() const { return mpImplFont->GetPitchNoAsk(); }
|
||||||
FontWeight Font::GetWeight() const { return mpImplFont->GetWeightNoAsk(); }
|
FontWeight Font::GetWeight() const { return mpImplFont->GetWeightNoAsk(); }
|
||||||
|
@ -1331,7 +1331,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r
|
|||||||
rWriter.attribute("width", aFont.GetFontSize().Width());
|
rWriter.attribute("width", aFont.GetFontSize().Width());
|
||||||
rWriter.attribute("height", aFont.GetFontSize().Height());
|
rWriter.attribute("height", aFont.GetFontSize().Height());
|
||||||
rWriter.attribute("orientation", aFont.GetOrientation().get());
|
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("vertical", aFont.IsVertical() ? "true" : "false");
|
||||||
rWriter.attribute("emphasis", aFont.GetEmphasisMark() != FontEmphasisMark::NONE ? "true" : "false");
|
rWriter.attribute("emphasis", aFont.GetEmphasisMark() != FontEmphasisMark::NONE ? "true" : "false");
|
||||||
rWriter.attribute("shadow", aFont.IsShadow() ? "true" : "false");
|
rWriter.attribute("shadow", aFont.IsShadow() ? "true" : "false");
|
||||||
|
@ -2882,7 +2882,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
|
|||||||
aStyleSettings.SetHelpFont( aHelpFont );
|
aStyleSettings.SetHelpFont( aHelpFont );
|
||||||
aStyleSettings.SetIconFont( aIconFont );
|
aStyleSettings.SetIconFont( aIconFont );
|
||||||
|
|
||||||
if ( aAppFont.GetWeight() > WEIGHT_NORMAL )
|
if ( aAppFont.GetWeightMaybeAskConfig() > WEIGHT_NORMAL )
|
||||||
aAppFont.SetWeight( WEIGHT_NORMAL );
|
aAppFont.SetWeight( WEIGHT_NORMAL );
|
||||||
aStyleSettings.SetToolFont( aAppFont );
|
aStyleSettings.SetToolFont( aAppFont );
|
||||||
aStyleSettings.SetTabFont( aAppFont );
|
aStyleSettings.SetTabFont( aAppFont );
|
||||||
|
@ -374,11 +374,13 @@ int ListFonts::Main()
|
|||||||
|
|
||||||
FontMetric aFont = pOutDev->GetFontMetric();
|
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\tStyle name: " << aFont.GetStyleName()
|
||||||
<< "\n\tWeight: " << aFont.GetWeight() << "\n\tItalic: " << aFont.GetItalic()
|
<< "\n\tWeight: " << aFont.GetWeightMaybeAskConfig()
|
||||||
<< "\n\tPitch: " << aFont.GetPitch()
|
<< "\n\tItalic: " << aFont.GetItalicMaybeAskConfig()
|
||||||
<< "\n\tWidth type: " << aFont.GetWidthType()
|
<< "\n\tPitch: " << aFont.GetPitchMaybeAskConfig()
|
||||||
|
<< "\n\tWidth type: " << aFont.GetWidthTypeMaybeAskConfig()
|
||||||
<< "\n\tAlignment: " << aFont.GetAlignment()
|
<< "\n\tAlignment: " << aFont.GetAlignment()
|
||||||
<< "\n\tCharset: " << GetOctetTextEncodingName(aFont.GetCharSet())
|
<< "\n\tCharset: " << GetOctetTextEncodingName(aFont.GetCharSet())
|
||||||
<< "\n\tAscent: " << aFont.GetAscent()
|
<< "\n\tAscent: " << aFont.GetAscent()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user