summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwtxtsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-03 09:56:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-03 19:19:39 +0100
commit0a1031a9ecd1502b1841bde26dde7ad51358c638 (patch)
tree564e854741e6307d5be08afcad395bca5ce30c16 /sw/source/uibase/shells/drwtxtsh.cxx
parentc1ac79906bde5c902be5cb0ae6b530da96e52169 (diff)
use SfxItemSet::GetItemIfSet in sw/source/uibase
Change-Id: Ic82df8d321ba2eb94957236264c71c5eb9a940a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130905 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.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 2416c3a4863c..776cd31c01da 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -675,18 +675,16 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!pOLV)
return;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = nullptr;
+ const SfxStringItem* pItem = nullptr;
if( pArgs )
- pArgs->GetItemState(SID_CHARMAP, false, &pItem);
+ pItem = pArgs->GetItemIfSet(SID_CHARMAP, false);
OUString sSym;
OUString sFontName;
if ( pItem )
{
- sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = nullptr;
- pArgs->GetItemState( SID_ATTR_SPECIALCHAR, false, &pFtItem);
- const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
+ sSym = pItem->GetValue();
+ const SfxStringItem* pFontItem = pArgs->GetItemIfSet( SID_ATTR_SPECIALCHAR, false);
if ( pFontItem )
sFontName = pFontItem->GetValue();
}