summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-03-15 16:04:05 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-27 12:22:59 +0200
commit88ff7cb2dceae0ef170042e03eacf1f44b6a907d (patch)
treec5b4b0233aae5b263a2b3df857da40399af64060 /sd
parentbb3121094af3cf0a73c059ca7e37d4155e6ca087 (diff)
tdf#115675: Shape selection was breaking when changing pos/size from sidebar.
Fixes also other potential breakages with the same root cause. Change-Id: I09b3650189f6edb28ab64652cd411b1dca7dca89 Reviewed-on: https://gerrit.libreoffice.org/51342 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 5372d8022dd8ce8aaa3090014b319727e88b17f1)
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuarea.cxx9
-rw-r--r--sd/source/ui/func/fuline.cxx8
-rw-r--r--sd/source/ui/func/futransf.cxx8
-rw-r--r--sd/source/ui/view/drviews2.cxx12
4 files changed, 15 insertions, 22 deletions
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 29d8cb5311a3..6311bf13c716 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -56,10 +56,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
if (pArgs)
- {
- mpViewShell->Cancel();
return;
- }
SfxItemSet aNewAttr( mpDoc->GetPool() );
mpView->GetAttributes( aNewAttr );
@@ -67,10 +64,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc, true) : nullptr);
if (!pDlg)
- {
- mpViewShell->Cancel();
return;
- }
pDlg->StartExecuteAsync([=](sal_Int32 nResult){
if (nResult == RET_OK)
@@ -90,6 +84,9 @@ void FuArea::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
}
+
+ // deferred until the dialog ends
+ mpViewShell->Cancel();
});
}
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index d4511fdcc610..71a35f4ec42e 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -64,10 +64,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
if (pArgs)
- {
- mpViewShell->Cancel();
return;
- }
const SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
@@ -81,10 +78,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(mpViewShell->GetActiveWindow(), pNewAttr.get(), mpDoc, pObj, bHasMarked) : nullptr);
if (!pDlg)
- {
- mpViewShell->Cancel();
return;
- }
pDlg->StartExecuteAsync([=](sal_Int32 nResult){
if (nResult == RET_OK)
@@ -106,6 +100,8 @@ void FuLine::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
}
+
+ // deferred until the dialog ends
mpViewShell->Cancel();
});
}
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index ef2894cc37f5..33d4b0d2796f 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -67,12 +67,6 @@ void setUndo(::sd::View* pView, const SfxItemSet* pArgs)
void FuTransform::DoExecute( SfxRequest& rReq )
{
- comphelper::ScopeGuard guard([&]() {
- // cleanup when leaving
- mpViewShell->Invalidate(SID_RULER_OBJECT);
- mpViewShell->Cancel();
- });
-
if (!mpView->AreObjectsMarked())
return;
@@ -124,7 +118,6 @@ void FuTransform::DoExecute( SfxRequest& rReq )
std::shared_ptr<SfxRequest> pRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
- guard.dismiss(); // we'll invalidate explicitly after the dialog ends
pDlg->StartExecuteAsync([=](sal_Int32 nResult){
if (nResult == RET_OK)
@@ -133,6 +126,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
setUndo(mpView, pRequest->GetArgs());
}
+ // deferred until the dialog ends
mpViewShell->Invalidate(SID_RULER_OBJECT);
mpViewShell->Cancel();
});
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 1979cb91bcb4..1311d8b551a1 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1367,21 +1367,27 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE: // BASIC
{
SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
- // Cancel() called directly in FuTransform::Create()
+ if (rReq.GetArgs())
+ Cancel();
}
break;
case SID_ATTRIBUTES_AREA: // BASIC
{
SetCurrentFunction( FuArea::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
- // Cancel() called directly in FuTransform::Create()
+ if (rReq.GetArgs())
+ Cancel();
}
break;
case SID_ATTR_TRANSFORM:
{
SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
- // Cancel() and Invalidate() called directly in FuTransform::Create()
+ if (rReq.GetArgs())
+ {
+ Invalidate(SID_RULER_OBJECT);
+ Cancel();
+ }
}
break;