diff options
Diffstat (limited to 'sc/source/ui/view/viewfun2.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 956593bfd234..29da9f810ff0 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1148,12 +1148,13 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter ) bool bShowDialog = officecfg::Office::Calc::Compatibility::MergeCells::ShowDialog::get(); if (!bApi && bShowDialog) { - ScopedVclPtr<ScMergeCellsDialog> aBox( VclPtr<ScMergeCellsDialog>::Create( GetViewData().GetDialogParent() ) ); - sal_uInt16 nRetVal = aBox->Execute(); + vcl::Window* pWin = GetViewData().GetDialogParent(); + ScMergeCellsDialog aBox(pWin ? pWin->GetFrameWeld() : nullptr); + sal_uInt16 nRetVal = aBox.run(); if ( nRetVal == RET_OK ) { - switch ( aBox->GetMergeCellsOption() ) + switch (aBox.GetMergeCellsOption()) { case MoveContentHiddenCells: rDoContents = true; |