[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/svx svx/sdi sw/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 3 12:39:24 UTC 2020
include/svx/svxids.hrc | 1 +
svx/sdi/svx.sdi | 4 ++--
sw/source/uibase/uiview/viewtab.cxx | 16 +++++++++++-----
3 files changed, 14 insertions(+), 7 deletions(-)
New commits:
commit 9d7b3fd5eb5c1ad9b1f622239a916bb1114896d7
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Jun 1 16:03:34 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Jun 3 14:38:49 2020 +0200
lok: add "Remove" param to .uno:ChangeTabStop
update for cp-6.2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95330
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
(cherry picked from commit 8d0b7e5b2f6773f4b3feb75f1ac73ea1a26609f7)
Change-Id: Ic6b71c0bb6177eb10f5be4197d77c5db5f5884a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95342
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 7d9d69e08dfe..eba3066ecf74 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -532,6 +532,7 @@ class SfxStringItem;
#define SID_TABSTOP_ADD_OR_CHANGE ( SID_SVX_START + 581 )
#define SID_TABSTOP_ATTR_INDEX ( SID_SVX_START + 582 )
#define SID_TABSTOP_ATTR_POSITION ( SID_SVX_START + 583 )
+#define SID_TABSTOP_ATTR_REMOVE ( SID_SVX_START + 584 )
// CAUTION! Range <587 .. 587> used by EditEngine (!)
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 7c4a5e8cadc0..cf48781fc77e 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7177,7 +7177,8 @@ SfxVoidItem RulerChangeState SID_RULER_CHANGE_STATE
SfxVoidItem ChangeTabStop SID_TABSTOP_ADD_OR_CHANGE
(SfxInt32Item Index SID_TABSTOP_ATTR_INDEX,
- SfxInt32Item Position SID_TABSTOP_ATTR_POSITION)
+ SfxInt32Item Position SID_TABSTOP_ATTR_POSITION,
+ SfxBoolItem Remove SID_TABSTOP_ATTR_REMOVE)
[
AutoUpdate = FALSE,
FastCall = TRUE,
@@ -7187,7 +7188,6 @@ SfxVoidItem ChangeTabStop SID_TABSTOP_ADD_OR_CHANGE
RecordAbsolute = FALSE,
RecordPerSet;
-
AccelConfig = FALSE,
MenuConfig = FALSE,
ToolBoxConfig = FALSE,
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 7b51c2331408..6a70fb9e6397 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -658,8 +658,12 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
const auto aIndexItem = static_cast<const SfxInt32Item&>(pReqArgs->Get(SID_TABSTOP_ATTR_INDEX));
const auto aPositionItem = static_cast<const SfxInt32Item&>(pReqArgs->Get(SID_TABSTOP_ATTR_POSITION));
+ const auto aRemoveItem = static_cast<const SfxBoolItem&>(pReqArgs->Get(SID_TABSTOP_ATTR_REMOVE));
const sal_Int32 nIndex = aIndexItem.GetValue();
const sal_Int32 nPosition = aPositionItem.GetValue();
+ const bool bRemove = aRemoveItem.GetValue();
+
+
SfxItemSet aItemSet(GetPool(), svl::Items<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP>{});
rSh.GetCurAttr(aItemSet);
@@ -683,12 +687,14 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
SvxTabStop aTabStop = aTabStopItem.At(nIndex);
aTabStopItem.Remove(nIndex);
- aTabStop.GetTabPos() = nPosition;
- aTabStopItem.Insert(aTabStop);
-
- SvxTabStop aSwTabStop(0, SvxTabAdjust::Default);
- aTabStopItem.Insert(aSwTabStop);
+ if (!bRemove)
+ {
+ aTabStop.GetTabPos() = nPosition;
+ aTabStopItem.Insert(aTabStop);
+ SvxTabStop aSwTabStop(0, SvxTabAdjust::Default);
+ aTabStopItem.Insert(aSwTabStop);
+ }
const SvxTabStopItem& rDefaultTabs = rSh.GetDefault(RES_PARATR_TABSTOP);
MakeDefTabs(GetTabDist(rDefaultTabs), aTabStopItem);
}
More information about the Libreoffice-commits
mailing list