summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-12 12:23:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-12 16:38:16 +0100
commit942c8654648ab18a32b00eb686ce04d9ee668617 (patch)
treed9e8c52f1a8db0031ccb39b1c18bc7b6de0101e9 /dbaccess
parent3e8214734f9695d7f16c4a37f1a497aeb229d677 (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/+/125100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 7f86d8d01bc0..5ebb87152684 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -90,7 +90,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();
}