diff options
Diffstat (limited to 'svx/source/form/fmtextcontrolshell.cxx')
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 43dccd894b63..44493395bb0f 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -655,9 +655,11 @@ namespace svx fillFeatureDispatchers( m_xActiveControl, pDialogSlots, aAdditionalFestures ); transferFeatureStatesToItemSet( aAdditionalFestures, *xCurrentItems, true ); - boost::scoped_ptr<SfxTabDialog> xDialog ( _eSet == eCharAttribs - ? static_cast< SfxTabDialog* >( new TextControlCharAttribDialog( NULL, *xCurrentItems, *pFontList ) ) - : static_cast< SfxTabDialog* >( new TextControlParaAttribDialog( NULL, *xCurrentItems ) ) ); + VclPtr<SfxTabDialog> xDialog; + if ( _eSet == eCharAttribs) + xDialog = VclPtr<TextControlCharAttribDialog>::Create( nullptr, *xCurrentItems, *pFontList ); + else + xDialog = VclPtr<TextControlParaAttribDialog>::Create( nullptr, *xCurrentItems ); if ( RET_OK == xDialog->Execute() ) { const SfxItemSet& rModifiedItems = *xDialog->GetOutputItemSet(); |