diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-12 12:23:05 +0000 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2021-11-14 23:18:40 +0100 |
commit | bc00beb99b62c8350e86f76d19367198ab979ea9 (patch) | |
tree | fd2200a2bfef02f009c6dde24b003a157a126e07 /dbaccess | |
parent | ecb15ba80cd85e40da5d2d48a394d4cbc9a43bba (diff) |
insert special character in sql view in dbaccess using an arbitrary font
The font to use in the editengine is set with the fallback list notation
"Font1;Font2;Font3" and while SvxCharacterMap::SetCharFont explicitly has...
{
// first get the underlying info in order to get font names
// like "Times New Roman;Times" resolved
vcl::Font aTmp(m_xVirDev->GetFontMetric(rFont));
}
which is supposed to resolve to what the physical font is, it appears
that since the ancient merge of:
commit 2f382d6c2579a25c68dbd121af7f1f5dc7ec9852
Date: Thu Mar 27 16:59:30 2003 +0000
MWS_SRX644: migrate branch mws_srx644 -> HEAD
a change was included of:
- // Fontdaten ermitteln und setzen
- aMetric.SetName( pMetric->maName );
+ // set aMetric with info from font
+ aMetric.SetName( maFont.GetName() );
which means that font names like "Times:Times New Roman" appear in the
FontMetric for the font and not the font name of the physical font that
the metric describes.
That doesn't look right to me, but rather than get bogged down in
changing that and the undoubtedly infinite chain of knock on problems
that will trigger just start with a simple font name here not the
fallback list.
The font is "Liberation Mono;etc;etc" so the first one is certain to be
available.
Change-Id: I58809be8edb515d9823867c7a0bce5931dccbd27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124981
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/sqledit.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index c379ad5fcc32..92af2e8bd03b 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -89,7 +89,7 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool) OUString sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString())); if (sFontName.isEmpty()) { - vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE)); + vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::OnlyOne)); sFontName = aTmpFont.GetFamilyName(); } |