summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-16 21:01:00 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-16 16:11:28 +0000
commit2b297116cb6bb1061c43e5714e2609c8ee9f57d2 (patch)
tree9622cff5a49a891f64899e34c48b53e8d462e96e
parent7d93bb8fcb406773d2dc68b25ab7cee6e114d482 (diff)
vcl: rename Font::GetName to Font::GetFamilyName
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5 Reviewed-on: https://gerrit.libreoffice.org/21509 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx2
-rw-r--r--chart2/source/tools/CharacterProperties.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx2
-rw-r--r--cui/source/dialogs/cuicharmap.cxx12
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx4
-rw-r--r--cui/source/tabpages/numpages.cxx2
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx2
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/eehtml.cxx6
-rw-r--r--editeng/source/editeng/eertfpar.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/editeng/textconv.cxx2
-rw-r--r--editeng/source/items/bulitem.cxx6
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/items/textitem.cxx4
-rw-r--r--editeng/source/misc/acorrcfg.cxx4
-rw-r--r--editeng/source/rtf/rtfitem.cxx4
-rw-r--r--editeng/source/uno/unofdesc.cxx2
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/svg/svgfontexport.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx10
-rw-r--r--forms/source/richtext/richtextengine.cxx2
-rw-r--r--include/vcl/font.hxx2
-rw-r--r--include/vcl/metric.hxx2
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/core/tool/autoform.cxx6
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xlstyle.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx4
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx12
-rw-r--r--sd/source/core/stlpool.cxx6
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/func/fubullet.cxx2
-rw-r--r--sd/source/ui/func/fuhhconv.cxx2
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx2
-rw-r--r--starmath/source/cfgitem.cxx2
-rw-r--r--starmath/source/dialog.cxx12
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/format.cxx2
-rw-r--r--starmath/source/rect.cxx2
-rw-r--r--starmath/source/unomodel.cxx6
-rw-r--r--starmath/source/utility.cxx4
-rw-r--r--svtools/source/control/ctrlbox.cxx6
-rw-r--r--svtools/source/control/ctrltool.cxx10
-rw-r--r--svtools/source/control/stdmenu.cxx2
-rw-r--r--svtools/source/misc/sampletext.cxx58
-rw-r--r--svx/source/dialog/fntctrl.cxx2
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx16
-rw-r--r--svx/source/svdraw/svdfmtf.cxx6
-rw-r--r--svx/source/svdraw/svdmodel.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx8
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/inc/swfont.hxx2
-rw-r--r--sw/source/core/text/txtfld.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx995
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx2
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx6
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx4
-rw-r--r--sw/source/uibase/app/docshini.cxx6
-rw-r--r--sw/source/uibase/config/fontcfg.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx2
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx4
-rw-r--r--sw/source/uibase/shells/annotsh.cxx8
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx8
-rw-r--r--sw/source/uibase/shells/textsh.cxx8
-rw-r--r--test/source/mtfxmldump.cxx2
-rw-r--r--toolkit/source/helper/vclunohelper.cxx2
-rw-r--r--vcl/qa/cppunit/font.cxx4
-rw-r--r--vcl/source/components/fontident.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx2
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx6
-rw-r--r--vcl/source/font/font.cxx6
-rw-r--r--vcl/source/font/fontcache.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx2
-rw-r--r--vcl/source/gdi/metaact.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/outdev/font.cxx6
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/source/window/window2.cxx2
-rw-r--r--vcl/win/window/salframe.cxx2
105 files changed, 774 insertions, 659 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index fbf2cd7d0f29..947396a060f3 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1015,7 +1015,7 @@ Document::retrieveCharacterAttributes(
//character font name
aAttribs[i].Name = "CharFontName";
aAttribs[i].Handle = -1;
- aAttribs[i].Value = css::uno::makeAny( aFont.GetName() );
+ aAttribs[i].Value = css::uno::makeAny( aFont.GetFamilyName() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index 3f82d708959e..1fb79e743bb4 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -31,7 +31,7 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), makeAny( (sal_Int16) rFont.GetCharSet() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), makeAny( (sal_Int16) rFont.GetFamily() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetName() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetFamilyName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), makeAny( (sal_Int16) rFont.GetPitch() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( rFont.GetStyleName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetSize().Height() ) ) );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 2729774f1996..bc6177c4e3d9 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1234,7 +1234,7 @@ void EditorWindow::ImplSetFont()
vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED,
Application::GetSettings().GetUILanguageTag().getLanguageType(),
GetDefaultFontFlags::NONE, this));
- sFontName = aTmpFont.GetName();
+ sFontName = aTmpFont.GetFamilyName();
}
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
vcl::Font aFont(sFontName, aFontSize);
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 735ebdf24b33..1e076b3f2f4d 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -499,7 +499,7 @@ namespace cairocanvas
<< (rSysFontData.bAntialias ? "AA " : "")
<< (rSysFontData.bFakeBold ? "FB " : "")
<< (rSysFontData.bFakeItalic ? "FI " : "") << " || Name:"
- << aFont.GetName() << " - "
+ << aFont.GetFamilyName() << " - "
<< maText.Text.copy(maText.StartPosition, maText.Length));
cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 9301e47cf770..f190dfd537f9 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -167,7 +167,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future
vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
- aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
+ aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP ));
OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index cdc4de6b1442..cecaeb7511a1 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -414,7 +414,7 @@ void CharacterProperties::AddDefaultsToMap(
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX);
vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetFamilyName() ) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamily()) );//awt::FontFamily::SWISS
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_CHAR_SET, sal_Int16(aFont.GetCharSet()) );//use awt::CharSet::DONTKNOW instead of SYSTEM to avoid assertion issue 50249
@@ -444,7 +444,7 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_LOCALE, aDefaultLocale_CJK );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetName() ) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetFamilyName() ) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, OUString(aFontCJK.GetStyleName()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamily()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_SET, sal_Int16(aFontCJK.GetCharSet()) );
@@ -455,7 +455,7 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_LOCALE, aDefaultLocale_CTL );
- ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetName() ) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetFamilyName() ) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, OUString(aFontCTL.GetStyleName()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamily()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_SET, sal_Int16(aFontCTL.GetCharSet()) );
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4a3dae4036e0..69a5d66f51ac 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -759,7 +759,7 @@ namespace cppcanvas
if( rParms.mrParms.maFontName.is_initialized() )
aFontRequest.FontDescription.FamilyName = *rParms.mrParms.maFontName;
else
- aFontRequest.FontDescription.FamilyName = rFont.GetName();
+ aFontRequest.FontDescription.FamilyName = rFont.GetFamilyName();
aFontRequest.FontDescription.StyleName = rFont.GetStyleName();
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index b17931ca3df5..85f30403e488 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -164,9 +164,9 @@ short SvxCharacterMap::Execute()
const SfxItemPool* pPool = pSet->GetPool();
const vcl::Font& rFont( GetCharFont() );
pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) );
- pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(),
+ pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetFamilyName(),
rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) );
- pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), rFont.GetName() ) );
+ pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), rFont.GetFamilyName() ) );
pSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), GetChar() ) );
}
}
@@ -325,12 +325,12 @@ void SvxCharacterMap::init()
m_pShowText->Hide();
}
- OUString aDefStr( aFont.GetName() );
+ OUString aDefStr( aFont.GetFamilyName() );
OUString aLastName;
int nCount = GetDevFontCount();
for ( int i = 0; i < nCount; i++ )
{
- OUString aFontName( GetDevFont( i ).GetName() );
+ OUString aFontName( GetDevFont( i ).GetFamilyName() );
if ( aFontName != aLastName )
{
aLastName = aFontName;
@@ -388,10 +388,10 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
// like "Times New Roman;Times" resolved
vcl::Font aTmp( GetFontMetric( rFont ) );
- if ( m_pFontLB->GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND )
+ if ( m_pFontLB->GetEntryPos( aTmp.GetFamilyName() ) == LISTBOX_ENTRY_NOTFOUND )
return;
- m_pFontLB->SelectEntry( aTmp.GetName() );
+ m_pFontLB->SelectEntry( aTmp.GetFamilyName() );
aFont = aTmp;
FontSelectHdl(*m_pFontLB);
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 362cdd12b87c..3625d82722d5 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -361,7 +361,7 @@ IMPL_LINK_TYPED(SvxFontSubstTabPage, NonPropFontsHdl, Button*, pBox, void)
{
const FontMetric& rFontMetric = aFntLst.GetFontName( nFont );
if(!bNonPropOnly || rFontMetric.GetPitch() == PITCH_FIXED)
- m_pFontNameLB->InsertEntry(rFontMetric.GetName());
+ m_pFontNameLB->InsertEntry(rFontMetric.GetFamilyName());
}
m_pFontNameLB->SelectEntry(sFontName);
}
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2d6550eaccea..c3a5794b704f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -530,7 +530,7 @@ namespace
_rFont.SetLanguage(_pLanguageLB->GetSelectLanguage());
_rFont.SetFamily( aFontMetrics.GetFamily() );
- _rFont.SetName( aFontMetrics.GetName() );
+ _rFont.SetName( aFontMetrics.GetFamilyName() );
_rFont.SetStyleName( aFontMetrics.GetStyleName() );
_rFont.SetPitch( aFontMetrics.GetPitch() );
_rFont.SetCharSet( aFontMetrics.GetCharSet() );
@@ -934,7 +934,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
aStyleBoxText.clear();
FontMetric aInfo( pFontList->Get( rFontName, aStyleBoxText ) );
- SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(),
+ SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetFamilyName(), aInfo.GetStyleName(),
aInfo.GetPitch(), aInfo.GetCharSet(), nWhich );
pOld = GetOldItem( rSet, nSlot );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 74c0f70dbe6d..325f93012c5b 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -723,7 +723,7 @@ IMPL_LINK_NOARG_TYPED(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
aFmt.SetSuffix(OUString());
if( !pLevelSettings->sBulletFont.isEmpty() &&
pLevelSettings->sBulletFont.compareTo(
- rActBulletFont.GetName()))
+ rActBulletFont.GetFamilyName()))
{
//search for the font
if(!pList)
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 19574fa309a3..db4db5197c0a 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -236,7 +236,7 @@ void OSqlEdit::ImplSetFont()
if ( sFontName.isEmpty() )
{
vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this ) );
- sFontName = aTmpFont.GetName();
+ sFontName = aTmpFont.GetFamilyName();
}
Size aFontSize(
0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() );
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index ffbb1158b6a0..1c4b3c596f43 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -384,7 +384,7 @@ bool ORTFImportExport::Write()
OString aFonts(OUStringToOString(m_aFont.Name, eDestEnc));
if (aFonts.isEmpty())
{
- OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
+ OUString aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetFamilyName();
aFonts = OUStringToOString(aName, eDestEnc);
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4afe19ce221c..f58d8a0e19ef 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1225,7 +1225,7 @@ static char* getFonts (const char* pCommand)
aChildren.push_back(std::make_pair("", aChild));
nSizeCount++;
}
- aValues.add_child(rFontMetric.GetName().toUtf8().getStr(), aChildren);
+ aValues.add_child(rFontMetric.GetFamilyName().toUtf8().getStr(), aChildren);
}
}
aTree.add_child("commandValues", aValues);
@@ -1530,7 +1530,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
for (sal_uInt16 i = 0; i < nFontCount; ++i)
{
const FontMetric& rFontMetric = pList->GetFontName(i);
- OUString aFontName = rFontMetric.GetName();
+ OUString aFontName = rFontMetric.GetFamilyName();
if (!aSearchedFontName.equals(aFontName.toUtf8().getStr()))
continue;
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index ee7df1f3c161..092e71cff25c 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -440,7 +440,7 @@ namespace drawinglayer
bool bBiDiStrong)
{
const attribute::FontAttribute aRetval(
- rFont.GetName(),
+ rFont.GetFamilyName(),
rFont.GetStyleName(),
static_cast<sal_uInt16>(rFont.GetWeight()),
RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(),
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index d6b3e669ee81..ad52b0f22033 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2565,7 +2565,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const vcl::Font& rFont
void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
{
rSet.Put( SvxLanguageItem( rFont.GetLanguage(), EE_CHAR_LANGUAGE ) );
- rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
+ rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetFamilyName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
rSet.Put( SvxFontHeightItem( rFont.GetSize().Height(), 100, EE_CHAR_FONTHEIGHT ) );
rSet.Put( SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ) );
rSet.Put( SvxShadowedItem( rFont.IsShadow(), EE_CHAR_SHADOW ) );
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 584634c9c435..52a1d8919ab2 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -653,13 +653,13 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
if ( nHLevel == STYLE_PRE )
{
vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
- SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
+ SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
aItems.Put( aFontItem );
- SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
+ SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
aItems.Put( aFontItemCJK );
- SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
+ SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
aItems.Put( aFontItemCTL );
}
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index a918adf2e008..bcf5da84c2f1 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -152,7 +152,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r
aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode);
SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
vcl::Font aDefFont( GetDefFont() );
- SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(),
+ SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetFamilyName(),
aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );
sal_Int32 nStartPara = mpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index beaf19680d3c..6e0d3434a910 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1661,7 +1661,7 @@ void ImpEditEngine::SetLanguageAndFont(
{
// set new font attribute
SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aNewSet.Get( nFontWhichId ) );
- aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamilyName( pFont->GetFamilyName());
aFontItem.SetFamily( pFont->GetFamily());
aFontItem.SetStyleName( pFont->GetStyleName());
aFontItem.SetPitch( pFont->GetPitch());
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index 78077148985b..deb8acb62852 100644
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -252,7 +252,7 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
{
// set new font attribute
SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aNewSet.Get( nFontWhichId ) );
- aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamilyName( pFont->GetFamilyName());
aFontItem.SetFamily( pFont->GetFamily());
aFontItem.SetStyleName( pFont->GetStyleName());
aFontItem.SetPitch( pFont->GetPitch());
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 2791bf44293c..96264b678f18 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -50,8 +50,8 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const vcl::Font& rFont )
nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream.WriteUInt16( nTemp );
nTemp = (sal_uInt16)rFont.GetItalic(); rStream.WriteUInt16( nTemp );
- // UNICODE: rStream << rFont.GetName();
- rStream.WriteUniOrByteString(rFont.GetName(), rStream.GetStreamCharSet());
+ // UNICODE: rStream << rFont.GetFamilyName();
+ rStream.WriteUniOrByteString(rFont.GetFamilyName(), rStream.GetStreamCharSet());
rStream.WriteBool( rFont.IsOutline() );
rStream.WriteBool( rFont.IsShadow() );
@@ -231,7 +231,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
{
vcl::Font _aFont = GetFont();
vcl::Font aNewFont = rCopyFrom.GetFont();
- _aFont.SetName( aNewFont.GetName() );
+ _aFont.SetName( aNewFont.GetFamilyName() );
_aFont.SetFamily( aNewFont.GetFamily() );
_aFont.SetStyleName( aNewFont.GetStyleName() );
_aFont.SetColor( aNewFont.GetColor() );
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 4d59e45f176e..9e3d1500429c 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -677,7 +677,7 @@ void SvxNumRule::Store( SvStream &rStream )
{
if(!pConverter)
pConverter =
- CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetName(),
+ CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetFamilyName(),
FontToSubsFontFlags::EXPORT|FontToSubsFontFlags::ONLYOLDSOSYMBOLFONTS);
}
aFmts[i]->Store(rStream, pConverter);
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 2837368be930..411ecb7a3846 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -149,7 +149,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst,
aFontNameSeq.realloc( nCount );
for ( sal_Int32 i = 0; i < nCount; i++ )
- aFontNameSeq[i] = pFontList->GetFontName(i).GetName();
+ aFontNameSeq[i] = pFontList->GetFontName(i).GetFamilyName();
}
}
@@ -3541,7 +3541,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
GetDefaultFontFlags::OnlyOne ) );
SvxFontItem* pItem = aItemArr[ n ];
pItem->SetFamily( aFont.GetFamily() );
- pItem->SetFamilyName( aFont.GetName() );
+ pItem->SetFamilyName( aFont.GetFamilyName() );
pItem->SetStyleName( OUString() );
pItem->SetPitch( aFont.GetPitch());
pItem->SetCharSet(aFont.GetCharSet());
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index f63a44f5ad45..f6ca4f8d39ab 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -582,7 +582,7 @@ void SvxSwAutoCorrCfg::ImplCommit()
pValues[nProp] <<= (sal_Int32)rSwFlags.cBullet;
break; // "Format/Option/ChangeToBullets/SpecialCharacter/Char",
case 17:
- pValues[nProp] <<= OUString(rSwFlags.aBulletFont.GetName());
+ pValues[nProp] <<= OUString(rSwFlags.aBulletFont.GetFamilyName());
break; // "Format/Option/ChangeToBullets/SpecialCharacter/Font",
case 18:
pValues[nProp] <<= (sal_Int32)rSwFlags.aBulletFont.GetFamily();
@@ -626,7 +626,7 @@ void SvxSwAutoCorrCfg::ImplCommit()
pValues[nProp] <<= (sal_Int32)rSwFlags.cByInputBullet;
break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Char",
case 43 :
- pValues[nProp] <<= OUString(rSwFlags.aByInputBulletFont.GetName());
+ pValues[nProp] <<= OUString(rSwFlags.aByInputBulletFont.GetFamilyName());
break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/Font",
case 44 :
pValues[nProp] <<= (sal_Int32)rSwFlags.aByInputBulletFont.GetFamily();
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 68582a73073f..91d17414d980 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -642,7 +642,7 @@ SET_FONTALIGNMENT:
{
const vcl::Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
SvxFontItem aTmpItem( rSVFont.GetFamily(),
- rSVFont.GetName(), rSVFont.GetStyleName(),
+ rSVFont.GetFamilyName(), rSVFont.GetStyleName(),
rSVFont.GetPitch(), rSVFont.GetCharSet(),
SID_ATTR_CHAR_FONT );
SetScriptAttr( eCharType, *pSet, aTmpItem );
@@ -1823,7 +1823,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
nValue = 0;
const vcl::Font& rSVFont = GetFont( sal_uInt16(nValue) );
SvxFontItem aTmpItem(
- rSVFont.GetFamily(), rSVFont.GetName(),
+ rSVFont.GetFamily(), rSVFont.GetFamilyName(),
rSVFont.GetStyleName(), rSVFont.GetPitch(),
rSVFont.GetCharSet(), SID_ATTR_CHAR_FONT );
SetScriptAttr( NOTDEF_CHARTYPE, aTmp, aTmpItem );
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 368513d03ae1..897d2be6d110 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -57,7 +57,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl:
void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDescriptor& rDesc )
{
- rDesc.Name = rFont.GetName();
+ rDesc.Name = rFont.GetFamilyName();
rDesc.StyleName = rFont.GetStyleName();
rDesc.Width = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Width());
rDesc.Height = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Height());
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index bef80878706a..5b82177e737e 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -493,7 +493,7 @@ namespace pcr
vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont();
SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults
- *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT);
+ *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT);
*pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT);
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT);
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_POSTURE);
@@ -505,7 +505,7 @@ namespace pcr
*pCounter++ = new SvxCharReliefItem(aDefaultVCLFont.GetRelief(), CFID_RELIEF);
*pCounter++ = new SvxEmphasisMarkItem(aDefaultVCLFont.GetEmphasisMark(), CFID_EMPHASIS);
- *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_CJK_FONT);
+ *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_CJK_FONT);
*pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_CJK_HEIGHT);
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_CJK_WEIGHT);
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_CJK_POSTURE);
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 82480e20ff53..260b29b857a0 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -371,7 +371,7 @@ void Writer::setClipping( const tools::PolyPolygon* pClipPolyPolygon )
// that we care about.
bool compare_fonts_for_me(const vcl::Font& rFont1, const vcl::Font& rFont2)
{
- return rFont1.GetName() == rFont2.GetName() &&
+ return rFont1.GetFamilyName() == rFont2.GetFamilyName() &&
rFont1.GetWeight() == rFont2.GetWeight() &&
rFont1.GetItalic() == rFont2.GetItalic() &&
rFont1.IsOutline() == rFont2.IsOutline() &&
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 2d62da72117b..823f0e9bf6e5 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -53,7 +53,7 @@ SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont
{
FontWeight eWeight( WEIGHT_NORMAL );
FontItalic eItalic( ITALIC_NONE );
- OUString aFontName( rFont.GetName() );
+ OUString aFontName( rFont.GetFamilyName() );
sal_Int32 nNextTokenPos( 0 );
switch( rFont.GetWeight() )
@@ -222,7 +222,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
else
aFontStyle = "normal";
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFont.GetName() ) );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-family", GetMappedFontName( rFont.GetFamilyName() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "units-per-em", aUnitsPerEM );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-weight", aFontWeight );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "font-style", aFontStyle );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 8613369d3432..5b602718734c 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -377,12 +377,12 @@ void SVGAttributeWriter::setFontFamily()
{
if( mrExport.IsUsePositionedCharacters() )
{
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, mrFontExport.GetMappedFontName( maCurFont.GetName() ) );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, mrFontExport.GetMappedFontName( maCurFont.GetFamilyName() ) );
}
else
{
sal_Int32 nNextTokenPos( 0 );
- const OUString& rsFontName = maCurFont.GetName();
+ const OUString& rsFontName = maCurFont.GetFamilyName();
OUString sFontFamily( rsFontName.getToken( 0, ';', nNextTokenPos ) );
FontPitch ePitch = maCurFont.GetPitch();
if( ePitch == PITCH_FIXED )
@@ -729,12 +729,12 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer )
if( maCurrentFont != maParentFont )
{
- const OUString& rsCurFontName = maCurrentFont.GetName();
+ const OUString& rsCurFontName = maCurrentFont.GetFamilyName();
long int nCurFontSize = maCurrentFont.GetHeight();
FontItalic eCurFontItalic = maCurrentFont.GetItalic();
FontWeight eCurFontWeight = maCurrentFont.GetWeight();
- const OUString& rsParFontName = maParentFont.GetName();
+ const OUString& rsParFontName = maParentFont.GetFamilyName();
long int nParFontSize = maParentFont.GetHeight();
FontItalic eParFontItalic = maParentFont.GetItalic();
FontWeight eParFontWeight = maParentFont.GetWeight();
@@ -840,7 +840,7 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer )
void SVGTextWriter::implSetFontFamily()
{
sal_Int32 nNextTokenPos( 0 );
- const OUString& rsFontName = maCurrentFont.GetName();
+ const OUString& rsFontName = maCurrentFont.GetFamilyName();
OUString sFontFamily( rsFontName.getToken( 0, ';', nNextTokenPos ) );
FontPitch ePitch = maCurrentFont.GetPitch();
if( ePitch == PITCH_FIXED )
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index ede2b4dccb9e..8043d0079536 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -63,7 +63,7 @@ namespace frm
// defaults
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont();
aFont.SetName( "Times New Roman" );
- pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
+ pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
// 12 pt font size
MapMode aPointMapMode( MAP_POINT );
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index c8a2c2df9037..e223ba3c66ca 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -67,7 +67,7 @@ public:
FontAlign GetAlign() const;
void SetName( const OUString& rFamilyName );
- const OUString& GetName() const;
+ const OUString& GetFamilyName() const;
void SetStyleName( const OUString& rStyleName );
const OUString& GetStyleName() const;
void SetSize( const Size& );
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index e37b91ffac75..d3dfa9c2f167 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -81,7 +81,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, const FontMetric& rMetric )
{
stream << "{"
- << "name=" << "\"" << rMetric.GetName() << "\""
+ << "name=" << "\"" << rMetric.GetFamilyName() << "\""
<< ",size=(" << rMetric.GetSize().Width() << "," << rMetric.GetSize().Height() << ")"
<< ",ascent=" << rMetric.GetAscent()
<< ",descent=" << rMetric.GetDescent()
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index e1eb4955e627..05e7fa8c9543 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -197,7 +197,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool)
vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US,
GetDefaultFontFlags::OnlyOne );
SvxFontItem* pStdFont = new SvxFontItem( aStdFont.GetFamily(),
- aStdFont.GetName(), aStdFont.GetStyleName(),
+ aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
aStdFont.GetPitch(), aStdFont.GetCharSet(),
ATTR_FONT );
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 61ab5ca3424f..21dc43f85ec2 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -368,7 +368,7 @@ void ScPatternAttr::GetFont(
// FontItem:
- if (rFont.GetName() != pFontAttr->GetFamilyName())
+ if (rFont.GetFamilyName() != pFontAttr->GetFamilyName())
rFont.SetName( pFontAttr->GetFamilyName() );
if (rFont.GetStyleName() != pFontAttr->GetStyleName())
rFont.SetStyleName( pFontAttr->GetStyleName() );
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 450445486cf0..aec6dcbd3b91 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -202,7 +202,7 @@ static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType
if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
{
vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
- SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(),
+ SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
if ( aNewItem != rSet.Get( nItemId ) )
{
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 46db04a9c451..aa10ec5946dd 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -825,19 +825,19 @@ ScAutoFormat::ScAutoFormat() :
vcl::Font aStdFont = OutputDevice::GetDefaultFont(
DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
SvxFontItem aFontItem(
- aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
+ aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT );
aStdFont = OutputDevice::GetDefaultFont(
DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
SvxFontItem aCJKFontItem(
- aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
+ aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CJK_FONT );
aStdFont = OutputDevice::GetDefaultFont(
DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
SvxFontItem aCTLFontItem(
- aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
+ aStdFont.GetFamily(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CTL_FONT );
SvxFontHeightItem aHeight( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt;
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 8299b9dcfea1..18edb9072e2d 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -729,7 +729,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
ScPatternAttr::GetFont( aFont, aItemSet, SC_AUTOCOL_RAW );
// font name and style
- aNewData.maName = XclTools::GetXclFontName( aFont.GetName() );
+ aNewData.maName = XclTools::GetXclFontName( aFont.GetFamilyName() );
aNewData.mnWeight = (aFont.GetWeight() > WEIGHT_NORMAL) ? EXC_FONTWGHT_BOLD : EXC_FONTWGHT_NORMAL;
aNewData.mbItalic = (aFont.GetItalic() != ITALIC_NONE);
bool bNewFont = !(aFontData.maName == aNewData.maName);
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 9005282156d9..3b8b6de243b8 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -198,7 +198,7 @@ void XclFontData::Clear()
void XclFontData::FillFromVclFont( const vcl::Font& rFont )
{
- maName = XclTools::GetXclFontName( rFont.GetName() ); // substitute with MS fonts
+ maName = XclTools::GetXclFontName( rFont.GetFamilyName() ); // substitute with MS fonts
maStyle.clear();
maColor = rFont.GetColor();
SetScUnderline( rFont.GetUnderline() );
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 3ea7a9ac8be2..dc3fcec3f330 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -314,7 +314,7 @@ static inline void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropN
/** Fills the sequence with all font attributes of rFont. */
static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont )
{
- SvxFontItem aFontItem( rFont.GetFamily(), rFont.GetName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT );
+ SvxFontItem aFontItem( rFont.GetFamily(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT );
SvxFontHeightItem aHeightItem( rFont.GetSize().Height(), 100, ATTR_FONT_HEIGHT );
SvxLanguageItem aLangItem( rFont.GetLanguage(), ATTR_FONT_LANGUAGE );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index ad25cd7ea48d..5efc9c74d180 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -231,7 +231,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
{
OUString aFontName(pFontItem->GetValue());
vcl::Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR
- aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(),
+ aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(), ATTR_FONT );
}
@@ -261,7 +261,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, true, &pItem ) == SfxItemState::SET )
{
const SvxHyperlinkItem* pHyper = static_cast<const SvxHyperlinkItem*>(pItem);
- const OUString& rName = pHyper->GetName();
+ const OUString& rName = pHyper->GetName();
const OUString& rURL = pHyper->GetURL();
const OUString& rTarget = pHyper->GetTargetFrame();
SvxLinkInsertMode eMode = pHyper->GetInsertMode();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e4c790b7bb93..e389787209a0 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2352,7 +2352,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SfxAllItemSet aSet( GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
- aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
+ aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 109376b75a1f..01b54bdc566b 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -399,7 +399,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
OUString aFontName(pFontItem->GetValue());
vcl::Font aFont(aFontName, Size(1,1)); // Size just because CTOR
- aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(),
+ aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(), ATTR_FONT );
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index e88e5da8ba25..267fa8b04e48 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2975,7 +2975,7 @@ void ScViewFunc::InsertSpecialChar( const OUString& rStr, const vcl::Font& rFont
const sal_Unicode* pChar = rStr.getStr();
ScTabViewShell* pViewShell = GetViewData().GetViewShell();
SvxFontItem aFontItem( rFont.GetFamily(),
- rFont.GetName(),
+ rFont.GetFamilyName(),
rFont.GetStyleName(),
rFont.GetPitch(),
rFont.GetCharSet(),
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index fc50caf9a1f2..7424e800fb02 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -185,13 +185,13 @@ void SdDrawDocument::CreateLayoutTemplates()
getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
- SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
+ SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
- SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
+ SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
- SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
+ SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
rISet.Put( aSvxFontItem );
@@ -564,13 +564,13 @@ void SdDrawDocument::CreateDefaultCellStyles()
getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
- SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
+ SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
- SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
+ SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
- SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
+ SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
rISet.Put( aSvxFontItem );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index bc1f18b7ae35..0df8f1c5fa32 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -192,13 +192,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
// Font for title and outline
- SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
+ SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetFamilyName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
- SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
+ SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetFamilyName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
- SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
+ SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetFamilyName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
vcl::Font aBulletFont( GetBulletFont() );
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 2d09b7a587be..b1192422599f 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -110,7 +110,7 @@ SfxItemPool* GetAnnotationPool()
mpAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() );
- mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamily(),aAppFont.GetName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
+ mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamily(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
}
return mpAnnotationPool;
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 445e4e8a3bc4..d98fe2f80a4d 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -261,7 +261,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
// set attributes (set font)
SfxItemSet aSet(pOL->GetEmptyItemSet());
- SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(),
+ SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO);
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index fa55949b149d..380d760c8e37 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -171,7 +171,7 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const vc
{
// set new font attribute
SvxFontItem aFontItem( static_cast<const SvxFontItem&>( rSet.Get( EE_CHAR_FONTINFO_CJK ) ) );
- aFontItem.SetFamilyName( pTargetFont->GetName());
+ aFontItem.SetFamilyName( pTargetFont->GetFamilyName());
aFontItem.SetFamily( pTargetFont->GetFamily());
aFontItem.SetStyleName( pTargetFont->GetStyleName());
aFontItem.SetPitch( pTargetFont->GetPitch());
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 502f52c2f38c..6f08a5d7e0d5 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -312,7 +312,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
mpEditEngineItemPool->SetPoolDefaultItem(
SvxFontItem(
aFont.GetFamily(),
- aFont.GetName(),
+ aFont.GetFamilyName(),
aFont.GetStyleName(),
aFont.GetPitch(),
aFont.GetCharSet(),
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index d6c91b76cb8a..1e1f9f9dc176 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -160,7 +160,7 @@ SmFontFormat::SmFontFormat()
SmFontFormat::SmFontFormat( const vcl::Font &rFont )
{
- aName = rFont.GetName();
+ aName = rFont.GetFamilyName();
nCharSet = (sal_Int16) rFont.GetCharSet();
nFamily = (sal_Int16) rFont.GetFamily();
nPitch = (sal_Int16) rFont.GetPitch();
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 852bc1b564ef..bf0a99274355 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -271,7 +271,7 @@ void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
rRenderContext.SetFont(aFont);
rRenderContext.SetTextColor(aTextColor);
- OUString sText(rRenderContext.GetFont().GetName());
+ OUString sText(rRenderContext.GetFont().GetFamilyName());
Size aTextSize(rRenderContext.GetTextWidth(sText), rRenderContext.GetTextHeight());
rRenderContext.DrawText(Point((rRenderContext.GetOutputSize().Width() - aTextSize.Width()) / 2,
@@ -336,7 +336,7 @@ void SmFontDialog::SetFont(const vcl::Font &rFont)
{
maFont = rFont;
- m_pFontBox->SetText(maFont.GetName());
+ m_pFontBox->SetText(maFont.GetFamilyName());
m_pBoldCheckBox->Check(IsBold(maFont));
m_pItalicCheckBox->Check(IsItalic(maFont));
m_pShowFont->SetFont(maFont);
@@ -360,7 +360,7 @@ SmFontDialog::SmFontDialog(vcl::Window * pParent, OutputDevice *pFntListDevice,
sal_uInt16 nCount = aFontList.GetFontNameCount();
for (sal_uInt16 i = 0; i < nCount; ++i)
{
- m_pFontBox->InsertEntry( aFontList.GetFontName(i).GetName() );
+ m_pFontBox->InsertEntry( aFontList.GetFontName(i).GetFamilyName() );
}
maFont.SetSize(Size(0, 24));
maFont.SetWeight(WEIGHT_NORMAL);
@@ -1758,7 +1758,7 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
{
sal_uInt16 nCount = pFontList->GetFontNameCount();
for (sal_uInt16 i = 0; i < nCount; i++)
- pFonts->InsertEntry( pFontList->GetFontName(i).GetName() );
+ pFonts->InsertEntry( pFontList->GetFontName(i).GetFamilyName() );
}
}
@@ -2018,7 +2018,7 @@ void SmSymDefineDialog::UpdateButtons()
&& aTmpSymbolSetName.equalsIgnoreAsciiCase(pOldSymbolSetName->GetText())
&& aTmpSymbolName.equals(pOrigSymbol->GetName())
&& pFonts->GetSelectEntry().equalsIgnoreAsciiCase(
- pOrigSymbol->GetFace().GetName())
+ pOrigSymbol->GetFace().GetFamilyName())
&& pStyles->GetText().equalsIgnoreAsciiCase(
GetFontStyles().GetStyleName(pOrigSymbol->GetFace()))
&& pCharsetDisplay->GetSelectCharacter() == pOrigSymbol->GetCharacter();
@@ -2281,7 +2281,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
// choose font and style accordingly
const vcl::Font &rFont = pSymbol->GetFace();
- SelectFont(rFont.GetName(), false);
+ SelectFont(rFont.GetFamilyName(), false);
SelectStyle(GetFontStyles().GetStyleName(rFont), false);
// Since setting the Font via the Style name of the SymbolFonts doesn't
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 41c6d6cd1bcf..53f33fdf39b2 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -336,7 +336,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool)
vcl::Font aFont = OutputDevice::GetDefaultFont(
rFntDta.nFontType, nLang, GetDefaultFontFlags::OnlyOne );
rEditEngineItemPool.SetPoolDefaultItem(
- SvxFontItem( aFont.GetFamily(), aFont.GetName(),
+ SvxFontItem( aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(),
rFntDta.nFontInfoId ) );
}
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 94222820af1d..c1917dabb61f 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -89,7 +89,7 @@ OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
return OutputDevice::GetDefaultFont(
pTable[ nIdent ], nLang,
- GetDefaultFontFlags::OnlyOne ).GetName();
+ GetDefaultFontFlags::OnlyOne ).GetFamilyName();
}
}
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 7e430252a14f..ebacd2cc27b7 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -133,7 +133,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight());
const FontMetric aFM (rDev.GetFontMetric());
- bool bIsMath = aFM.GetName().equalsIgnoreAsciiCase( FONTNAME_MATH );
+ bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH );
bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
const long nFontHeight = rDev.GetFont().GetSize().Height();
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 2c19f8a28e85..37592db3a44f 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -454,7 +454,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
if(sFontName.isEmpty())
throw IllegalArgumentException();
- if(OUString(aFormat.GetFont((*ppEntries)->mnMemberId).GetName()) != sFontName)
+ if(OUString(aFormat.GetFont((*ppEntries)->mnMemberId).GetFamilyName()) != sFontName)
{
const SmFace rOld = aFormat.GetFont((*ppEntries)->mnMemberId);
@@ -727,7 +727,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_CUSTOM_FONT_NAME_FIXED :
{
const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId);
- *pValue <<= OUString(rFace.GetName());
+ *pValue <<= OUString(rFace.GetFamilyName());
}
break;
case HANDLE_CUSTOM_FONT_FIXED_POSTURE:
@@ -879,7 +879,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter());
vcl::Font rFont = (*aIter)->GetFace();
- pDescriptor->sFontName = rFont.GetName();
+ pDescriptor->sFontName = rFont.GetFamilyName();
pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet());
pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamily());
pDescriptor->nPitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch());
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index f66c385dc72d..cfb4917881e3 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -73,7 +73,7 @@ vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const
bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont)
{
- return rFirstFont.GetName() == rSecondFont.GetName() &&
+ return rFirstFont.GetFamilyName() == rSecondFont.GetFamilyName() &&
rFirstFont.GetFamily() == rSecondFont.GetFamily() &&
rFirstFont.GetCharSet() == rSecondFont.GetCharSet() &&
rFirstFont.GetWeight() == rSecondFont.GetWeight() &&
@@ -82,7 +82,7 @@ bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font &
OUString SmFontPickList::GetStringItem(const vcl::Font &rFont)
{
- OUStringBuffer aString(rFont.GetName());
+ OUStringBuffer aString(rFont.GetFamilyName());
if (IsItalic( rFont ))
{
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 5c411202463c..8bd7b594b08a 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1036,7 +1036,7 @@ void FontNameBox::Fill( const FontList* pList )
for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const FontMetric& rFontMetric = pList->GetFontName( i );
- sal_uLong nIndex = InsertEntry( rFontMetric.GetName() );
+ sal_uLong nIndex = InsertEntry( rFontMetric.GetFamilyName() );
if ( nIndex != LISTBOX_ERROR )
{
if ( nIndex < mpFontList->size() ) {
@@ -1140,7 +1140,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
Rectangle aTextRect;
// Preview the font name
- OUString sFontName = rFontMetric.GetName();
+ OUString sFontName = rFontMetric.GetFamilyName();
//If it shouldn't or can't draw its own name because it doesn't have the glyphs
if (!canRenderNameOfSelectedFont(*pRenderContext))
@@ -1171,7 +1171,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
if (!bSymbolFont)
{
- const bool bNameBeginsWithLatinText = rFontMetric.GetName()[0] <= 'z';
+ const bool bNameBeginsWithLatinText = rFontMetric.GetFamilyName()[0] <= 'z';
if (bNameBeginsWithLatinText || !bUsingCorrectFont)
sSampleText = makeShortRepresentativeTextForSelectedFont(*pRenderContext);
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index fcaac738b646..1174cd8f79b7 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -259,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
if ( !bAll && (aFontMetric.GetType() == TYPE_RASTER) )
continue;
- OUString aSearchName(aFontMetric.GetName());
+ OUString aSearchName(aFontMetric.GetFamilyName());
ImplFontListNameInfo* pData;
sal_uLong nIndex;
aSearchName = ImplMakeSearchString(aSearchName);
@@ -483,13 +483,13 @@ OUString FontList::GetStyleName(const FontMetric& rInfo) const
OUString FontList::GetFontMapText( const FontMetric& rInfo ) const
{
- if ( rInfo.GetName().isEmpty() )
+ if ( rInfo.GetFamilyName().isEmpty() )
{
return OUString();
}
// Search Fontname
- ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() );
+ ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() );
if ( !pData )
{
if (maMapNotAvailable.isEmpty())
@@ -734,12 +734,12 @@ const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const
}
// use standard sizes if no name
- if ( rInfo.GetName().isEmpty() )
+ if ( rInfo.GetFamilyName().isEmpty() )
return aStdSizeAry;
// first search fontname in order to use device from the matching font
OutputDevice* pDevice = mpDev;
- ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() );
+ ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() );
if ( pData )
pDevice = pData->mpFirst->GetDevice();
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 55eb7ba54d92..6e0e55e8f4a9 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -57,7 +57,7 @@ void FontNameMenu::Fill( const FontList* pList )
sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
for (sal_uInt16 i = 0; i < nFontCount; ++i)
{
- const OUString& rName = pList->GetFontName( i ).GetName();
+ const OUString& rName = pList->GetFontName( i ).GetFamilyName();
// sort with the I18nHelper
sal_uInt16 j = GetItemCount();
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index 4ba252b5702c..ebe0e7863ecd 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -19,7 +19,7 @@
// that caused it to be added
static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevice)
{
- const OUString &rName = rDevice.GetFont().GetName();
+ const OUString &rName = rDevice.GetFont().GetFamilyName();
if (rName == "GB18030 Bitmap")
{
@@ -105,49 +105,49 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic
bool isOpenSymbolFont(const vcl::Font &rFont)
{
- return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") ||
- rFont.GetName().equalsIgnoreAsciiCase("opensymbol");
+ return rFont.GetFamilyName().equalsIgnoreAsciiCase("starsymbol") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("opensymbol");
}
bool isSymbolFont(const vcl::Font &rFont)
{
return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) ||
- rFont.GetName().equalsIgnoreAsciiCase("Apple Color Emoji") ||
- rFont.GetName().equalsIgnoreAsciiCase("cmsy10") ||
- rFont.GetName().equalsIgnoreAsciiCase("cmex10") ||
- rFont.GetName().equalsIgnoreAsciiCase("esint10") ||
- rFont.GetName().equalsIgnoreAsciiCase("feta26") ||
- rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmsy10") ||
- rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmex10") ||
- rFont.GetName().equalsIgnoreAsciiCase("msam10") ||
- rFont.GetName().equalsIgnoreAsciiCase("msbm10") ||
- rFont.GetName().equalsIgnoreAsciiCase("wasy10") ||
- rFont.GetName().equalsIgnoreAsciiCase("Denemo") ||
- rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic1") ||
- rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic2") ||
- rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic3") ||
- rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic4") ||
- rFont.GetName().equalsIgnoreAsciiCase("Letters Laughing") ||
- rFont.GetName().equalsIgnoreAsciiCase("MusiQwik") ||
- rFont.GetName().equalsIgnoreAsciiCase("MusiSync") ||
- rFont.GetName().equalsIgnoreAsciiCase("stmary10") ||
- rFont.GetName().equalsIgnoreAsciiCase("Symbol") ||
- rFont.GetName().startsWith("STIXIntegrals") ||
- rFont.GetName().startsWith("STIXNonUnicode") ||
- rFont.GetName().startsWith("STIXSize") ||
- rFont.GetName().startsWith("STIXVariants") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("Apple Color Emoji") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("cmsy10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("cmex10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("esint10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("feta26") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmsy10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmex10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("msam10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("msbm10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("wasy10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("Denemo") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic1") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic2") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic3") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic4") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("Letters Laughing") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiQwik") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiSync") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("stmary10") ||
+ rFont.GetFamilyName().equalsIgnoreAsciiCase("Symbol") ||
+ rFont.GetFamilyName().startsWith("STIXIntegrals") ||
+ rFont.GetFamilyName().startsWith("STIXNonUnicode") ||
+ rFont.GetFamilyName().startsWith("STIXSize") ||
+ rFont.GetFamilyName().startsWith("STIXVariants") ||
isOpenSymbolFont(rFont);
}
bool canRenderNameOfSelectedFont(OutputDevice &rDevice)
{
const vcl::Font &rFont = rDevice.GetFont();
- return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetName()) );
+ return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetFamilyName()) );
}
OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice)
{
- if (rDevice.GetFont().GetName() == "Symbol")
+ if (rDevice.GetFont().GetFamilyName() == "Symbol")
{
static const sal_Unicode aImplAppleSymbolText[] = {
0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0};
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 1aa7a6ddca15..0b7e40db1523 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -673,7 +673,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
if ((pImpl->m_bCJKEnabled) || (pImpl->m_bCTLEnabled))
pImpl->maText = makeRepresentativeTextForFont(LATIN, rFont);
else
- pImpl->maText = rFont.GetName();
+ pImpl->maText = rFont.GetFamilyName();
if (pImpl->m_bCJKEnabled)
{
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 3cef94fd240c..71f8235a6881 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -82,7 +82,7 @@ using ::com::sun::star::awt::XVclWindowPeer;
css::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont )
{
css::awt::FontDescriptor aFD;
- aFD.Name = rFont.GetName();
+ aFD.Name = rFont.GetFamilyName();
aFD.StyleName = rFont.GetStyleName();
aFD.Height = (sal_Int16)rFont.GetSize().Height();
aFD.Width = (sal_Int16)rFont.GetSize().Width();
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 591d8ad6beff..2679bf40c0d5 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -1533,10 +1533,8 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
if( eNumType == SVX_NUM_CHAR_SPECIAL)
{
sal_Unicode cChar = aFmt.GetBulletChar();
- //const vcl::Font* pFont = aFmt.GetBulletFont();
sal_Unicode ccChar = _pSet->sBulletChar[0];
- // rtl::OUString sFont = _pSet->sBulletFont;
- if ( !((cChar == ccChar) && //pFont && sFont.compareTo(pFont->GetName()) &&
+ if ( !((cChar == ccChar) &&
_pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
_pSet->nTabValue == aFmt.GetListtabPos() &&
_pSet->eNumAlign == aFmt.GetNumAdjust() &&
@@ -1600,8 +1598,6 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
{
SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
- //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0];
- //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0];
sal_Int16 eNumType = aFmt.GetNumberingType();
NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
@@ -1616,9 +1612,9 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
{
sal_Unicode cChar = aFmt.GetBulletChar();
OUString sChar(cChar);
- _pSet->sBulletChar = sChar;//OUString(cChar);
+ _pSet->sBulletChar = sChar;
if ( aFmt.GetBulletFont() )
- _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetName());
+ _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetFamilyName());
_pSet->nNumberType = eNumType;
pItemArr->bIsCustomized = true;
}else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
@@ -1636,7 +1632,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
_pSet->sSuffix = aFmt.GetSuffix();
_pSet->nNumberType = eNumType;
if ( aFmt.GetBulletFont() )
- _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetName());
+ _pSet->sBulletFont = rtl::OUString(aFmt.GetBulletFont()->GetFamilyName());
pItemArr->bIsCustomized = true;
}
}
@@ -1667,7 +1663,6 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex];
if (isDefault) pItemArr=pDefaultOutlineSettingsArrs[nIndex];
- //Font& rActBulletFont = lcl_GetDefaultBulletFont();
NumSettingsArr_Impl *pNumSettingsArr=pItemArr->pNumSettingsArr;
NumSettings_Impl* pLevelSettings = nullptr;
@@ -1681,7 +1676,6 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
break;
SvxNumberFormat aFmt(aNum.GetLevel(i));
- //aFmt.SetBulletFont(&pLevelSettings->aFont);
vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
if (pLevelSettings->nNumberType !=aFmt.GetNumberingType()) isResetSize=true;
aFmt.SetNumberingType( pLevelSettings->nNumberType );
@@ -1689,7 +1683,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)
{
if( pLevelSettings->sBulletFont.getLength() &&
- pLevelSettings->sBulletFont.compareTo(rActBulletFont.GetName()))
+ pLevelSettings->sBulletFont.compareTo(rActBulletFont.GetFamilyName()))
{
//search for the font
if(!pList)
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 04d97c7c59a5..5710493f767b 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -411,9 +411,9 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr
vcl::Font aFnt(mpVD->GetFont());
const sal_uInt32 nHeight(FRound(aFnt.GetSize().Height() * mfScaleY));
- mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) );
- mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) );
- mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) );
+ mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) );
+ mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) );
+ mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CTL ) );
mpTextAttr->Put(SvxPostureItem(aFnt.GetItalic(), EE_CHAR_ITALIC));
mpTextAttr->Put(SvxWeightItem(aFnt.GetWeight(), EE_CHAR_WEIGHT));
mpTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 855fd69dbf3e..a761f74e71a7 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -727,7 +727,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
// get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
aSvxFontItem.SetFamily(aFont.GetFamily());
- aSvxFontItem.SetFamilyName(aFont.GetName());
+ aSvxFontItem.SetFamilyName(aFont.GetFamilyName());
aSvxFontItem.SetStyleName(OUString());
aSvxFontItem.SetPitch( aFont.GetPitch());
aSvxFontItem.SetCharSet( aFont.GetCharSet() );
@@ -736,7 +736,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
// get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily());
- aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName());
+ aSvxFontItemCJK.SetFamilyName(aFontCJK.GetFamilyName());
aSvxFontItemCJK.SetStyleName(OUString());
aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch());
aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet());
@@ -745,7 +745,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
// get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily());
- aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName());
+ aSvxFontItemCTL.SetFamilyName(aFontCTL.GetFamilyName());
aSvxFontItemCTL.SetStyleName(OUString());
aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() );
aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet());
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 67e2ab6b525f..fe83c23cff79 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1006,7 +1006,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem )
aCurFont.SetPitch ( pFontItem->GetPitch() );
aCurFont.SetCharSet ( pFontItem->GetCharSet() );
}
- OUString aCurName = aCurFont.GetName();
+ OUString aCurName = aCurFont.GetFamilyName();
if ( GetText() != aCurName )
SetText( aCurName );
}
@@ -1145,7 +1145,7 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
aCurFont.GetItalic() ) );
SvxFontItem aFontItem( aFontMetric.GetFamily(),
- aFontMetric.GetName(),
+ aFontMetric.GetFamilyName(),
aFontMetric.GetStyleName(),
aFontMetric.GetPitch(),
aFontMetric.GetCharSet(),
@@ -1172,7 +1172,7 @@ void SvxFontNameBox_Impl::Select()
aCurFont = aFontMetric;
pFontItem.reset( new SvxFontItem( aFontMetric.GetFamily(),
- aFontMetric.GetName(),
+ aFontMetric.GetFamilyName(),
aFontMetric.GetStyleName(),
aFontMetric.GetPitch(),
aFontMetric.GetCharSet(),
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index f9137bc4b791..57cc458cbdf3 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -127,7 +127,7 @@ namespace
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType,
nLng, GetDefaultFontFlags::OnlyOne ) );
- rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
+ rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(),
OUString(), aFnt.GetPitch(),
aFnt.GetCharSet(), aArr[n].nResFntId ));
}
@@ -156,7 +156,7 @@ namespace
vcl::Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType,
nLng, GetDefaultFontFlags::OnlyOne ) );
- rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
+ rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(),
OUString(), aFnt.GetPitch(),
aFnt.GetCharSet(), aArr[n].nResFntId ));
}
@@ -469,7 +469,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i],
nLng, GetDefaultFontFlags::OnlyOne ) );
- aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
+ aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetFamilyName(),
OUString(), aFnt.GetPitch(),
aFnt.GetCharSet(), aFontWhich[i] ));
}
@@ -1202,7 +1202,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
{
const vcl::Font& rBulletFont = numfunc::GetDefBulletFont();
SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(),
- rBulletFont.GetName(), rBulletFont.GetStyleName(),
+ rBulletFont.GetFamilyName(), rBulletFont.GetStyleName(),
rBulletFont.GetPitch(), rBulletFont.GetCharSet(), RES_CHRATR_FONT ));
}
break;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 2c1c57d4dcc3..bd5e6a52a191 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1620,7 +1620,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
m_aDelPam.GetMark()->nContent = 1;
SetAllScriptItem( aSet,
SvxFontItem( m_aFlags.aBulletFont.GetFamily(),
- m_aFlags.aBulletFont.GetName(),
+ m_aFlags.aBulletFont.GetFamilyName(),
m_aFlags.aBulletFont.GetStyleName(),
m_aFlags.aBulletFont.GetPitch(),
m_aFlags.aBulletFont.GetCharSet(),
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 60c2eed78c76..3f52b090a5fe 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -287,7 +287,7 @@ public:
sal_uInt16 GetOrientation( const bool bVertLayout = false ) const;
inline const OUString& GetName( const sal_uInt8 nWhich ) const
- { return m_aSub[nWhich].GetName(); }
+ { return m_aSub[nWhich].GetFamilyName(); }
inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const
{ return m_aSub[nWhich].GetLanguage(); }
inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index c470a067f710..dc01d799dd9a 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -537,7 +537,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
{
const sal_uInt8 nAct = pNumFnt->GetActual();
pNumFnt->SetFamily( pFormatFnt->GetFamily(), nAct );
- pNumFnt->SetName( pFormatFnt->GetName(), nAct );
+ pNumFnt->SetName( pFormatFnt->GetFamilyName(), nAct );
pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct );
pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct );
pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index abd97f7ed2a4..3bc1da5c22dc 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -361,7 +361,7 @@ sal_uInt16 SwFntObj::GetFontLeading( const SwViewShell *pSh, const OutputDevice&
bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
GuessLeading( *pSh, aMet );
nExtLeading = static_cast<sal_uInt16>(aMet.GetExternalLeading());
- /* HACK: There is something wrong with Writer's bullet rendering, causing lines
+ /* HACK: FIXME There is something wrong with Writer's bullet rendering, causing lines
with bullets to be higher than they should be. I think this is because
Writer uses font's external leading incorrect, as the vertical distance
added to every line instead of only a distance between multiple lines,
@@ -376,7 +376,7 @@ sal_uInt16 SwFntObj::GetFontLeading( const SwViewShell *pSh, const OutputDevice&
Interestingly enough, bSymbol is false for 'StarSymbol; Arial Unicode MS', so
also check explicitly.
*/
- if( bSymbol || IsStarSymbol( pPrtFont->GetName()))
+ if( bSymbol || IsStarSymbol( pPrtFont->GetFamilyName()))
nExtLeading = 0;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index ecb3bfb90088..7ae1320d46f1 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1084,7 +1084,7 @@ void SwTextNode::SetLanguageAndFont( const SwPaM &rPaM,
if (pFont)
{
SvxFontItem aFontItem = static_cast<const SvxFontItem&>( aSet.Get( nFontWhichId ) );
- aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamilyName( pFont->GetFamilyName());
aFontItem.SetFamily( pFont->GetFamily());
aFontItem.SetStyleName( pFont->GetStyleName());
aFontItem.SetPitch( pFont->GetPitch());
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 41904cebfdbb..0bd244589e2f 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -816,7 +816,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
if(
!pBulletFontNames[i].isEmpty() &&
!SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) &&
- (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetName() != pBulletFontNames[i])
+ (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetFamilyName() != pBulletFontNames[i])
)
{
const SvxFontListItem* pFontListItem =
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f18f9ef29fb8..118d4d524aab 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -89,7 +89,6 @@
#include <cassert>
#include <memory>
#include <set>
-#include <limits>
namespace
{
@@ -244,8 +243,6 @@ namespace sw
};
}
-
-class SwStyleBase_Impl;
class SwXStyle : public cppu::WeakImplHelper
<
css::style::XStyle,
@@ -272,8 +269,6 @@ protected:
css::uno::Reference<css::container::XNameAccess> m_xStyleFamily;
css::uno::Reference<css::beans::XPropertySet> m_xStyleData;
- template<sal_uInt16>
- void SetPropertyValue(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&);
void SAL_CALL SetPropertyValues_Impl( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues )
throw (css::beans::UnknownPropertyException,
css::beans::PropertyVetoException,
@@ -364,8 +359,6 @@ public:
void Invalidate();
void ApplyDescriptorProperties();
void SetStyleName(const OUString& rSet){ m_sStyleName = rSet;}
- void SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception);
- void PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl);
};
class SwXFrameStyle
@@ -1099,7 +1092,7 @@ static uno::Reference<beans::XPropertySet> lcl_InitStandardStyle(const SfxStyleF
if(eFamily != SFX_STYLE_FAMILY_PARA && eFamily != SFX_STYLE_FAMILY_PAGE)
return {};
auto aResult(rxStyleFamily->getByName("Standard"));
- if(!aResult.has<return_t>())
+ if(!aResult.isExtractableTo(cppu::UnoType<return_t>::get()))
return {};
return aResult.get<return_t>();
}
@@ -1115,7 +1108,7 @@ static uno::Reference<container::XNameAccess> lcl_InitStyleFamily(SwDoc* pDoc, c
uno::Reference<style::XStyleFamiliesSupplier> xFamilySupplier(xModel, uno::UNO_QUERY);
auto xFamilies = xFamilySupplier->getStyleFamilies();
auto aResult(xFamilies->getByName(rEntry.m_sName));
- if(!aResult.has<return_t>())
+ if(!aResult.isExtractableTo(cppu::UnoType<return_t>::get()))
return {};
return aResult.get<return_t>();
}
@@ -1406,453 +1399,580 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc()
return m_pOldPageDesc;
}
-static void lcl_SetDefaultWay(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- // default ItemSet handling
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
- aSet.SetParent(&rStyleSet);
- rPropSet.setPropertyValue(rEntry, rValue, aSet);
- rStyleSet.Put(aSet);
-}
-sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
-{
- // check for needed metric translation
- if(!(rEntry.nMemberId & SFX_METRIC_ITEM))
- return rEntry.nMemberId;
- // exception: If these ItemTypes are used, do not convert when these are negative
- // since this means they are intended as percent values
- if((XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID)
- && o_aValue.has<sal_Int32>()
- && o_aValue.get<sal_Int32>() < 0)
- return rEntry.nMemberId;
- if(!pDoc)
- return rEntry.nMemberId & (~SFX_METRIC_ITEM);
+static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
+ const SfxItemPropertySet& rPropSet,
+ const uno::Any& rValue,
+ SwStyleBase_Impl& rBase,
+ SfxStyleSheetBasePool* pBasePool,
+ SwDoc* pDoc,
+ SfxStyleFamily eFamily)
+ throw(beans::PropertyVetoException, lang::IllegalArgumentException,
+ lang::WrappedTargetException, uno::RuntimeException,
+ std::exception)
- const SfxItemPool& rPool = pDoc->GetAttrPool();
- const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- SvxUnoConvertFromMM(eMapUnit, o_aValue);
- return rEntry.nMemberId & (~SFX_METRIC_ITEM);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- bool bHidden = false;
- if(rValue >>= bHidden)
- {
- //make it a 'real' style - necessary for pooled styles
- o_rStyleBase.getNewBase()->GetItemSet();
- o_rStyleBase.getNewBase()->SetHidden(bHidden);
- }
- lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- o_rStyleBase.getNewBase()->GetItemSet();
- o_rStyleBase.getNewBase()->SetGrabBagItem(rValue);
- lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase);
-}
-template<>
-void SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
+ //UUUU adapted switch logic to a more readable state; removed goto's and made
+ // execution of standard setting of proerty in ItemSet dependent of this variable
+ bool bDone(false);
+
+ //UUUU
+ const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
uno::Any aValue(rValue);
- const auto nMemberId(lcl_TranslateMetric(rEntry, m_pDoc, aValue));
- if(MID_NAME == nMemberId)
+
+ //UUUU check for needed metric translation
+ if(rEntry.nMemberId & SFX_METRIC_ITEM)
{
- // add set commands for FillName items
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- if(!aValue.has<OUString>())
- throw lang::IllegalArgumentException();
- SvxShape::SetFillAttribute(rEntry.nWID, aValue.get<OUString>(), rStyleSet);
+ bool bDoIt(true);
+
+ if(XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID)
+ {
+ // exception: If these ItemTypes are used, do not convert when these are negative
+ // since this means they are intended as percent values
+ sal_Int32 nValue = 0;
+
+ if(aValue >>= nValue)
+ {
+ bDoIt = nValue > 0;
+ }
+ }
+
+ if(bDoIt && pDoc)
+ {
+ const SfxItemPool& rPool = pDoc->GetAttrPool();
+ const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
+
+ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ SvxUnoConvertFromMM(eMapUnit, aValue);
+ }
+ }
}
- else if(MID_GRAFURL == nMemberId)
+
+ switch(rEntry.nWID)
{
- if(XATTR_FILLBITMAP == rEntry.nWID)
+ case FN_UNO_HIDDEN:
{
- // Bitmap also has the MID_GRAFURL mode where a Bitmap URL is used
- const Graphic aNullGraphic;
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- XFillBitmapItem aXFillBitmapItem(rStyleSet.GetPool(), aNullGraphic);
- aXFillBitmapItem.PutValue(aValue, nMemberId);
- rStyleSet.Put(aXFillBitmapItem);
+ bool bHidden = false;
+ if ( rValue >>= bHidden )
+ {
+ //make it a 'real' style - necessary for pooled styles
+ rBase.getNewBase()->GetItemSet();
+ rBase.getNewBase()->SetHidden( bHidden );
+ }
}
- }
- else
- lcl_SetDefaultWay(rEntry, rPropSet, aValue, o_rStyleBase);
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_BACKGROUND>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, m_pDoc->IsInXMLImport()));
- SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
+ break;
- uno::Any aValue(rValue);
- const auto nMemberId(lcl_TranslateMetric(rEntry, m_pDoc, aValue));
- aChangedBrushItem.PutValue(aValue, nMemberId);
+ case FN_UNO_STYLE_INTEROP_GRAB_BAG:
+ {
+ rBase.getNewBase()->GetItemSet();
+ rBase.getNewBase()->SetGrabBagItem(rValue);
+ }
+ break;
- // 0xff is already the default - but if BackTransparent is set
- // to true, it must be applied in the item set on ODF import
- // to potentially override parent style, which is unknown yet
- if(aChangedBrushItem == aOriginalBrushItem && (MID_GRAPHIC_TRANSPARENT != nMemberId || !aValue.has<bool>() || !aValue.get<bool>()))
- return;
+ case XATTR_FILLGRADIENT:
+ case XATTR_FILLHATCH:
+ case XATTR_FILLBITMAP:
+ case XATTR_FILLFLOATTRANSPARENCE:
+ // not yet needed; activate when LineStyle support may be added
+ // case XATTR_LINESTART:
+ // case XATTR_LINEEND:
+ // case XATTR_LINEDASH:
+ {
+ if(MID_NAME == nMemberId)
+ {
+ //UUUU add set commands for FillName items
+ OUString aTempName;
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
- setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, rStyleSet);
-}
-template<>
-void SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- drawing::BitmapMode eMode;
- if(!(rValue >>= eMode))
- {
- if(!rValue.has<sal_Int32>())
- throw lang::IllegalArgumentException();
- eMode = ((drawing::BitmapMode)rValue.get<sal_Int32>());
- }
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- rStyleSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
- rStyleSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_PAPER_BIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!rValue.has<OUString>())
- throw lang::IllegalArgumentException();
- SfxPrinter* pPrinter = m_pDoc->getIDocumentDeviceAccess().getPrinter(true);
- OUString sValue(rValue.get<OUString>());
- using printeridx_t = decltype(pPrinter->GetPaperBinCount());
- printeridx_t nBin = std::numeric_limits<printeridx_t>::max();
- if(sValue == "[From printer settings]")
- nBin = std::numeric_limits<printeridx_t>::max()-1;
- else if(pPrinter)
- {
- for(sal_uInt16 i=0, nEnd = pPrinter->GetPaperBinCount(); i < nEnd; ++i)
+ if(!(aValue >>= aTempName))
+ {
+ throw lang::IllegalArgumentException();
+ }
+
+ SvxShape::SetFillAttribute(rEntry.nWID, aTempName, rStyleSet);
+ bDone = true;
+ }
+ else if(MID_GRAFURL == nMemberId)
+ {
+ if(XATTR_FILLBITMAP == rEntry.nWID)
+ {
+ //UUUU Bitmap also has the MID_GRAFURL mode where a Bitmap URL is used
+ const Graphic aNullGraphic;
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ XFillBitmapItem aXFillBitmapItem(rStyleSet.GetPool(), aNullGraphic);
+
+ aXFillBitmapItem.PutValue(aValue, nMemberId);
+ rStyleSet.Put(aXFillBitmapItem);
+ bDone = true;
+ }
+ }
+
+ break;
+ }
+ case RES_BACKGROUND:
{
- if (sValue == pPrinter->GetPaperBinName(i))
+ //UUUU
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, pDoc->IsInXMLImport()));
+ SvxBrushItem aChangedBrushItem(aOriginalBrushItem);
+
+ aChangedBrushItem.PutValue(aValue, nMemberId);
+
+ if (!(aChangedBrushItem == aOriginalBrushItem) ||
+ // 0xff is already the default - but if BackTransparent is set
+ // to true, it must be applied in the item set on ODF import
+ // to potentially override parent style, which is unknown yet
+ (MID_GRAPHIC_TRANSPARENT == nMemberId && aValue.has<bool>() && aValue.get<bool>()))
{
- nBin = i;
- break;
+ setSvxBrushItemAsFillAttributesToTargetSet(aChangedBrushItem, rStyleSet);
}
+
+ bDone = true;
+ break;
}
- }
- if(nBin == std::numeric_limits<printeridx_t>::max())
- throw lang::IllegalArgumentException();
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
- aSet.SetParent(&rStyleSet);
- rPropSet.setPropertyValue(rEntry, uno::makeAny(static_cast<sal_Int8>(nBin == std::numeric_limits<printeridx_t>::max()-1 ? -1 : nBin)), aSet);
- rStyleSet.Put(aSet);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!rValue.has<uno::Reference<container::XIndexReplace>>() || !rValue.has<uno::Reference<lang::XUnoTunnel>>())
- throw lang::IllegalArgumentException();
- auto xNumberTunnel(rValue.get<uno::Reference<lang::XUnoTunnel>>());
- SwXNumberingRules* pSwXRules = reinterpret_cast<SwXNumberingRules*>(sal::static_int_cast<sal_IntPtr>(xNumberTunnel->getSomething(SwXNumberingRules::getUnoTunnelId())));
- if(!pSwXRules)
- return;
- SwNumRule aSetRule(*pSwXRules->GetNumRule());
- for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
- {
- const SwNumFormat* pFormat = aSetRule.GetNumFormat(i);
- if(!pFormat)
- continue;
- SwNumFormat aFormat(*pFormat);
- const auto pCharName(pSwXRules->GetNewCharStyleNames()[i]);
- if(!pCharName.isEmpty()
- && !SwXNumberingRules::isInvalidStyle(pCharName)
- && (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharName))
+ case OWN_ATTR_FILLBMP_MODE:
+ {
+ //UUUU
+ drawing::BitmapMode eMode;
+
+ if(!(aValue >>= eMode))
+ {
+ sal_Int32 nMode = 0;
+
+ if(!(aValue >>= nMode))
+ {
+ throw lang::IllegalArgumentException();
+ }
+
+ eMode = (drawing::BitmapMode)nMode;
+ }
+
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+
+ rStyleSet.Put(XFillBmpStretchItem(drawing::BitmapMode_STRETCH == eMode));
+ rStyleSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
+
+ bDone = true;
+ break;
+ }
+ case RES_PAPER_BIN:
{
- auto pCharFormatIt(std::find_if(m_pDoc->GetCharFormats()->begin(), m_pDoc->GetCharFormats()->end(),
- [pCharName] (SwCharFormat* pF) { return pF->GetName() == pCharName; }));
- if(pCharFormatIt != m_pDoc->GetCharFormats()->end())
- aFormat.SetCharFormat(*pCharFormatIt);
- else if(m_pBasePool)
+ SfxPrinter *pPrinter = pDoc->getIDocumentDeviceAccess().getPrinter( true );
+ OUString sTmp;
+ sal_uInt16 nBin = USHRT_MAX;
+ if ( !( aValue >>= sTmp ) )
+ throw lang::IllegalArgumentException();
+ if ( sTmp == "[From printer settings]" )
+ nBin = USHRT_MAX-1;
+ else if ( pPrinter )
{
- auto pBase(static_cast<SfxStyleSheetBasePool*>(m_pBasePool)->Find(pCharName, SFX_STYLE_FAMILY_CHAR));
- if(!pBase)
- pBase = &m_pBasePool->Make(pCharName, SFX_STYLE_FAMILY_CHAR);
- aFormat.SetCharFormat(static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat());
+ for (sal_uInt16 i=0, nEnd = pPrinter->GetPaperBinCount(); i < nEnd; i++ )
+ {
+ if (sTmp == pPrinter->GetPaperBinName ( i ) )
+ {
+ nBin = i;
+ break;
+ }
+ }
}
+ if ( nBin == USHRT_MAX )
+ throw lang::IllegalArgumentException();
else
- aFormat.SetCharFormat(nullptr);
+ {
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
+ aSet.SetParent(&rStyleSet);
+ rPropSet.setPropertyValue(rEntry, uno::makeAny ( static_cast < sal_Int8 > ( nBin == USHRT_MAX-1 ? -1 : nBin ) ), aSet);
+ rStyleSet.Put(aSet);
+ }
+
+ bDone = true;
+ break;
}
- // same for fonts:
- const auto pBulletName(pSwXRules->GetBulletFontNames()[i]);
- if(!pBulletName.isEmpty()
- && !SwXNumberingRules::isInvalidStyle(pBulletName)
- && (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetName() != pBulletName))
+ case FN_UNO_NUM_RULES: // special handling for a SvxNumRuleItem:
{
- const auto pFontListItem(static_cast<const SvxFontListItem*>(m_pDoc->GetDocShell()->GetItem(SID_ATTR_CHAR_FONTLIST)));
- const auto pList(pFontListItem->GetFontList());
- FontMetric aFontInfo(pList->Get(pBulletName, WEIGHT_NORMAL, ITALIC_NONE));
- vcl::Font aFont(aFontInfo);
- aFormat.SetBulletFont(&aFont);
+ if(aValue.getValueType() == cppu::UnoType<container::XIndexReplace>::get())
+ {
+ uno::Reference< container::XIndexReplace > const * pxRulesRef =
+ static_cast<uno::Reference< container::XIndexReplace > const *>(aValue.getValue());
+
+ uno::Reference<lang::XUnoTunnel> xNumberTunnel( *pxRulesRef, uno::UNO_QUERY);
+
+ SwXNumberingRules* pSwXRules = nullptr;
+ if(xNumberTunnel.is())
+ {
+ pSwXRules = reinterpret_cast< SwXNumberingRules * >(
+ sal::static_int_cast< sal_IntPtr >(xNumberTunnel->getSomething( SwXNumberingRules::getUnoTunnelId()) ));
+ }
+ if(pSwXRules)
+ {
+ const OUString* pCharStyleNames = pSwXRules->GetNewCharStyleNames();
+ const OUString* pBulletFontNames = pSwXRules->GetBulletFontNames();
+
+ SwNumRule aSetRule(*pSwXRules->GetNumRule());
+ const SwCharFormats* pFormats = pDoc->GetCharFormats();
+ const size_t nChCount = pFormats->size();
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
+ {
+
+ const SwNumFormat* pFormat = aSetRule.GetNumFormat( i );
+ if(pFormat)
+ {
+ SwNumFormat aFormat(*pFormat);
+ if (!pCharStyleNames[i].isEmpty() &&
+ !SwXNumberingRules::isInvalidStyle(pCharStyleNames[i]) &&
+ (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharStyleNames[i]) )
+ {
+
+ SwCharFormat* pCharFormat = nullptr;
+ for(size_t j = 0; j< nChCount; ++j)
+ {
+ SwCharFormat* pTmp = (*pFormats)[j];
+ if(pTmp->GetName() == pCharStyleNames[i])
+ {
+ pCharFormat = pTmp;
+ break;
+ }
+ }
+ if(!pCharFormat && pBasePool)
+ {
+
+ SfxStyleSheetBase* pBase;
+ pBase = static_cast<SfxStyleSheetBasePool*>(pBasePool)->Find(pCharStyleNames[i], SFX_STYLE_FAMILY_CHAR);
+ if(!pBase)
+ pBase = &pBasePool->Make(pCharStyleNames[i], SFX_STYLE_FAMILY_CHAR);
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
+
+ }
+
+ aFormat.SetCharFormat( pCharFormat );
+ }
+ // same for fonts:
+ if (!pBulletFontNames[i].isEmpty() &&
+ !SwXNumberingRules::isInvalidStyle(pBulletFontNames[i]) &&
+ (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != pBulletFontNames[i]) )
+ {
+ const SvxFontListItem* pFontListItem =
+ static_cast<const SvxFontListItem*>(pDoc->GetDocShell()
+ ->GetItem( SID_ATTR_CHAR_FONTLIST ));
+ const FontList* pList = pFontListItem->GetFontList();
+ FontMetric aFontMetric = pList->Get(
+ pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE);
+ vcl::Font aFont(aFontMetric);
+ aFormat.SetBulletFont(&aFont);
+ }
+ aSetRule.Set( i, &aFormat );
+ }
+ }
+ rBase.getNewBase()->SetNumRule(aSetRule);
+ }
+ }
+ else
+ throw lang::IllegalArgumentException();
+
+ bDone = true;
+ break;
}
- aSetRule.Set(i, &aFormat);
- }
- o_rStyleBase.getNewBase()->SetNumRule(aSetRule);
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_PARATR_OUTLINELEVEL>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!rValue.has<sal_Int16>())
- return;
- const auto nLevel(rValue.get<sal_Int16>());
- if(0 <= nLevel && nLevel <= MAXLEVEL)
- o_rStyleBase.getNewBase()->GetCollection()->SetAttrOutlineLevel(nLevel);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!rValue.has<OUString>())
- return;
- const auto sValue(rValue.get<OUString>());
- OUString aString;
- SwStyleNameMapper::FillUIName(sValue, aString, m_rEntry.m_aPoolId, true);
- o_rStyleBase.getNewBase()->SetFollow(aString);
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_PAGEDESC>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
- {
- lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase);
- return;
- }
- if(!rValue.has<OUString>())
- throw lang::IllegalArgumentException();
- // special handling for RES_PAGEDESC
- SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- std::unique_ptr<SwFormatPageDesc> pNewDesc;
- const SfxPoolItem* pItem;
- if(SfxItemState::SET == rStyleSet.GetItemState(RES_PAGEDESC, true, &pItem))
- pNewDesc.reset(new SwFormatPageDesc(*static_cast<const SwFormatPageDesc*>(pItem)));
- else
- pNewDesc.reset(new SwFormatPageDesc);
- const auto sValue(rValue.get<OUString>());
- OUString sDescName;
- SwStyleNameMapper::FillUIName(sValue, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true);
- if(pNewDesc->GetPageDesc() && pNewDesc->GetPageDesc()->GetName() == sDescName)
- return;
- if(sDescName.isEmpty())
- {
- rStyleSet.ClearItem(RES_BREAK);
- rStyleSet.Put(SwFormatPageDesc());
- }
- else
- {
- SwPageDesc* pPageDesc(SwPageDesc::GetByName(*m_pDoc, sDescName));
- if(!pPageDesc)
- throw lang::IllegalArgumentException();
- pNewDesc->RegisterToPageDesc(*pPageDesc);
- rStyleSet.Put(*pNewDesc);
- }
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!m_pDoc || !rValue.has<drawing::TextVerticalAdjust>() || !o_rStyleBase.GetOldPageDesc())
- return;
- SwPageDesc* pPageDesc = m_pDoc->FindPageDesc(o_rStyleBase.GetOldPageDesc()->GetName());
- if(pPageDesc)
- pPageDesc->SetVerticalAdjustment(rValue.get<drawing::TextVerticalAdjust>());
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(!rValue.has<bool>())
- throw lang::IllegalArgumentException();
- const bool bAuto(rValue.get<bool>());
- if(SFX_STYLE_FAMILY_PARA == m_rEntry.m_eFamily)
- o_rStyleBase.getNewBase()->GetCollection()->SetAutoUpdateFormat(bAuto);
- else if(SFX_STYLE_FAMILY_FRAME == m_rEntry.m_eFamily)
- o_rStyleBase.getNewBase()->GetFrameFormat()->SetAutoUpdateFormat(bAuto);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- static_assert(COND_COMMAND_COUNT == 28, "invalid size of command count?");
- using expectedarg_t = uno::Sequence<beans::NamedValue>;
- if(!rValue.has<expectedarg_t>() || !m_pBasePool)
- throw lang::IllegalArgumentException();
- SwCondCollItem aCondItem;
- for(auto& rNamedValue : rValue.get<expectedarg_t>())
- {
- if(!rNamedValue.Value.has<OUString>())
- throw lang::IllegalArgumentException();
-
- const OUString sValue(rNamedValue.Value.get<OUString>());
- // get UI style name from programmatic style name
- OUString aStyleName;
- SwStyleNameMapper::FillUIName(sValue, aStyleName, lcl_GetSwEnumFromSfxEnum(m_rEntry.m_eFamily), true);
-
- // check for correct context and style name
- const auto nIdx(GetCommandContextIndex(rNamedValue.Name));
- if(nIdx == -1)
- throw lang::IllegalArgumentException();
- m_pBasePool->SetSearchMask(SFX_STYLE_FAMILY_PARA);
- for(auto pBase = m_pBasePool->First(); pBase->GetName() != aStyleName; pBase = m_pBasePool->Next())
+
+ case RES_PARATR_OUTLINELEVEL:
{
- if(!pBase)
+ sal_Int16 nLevel = 0;
+ aValue >>= nLevel;
+ if( 0 <= nLevel && nLevel <= MAXLEVEL)
+ rBase.getNewBase()->GetCollection()->SetAttrOutlineLevel( nLevel );
+
+ bDone = true;
+ break;
+ }
+
+ case FN_UNO_FOLLOW_STYLE:
+ {
+ OUString sTmp;
+ aValue >>= sTmp;
+ OUString aString;
+ SwStyleNameMapper::FillUIName(sTmp, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true ) ;
+ rBase.getNewBase()->SetFollow( aString );
+
+ bDone = true;
+ break;
+ }
+ case RES_PAGEDESC :
+ {
+ if (MID_PAGEDESC_PAGEDESCNAME != nMemberId)
+ break;
+ // special handling for RES_PAGEDESC
+ if(aValue.getValueType() != ::cppu::UnoType<OUString>::get())
throw lang::IllegalArgumentException();
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+
+ std::unique_ptr<SwFormatPageDesc> pNewDesc;
+ const SfxPoolItem* pItem;
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
+ {
+ pNewDesc.reset( new SwFormatPageDesc(*static_cast<const SwFormatPageDesc*>(pItem)) );
+ }
+ else
+ pNewDesc.reset( new SwFormatPageDesc );
+ OUString uDescName;
+ aValue >>= uDescName;
+ OUString sDescName;
+ SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
+ if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName)
+ {
+ bool bPut = false;
+ if (!sDescName.isEmpty())
+ {
+ SwPageDesc* pPageDesc = SwPageDesc::GetByName(*pDoc, sDescName);
+ if(pPageDesc)
+ {
+ pNewDesc->RegisterToPageDesc( *pPageDesc );
+ bPut = true;
+ }
+ else
+ {
+ throw lang::IllegalArgumentException();
+ }
+ }
+ if(!bPut)
+ {
+ rStyleSet.ClearItem(RES_BREAK);
+ rStyleSet.Put(SwFormatPageDesc());
+ }
+ else
+ rStyleSet.Put(*pNewDesc);
+
+ }
+ bDone = true;
+ break;
}
- aCondItem.SetStyle(&aStyleName, nIdx);
- }
- o_rStyleBase.GetItemSet().Put(aCondItem);
-}
-template<>
-void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- using paragraphstyle_t = std::remove_const<decltype(style::ParagraphStyleCategory::TEXT)>::type;
- using paragraphcorestyle_t = sal_uInt16;
- if(!o_rStyleBase.getNewBase()->IsUserDefined() || !rValue.has<paragraphstyle_t>())
- throw lang::IllegalArgumentException();
- static std::unique_ptr<std::map<paragraphstyle_t, paragraphcorestyle_t>> pUnoToCore;
- if(!pUnoToCore)
- {
- pUnoToCore.reset(new std::map<paragraphstyle_t, paragraphcorestyle_t> {
- { style::ParagraphStyleCategory::TEXT, SWSTYLEBIT_TEXT },
- { style::ParagraphStyleCategory::CHAPTER, SWSTYLEBIT_CHAPTER },
- { style::ParagraphStyleCategory::LIST, SWSTYLEBIT_LIST },
- { style::ParagraphStyleCategory::INDEX, SWSTYLEBIT_IDX },
- { style::ParagraphStyleCategory::EXTRA, SWSTYLEBIT_EXTRA },
- { style::ParagraphStyleCategory::HTML, SWSTYLEBIT_HTML }
- });
- }
- const auto pUnoToCoreIt(pUnoToCore->find(rValue.get<paragraphstyle_t>()));
- if(pUnoToCoreIt == pUnoToCore->end())
- throw lang::IllegalArgumentException();
- o_rStyleBase.getNewBase()->SetMask( pUnoToCoreIt->second|SFXSTYLEBIT_USERDEF );
-}
-template<>
-void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- OUString sName;
- rValue >>= sName;
- SwRegisterItem aReg(!sName.isEmpty());
- aReg.SetWhich(SID_SWREGISTER_MODE);
- o_rStyleBase.GetItemSet().Put(aReg);
- OUString aString;
- SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
- o_rStyleBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(MID_RUBY_CHARSTYLE != rEntry.nMemberId)
- return;
- if(!rValue.has<OUString>())
- throw lang::IllegalArgumentException();
- const auto sValue(rValue.get<OUString>());
- SfxItemSet& rStyleSet(o_rStyleBase.GetItemSet());
- std::unique_ptr<SwFormatRuby> pRuby;
- const SfxPoolItem* pItem;
- if(SfxItemState::SET == rStyleSet.GetItemState(RES_TXTATR_CJK_RUBY, true, &pItem))
- pRuby.reset(new SwFormatRuby(*static_cast<const SwFormatRuby*>(pItem)));
- else
- pRuby.reset(new SwFormatRuby(OUString()));
- OUString sStyle;
- SwStyleNameMapper::FillUIName(sValue, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
- pRuby->SetCharFormatName(sValue);
- pRuby->SetCharFormatId(0);
- if(!sValue.isEmpty())
- {
- const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(sValue, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT));
- pRuby->SetCharFormatId(nId);
- }
- rStyleSet.Put(*pRuby);
- lcl_SetDefaultWay(rEntry, rPropSet, rValue, o_rStyleBase);
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_PARATR_DROP>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- if(MID_DROPCAP_CHAR_STYLE_NAME != rEntry.nMemberId)
- return;
- if(!rValue.has<OUString>())
- throw lang::IllegalArgumentException();
- SfxItemSet& rStyleSet(o_rStyleBase.GetItemSet());
- std::unique_ptr<SwFormatDrop> pDrop;
- const SfxPoolItem* pItem;
- if(SfxItemState::SET == rStyleSet.GetItemState(RES_PARATR_DROP, true, &pItem))
- pDrop.reset(new SwFormatDrop(*static_cast<const SwFormatDrop*>(pItem)));
- else
- pDrop.reset(new SwFormatDrop);
- const auto sValue(rValue.get<OUString>());
- OUString sStyle;
- SwStyleNameMapper::FillUIName(sValue, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
- auto pStyle(static_cast<SwDocStyleSheet*>(m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR)));
- if(!pStyle)
- throw lang::IllegalArgumentException();
- pDrop->SetCharFormat(pStyle->GetCharFormat());
- rStyleSet.Put(*pDrop);
-}
-template<>
-void SwXStyle::SetPropertyValue<RES_PARATR_NUMRULE>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
-{
- uno::Any aValue(rValue);
- lcl_TranslateMetric(rEntry, m_pDoc, aValue);
- lcl_SetDefaultWay(rEntry, rPropSet, aValue, o_rStyleBase);
- // --> OD 2006-10-18 #i70223#
- if(SFX_STYLE_FAMILY_PARA == m_rEntry.m_eFamily &&
- o_rStyleBase.getNewBase().is() && o_rStyleBase.getNewBase()->GetCollection() &&
- //rBase.getNewBase()->GetCollection()->GetOutlineLevel() < MAXLEVEL /* assigned to list level of outline style */) //#outline level,removed by zhaojianwei
- o_rStyleBase.getNewBase()->GetCollection()->IsAssignedToListLevelOfOutlineStyle()) ////<-end,add by zhaojianwei
- {
- OUString sNewNumberingRuleName;
- aValue >>= sNewNumberingRuleName;
- if(sNewNumberingRuleName.isEmpty() || sNewNumberingRuleName != m_pDoc->GetOutlineNumRule()->GetName())
- o_rStyleBase.getNewBase()->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
- }
-}
+ case RES_TEXT_VERT_ADJUST:
+ {
+ if( pDoc )
+ {
+ const SwPageDesc* pOldPageDesc = rBase.GetOldPageDesc();
+ SwPageDesc* pPageDesc = pOldPageDesc ? pDoc->FindPageDesc(pOldPageDesc->GetName()) : nullptr;
+ if (pPageDesc)
+ {
+ drawing::TextVerticalAdjust nVA;
+ rValue >>= nVA;
+ pPageDesc->SetVerticalAdjustment( nVA );
+ }
+ }
+ bDone = true;
+ break;
+ }
+ case FN_UNO_IS_AUTO_UPDATE:
+ {
+ bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
+ if(SFX_STYLE_FAMILY_PARA == eFamily)
+ rBase.getNewBase()->GetCollection()->SetAutoUpdateFormat(bAuto);
+ else if(SFX_STYLE_FAMILY_FRAME == eFamily)
+ rBase.getNewBase()->GetFrameFormat()->SetAutoUpdateFormat(bAuto);
-void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& rBase) throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
-{
- using propertytype_t = decltype(rEntry.nWID);
- using coresetter_t = std::function<void(SwXStyle&, const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any&, SwStyleBase_Impl&)>;
- static std::unique_ptr<std::map<propertytype_t, coresetter_t>> pUnoToCore;
- if(!pUnoToCore)
- {
- pUnoToCore.reset(new std::map<propertytype_t, coresetter_t> {
- // these explicit std::mem_fn() calls shouldnt be needed, but apparently MSVC is currently too stupid for C++11 again
- { FN_UNO_HIDDEN, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_HIDDEN>) },
- { FN_UNO_STYLE_INTEROP_GRAB_BAG, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_STYLE_INTEROP_GRAB_BAG>) },
- { XATTR_FILLGRADIENT, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLHATCH, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLBITMAP, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { XATTR_FILLFLOATTRANSPARENCE, std::mem_fn(&SwXStyle::SetPropertyValue<XATTR_FILLGRADIENT>) },
- { RES_BACKGROUND, std::mem_fn(&SwXStyle::SetPropertyValue<RES_BACKGROUND>) },
- { OWN_ATTR_FILLBMP_MODE, std::mem_fn(&SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>) },
- { RES_PAPER_BIN, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PAPER_BIN>) },
- { FN_UNO_NUM_RULES, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>) },
- { RES_PARATR_OUTLINELEVEL, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PARATR_OUTLINELEVEL>) },
- { FN_UNO_FOLLOW_STYLE, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>) },
- { RES_PAGEDESC, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PAGEDESC>) },
- { RES_TEXT_VERT_ADJUST, std::mem_fn(&SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>) },
- { FN_UNO_IS_AUTO_UPDATE, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>) },
- { FN_UNO_PARA_STYLE_CONDITIONS, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>) },
- { FN_UNO_CATEGORY, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>) },
- { SID_SWREGISTER_COLLECTION, std::mem_fn(&SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>) },
- { RES_TXTATR_CJK_RUBY, std::mem_fn(&SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>) },
- { RES_PARATR_DROP, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PARATR_DROP>) },
- { RES_PARATR_DROP, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PARATR_DROP>) },
- { RES_PARATR_NUMRULE, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PARATR_NUMRULE>) }
- });
+ bDone = true;
+ break;
+ }
+ case FN_UNO_PARA_STYLE_CONDITIONS:
+ {
+ uno::Sequence< beans::NamedValue > aSeq;
+ if (!(aValue >>= aSeq))
+ throw lang::IllegalArgumentException();
+
+ OSL_ENSURE(COND_COMMAND_COUNT == 28,
+ "invalid size of command count?");
+ const beans::NamedValue *pSeq = aSeq.getConstArray();
+ const sal_Int32 nLen = aSeq.getLength();
+
+ bool bFailed = false;
+ SwCondCollItem aCondItem;
+ for(sal_Int32 i = 0; i < nLen; ++i)
+ {
+ OUString aTmp;
+ if ((pSeq[i].Value >>= aTmp))
+ {
+ // get UI style name from programmatic style name
+ OUString aStyleName;
+ SwStyleNameMapper::FillUIName(aTmp, aStyleName,
+ lcl_GetSwEnumFromSfxEnum(eFamily), true);
+
+ // check for correct context and style name
+
+ sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name );
+
+ bool bStyleFound = false;
+ if (pBasePool)
+ {
+ pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA);
+ const SfxStyleSheetBase* pBase = pBasePool->First();
+ while (pBase && !bStyleFound)
+ {
+ if(pBase->GetName() == aStyleName)
+ bStyleFound = true;
+ pBase = pBasePool->Next();
+ }
+ }
+
+ if (nIdx == -1 || !bStyleFound)
+ {
+ bFailed = true;
+ break;
+ }
+
+ aCondItem.SetStyle(&aStyleName, nIdx);
+ }
+ else
+ bFailed = true;
+ }
+ if (bFailed)
+ throw lang::IllegalArgumentException();
+ rBase.GetItemSet().Put( aCondItem );
+ bDone = true;
+ break;
+ }
+ case FN_UNO_CATEGORY:
+ {
+ if(!rBase.getNewBase()->IsUserDefined())
+ throw lang::IllegalArgumentException();
+ short nSet = 0;
+ aValue >>= nSet;
+
+ sal_uInt16 nId;
+ switch( nSet )
+ {
+ case style::ParagraphStyleCategory::TEXT:
+ nId = SWSTYLEBIT_TEXT;
+ break;
+ case style::ParagraphStyleCategory::CHAPTER:
+ nId = SWSTYLEBIT_CHAPTER;
+ break;
+ case style::ParagraphStyleCategory::LIST:
+ nId = SWSTYLEBIT_LIST;
+ break;
+ case style::ParagraphStyleCategory::INDEX:
+ nId = SWSTYLEBIT_IDX;
+ break;
+ case style::ParagraphStyleCategory::EXTRA:
+ nId = SWSTYLEBIT_EXTRA;
+ break;
+ case style::ParagraphStyleCategory::HTML:
+ nId = SWSTYLEBIT_HTML;
+ break;
+ default: throw lang::IllegalArgumentException();
+ }
+
+ rBase.getNewBase()->SetMask( nId|SFXSTYLEBIT_USERDEF );
+ bDone = true;
+ break;
+ }
+ case SID_SWREGISTER_COLLECTION:
+ {
+ OUString sName;
+ aValue >>= sName;
+ SwRegisterItem aReg( !sName.isEmpty() );
+ aReg.SetWhich(SID_SWREGISTER_MODE);
+ rBase.GetItemSet().Put(aReg);
+ OUString aString;
+ SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
+
+ rBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
+ bDone = true;
+ break;
+ }
+ case RES_TXTATR_CJK_RUBY:
+ {
+ if(MID_RUBY_CHARSTYLE == nMemberId )
+ {
+ OUString sTmp;
+ if(aValue >>= sTmp)
+ {
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ std::unique_ptr<SwFormatRuby> pRuby;
+ const SfxPoolItem* pItem;
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_TXTATR_CJK_RUBY, true, &pItem ) )
+ pRuby.reset(new SwFormatRuby(*static_cast<const SwFormatRuby*>(pItem)));
+ else
+ pRuby.reset(new SwFormatRuby(OUString()));
+ OUString sStyle;
+ SwStyleNameMapper::FillUIName(sTmp, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
+ pRuby->SetCharFormatName( sTmp );
+ pRuby->SetCharFormatId( 0 );
+ if(!sTmp.isEmpty())
+ {
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ pRuby->SetCharFormatId(nId);
+ }
+ rStyleSet.Put(*pRuby);
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
+ break;
+ }
+ case RES_PARATR_DROP:
+ {
+ if( MID_DROPCAP_CHAR_STYLE_NAME == nMemberId)
+ {
+ if(aValue.getValueType() == ::cppu::UnoType<OUString>::get())
+ {
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+
+ std::unique_ptr<SwFormatDrop> pDrop;
+ const SfxPoolItem* pItem;
+ if(SfxItemState::SET == rStyleSet.GetItemState( RES_PARATR_DROP, true, &pItem ) )
+ pDrop.reset(new SwFormatDrop(*static_cast<const SwFormatDrop*>(pItem)));
+ else
+ pDrop.reset( new SwFormatDrop );
+ OUString uStyle;
+ aValue >>= uStyle;
+ OUString sStyle;
+ SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
+ SwDocStyleSheet* pStyle =
+ static_cast<SwDocStyleSheet*>(pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR));
+ if(pStyle)
+ pDrop->SetCharFormat(pStyle->GetCharFormat());
+ else
+ throw lang::IllegalArgumentException();
+ rStyleSet.Put(*pDrop);
+ }
+ else
+ throw lang::IllegalArgumentException();
+
+ bDone = true;
+ }
+ break;
+ }
+ default:
+ {
+ // nothing to do
+ break;
+ }
}
- const auto pUnoToCoreIt(pUnoToCore->find(rEntry.nWID));
- if(pUnoToCoreIt != pUnoToCore->end())
- pUnoToCoreIt->second(*this, rEntry, rPropSet, rValue, rBase);
- else
+
+ if(!bDone)
{
- //UUUU adapted switch logic to a more readable state; removed goto's and made
- // execution of standard setting of proerty in ItemSet dependent of this variable
- uno::Any aValue(rValue);
- lcl_TranslateMetric(rEntry, m_pDoc, aValue);
- lcl_SetDefaultWay(rEntry, rPropSet, aValue, rBase);
+ // default ItemSet handling
+ SfxItemSet& rStyleSet = rBase.GetItemSet();
+ SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
+ aSet.SetParent(&rStyleSet);
+ rPropSet.setPropertyValue(rEntry, aValue, aSet);
+ rStyleSet.Put(aSet);
+
+ // --> OD 2006-10-18 #i70223#
+ if ( SFX_STYLE_FAMILY_PARA == eFamily &&
+ rEntry.nWID == RES_PARATR_NUMRULE &&
+ rBase.getNewBase().is() && rBase.getNewBase()->GetCollection() &&
+ //rBase.getNewBase()->GetCollection()->GetOutlineLevel() < MAXLEVEL /* assigned to list level of outline style */) //#outline level,removed by zhaojianwei
+ rBase.getNewBase()->GetCollection()->IsAssignedToListLevelOfOutlineStyle() ) ////<-end,add by zhaojianwei
+ {
+ OUString sNewNumberingRuleName;
+ aValue >>= sNewNumberingRuleName;
+ if ( sNewNumberingRuleName.isEmpty() ||
+ sNewNumberingRuleName != pDoc->GetOutlineNumRule()->GetName() )
+ {
+ rBase.getNewBase()->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
+ }
+ }
}
}
@@ -1895,7 +2015,7 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl(
throw beans::PropertyVetoException ("Property is read-only: " + pNames[nProp], static_cast<cppu::OWeakObject*>(this));
if(aBaseImpl.getNewBase().is())
{
- SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl);
+ lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, m_pDoc, m_rEntry.m_eFamily);
}
else if(m_bIsDescriptor)
{
@@ -2933,20 +3053,20 @@ SwXPageStyle::~SwXPageStyle()
}
-void SwXStyle::PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl)
+static void lcl_putItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl, SfxStyleSheetBasePool* pPool, SwDoc *pDoc, SfxStyleFamily eFamily)
{
// create a new SvxSetItem and get it's ItemSet as new target
SvxSetItem* pNewSetItem = static_cast< SvxSetItem* >(pSetItem->Clone());
SfxItemSet& rSetSet = pNewSetItem->GetItemSet();
// set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
- rSetSet.SetParent(&m_pDoc->GetDfltFrameFormat()->GetAttrSet());
+ rSetSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet());
// replace the used SfxItemSet at the SwStyleBase_Impl temporarily and use the
// default method to set the property
{
SwStyleBase_Impl::ItemSetOverrider o(rBaseImpl, &rSetSet);
- SetStyleProperty(rEntry, rPropSet, rVal, rBaseImpl);
+ lcl_SetStyleProperty(rEntry, rPropSet, rVal, rBaseImpl, pPool, pDoc, eFamily);
}
// reset paret at ItemSet from SetItem
@@ -3035,7 +3155,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
if (lcl_GetHeaderFooterItem(aBaseImpl.GetItemSet(),
rPropName, bFooter, pSetItem))
{
- PutItemToSet(pSetItem, *pPropSet, *pEntry, pValues[nProp], aBaseImpl);
+ lcl_putItemToSet(pSetItem, *pPropSet, *pEntry, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
if (pEntry->nWID == SID_ATTR_PAGE_SHARED_FIRST)
{
@@ -3044,7 +3164,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
bFooter ? SID_ATTR_PAGE_HEADERSET : SID_ATTR_PAGE_FOOTERSET,
false, reinterpret_cast<const SfxPoolItem**>(&pSetItem)))
{
- PutItemToSet(pSetItem, *pPropSet, *pEntry, pValues[nProp], aBaseImpl);
+ lcl_putItemToSet(pSetItem, *pPropSet, *pEntry, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
}
}
}
@@ -3099,7 +3219,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
default:
{
// part of PageStyle, fallback to default
- SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl);
+ lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
}
}
}
@@ -3150,7 +3270,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
// default method to set the property
{
SwStyleBase_Impl::ItemSetOverrider o(aBaseImpl, &rSetSet);
- SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl);
+ lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
}
// reset paret at ItemSet from SetItem
@@ -3164,7 +3284,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
else
{
// part of PageStyle, fallback to default
- SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl);
+ lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
}
break;
@@ -3193,7 +3313,8 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
}
default:
{
- SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl);
+ //UUUU
+ lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, m_pBasePool, GetDoc(), GetFamily());
break;
}
}
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 5c6f63ecf85d..aec0ecd8aa3b 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -116,7 +116,7 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCursor, SvStream& rIn,
vcl::Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) );
if( pDoc->getIDocumentDeviceAccess().getPrinter( false ) )
aTextFont = pDoc->getIDocumentDeviceAccess().getPrinter( false )->GetFontMetric( aTextFont );
- SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(),
+ SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetFamilyName(),
OUString(), aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT );
pItemSet->Put( aFont );
pItemSet->Put( aFont, RES_CHRATR_CJK_FONT );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 94794a79faa3..8e6b4a2a3ae7 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -612,7 +612,7 @@ static void lcl_html_setFixedFontProperty(
DefaultFontType::FIXED, LANGUAGE_ENGLISH_US,
GetDefaultFontFlags::OnlyOne ) );
Any aTmp;
- aTmp <<= OUString( aFixedFont.GetName() );
+ aTmp <<= OUString( aFixedFont.GetFamilyName() );
rPropSet->setPropertyValue("FontName", aTmp );
aTmp <<= OUString( aFixedFont.GetStyleName() );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 539d77a0522b..4479c535cd83 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1078,7 +1078,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
DefaultFontType::FIXED, LANGUAGE_ENGLISH_US,
GetDefaultFontFlags::OnlyOne ) );
OUString aFName( *static_cast<OUString const *>(aTmp.getValue()) );
- if( !bEdit || aFName != aFixedFont.GetName() )
+ if( !bEdit || aFName != aFixedFont.GetFamilyName() )
{
FontFamily eFamily = FAMILY_DONTKNOW;
if( xPropSetInfo->hasPropertyByName( "FontFamily" ) )
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 6eff01aecd90..b696e7f9bcc3 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -332,7 +332,7 @@ void Writer::PutNumFormatFontsInAttrPool()
bCheck = true;
_AddFontItem( rPool, SvxFontItem( pFont->GetFamily(),
- pFont->GetName(), pFont->GetStyleName(),
+ pFont->GetFamilyName(), pFont->GetStyleName(),
pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT ));
}
}
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 084254fd3599..9b58dd38a469 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -424,7 +424,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
}
eChrSet = pBulletFont->GetCharSet();
- sFontName = pBulletFont->GetName();
+ sFontName = pBulletFont->GetFamilyName();
eFamily = pBulletFont->GetFamily();
if ( IsStarSymbol(sFontName) )
@@ -498,7 +498,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
aSet.ClearItem( RES_CHRATR_FONT );
if ( sFontName.isEmpty() )
- sFontName = pBulletFont->GetName();
+ sFontName = pBulletFont->GetFamilyName();
pPseudoFont = new wwFont( sFontName, pBulletFont->GetPitch(),
eFamily, eChrSet);
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index e3eecbd256d8..016b35b62d23 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -641,7 +641,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
if( pPrt )
aFont = pPrt->GetFontMetric( aFont );
SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
- pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(),
aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
@@ -717,7 +717,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* )
vcl::Font aFont( sStandard, Size( 0, 10 ) );
if( pPrinter )
aFont = pPrinter->GetFontMetric( aFont );
- m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ m_pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(),
aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFormatAttr(nFontWhich);
@@ -829,7 +829,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
for( int i = 0; i < nFontNames; i++ )
{
FontMetric aFontMetric( m_pPrt->GetDevFont( i ) );
- aFontNames.insert( aFontMetric.GetName() );
+ aFontNames.insert( aFontMetric.GetFamilyName() );
}
// insert to listboxes
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index b0ee67ead375..beb36a6a5359 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -191,7 +191,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
for( int i = 0; i < nFontNames; i++ )
{
FontMetric aFontMetric( pPrt->GetDevFont( i ) );
- aFontNames.insert( aFontMetric.GetName() );
+ aFontNames.insert( aFontMetric.GetFamilyName() );
}
// insert into listbox
@@ -205,7 +205,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
{
LanguageType eLang = aOpt.GetLanguage();
vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, eLang, GetDefaultFontFlags::OnlyOne, pPrt));
- aOpt.SetFontName(aTmpFont.GetName());
+ aOpt.SetFontName(aTmpFont.GetFamilyName());
}
m_pFontLB->SelectEntry( aOpt.GetFontName() );
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 2844b23cde5b..448986570fb5 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -196,7 +196,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
aFont = pPrt->GetFontMetric( aFont );
}
- pFontItem.reset(new SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ pFontItem.reset(new SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(),
aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
else
@@ -213,7 +213,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
nFontTypes[i],
eLanguage,
GetDefaultFontFlags::OnlyOne );
- pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),
+ pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetFamilyName(),
aEmptyOUStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich));
}
m_pDoc->SetDefault(*pFontItem);
@@ -281,7 +281,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SfxItemState::SET != pColl->GetAttrSet().GetItemState(
nFontWhich, false ) )
{
- pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetFamilyName(),
aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
}
diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx
index 8aa42336a9d5..1f30c3920c51 100644
--- a/sw/source/uibase/config/fontcfg.cxx
+++ b/sw/source/uibase/config/fontcfg.cxx
@@ -257,7 +257,7 @@ OUString SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLan
nFontId = DefaultFontType::LATIN_TEXT;
}
vcl::Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, GetDefaultFontFlags::OnlyOne);
- return aFont.GetName();
+ return aFont.GetFamilyName();
}
sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 3a06617af7fa..353397e2b3d8 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -983,7 +983,7 @@ void SwSrcEditWindow::SetFont()
else
aFont = OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE,
Application::GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this);
- sFontName = aFont.GetName();
+ sFontName = aFont.GetFamilyName();
}
const SvxFontListItem* pFontListItem =
static_cast<const SvxFontListItem* >(pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ));
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index fde324abb0f0..7a9b020743e3 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -151,7 +151,7 @@ SwHHCWrapper::~SwHHCWrapper()
const vcl::Font *pFont = GetTargetFont();
if (pFont)
{
- SvxFontItem aFontItem( pFont->GetFamily(), pFont->GetName(),
+ SvxFontItem aFontItem( pFont->GetFamily(), pFont->GetFamilyName(),
pFont->GetStyleName(), pFont->GetPitch(),
pFont->GetCharSet(), RES_CHRATR_CJK_FONT );
pDoc->SetDefault( aFontItem );
@@ -492,7 +492,7 @@ void SwHHCWrapper::ReplaceUnit(
if (pTargetFont && pNewUnitLanguage)
{
SvxFontItem aFontItem(static_cast<const SvxFontItem&>( aSet.Get( RES_CHRATR_CJK_FONT ) ));
- aFontItem.SetFamilyName( pTargetFont->GetName());
+ aFontItem.SetFamilyName( pTargetFont->GetFamilyName());
aFontItem.SetFamily( pTargetFont->GetFamily());
aFontItem.SetStyleName( pTargetFont->GetStyleName());
aFontItem.SetPitch( pTargetFont->GetPitch());
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 2d46ca8ceda0..3e8b08591ab1 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1723,7 +1723,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
if ( pCItem )
{
sSym = pCItem->GetValue();
- aOpt.SetSymbolFont(aFont.GetName());
+ aOpt.SetSymbolFont(aFont.GetFamilyName());
SW_MOD()->ApplyUsrPref(aOpt, &rView);
}
}
@@ -1749,7 +1749,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
// Attributing (set font)
SfxItemSet aSetFont( *aFontSet.GetPool(), aFontSet.GetRanges() );
- SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(),
+ SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
@@ -1776,8 +1776,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
- if(!aFont.GetName().isEmpty())
- rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) );
+ if(!aFont.GetFamilyName().isEmpty())
+ rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetFamilyName() ) );
rReq.Done();
}
}
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 391d0f175f6d..6072b7ef53dc 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -760,7 +760,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if ( pCItem )
{
sSym = pCItem->GetValue();
- aOpt.SetSymbolFont(aFont.GetName());
+ aOpt.SetSymbolFont(aFont.GetFamilyName());
SW_MOD()->ApplyUsrPref(aOpt, &rView);
}
}
@@ -786,7 +786,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// assign attributes (Set font)
SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() );
- SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(),
+ SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
@@ -813,8 +813,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
- if(!aFont.GetName().isEmpty())
- rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) );
+ if(!aFont.GetFamilyName().isEmpty())
+ rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetFamilyName() ) );
rReq.Done();
}
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 3a91e23780e2..058a82825620 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -955,7 +955,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
if ( pCItem )
{
aChars = pCItem->GetValue();
- aOpt.SetSymbolFont(aNewFont.GetName());
+ aOpt.SetSymbolFont(aNewFont.GetFamilyName());
SW_MOD()->ApplyUsrPref(aOpt, &GetView());
}
}
@@ -991,10 +991,10 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.Insert( aChars );
// #108876# a font attribute has to be set always due to a guessed script type
- if( !aNewFont.GetName().isEmpty() )
+ if( !aNewFont.GetFamilyName().isEmpty() )
{
SvxFontItem aNewFontItem( aFont );
- aNewFontItem.SetFamilyName( aNewFont.GetName());
+ aNewFontItem.SetFamilyName( aNewFont.GetFamilyName() );
aNewFontItem.SetFamily( aNewFont.GetFamily());
aNewFontItem.SetPitch( aNewFont.GetPitch());
aNewFontItem.SetCharSet( aNewFont.GetCharSet() );
@@ -1045,7 +1045,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
if ( !aChars.isEmpty() )
{
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), aChars ) );
- rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aNewFont.GetName() ) );
+ rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aNewFont.GetFamilyName() ) );
rReq.Done();
}
}
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index f30e72729327..64efc48a3f39 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -350,7 +350,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
rWriter.attribute("color", convertColorToString(aFont.GetColor()));
rWriter.attribute("fillcolor", convertColorToString(aFont.GetFillColor()));
- rWriter.attribute("name", aFont.GetName());
+ rWriter.attribute("name", aFont.GetFamilyName());
rWriter.attribute("stylename", aFont.GetStyleName());
rWriter.attribute("width", aFont.GetSize().Width());
rWriter.attribute("height", aFont.GetSize().Height());
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 20043e6614f3..4be231bc3e76 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -366,7 +366,7 @@ FontItalic VCLUnoHelper::ConvertFontSlant(css::awt::FontSlant eSlant)
css::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const vcl::Font& rFont )
{
css::awt::FontDescriptor aFD;
- aFD.Name = rFont.GetName();
+ aFD.Name = rFont.GetFamilyName();
aFD.StyleName = rFont.GetStyleName();
aFD.Height = (sal_Int16)rFont.GetSize().Height();
aFD.Width = (sal_Int16)rFont.GetSize().Width();
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx
index b5ae8d71325d..a6e008b4552c 100644
--- a/vcl/qa/cppunit/font.cxx
+++ b/vcl/qa/cppunit/font.cxx
@@ -42,10 +42,10 @@ void VclFontTest::testName()
{
vcl::Font aFont;
- CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetName().isEmpty());
+ CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetFamilyName().isEmpty());
CPPUNIT_ASSERT_MESSAGE( "Style name should be empty", aFont.GetStyleName().isEmpty());
aFont.SetName("Test family name");
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetFamilyName());
aFont.SetStyleName("Test style name");
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", OUString("Test style name"), aFont.GetStyleName());
}
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index 20aa9d1a705f..bbf3b5f63624 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -93,7 +93,7 @@ Any SAL_CALL FontIdentificator::getMaterial() throw(RuntimeException, std::excep
return Any(); // VCL not initialized
FontDescriptor aFD;
- aFD.Name = m_aFont.GetName();
+ aFD.Name = m_aFont.GetFamilyName();
aFD.Height = 0;
aFD.Width = 0;
aFD.StyleName = m_aFont.GetStyleName();
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 15375dd10394..f583729c0b11 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -504,7 +504,7 @@ void EMFWriter::ImplCheckTextAttr()
if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) )
{
const vcl::Font& rFont = maVDev->GetFont();
- OUString aFontName( rFont.GetName() );
+ OUString aFontName( rFont.GetFamilyName() );
sal_Int32 nWeight;
sal_uInt16 i;
sal_uInt8 nPitchAndFamily;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index a142f765020a..025d367ca5c1 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -1041,7 +1041,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case PRIVATE_ESCAPE_UNICODE :
{
// we will use text instead of polygons only if we have the correct font
- if ( Application::GetDefaultDevice()->IsFontAvailable( pOut->GetFont().GetName() ) )
+ if ( Application::GetDefaultDevice()->IsFontAvailable( pOut->GetFont().GetFamilyName() ) )
{
Point aPt;
OUString aString;
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 90ef1d756ff7..816e536cab37 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -359,7 +359,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont)
}
pWMF->WriteUChar( nPitchFamily );
- OString aFontName(OUStringToOString(rFont.GetName(), eFontNameEncoding));
+ OString aFontName(OUStringToOString(rFont.GetFamilyName(), eFontNameEncoding));
for ( i = 0; i < W_LF_FACESIZE; i++ )
{
sal_Char nChar = ( i < aFontName.getLength() ) ? aFontName[i] : 0;
@@ -491,7 +491,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r
}
}
- if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we
+ if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetFamilyName() ) ) // after conversion the characters are not original, so we
{ // will store the unicode string and a polypoly replacement
Color aOldFillColor( aSrcFillColor );
Color aOldLineColor( aSrcLineColor );
@@ -946,7 +946,7 @@ void WMFWriter::SetAllAttr()
if ( aDstFont != aSrcFont )
{
pVirDev->SetFont(aSrcFont);
- if ( aDstFont.GetName() != aSrcFont.GetName() )
+ if ( aDstFont.GetFamilyName() != aSrcFont.GetFamilyName() )
{
FontCharMapPtr xFontCharMap;
if ( pVirDev->GetFontCharMap( xFontCharMap ) )
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index dfb219a2c893..8c69ea63ee60 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -409,9 +409,9 @@ bool Font::operator==( const vcl::Font& rFont ) const
void Font::Merge( const vcl::Font& rFont )
{
- if ( !rFont.GetName().isEmpty() )
+ if ( !rFont.GetFamilyName().isEmpty() )
{
- SetName( rFont.GetName() );
+ SetName( rFont.GetFamilyName() );
SetStyleName( rFont.GetStyleName() );
SetCharSet( GetCharSet() );
SetLanguageTag( rFont.GetLanguageTag() );
@@ -778,7 +778,7 @@ bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
-const OUString& Font::GetName() const { return mpImplFont->GetFamilyName(); }
+const OUString& Font::GetFamilyName() const { return mpImplFont->GetFamilyName(); }
const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; }
diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx
index 25fe88910deb..7f2e82b7420d 100644
--- a/vcl/source/font/fontcache.cxx
+++ b/vcl/source/font/fontcache.cxx
@@ -143,7 +143,7 @@ ImplFontCache::~ImplFontCache()
LogicalFontInstance* ImplFontCache::GetFontInstance( PhysicalFontCollection* pFontList,
const vcl::Font& rFont, const Size& rSize, float fExactHeight )
{
- OUString aSearchName = rFont.GetName();
+ OUString aSearchName = rFont.GetFamilyName();
// initialize internal font request object
FontSelectPattern aFontSelData( rFont, aSearchName, rSize, fExactHeight );
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 07ceea37ac5b..0fd6d3a2ad69 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -206,7 +206,7 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont,
char aName[33];
short nWeight;
- OString aByteName(OUStringToOString(rFont.GetName(),
+ OString aByteName(OUStringToOString(rFont.GetFamilyName(),
rOStm.GetStreamCharSet()));
strncpy( aName, aByteName.getStr(), 32 );
aName[32] = 0;
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index ed742770a51d..2643b9bc14e5 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -2775,7 +2775,7 @@ MetaFontAction::MetaFontAction( const vcl::Font& rFont ) :
// we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
// to be the right way; changing the textencoding at other sources
// is too dangerous at the moment
- if ( IsStarSymbol( maFont.GetName() )
+ if ( IsStarSymbol( maFont.GetFamilyName() )
&& ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
{
maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 69d8b50720f3..891a6d2d007e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4691,7 +4691,7 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font&
bool bAdjustSize = false;
Font aFont( rControlFont );
- if( aFont.GetName().isEmpty() )
+ if( aFont.GetFamilyName().isEmpty() )
{
aFont = rAppSetFont;
if( rControlFont.GetHeight() )
@@ -4721,7 +4721,7 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font&
sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont )
{
sal_Int32 nBest = 4; // default to Helvetica
- OUString aFontName( rFont.GetName() );
+ OUString aFontName( rFont.GetFamilyName() );
aFontName = aFontName.toAsciiLowerCase();
if( aFontName.indexOf( "times" ) != -1 )
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 7af457e8344a..99d2109a2b4f 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -112,7 +112,7 @@ int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const
delete mpDeviceFontSizeList;
ImplInitFontList();
- mpDeviceFontSizeList = mpFontCollection->GetDeviceFontSizeList( rFont.GetName() );
+ mpDeviceFontSizeList = mpFontCollection->GetDeviceFontSizeList( rFont.GetFamilyName() );
return mpDeviceFontSizeList->Count();
}
@@ -195,7 +195,7 @@ FontMetric OutputDevice::GetFontMetric() const
aMetric.Font::operator=( maFont );
// set aMetric with info from font
- aMetric.SetName( maFont.GetName() );
+ aMetric.SetName( maFont.GetFamilyName() );
aMetric.SetStyleName( xFontMetric->GetStyleName() );
aMetric.SetSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) );
aMetric.SetCharSet( xFontMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
@@ -883,7 +883,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
}
// No Name, than set all names
- if ( aFont.GetName().isEmpty() )
+ if ( aFont.GetFamilyName().isEmpty() )
{
if ( nFlags & GetDefaultFontFlags::OnlyOne )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d50871932fd1..be6a3e4097df 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1883,7 +1883,7 @@ void Window::ImplNewInputContext()
SalInputContext aNewContext;
const vcl::Font& rFont = rInputContext.GetFont();
- const OUString& rFontName = rFont.GetName();
+ const OUString& rFontName = rFont.GetFamilyName();
LogicalFontInstance* pFontInstance = nullptr;
aNewContext.mpFont = nullptr;
if (!rFontName.isEmpty())
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index ff5d496a1da7..be85aa3c3528 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -483,7 +483,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
else
nType = DefaultFontType::UI_SANS;
vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE);
- aFont.SetName(aTempFont.GetName());
+ aFont.SetName(aTempFont.GetFamilyName());
SetPointFont(rRenderContext, aFont);
}
}
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 62883261dfe3..c24fce107aa1 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2787,7 +2787,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
// is to wide for the dialogs
if ( rSettings.GetLanguageTag().getLanguageType() == LANGUAGE_RUSSIAN )
{
- OUString aFontName = aAppFont.GetName();
+ OUString aFontName = aAppFont.GetFamilyName();
OUString aFirstName = aFontName.getToken( 0, ';' );
if ( aFirstName.equalsIgnoreAsciiCase( "MS Sans Serif" ) )
{