summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx33
1 files changed, 21 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index d55f0f29f9c5..8b1730af3a0d 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -23,7 +23,7 @@
#include <cassert>
#include <scitems.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/waitobj.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
@@ -82,8 +82,11 @@ void ScDocShell::ErrorMessage(const char* pGlobStrId)
}
}
- ScopedVclPtrInstance< InfoBox > aBox( pParent, ScGlobal::GetRscString(pGlobStrId));
- aBox->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ ScGlobal::GetRscString(pGlobStrId)));
+ xInfoBox->run();
+
if (bFocus)
pParent->GrabFocus();
}
@@ -519,9 +522,11 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
if (bErr)
{
- ScopedVclPtrInstance<InfoBox> aBox( GetActiveDialogParent(),
- ScGlobal::GetRscString( STR_CONSOLIDATE_ERR1 ) );
- aBox->Execute();
+ vcl::Window* pWin = GetActiveDialogParent();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ ScGlobal::GetRscString(STR_CONSOLIDATE_ERR1)));
+ xInfoBox->run();
return;
}
@@ -729,16 +734,20 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
}
else
{
- ScopedVclPtrInstance<InfoBox> aBox( GetActiveDialogParent(),
- ScGlobal::GetRscString( STR_PROTECTIONERR ) );
- aBox->Execute();
+ vcl::Window* pWin = GetActiveDialogParent();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ ScGlobal::GetRscString(STR_PROTECTIONERR)));
+ xInfoBox->run();
}
}
else
{
- ScopedVclPtrInstance<InfoBox> aBox(GetActiveDialogParent(),
- ScGlobal::GetRscString( STR_SCENARIO_NOTFOUND ) );
- aBox->Execute();
+ vcl::Window* pWin = GetActiveDialogParent();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ ScGlobal::GetRscString(STR_SCENARIO_NOTFOUND)));
+ xInfoBox->run();
}
}
else