[Libreoffice-commits] core.git: include/svx sd/sdi sd/source svx/sdi

2021-03-01 Thread mert (via logerrit)
 include/svx/svxids.hrc |5 -
 sd/sdi/_drvwsh.sdi |5 -
 sd/source/ui/view/drviews2.cxx |   17 +
 svx/sdi/svx.sdi|   17 +
 4 files changed, 42 insertions(+), 2 deletions(-)

New commits:
commit 66f18f543316ee718d5ab454b51fae9f301673f5
Author: mert 
AuthorDate: Thu Jan 28 07:19:07 2021 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 1 13:05:52 2021 +0100

Added .uno:MoveShapeHandle uno command

This is now only available for Draw/Presentation
It will allow interactive dragging/resizing operations
via the command. Later it will be implemented for other
modules too.

Change-Id: Iaed7d25cf4035591083e779c13a6f0227a3b564f
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110041
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111508
Tested-by: Jenkins

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 844b23db5cf3..7b2b802bf8f1 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1027,8 +1027,11 @@ class SdrAngleItem;
 #define SID_ULINE_VAL_DOUBLE(SID_SVX_START + 1197) 
/* double underline */
 #define SID_ULINE_VAL_DOTTED(SID_SVX_START + 1198) 
/* dotted underline */
 
+#define SID_MOVE_SHAPE_HANDLE   ( SID_SVX_START + 1199 
)
+
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1198 
+ 1 )
+#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1199 
+ 1 )
+
 
 // Overflow check for slot IDs
 #if SID_SVX_FIRSTFREE > SID_SVX_END
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 683e52888635..90e37f7f52fe 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2918,5 +2918,8 @@ interface DrawView
 ExecMethod = FuTemporary;
 StateMethod = GetAttrState;
 ]
-
+SID_MOVE_SHAPE_HANDLE
+[
+ExecMethod = FuTemporary ;
+]
 }
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d60ebb701298..85feaa826954 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -88,6 +88,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -1489,7 +1490,23 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 }
 }
 break;
+case SID_MOVE_SHAPE_HANDLE:
+{
+const SfxItemSet *pArgs = rReq.GetArgs ();
+if (pArgs && pArgs->Count () == 3)
+{
+const SfxUInt32Item* handleNumItem = 
rReq.GetArg(FN_PARAM_1);
+const SfxUInt32Item* newPosXTwips = 
rReq.GetArg(FN_PARAM_2);
+const SfxUInt32Item* newPosYTwips = 
rReq.GetArg(FN_PARAM_3);
 
+const sal_uLong handleNum = handleNumItem->GetValue();
+const sal_uLong newPosX = 
convertTwipToMm100(newPosXTwips->GetValue());
+const sal_uLong newPosY = 
convertTwipToMm100(newPosYTwips->GetValue());
+mpDrawView->MoveShapeHandle(handleNum, Point(newPosX, 
newPosY));
+Cancel();
+}
+break;
+}
 case SID_CHAR_DLG_EFFECT:
 case SID_CHAR_DLG:  // BASIC
 {
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index f66c0a193c13..028e9bdee170 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -12513,3 +12513,20 @@ SdrMetricItem SoftEdgeRadius SID_ATTR_SOFTEDGE_RADIUS
 ToolBoxConfig = FALSE,
 GroupId = SfxGroupId::Document;
 ]
+
+SfxVoidItem MoveShapeHandle SID_MOVE_SHAPE_HANDLE
+(SfxUInt32Item HandleNum FN_PARAM_1 SfxUInt32Item NewPosX FN_PARAM_2 
SfxUInt32Item NewPosY FN_PARAM_3)
+[
+AutoUpdate = FALSE,
+FastCall = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Format;
+]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx sd/sdi sd/source svx/sdi

2016-05-25 Thread Jan Holesovsky
 include/svx/svxids.hrc|6 ++
 sd/sdi/tables.sdi |   20 
 sd/source/ui/table/tableobjectbar.cxx |   44 ++-
 svx/sdi/svx.sdi   |   78 ++
 4 files changed, 137 insertions(+), 11 deletions(-)

New commits:
commit 99b8598495ba76e8fd32af2ace17e0b29b3beffd
Author: Jan Holesovsky 
Date:   Wed May 25 13:05:42 2016 +0200

sd bccu#1840: .uno: commands for inserting rows / columns in Impress.

Change-Id: Ic07722c3e1f75d909ec8f123919a1898dfde05b0

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 39ef138..340fc61 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -529,6 +529,12 @@
 
 #define SID_RULER_PROTECT   ( SID_SVX_START + 415 )
 #define SID_COLOR_CONTROL   ( SID_SVX_START + 417 )
