summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-03-02 20:22:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-03-03 05:52:55 +0100
commite17224501e9f4f783d5be3f5aa9c7f6decd8a405 (patch)
treea71050673f3bc76a5956a728262b12f9991247fe /sw
parent300eaa533eed3f9e07cf24d53e4e4c561be2fc3b (diff)
Revert "Make Chart Creation Wizard async"
This reverts commit ed86b6250cd00ed6b7bdb81307bc66adba129cae. Reason for revert: Most Jenkins builds for that change were aborted after timing out, and many other Gerrit Jenkins and tinderbox builds now time out, too. It very much smells like that commit was the culprit. Change-Id: I5473c58957f92d63113e32f862ad9c114f9c844c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89803 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/inc/chartins.hxx8
-rw-r--r--sw/source/uibase/inc/textsh.hxx3
-rw-r--r--sw/source/uibase/shells/textsh.cxx23
-rw-r--r--sw/source/uibase/table/chartins.cxx32
4 files changed, 19 insertions, 47 deletions
diff --git a/sw/source/uibase/inc/chartins.hxx b/sw/source/uibase/inc/chartins.hxx
index d258053ae985..383e0fda1a58 100644
--- a/sw/source/uibase/inc/chartins.hxx
+++ b/sw/source/uibase/inc/chartins.hxx
@@ -20,17 +20,11 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_CHARTINS_HXX
#include <tools/gen.hxx>
-#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>
namespace vcl { class Window; }
Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSize, const tools::Rectangle& rLogicChart );
-
-class SwInsertChart
-{
-public:
- SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*,void>& rLink );
-};
+void SwInsertChart();
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_CHARTINS_HXX
diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx
index 849bffcf4f2b..9ec521afe647 100644
--- a/sw/source/uibase/inc/textsh.hxx
+++ b/sw/source/uibase/inc/textsh.hxx
@@ -22,13 +22,11 @@
#include "basesh.hxx"
#include <unotools/caserotate.hxx>
-#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>
class AbstractSvxPostItDialog;
class SwFieldMgr;
class SwFlyFrameAttrMgr;
class SvxHyperlinkItem;
-class SwInsertChart;
class SW_DLLPUBLIC SwTextShell: public SwBaseShell
{
@@ -48,7 +46,6 @@ private:
public:
DECL_LINK( RedlineNextHdl, AbstractSvxPostItDialog&, void );
DECL_LINK( RedlinePrevHdl, AbstractSvxPostItDialog&, void );
- DECL_STATIC_LINK( SwTextShell, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
void Execute(SfxRequest &);
void GetState(SfxItemSet &);
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index c16dcf1a7cfc..ef1341d078bc 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -87,30 +87,9 @@ using namespace ::com::sun::star;
#include <drawdoc.hxx>
#include <svtools/embedhlp.hxx>
#include <sfx2/event.hxx>
-#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <IDocumentUndoRedo.hxx>
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell)
-IMPL_STATIC_LINK( SwTextShell, DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, pEvent, void )
-{
- SwView* pView = ::GetActiveView();
- SwWrtShell& rWrtShell = pView->GetWrtShell();
-
- sal_Int16 nDialogRet = pEvent->DialogResult;
- if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
- {
- rWrtShell.Undo();
- rWrtShell.GetIDocumentUndoRedo().ClearRedo();
- }
- else
- {
- OSL_ENSURE( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
- "dialog execution failed" );
- }
-}
-
void SwTextShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("text");
@@ -324,7 +303,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break;
if(!rReq.IsAPI())
{
- SwInsertChart( LINK( this, SwTextShell, DialogClosedHdl ) );
+ SwInsertChart();
}
else
{
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index 51289c19e983..b9e5f1e5103b 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -41,12 +41,11 @@
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-#include <svtools/dialogclosedlistener.hxx>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
using namespace ::com::sun::star;
@@ -123,7 +122,7 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz
return aRet;
}
-SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, void>& rLink )
+void SwInsertChart()
{
SwView *pView = ::GetActiveView();
@@ -163,7 +162,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v
uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager() );
if(xMCF.is())
{
- uno::Reference< ui::dialogs::XAsynchronousExecutableDialog > xDialog(
+ uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
"com.sun.star.comp.chart2.WizardDialog", xContext),
uno::UNO_QUERY);
@@ -209,18 +208,21 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v
}
}
- ::svt::DialogClosedListener* pListener = new ::svt::DialogClosedListener();
- pListener->SetDialogClosedLink( rLink );
- css::uno::Reference<css::ui::dialogs::XDialogClosedListener> xListener( pListener );
-
- xDialog->startExecuteModal( xListener );
- }
- else
- {
- uno::Reference< lang::XComponent > xComponent( xDialog, uno::UNO_QUERY );
- if( xComponent.is())
- xComponent->dispose();
+ sal_Int16 nDialogRet = xDialog->execute();
+ if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
+ {
+ rWrtShell.Undo();
+ rWrtShell.GetIDocumentUndoRedo().ClearRedo();
+ }
+ else
+ {
+ OSL_ENSURE( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
+ "dialog execution failed" );
+ }
}
+ uno::Reference< lang::XComponent > xComponent( xDialog, uno::UNO_QUERY );
+ if( xComponent.is())
+ xComponent->dispose();
}
}
}