[Libreoffice-commits] core.git: sc/sdi sc/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 26 14:15:43 UTC 2020
sc/sdi/scalc.sdi | 2 +-
sc/source/ui/view/tabvwshf.cxx | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit e2af5a1a0aa05884dc93775f0a5864dbb9a94f81
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Tue Nov 24 13:14:50 2020 +0530
Commit: Pranam Lashkari <lpranam at collabora.com>
CommitDate: Thu Nov 26 15:14:46 2020 +0100
added new parameter in uno:Move
new parameter UseCurrentDocument forces to use the correct document
for moving/copying sheet tabs around
When this parameter is true first parameter DocName will be ignored
Change-Id: I207966af5e11fdaaa0bdd91c07e1923399680395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106478
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 7e21086c2903d19ec0981d09d63d8f7c4e078242)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106515
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari <lpranam at collabora.com>
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 077fa4adf9d9..aff341b676e2 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3412,7 +3412,7 @@ SfxVoidItem Mirror SID_OBJECT_MIRROR
SfxVoidItem Move FID_TAB_MOVE
-(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2)
+(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 98ce2db58fa7..40f78b7fc85b 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -464,7 +464,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
bool bDoIt = false;
sal_uInt16 nDoc = 0;
SCTAB nTab = rViewData.GetTabNo();
- bool bCpy = false;
+ bool bCpy = false, bUseCurrentDocument = false;
OUString aDocName;
OUString aTabName;
@@ -473,8 +473,15 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SCTAB nTableCount = rDoc.GetTableCount();
const SfxPoolItem* pItem;
- if( pReqArgs->HasItem( FID_TAB_MOVE, &pItem ) )
+ // if UseCurrentDocument(FN_PARAM_3) is true ignore the document name provided and use current document
+ if( pReqArgs->HasItem( FN_PARAM_3, &pItem ) )
+ bUseCurrentDocument = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+
+ if (bUseCurrentDocument)
+ aDocName = GetViewData().GetDocShell()->GetTitle();
+ else if(pReqArgs->HasItem( FID_TAB_MOVE, &pItem ))
aDocName = static_cast<const SfxStringItem*>(pItem)->GetValue();
+
if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
{
// table is 1-based
More information about the Libreoffice-commits
mailing list