+
+#define SID_TABLE_INSERT_COL_BEFORE ( SID_SVX_START + 418 )
+#define SID_TABLE_INSERT_COL_AFTER  ( SID_SVX_START + 419 )
+#define SID_TABLE_INSERT_ROW_BEFORE ( SID_SVX_START + 420 )
+#define SID_TABLE_INSERT_ROW_AFTER  ( SID_SVX_START + 421 )
+
 #define SID_ATTR_3D_INTERN  ( SID_SVX_START + 422 )
 #define SID_PSZ_FUNCTION( SID_SVX_START + 423 )
 
diff --git a/sd/sdi/tables.sdi b/sd/sdi/tables.sdi
index 0d3eb62..4e234a7 100644
--- a/sd/sdi/tables.sdi
+++ b/sd/sdi/tables.sdi
@@ -83,11 +83,31 @@ shell TableObjectBar
 ExecMethod = Execute;
 StateMethod = GetState;
 ]
+SID_TABLE_INSERT_ROW_BEFORE
+[
+ExecMethod = Execute;
+StateMethod = GetState;
+]
+SID_TABLE_INSERT_ROW_AFTER
+[
+ExecMethod = Execute;
+StateMethod = GetState;
+]
 SID_TABLE_INSERT_COL_DLG
 [
 ExecMethod = Execute;
 StateMethod = GetState;
 ]
+SID_TABLE_INSERT_COL_BEFORE
+[
+ExecMethod = Execute;
+StateMethod = GetState;
+]
+SID_TABLE_INSERT_COL_AFTER
+[
+ExecMethod = Execute;
+StateMethod = GetState;
+]
 SID_TABLE_DELETE_ROW
 [
 ExecMethod = Execute;
diff --git a/sd/source/ui/table/tableobjectbar.cxx 
b/sd/source/ui/table/tableobjectbar.cxx
index c31ba01..ded39a1 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -134,23 +134,45 @@ void TableObjectBar::Execute( SfxRequest& rReq )
 switch( nSlotId )
 {
 case SID_TABLE_INSERT_ROW_DLG:
+case SID_TABLE_INSERT_ROW_BEFORE:
+case SID_TABLE_INSERT_ROW_AFTER:
 case SID_TABLE_INSERT_COL_DLG:
+case SID_TABLE_INSERT_COL_BEFORE:
+case SID_TABLE_INSERT_COL_AFTER:
 {
-SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-std::unique_ptr pDlg( pFact ? 
pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), 
nSlotId == SID_TABLE_INSERT_COL_DLG, 
SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr);
-
-if( pDlg.get() && (pDlg->Execute() == 1) )
+std::unique_ptr pDlg;
+if (nSlotId == SID_TABLE_INSERT_ROW_DLG || nSlotId == 
SID_TABLE_INSERT_COL_DLG)
 {
-if( nSlotId == SID_TABLE_INSERT_ROW_DLG )
-nSlotId = SID_TABLE_INSERT_ROW;
-else
-nSlotId = SID_TABLE_INSERT_COL;
+SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
+pDlg.reset(pFact ? 
pFact->CreateSvxInsRowColDlg(mpView->GetViewShell()->GetParentWindow(), nSlotId 
== SID_TABLE_INSERT_COL_DLG, 
SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr);
+
+if (!pDlg.get() || (pDlg->Execute() != 1))
+break;
+}
 
-rReq.AppendItem( SfxInt16Item( (sal_uInt16)nSlotId, 
(sal_uInt16)pDlg->getInsertCount() ) );
-rReq.AppendItem( SfxBoolItem( 
SID_TABLE_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() ) );
+sal_uInt16 nCount = 1;
+bool bInsertAfter = (nSlotId == SID_TABLE_INSERT_ROW_AFTER) || 
(nSlotId == SID_TABLE_INSERT_COL_AFTER);
 
- rReq.SetSlot( (sal_uInt16)nSlotId );
+if (nSlotId == SID_TABLE_INSERT_ROW_DLG)
+{
+nCount = pDlg->getInsertCount();
+bInsertAfter = !pDlg->isInsertBefore();
 }
+else if (nSlotId == SID_TABLE_INSERT_COL_DLG)
+{
+nCount = pDlg->getInsertCount();
+bInsertAfter = !pDlg->isInsertBefore();
+}
+
+if (nSlotId == SID_TABLE_INSERT_ROW_DLG ||