[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source sw/source

2020-03-02 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   10 +++---
 sw/source/uibase/docvw/edtwin.cxx |6 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 3fe9dfca2d44d9e41ee329883f199359c673f382
Author: Mert Tumer 
AuthorDate: Wed Feb 26 18:48:46 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 2 23:42:13 2020 +0100

fix ToC links give unhelpful url popups

core expects ctrl+click for internal links too and
it should not expect it if it is tiled rendering

Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a5ca02b06aec..2a751f77ac99 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2185,14 +2185,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 if ( GetEditUrl( rMEvt.GetPosPixel(), , ,  ) )
 {
 nMouseStatus = SC_GM_NONE;  // Ignore double-click
-
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
 {
+if (aUrl.startsWith("#")) {
+ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+return;
+}
 // in mobile view there is no ctrl+click and for hyperlink 
popup
 // the cell coordinates must be sent along with click position 
for elegance
-if (comphelper::LibreOfficeKit::isActive() &&
+if (isTiledRendering &&
  
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
 {
 ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2243,7 +2247,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
 aBuf.append('#');
 OUString 
aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, 
formula::FormulaGrammar::CONV_OOO));
 aBuf.append(aUrlCalcA1);
-ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, 
isTiledRendering);
 }
 }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index d48a5a4199c0..06d98b1c6dac 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4650,6 +4650,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
 }
 else if ( IsAttrAtPos::InetAttr == 
aContentAtPos.eContentAtPos )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString val((*static_cast(aContentAtPos.aFnd.pAttr)).GetValue());
+if (val.startsWith("#"))
+bExecHyperlinks = true;
+}
 if ( bExecHyperlinks && 
aContentAtPos.aFnd.pAttr )
 rSh.ClickToINetAttr( *static_cast(aContentAtPos.aFnd.pAttr), nFilter );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source sw/source

2019-06-29 Thread Muhammet Kara (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx|   26 +---
 sw/source/uibase/shells/drawdlg.cxx |   58 +---
 2 files changed, 50 insertions(+), 34 deletions(-)

New commits:
commit 58b29efeea5514755084a255b06268fed7cd6ecb
Author: Muhammet Kara 
AuthorDate: Thu Jun 27 21:12:42 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Jun 29 14:01:28 2019 +0200

lokdialog: Convert the Format -> Line... to async exec

for sw and sc

Change-Id: If89bff982d16ba8d4e4524445e56ee2fe23d7876
Reviewed-on: https://gerrit.libreoffice.org/74818
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/74870
Tested-by: Muhammet Kara 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index aeabba5c8212..f41eb161665c 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -379,6 +379,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
 const SdrObject*pObj= nullptr;
 const SdrMarkList&  rMarkList   = pView->GetMarkedObjectList();
 
+std::shared_ptr pRequest;
+pRequest.reset(new SfxRequest(rReq));
+
 if( rMarkList.GetMarkCount() == 1 )
 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
@@ -387,22 +390,25 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
 pView->MergeAttrFromMarked( aNewAttr, false );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr pDlg(pFact->CreateSvxLineTabDialog( 
pViewData->GetFrameWeld(),
+VclPtr pDlg(pFact->CreateSvxLineTabDialog( 
pViewData->GetFrameWeld(),
 ,
 pViewData->GetDocument()->GetDrawLayer(),
 pObj,
 bHasMarked));
 
-if ( pDlg->Execute() == RET_OK )
-{
-if( bHasMarked )
-pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
-else
-pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if ( nResult == RET_OK )
+{
+if( bHasMarked )
+pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
+else
+pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
 
-pView->InvalidateAttribs();
-rReq.Done();
-}
+pView->InvalidateAttribs();
+pRequest->Done();
+}
+pDlg->disposeOnce();
+});
 }
 
 void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index 27c2ea6b9b91..7cc72c5e4ae9 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -143,36 +143,46 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxLineTabDialog(rReq.GetFrameWeld(),
+VclPtr 
pDlg(pFact->CreateSvxLineTabDialog(rReq.GetFrameWeld(),
 ,
 pDoc,
 pObj,
 bHasMarked));
-if (pDlg->Execute() == RET_OK)
-{
-pSh->StartAction();
-if(bHasMarked)
-pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), false);
-else
-pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), false);
-pSh->EndAction();
 
