diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-17 13:26:25 +1100 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:25:56 -0400 |
commit | 49329d19eff5b5beffdeaa54242c9534f5b470c4 (patch) | |
tree | 85517ead7d4e926c17f9e52cda01475c3c93eaeb /svtools/source | |
parent | 745d356d6b5b6b9308f35e89713288f17dd32503 (diff) |
vcl: rename Font::GetName to Font::GetFamilyName
Reviewed-on: https://gerrit.libreoffice.org/21529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
(cherry picked from commit 28c96fc2553a5c3dee108f1e2060d7bc081a7e7e)
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 10 | ||||
-rw-r--r-- | svtools/source/control/stdmenu.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 58 |
4 files changed, 38 insertions, 38 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 1c2742bd229f..0a78478eed72 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1036,7 +1036,7 @@ void FontNameBox::Fill( const FontList* pList ) for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { const vcl::FontInfo& rFontInfo = pList->GetFontName( i ); - sal_uLong nIndex = InsertEntry( rFontInfo.GetName() ); + sal_uLong nIndex = InsertEntry( rFontInfo.GetFamilyName() ); if ( nIndex != LISTBOX_ERROR ) { if ( nIndex < mpFontList->size() ) { @@ -1140,7 +1140,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) Rectangle aTextRect; // Preview the font name - OUString sFontName = rInfo.GetName(); + OUString sFontName = rInfo.GetFamilyName(); //If it shouldn't or can't draw its own name because it doesn't have the glyphs if (!canRenderNameOfSelectedFont(*pRenderContext)) @@ -1171,7 +1171,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) if (!bSymbolFont) { - const bool bNameBeginsWithLatinText = rInfo.GetName()[0] <= 'z'; + const bool bNameBeginsWithLatinText = rInfo.GetFamilyName()[0] <= 'z'; if (bNameBeginsWithLatinText || !bUsingCorrectFont) sSampleText = makeShortRepresentativeTextForSelectedFont(*pRenderContext); diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 6ed7b4301a16..282462e96188 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -259,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll, if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) ) continue; - OUString aSearchName(aFontInfo.GetName()); + OUString aSearchName(aFontInfo.GetFamilyName()); ImplFontListNameInfo* pData; sal_uLong nIndex; aSearchName = ImplMakeSearchString(aSearchName); @@ -483,13 +483,13 @@ OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const { - if ( rInfo.GetName().isEmpty() ) + if ( rInfo.GetFamilyName().isEmpty() ) { return OUString(); } // Search Fontname - ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); + ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() ); if ( !pData ) { if (maMapNotAvailable.isEmpty()) @@ -734,12 +734,12 @@ const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const } // use standard sizes if no name - if ( rInfo.GetName().isEmpty() ) + if ( rInfo.GetFamilyName().isEmpty() ) return aStdSizeAry; // first search fontname in order to use device from the matching font OutputDevice* pDevice = mpDev; - ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); + ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetFamilyName() ); if ( pData ) pDevice = pData->mpFirst->GetDevice(); diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 4296dbb3b093..08882904c682 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -57,7 +57,7 @@ void FontNameMenu::Fill( const FontList* pList ) sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) ); for (sal_uInt16 i = 0; i < nFontCount; ++i) { - const OUString& rName = pList->GetFontName( i ).GetName(); + const OUString& rName = pList->GetFontName( i ).GetFamilyName(); // sort with the I18nHelper sal_uInt16 j = GetItemCount(); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 54e62dbd1fff..c17068b4b9ee 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -18,7 +18,7 @@ // that caused it to be added static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevice) { - const OUString &rName = rDevice.GetFont().GetName(); + const OUString &rName = rDevice.GetFont().GetFamilyName(); if (rName == "GB18030 Bitmap") { @@ -104,49 +104,49 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic bool isOpenSymbolFont(const vcl::Font &rFont) { - return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") || - rFont.GetName().equalsIgnoreAsciiCase("opensymbol"); + return rFont.GetFamilyName().equalsIgnoreAsciiCase("starsymbol") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("opensymbol"); } bool isSymbolFont(const vcl::Font &rFont) { return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) || - rFont.GetName().equalsIgnoreAsciiCase("Apple Color Emoji") || - rFont.GetName().equalsIgnoreAsciiCase("cmsy10") || - rFont.GetName().equalsIgnoreAsciiCase("cmex10") || - rFont.GetName().equalsIgnoreAsciiCase("esint10") || - rFont.GetName().equalsIgnoreAsciiCase("feta26") || - rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmsy10") || - rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmex10") || - rFont.GetName().equalsIgnoreAsciiCase("msam10") || - rFont.GetName().equalsIgnoreAsciiCase("msbm10") || - rFont.GetName().equalsIgnoreAsciiCase("wasy10") || - rFont.GetName().equalsIgnoreAsciiCase("Denemo") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic1") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic2") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic3") || - rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic4") || - rFont.GetName().equalsIgnoreAsciiCase("Letters Laughing") || - rFont.GetName().equalsIgnoreAsciiCase("MusiQwik") || - rFont.GetName().equalsIgnoreAsciiCase("MusiSync") || - rFont.GetName().equalsIgnoreAsciiCase("stmary10") || - rFont.GetName().equalsIgnoreAsciiCase("Symbol") || - rFont.GetName().startsWith("STIXIntegrals") || - rFont.GetName().startsWith("STIXNonUnicode") || - rFont.GetName().startsWith("STIXSize") || - rFont.GetName().startsWith("STIXVariants") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Apple Color Emoji") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("cmsy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("cmex10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("esint10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("feta26") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmsy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("jsMath-cmex10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("msam10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("msbm10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("wasy10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Denemo") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic1") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic2") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic3") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("GlyphBasic4") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Letters Laughing") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiQwik") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("MusiSync") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("stmary10") || + rFont.GetFamilyName().equalsIgnoreAsciiCase("Symbol") || + rFont.GetFamilyName().startsWith("STIXIntegrals") || + rFont.GetFamilyName().startsWith("STIXNonUnicode") || + rFont.GetFamilyName().startsWith("STIXSize") || + rFont.GetFamilyName().startsWith("STIXVariants") || isOpenSymbolFont(rFont); } bool canRenderNameOfSelectedFont(OutputDevice &rDevice) { const vcl::Font &rFont = rDevice.GetFont(); - return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetName()) ); + return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetFamilyName()) ); } OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice) { - if (rDevice.GetFont().GetName() == "Symbol") + if (rDevice.GetFont().GetFamilyName() == "Symbol") { static const sal_Unicode aImplAppleSymbolText[] = { 0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0}; |