[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - include/svx svx/sdi sw/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 1 14:04:53 UTC 2020
include/svx/svxids.hrc | 7 ++++---
svx/sdi/svx.sdi | 4 ++--
sw/source/uibase/uiview/viewtab.cxx | 16 +++++++++++-----
3 files changed, 17 insertions(+), 10 deletions(-)
New commits:
commit a1bb7410615254af19ba8a5e2e34ae289d117584
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Jun 1 16:03:34 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Mon Jun 1 16:03:34 2020 +0200
lok: add "Remove" param to .uno:ChangeTabStop
Change-Id: Ic6b71c0bb6177eb10f5be4197d77c5db5f5884a0
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 5b7c1f0a9b6b..8d0c608b6751 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -537,12 +537,13 @@ class SvxSetItem;
#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_PARAGRAPH_FIRST_LINE_INDENT ( SID_SVX_START + 584 )
-#define SID_PARAGRAPH_LEFT_INDENT ( SID_SVX_START + 585 )
-#define SID_PARAGRAPH_RIGHT_INDENT ( SID_SVX_START + 586 )
+#define SID_TABSTOP_ATTR_REMOVE ( SID_SVX_START + 584 )
// CAUTION! Range <587 .. 587> used by EditEngine (!)
+#define SID_PARAGRAPH_FIRST_LINE_INDENT ( SID_SVX_START + 588 )
+#define SID_PARAGRAPH_LEFT_INDENT ( SID_SVX_START + 589 )
+#define SID_PARAGRAPH_RIGHT_INDENT ( SID_SVX_START + 590 )
// CAUTION! Range <591 .. 591> used by EditEngine (!)
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index c36e1771afd7..aedcfda602f4 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7211,7 +7211,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,
@@ -7221,7 +7222,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 0c2995e0b56d..b7f6e02dcc09 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -655,8 +655,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);
@@ -680,12 +684,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