-static sal_uInt16 aInval[] =
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if (nResult == RET_OK)
 {
-SID_ATTR_LINE_STYLE,// ( SID_SVX_START + 
169 )
-SID_ATTR_LINE_DASH, // ( SID_SVX_START + 
170 )
-SID_ATTR_LINE_WIDTH,// ( SID_SVX_START + 
171 )
-SID_ATTR_LINE_COLOR,// ( SID_SVX_START + 
172 )
-SID_ATTR_LINE_START,// ( SID_SVX_START + 
173 )
-SID_ATTR_LINE_END,  // ( SID_SVX_START + 
174 )
-SID_ATTR_LINE_TRANSPARENCE, // (SID_SVX_START+1107)
-SID_ATTR_LINE_JOINT,// (SID_SVX_START+1110)
-SID_ATTR_LINE_CAP,  // (SID_SVX_START+)
-0
-};
-
-GetView().GetViewFrame()->GetBindings().Invalidate(aInval);
-}
+pSh->StartAction();
+if(bHasMarked)
+pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), 
false);
+else
+pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), 
false);
+pSh->EndAction();
+
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source sw/source

2019-06-29 Thread Muhammet Kara (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx|   26 ++--
 sw/source/uibase/shells/drawdlg.cxx |   56 +---
 sw/source/uibase/shells/frmsh.cxx   |   52 +
 3 files changed, 76 insertions(+), 58 deletions(-)

New commits:
commit cd8576920665bcd34745e5799c06232db8fc3b3a
Author: Muhammet Kara 
AuthorDate: Thu Jun 27 18:06:06 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Jun 29 14:00:54 2019 +0200

lokdialog: Convert the Format -> Area... to async exec.

For sw and sc

Change-Id: I83ad76658545d8df135e1a08abff4d0b5a81b46a
Reviewed-on: https://gerrit.libreoffice.org/74808
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/74865
Tested-by: Muhammet Kara 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 4d68e8365fd2..aeabba5c8212 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -410,26 +410,32 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
 ScDrawView* pView   = pViewData->GetScDrawView();
 boolbHasMarked  = pView->AreObjectsMarked();
 
+std::shared_ptr pRequest;
+pRequest.reset(new SfxRequest(rReq));
+
 SfxItemSet  aNewAttr( pView->GetDefaultAttr() );
 if( bHasMarked )
 pView->MergeAttrFromMarked( aNewAttr, false );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 vcl::Window* pWin = pViewData->GetDialogParent();
-ScopedVclPtr pDlg(pFact->CreateSvxAreaTabDialog(
+VclPtr pDlg(pFact->CreateSvxAreaTabDialog(
 pWin ? pWin->GetFrameWeld() : nullptr, ,
 pViewData->GetDocument()->GetDrawLayer(), true));
 
-if ( pDlg->Execute() == RET_OK )
-{
-if( bHasMarked )
-pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
-else
-pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if ( nResult == RET_OK )
+{
+if( bHasMarked )
+pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
+else
+pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
 
-pView->InvalidateAttribs();
-rReq.Done();
-}
+pView->InvalidateAttribs();
+pRequest->Done();
+}
+pDlg->disposeOnce();
+});
 }
 
 void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index 71fb6b17d4a1..27c2ea6b9b91 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -92,34 +92,44 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 bool bHasMarked = pView->AreObjectsMarked();
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
+VclPtr 
pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
 
,
 
pDoc,
 
true));
-if (pDlg->Execute() == RET_OK)
-{
-pSh->StartAction();
-if (bHasMarked)
-pView->SetAttributes(*pDlg->GetOutputItemSet());
-else
-pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), false);
-pSh->EndAction();
 
-static sal_uInt16 aInval[] =
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if (nResult == RET_OK)
 {
-SID_ATTR_FILL_STYLE,
-SID_ATTR_FILL_COLOR,
-SID_ATTR_FILL_TRANSPARENCE,
-SID_ATTR_FILL_FLOATTRANSPARENCE,
-0
-};
-SfxBindings  = GetView().GetViewFrame()->GetBindings();
-rBnd.Invalidate(aInval);
-rBnd.Update(SID_ATTR_FILL_STYLE);
-rBnd.Update(SID_ATTR_FILL_COLOR);
-rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
-rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
-}
+pSh->StartAction();
+if (bHasMarked)
+pView->SetAttributes(*pDlg->GetOutputItemSet());
+else
+pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), 
false);
+pSh->EndAction();
+
+static sal_uInt16 aInval[] =
+{
+SID_ATTR_FILL_STYLE,
+SID_ATTR_FILL_COLOR,
+SID_ATTR_FILL_TRANSPARENCE,
+