summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui/dbinsdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-09 08:59:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-11 11:40:31 +0100
commita188ffa01616673c011c7bc1a392a6f6fa81f93b (patch)
tree29afdd4449027ff8d214ceaa48dd76f2f906b459 /sw/source/ui/dbui/dbinsdlg.cxx
parent459ee2660cba282ae988da43fdd3147a2ebce58b (diff)
use SfxItemSet::GetItemIfSet in sw/.../ui
Change-Id: Ic6a15dfd159ee2e5d4aa0e0c3bc31cff1557a875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/dbui/dbinsdlg.cxx')
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index c73a8aa2bed0..82839c6bf414 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1407,9 +1407,8 @@ void SwInsertDBColAutoPilot::SetTabSet()
pTableSet->ClearItem( i );
}
- if( SfxItemState::SET == pTableSet->GetItemState( FN_PARAM_TABLE_NAME, false,
- &pItem ) && static_cast<const SfxStringItem*>(pItem)->GetValue() ==
- rSh.GetTableFormat()->GetName() )
+ const SfxStringItem* pTableNameItem = pTableSet->GetItemIfSet( FN_PARAM_TABLE_NAME, false);
+ if( pTableNameItem && pTableNameItem->GetValue() == rSh.GetTableFormat()->GetName() )
pTableSet->ClearItem( FN_PARAM_TABLE_NAME );
rSh.MoveTable( GotoCurrTable, fnTableStart );