summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwtxtsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 16:29:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-02 08:30:52 +0100
commit31a8627f0323fad0f85f7859a513dbc039375afb (patch)
treec0b8ca5310c2c56661f02c90c3072c11a01e6576 /sw/source/uibase/shells/drwtxtsh.cxx
parenta12b4d548cd4173d87d8736ec6a484becb44d943 (diff)
add TypedWhichId version of GetWhichOfScript
Change-Id: Ieb93f9525d0cc5b3a23e013f30ddaad6f44890ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130796 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/shells/drwtxtsh.cxx')
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 43c35159f671..2416c3a4863c 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -701,9 +701,13 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if( pI )
aSetDlgFont.reset(static_cast<SvxFontItem*>(pI->Clone()));
else
- aSetDlgFont.reset(static_cast<SvxFontItem*>(aSet.Get( GetWhichOfScript(
+ {
+ TypedWhichId<SvxFontItem> nFontWhich =
+ GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() ) )).Clone()));
+ SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() ) );
+ aSetDlgFont.reset(aSet.Get( nFontWhich ).Clone());
+ }
if (sFontName.isEmpty())
sFontName = aSetDlgFont->GetFamilyName();
}